COMP433 · Chapter 4 · activity notations

Activity diagrams: parallel work and choices

The booking flow used an initial node, actions, decisions, a loop and final nodes. Two more notations complete the set: the fork and join for parallel work, and the merge that closes a decision.

Confirm orderPack itemsCharge cardDispatch order

Fork and join (parallel work)

Fork and join model concurrency. A fork (the bar) starts several flows at once; a join (the matching bar) waits for all of them to finish before the flow continues. Use them when steps genuinely happen in parallel and none of the later work may start until every branch is done.

Check stockin stock?[yes]Reserve item[no]BackorderNotify customer

Decision and merge (choosing a path)

A decision chooses one of several guarded branches; the matching merge brings them back to a single path. Use them for alternatives, where exactly one branch runs. This is the counterpart to fork and join: a decision is a choice, a fork is concurrency, so a merge re-joins choices while a join waits for parallel flows.