Você está na página 1de 10

UML Design Example for Object Oriented Systems Analysis and Design

Events Table
Event Trigger Source Use Case Response Destination
Register Customer New Customer Front Office Clerk Create Customer Customer Name Front Office Clerk
Customer Address
Customer Tel
Confirmation
Customer inquires about Customer inquiry Front Office Clerk List Products Item Description Front Office Clerk
products Item Price
Customer places an Order New Order Request Front Office Clerk Create Order Order ID Back Office Clerk
Order Date
Customer Name
Item Quantity
Item Description
Order cancelled Customer cancels Order Front Office Clerk Update Order Order ID Back Office Clerk
Order Date
Customer Name
Item Quantity
Item Description
Status
Order cancelled Item stock level does not Back Office Clerk Update Order Order ID Front Office Clerk
meet the request Order Date
Customer Name
Item Quantity
Item Description
Status
Order cancelled Customer credit card fails Front Office Clerk Update Order Order ID Back Office Clerk
checks Order Date
Customer Name
Item Quantity
Item Description
Status
Order updated Customer updates Order Front Office Clerk Update Order Order ID Back Office Clerk
Order Date
Customer Name
Item Quantity
Item Description
Status
Service Customer's Order Completed Order Request Back Office Clerk Fulill Order Order ID Back Office Clerk
Order Date Front Office Clerk
Customer Name
Item Quantity
Item Description
Status
Invoice Customer Completed Order Front Office Clerk Generate Invoice Invoice ID Front Office Clerk
Order ID
Invoice Date
Customer Name
Invoice Total
Payment Type
Use Cases
Formal Specification

Use Case Name Create Order


Scenario Customer places an Order
Trigger New Order request
Brief Description An order from the customer triggers this use case. The front office clerk fills in
the order request form with the customer's details, the items the customer wishes
to purchase, and the quantity of each.
Actors Front Office Clerk, Back Office Clerk
Related Use Cases Check Order, Update Order, Fulfill Order
Stakeholders Front Office Clerk, Back Office Clerk, Customer
Preconditions Customer must exist in database.
Postconditions Order created.
Flow of Action Actor System
1. Front Office Clerk receives order
from customer

2. Front Office Clerk opens a new 2.1. System creates Order


Order. 2.2. System displays Order form

3. Front Office Clerk fills in Order


details: Customer, Item Details

4. Front Office Clerk submits Order 4.1. System Confirms


4.2. System alerts Back Office Clerk
Exception 3.1. Customer does not exist in system.
3.2. No Items placed in Order.
3.3. Item quantity is zero or null.
Use Case Name Update Order
Scenario Order cancelled on Customer's request
Trigger Customer cancels Order
Brief Description Customer changes his mind about the order, and informs the Front Office Clerk.
The Front Office Clerk marks the Order as cancelled. The system informs the
Back Office Clerk.
Actors Front Office Clerk, Back Office Clerk
Related Use Cases Create Order, Check Order, Fulfill Order
Stakeholders Front Office Clerk, Back Office Clerk, Customer
Preconditions Order must exist.
Postconditions Order marked as cancelled.
Flow of Action Actor System
1. Customer asks Front Office Clerk to
cancel Order.

2. Front Office Clerk calls up Order. 2.1. System displays Order.

3. Front Office Clerk marks Order as 3.1. System cancels Order.


cancelled. 3.2. System informs Back Office Clerk.
Exception 2.1. Order does not exist in system.
Use Case Name Update Order
Scenario Order cancelled because Item not available
Trigger Item not available.
Brief Description Item in the Order is not available, so the Back Office Clerk marks the Order as
cancelled. The system informs the Front Office Clerk, who then informs the
Customer.
Actors Back Office Clerk, Front Office Clerk
Related Use Cases Create Order, Check Order, Fulfill Order
Stakeholders Front Office Clerk, Back Office Clerk, Customer
Preconditions Order must exist.
Item stock level cannot meet the request.
Postconditions Order marked as cancelled.
Flow of Action Actor System
1. Back Office Clerk brings up the 1.1. System displays the Order.
Order. 1.2. System displays the stock level of
the Items.
1.3. System flags Items which do not
meet the stock level.

2. Back Office Clerk marks the Order as 2.1. System marks the Order as
cancelled. cancelled.
2.2. System alerts Front Office Clerk.
Exception 1.1 Order does not exist.
1.2. Item stock level is sufficient to meet the request (see Fulfill Request use case)
Use Case Name Update Order
Scenario Order cancelled because Customer credit card fails checks.
Trigger Customer credit card fails checks.
Brief Description Order is cancelled because the Customer's credit card fails checks: it is not in the
customer's name, its validity is less than two weeks from the current date, or the
credit level exceeds the amount of the Order.
Actors Front Office Clerk, Back Office Clerk
Related Use Cases Create Order, Check Order
Stakeholders Front Office Clerk, Back Office Clerk
Preconditions Order must exist.
Postconditions Order marked as cancelled.
Flow of Action Actor System
1. Front Office Clerk checks the credit
card.
1.1 Credit card is not in the name of
customer
1.2 Credit card is less than two weeks
from validity date
1.3 Credit card limit exceeds the
amount of the Order

2. Front Office Clerk calls up Order. 2.1. System displays Order.

3. Front Office Clerk marks Order as 3.1. System cancels Order.


cancelled. 3.2. System informs Back Office Clerk.
Exception 1.1 Order does not exist.
1.2. Item stock level is sufficient to meet the request (see Fulfill Request use case)
Use Case Name Update Order
Event Customer changes his mind about some parts of the Order.
Trigger Customer updates Order details.
Brief Description The Customer decides to change some part of the Order, either to add items,
delete items, or change quantities. The Front Office Clerk brings up the Order and
updates it accordingly. This only happens if the Order has not yet been fulfilled.
Actors Front Office Clerk, Back Office Clerk
Related Use Cases Create Order, Check Order, Fulfill Order
Stakeholders Front Office Clerk, Back Office Clerk, Customer
Preconditions Order must exist.
Postconditions Order details updated.
Flow of Action Actor System
1. Customer asks Front Office Clerk to
change Order.

2. Front Office Clerk calls up Order. 2.1. System displays Order.

3. Front Office Clerk modifies Order


details.

4. Front Office Clerk submits modified 4.1. System Confirms


Order. 4.2. System alerts Back Office Clerk
Exception 2.1. Order does not exist in the system.
Use Case Name Fulfill Order
Scenario The Back Office Clerk fulfills the Order
Trigger Completed Order Request
Brief Description The Back Office Clerk is able to fill all the details of the Order. The Back Office
Clerk then marks the Order as completed.
Actors Back Office Clerk, Front Office Clerk
Related Use Cases Create Order, Check Order, Update Order, Generate Invoice
Stakeholders Front Office Clerk, Back Office Clerk, Customer
Preconditions Order must exist.
Item stock levels are able to meet the Order.
Postconditions Order marked as completed.
Flow of Action Actor System
1. Back Office Clerk brings up the 1.1. System displays the Order.
Order. 1.2. System displays the stock level of
the Items.

2. Back Office Clerk assembles the


Order.

3. Back Office Clerk marks the Order as 3.1. System marks the Order as
completed. serviced.
3.2. System substracts the quantity of
fulfilled items from the Item quantity.
3.2. System alerts Front Office Clerk.
Exception 1.1. Order does not exist.
1.3. Item stock levels do not meet the Order requirements (see Update
Order:Order cancelled because Item not available)
Use Case Name Generate Invoice
Scenario The Order has been fulfilled, now the Customer must pay.
Trigger Completed Order
Brief Description The Order has been fulfilled, and now the Customer must pay. Customer can pay
either by cash or by check.
Actors Front Office Clerk
Related Use Cases Create Order, Check Order, Update Order, Fulfill Order
Stakeholders Front Office Clerk, Customer
Preconditions Order must be fulfilled.
Postconditions Invoice generated.
Flow of Action Actor System
1. Front Office Clerk brings up the 1.1. System displays the Order.
Order. 1.2. System displays the Order as
fulfilled/serviced.

2. Front Office Clerk opens a new 2.1. System displays Invoice.


Invoice.

3. Front Office Clerk enters payment


details: cash or check.

4. Front Office Clerk submits Invoice. 4.1. System Confirms


4.2. System prints out Invoice.
Exception 1.1. Order is not fulfilled/serviced.
Class Diagram