A sequence diagram describes an interaction among a set of objects participated in a collaboration (or scenario), arranged in a chronological order; it shows the objects participating in the interaction by their "lifelines" and the messages that they send to each other.
UML Sequence diagrams are interaction diagrams that detail how operations are carried out. As sequence diagrams can be used to capture the interaction between objects in the context of a collaboration, one of the primary uses of sequence diagrams is in the transition from requirements expressed as use cases to the next and more formal level of refinement. Use cases are often refined into one or more sequence diagrams.
Sequence diagrams are time focus and they show the order of the interaction visually by using the vertical axis of the diagram to represent time what messages are sent and when.
Sequence Diagrams captures interaction in different level of granularity:
Finding an online Sequence Diagram tool? Just click the Draw button below to create your Sequence Diagram online. Visual Paradigm Online is free* and intuitive. You can also go through this Sequence Diagram tutorial to learn about Sequence Diagram before you get started.
Draw NowA lifeline represents an individual participant in the Interaction.
An Actor a type of role played by an entity that interacts with the subject (e.g., by exchanging signals and data). An actor can also be an external to the subject (i.e., in the sense that an instance of an actor is not a part of the instance of its corresponding subject). They typically represent roles played by human users, external hardware, or other subjects.
Note That:
An activation is represented by a thin rectangle on a lifeline) represents the period during which an element is performing an operation. The top and the bottom of the of the rectangle are aligned with the initiation and the completion time respectively
A call message defines a particular communication between lifelines of an interaction, which represents an invocation of operation of target lifeline.
A return message defines a particular communication between lifelines of an interaction, which represents the pass of information back to the caller of a corresponded former message.
A self message defines a particular communication between lifelines of an interaction, which represents the invocation of message of the same lifeline.
A recursive message defines a particular communication between lifelines of an interaction, which represents the invocation of message of the same lifeline. It's target points to an activation on top of the activation where the message was invoked from.
A create message defines a particular communication between lifelines of an interaction, which represents the instantiation of (target) lifeline.
A destroy message defines a particular communication between lifelines of an interaction, which represents the request of destroying the lifecycle of target lifeline.
A duration message defines a particular communication between lifelines of an interaction, which shows the distance between two time instants for a message invocation.
A note (comment) gives the ability to attach various remarks to elements. A comment carries no semantic force, but may contain information that is useful to a modeler.
You can also:
The sequence diagram example below shows the interactions between a user and a ticket booking system in booking a seat. It consists of mainly four parts: The actor, which is the user, the boundary object ‘interface', the controller object ‘mainController' and two entity objects routes and route.
The sequence diagram example below shows a patient admission process. It shows the use of timing and duration constraint.
The sequence diagram example shows how recursive message can be used in interaction modeling.
You've learned what a Sequence Diagram is and how to draw a Sequence Diagram step-by-step. It's time to get your hands dirty by drawing a Sequence Diagram of your own. Draw UML diagrams free* with Visual Paradigm Online. It's easy-to-use, intuitive.
Draw Now* The Free edition supports free usage of Visual Paradigm Online for non-commercial use only.