Sequence Diagram
Updated 2026-08-15
Summary
A UML interaction diagram that shows objects as lifelines and messages as ordered arrows, making the time-sequenced exchange between system components explicit and inspectable.
Definition
A sequence diagram is one of the interaction diagrams in the Unified Modeling Language. Participants are drawn as lifelines, activation bars mark when each object is executing, and arrows distinguish synchronous calls, asynchronous messages and returns, arranged top to bottom in time order. The core proposition is that the dynamic behaviour of a system becomes inspectable when every message is bound to a sender, a receiver and a position in time, which exposes ordering assumptions and missing error paths. The key qualification is scope: one diagram models one scenario well and becomes unreadable when too many messages are crowded onto a single canvas.
Introduction
How to use
- Bind Messages To Parties: draw every interaction as an arrow between two named lifelines so ownership is explicit. - Order By Time: stack messages top to bottom and read the diagram as a causal chain. - Frame The Variants: use loop, alt and opt frames to show error and alternative paths, not only the happy path.
Mechanism
Static structure diagrams show what components exist but not how they cooperate at runtime, so ordering bugs and hidden dependencies stay invisible. Placing messages on a shared time axis forces each interaction to have a definite position, which reveals races, missing acknowledgements and assumptions about synchronous behaviour. Because the diagram is drawn before implementation, design gaps surface while change is still cheap.
Practice
In progress 0/1Practice this model in one real situation:
Cases
- A login flow reads interface to controller to authentication service to database, with each layer returning a result.
- An order placement scenario shows inventory, payment and logistics services being invoked in sequence with compensating actions.
- A payment integration review reveals a missing timeout path by tracing the message arrows.
Common pitfalls
- Using it as a flowchart and ignoring object boundaries, which hides who actually owns each action.
- Including so much message detail that the diagram becomes unreadable and stops being a communication tool.
- Drawing only the success path and omitting exception, retry and timeout branches.
Sources
Source support: Explicit
References currently contain only Wikipedia links; primary sources still need review.
- en.wikipedia.orghttps://en.wikipedia.org/wiki/Sequence_diagramverified
account_treeGenealogyexpand_more
PRIVATE NOTES · Only visible to you
SAVED Q&A
ENTRY Q&A · Private saving available
Ask with a clear boundary
thinkingmodels answers from published entry context only.
Your question is sent to thinkingmodels. The answer uses public entry context only.
RELATED MODELS