Skip to main content

Essential components of an activity diagram

Short answer

Essential components of an activity diagram: initial node, actions (rounded rectangles), control flow arrows, decision/merge diamonds with guards, fork/join bars for parallelism, swimlanes for responsibility, object flows, and final node. For a library book issue, actions like scanning card, validating member, checking availability, issuing book, and parallel update/print use decisions and fork-join.

Prepare the list of essential components to be identified in building an activity diagram. Illustrate with an example of your own choice.

An activity diagram models a workflow or the logic of an operation as a flow of activities. The essential components to identify are:

ComponentNotationMeaning
Initial nodefilled circleStart of the flow
Activity/actionrounded rectangleA step of work
Transition (control flow)arrowOrder from one action to the next
Decision / mergediamond with guards [ ]Branch on a condition; bring alternative flows back together
Fork / jointhick barStart / synchronise parallel flows
Final nodefilled circle inside a ring (bull's eye)End of the activity
Swimlane (partition)vertical lanesWho is responsible
Object flow / object noderectangleData passed between actions
Signal send/receivepentagon shapesEvents sent or awaited
Notefolded rectangleComment

Steps to build one: (1) identify the activities from the use case or process, (2) identify their order, (3) find decisions and their guards, (4) find the parallel work, (5) assign swimlanes if responsibility matters, (6) add the start and end.

Example: processing a library book issue

            (start)
               |
        [ Scan member card ]
               |
          < member valid? >
        [no] /      \ [yes]
  [Reject request]  [ Scan book ]
        |                |
        |          < book available? >
        |        [no] /      \ [yes]
        |   [Offer reservation] [Issue book]
        |          |               |
        |          |         ======fork======
        |          |          |            |
        |          |   [Update record] [Print slip]
        |          |          |            |
        |          |         ======join======
        |          |               |
        +----------+------(merge)---+
                         |
                      (end)

This example shows the initial node, actions, two decisions with guards, a merge, a fork-join for parallel work, and the final node.

✓ Answer checked by Claude Opus 5.5 (high effort)

All Object Oriented Analysis and Design chapter 2 questions →