Last updated
Was this helpful?
Last updated
Was this helpful?
A Sequence Diagram in UML represents how objects interact in a particular sequence over time. It is primarily used to illustrate the flow of messages between different components in a system. This diagram is essential for understanding dynamic behavior and how different parts of a system communicate.
Refer to the official documentation for more details -
Actors & Objects
Represented as stick figures (Actors) or rectangles (Objects).
Actors interact with the system (e.g., User, External System).
Lifelines
Dashed vertical lines indicating the object's existence over time.
Shows how long an object is active in the sequence.
Messages
Arrows representing method calls, responses, and interactions.
Types:
Synchronous (-->
) – Caller waits for a response.
Asynchronous (->
) – Caller continues execution without waiting.
Activation Bars
Vertical rectangles on lifelines showing when an object is active/executing.
Indicate processing time for a message.
Return Messages
Dashed arrows (-->>
) representing responses or results sent back.
Loops & Conditions
Used to model iterations or conditional logic (e.g., alt
, loop
).
Destroying Objects
Represented by ‘X’ at the bottom of a lifeline when an object is deleted.
This sequence diagram represents a user performing a fund transfer in a banking system.
Actors (participant
): Represent different entities in the system.
Messages (->
): Show interactions between entities.
Alternative (alt ... else
): Conditional logic for valid/invalid accounts.
Self-calls (->
): Represents internal method calls within the same participant.