Activity Diagram.

Example of using Activity Diagram for the Receive Order Use Case
by Yelena Gelfand. Instructor Jeff Zhuk.

------->
Enter
Order
|
\/



|
\/
|
\/
*[for each orderline]
Cancel
Order
[failed]
<-------
Verify
Payment
Check
Item
[out of stock]
----------->
Hold
Order
|
|
|
\/
[in stock]
[succeeded]|
|
Assign
to Order
|
\/
|
\/



[all items
assigned
and
payments
verified]
|
|
|
|
\/
Dispatch
Order


Legend
Activity[...] Guard
------>Trigger
Sychronization bar
Figure 6-4 Activity Diagram for the Receive Order Use Case

There are other cases in which an activity may not have a next activity, because the following activities may not have a sequence so can be accomplished in any order. These activities could be happening in parallel. In this case, you will need to use a synchronization bar (a heavy horizontal bar) to connect the activities. In Figure 6-4, after the Assign to Order activity, the next activity can be Dispatch Order and/or Reorder Item because they are independent activities. Synchronization bars are also used to bring together parallel processes.

You can also create parallel activities by having a multiple trigger; indicate on the diagram the basis of the trigger. If you use a multiple trigger, then you must remember to synchronize the parallel activities with the synchronization bar.

Follow these steps to create an activity diagram:

  1. Select a use case.
  2. Add activities to the diagram.
  3. Add triggers.
  4. Add guards, if necessary.
  5. Add synnchronization bars, if necessary.

Back