ProcessSample
UML sequence diagram
Who talks to whom, in what order, for one scenario. Time runs down the page; each arrow is one message between participants.
Try this
- 01Step through the messages one at a time and watch the activation bars grow and close as calls return.
- 02Find the OrderPaid event: the order service does not wait for the email, so the customer is not kept waiting either.
- 03Count how long the web app stays active: it is blocked for the whole payment round trip.
Notation
- Participant
- A person, service or database taking part, drawn at the top.
- Lifeline (dashed)
- The participant’s existence over time.
- Activation bar
- The period when a participant is busy handling a call.
- Synchronous message (filled head)
- The caller waits until it gets an answer.
- Asynchronous message (open head)
- Fire and forget: the caller does not wait.
- Return (dashed)
- The reply to an earlier synchronous call.
Use it when
- Designing or debugging an API call chain
- Explaining one scenario across several services
- Spotting chatty or blocking interactions
Avoid it when
- Showing every possible path (it describes one scenario at a time)
- Showing structure rather than behaviour
More in Process
BPMN process diagram
Business Process Model and Notation: who does what, in which order, with decisions and parallel work, laid out in swimlanes.
Data flow diagram
Shows how data moves: from external entities, through processes that transform it, into and out of data stores. No timing, no decisions, just data.
State machine diagram
The life of one object: the states it can be in, the events that move it between them, and the conditions that must hold. Anything not drawn is not allowed.