0.3.5 UML Activity Diagrams

Activity Diagrams: Flow Through a Process

Picture a coach organizing a training turn: check whether the field is open, choose an indoor or outdoor drill, gather the players, and begin. The useful question is not which objects are currently stored. It is what happens next, what can happen instead, and when the process finishes.

An activity diagram shows flow: actions connected in execution order, with decisions choosing alternative routes and loops returning to earlier checks. A flowchart is a general way to draw a process. UML activity diagrams use a defined modeling notation, including start, action, decision, merge, and final nodes. Their purpose overlaps, but not every informal flowchart symbol belongs in a UML activity diagram.

Start with a Real Soccer Routine

Assume the coach already knows whether the field is open. The following diagram models one drill-planning attempt, not an entire match. Both choices end with gathering the players and beginning the selected drill.

Check field availability, choose exactly one drill location, merge, gather players, and begin the chosen drill.
Choose a training location, then continue together
  • New
  • Changed
  • Removed
Follow One Complete Route

Begin at the filled start circle. Follow the arrow to Field open? If the answer is true, visit only the outdoor action. If false, visit only the indoor action. The routes merge before Gather players; merging alternatives does not require both alternatives to run.

The final node means this modeled activity has ended. It does not mean that soccer training, the computer, or every other activity has ended. Good diagrams make their boundary explicit.

Build a Useful Process View
  1. State the beginning and ending of the task in one sentence.
  2. Write each meaningful action as a short verb phrase.
  3. Connect actions in order and add a diamond only where a route must be selected.
  4. Label outgoing alternatives and follow every route to its intended continuation.
Check One Changed Situation