Sequence Diagram
Example of using Sequence Diagram by Yelena Gelfand. Instructor Jeff Zhuk

Figure6-2 Shows a sequence diagram for the Receive Order use case.
Order
Window
Order

Order
Line
Item

Payment

|initialize()
|--------->
| | | |
| |*[for each orderline]
|initialize()
|-------------------->
| | |
| | |inStock:=chek()
|-------------->
| |
| | |[inStock]
|add
|-------------->
| |
| | | |reorder:=reorder()
|_ _ _ _ _
||| |
|
||| |<--------- |
| |[not inStock]
hold()
|<--------------------
|<-------------- | |
| |----------------------- |----------------- |-----------------> |
verify()
  
Legend
Object [...] Condition
Activation
|
|
* Iteration marker X Deletion
----> Message <---- Return
Figure6-2 Sample Sequence Diagram for Receive Order Use Case

The OrderWindow object sends an initialize message to the Order object, which in turn sends an initialize message to each OrderLine object.

The OrderLine object sends a message to the Item object to check available stock. If the item is in stock, then it ts added.

The Item object sends a message to itself to check the reorder point on the item and if needs to reorder it sends a message to the ReorderItem to be reordered and returns to OrderLine. If the item is not in stock, the OrderLine object sends a message to the order, placing it on hold.

Back