Activity diagram
An activity diagram is UML's flowchart, with two additions that earn their keep: forks and joins for parallel work, and partitions for who does what.
It suits processes with genuine concurrency, which a plain flowchart handles badly.
#When to draw one
Processes with parallel steps that must all complete.
Algorithms and workflows with real branching.
Documentation where the swimlane and the flow both matter.
#What is on the diagram
Element | Meaning |
|---|---|
Start and stop | Filled circle and bullseye |
Action | A rounded box: ":do something;" |
Decision | if/then/else, with guards in brackets |
Fork and join | Parallel paths that all run and all must finish |
Partition | A swimlane, written as a named block |
#A worked example
A release process with parallel checks:
The source, which you can paste into a new diagram and edit:
#A few things that catch people out
A fork must be matched by a join. Parallel paths that never rejoin are a modelling error.
Guards belong in brackets on the branches, so the reader knows which path applies.
Partitions are the swimlanes. Use them when ownership matters, and leave them out when it does not.
#Related
Four types cover most of it.
