Keyboard shortcuts

Press ← or → to navigate between chapters

Press S or / to search in the book

Press ? to show this help

Press Esc to hide this help

Fork and join

A solid bar. A fork splits one flow into concurrent flows, and a join waits for them all.

diagram activity "Fork and join"
start
fork {
  action "Fetch profile"
} and {
  action "Fetch orders"
}
action "Compose page"
stop
Fork and join Fetch profile Fetch orders Compose page

A branch ending in end or stop does not reach the join. When only one branch reaches it, the join is left out. In lanes, a bar spans the lanes of its branches.

Syntax

fork { ... } and { ... } [and { ... }]...

Each branch needs at least one step.

Specification

UML 2.5.1, 15.3.4 (p. 391).

Used in

Build and release pipeline, Deployment with parallel checks.

See also

Activity diagrams (how to write the whole diagram), Elements of activity diagrams, Grammar.