0.3.7 Representing Decision Nodes and Paths in Activity Diagrams

Representing Decision Nodes and Paths in Activity Diagrams

A coach chooses a drill location based on field availability. The diagram must show the alternatives without implying that both happen.

Read the Process Before Drawing

Model this simplified real-world rule. The field availability is already known; checking it does not change it.

If the underlying modeling idea is unfamiliar, use the lesson below while reading this example.

Requirements to translate
If the field is open
    Choose an outdoor drill
Otherwise
    Choose an indoor drill
Gather the players
Rewrite the Meaning in Ordinary Words
Pseudocode for the same behavior
Ask whether the field is open
If true, choose an outdoor drill
If false, choose an indoor drill
Continue from either choice by gathering the players

Use these words to follow one execution before drawing it. Keep the same order and the same alternatives as the source; simplify the wording without adding work that the code does not perform.

Map the Source to Nodes and Arrows
Build the Diagram in Violet
  1. Create an activity diagram. Connect an unlabeled start node to a decision diamond labeled Field open?.
  2. Place two rounded action nodes labeled Choose outdoor drill and Choose indoor drill. Keep them on different routes.
  3. Connect the decision to the outdoor action with an arrow labeled true. Connect it to the indoor action with an arrow labeled false. Put these labels on the arrows, not inside the action boxes.
  4. Place a merge diamond after the two actions and connect both action exits to it. From the merge, connect to Gather players and then the activity final.
  5. Save and trace each answer separately. Both routes should gather players once, without passing through the other drill-choice action.
Compare the Completed Soccer Diagram

Compare this reference with the diagram you built in Violet. Layout may differ; the source meaning, labels, and relevant connections should agree.

A true field check chooses an outdoor drill, a false check an indoor drill; both routes merge before gathering players.
One choice, then one shared continuation
  • New
  • Changed
  • Removed
Trace One Route at a Time

With the field closed, visit only the indoor action and then Gather players. With it open, visit only the outdoor action before gathering.

Verify the Drawing Against the Source
Predict and Check a Small Change