Contents
ToggleSequence diagram
the sequence diagram is the graphic representation of the interactions between the actors and the system in chronological order in the Unified Modeling Language formulation:
- Description of the order of interactions between the objects that make up the system.
- Representation focusing on the sequence of interactions from a temporal point of view.
Sequence diagrams are interaction diagrams like collaboration diagrams. They are suitable for modeling the dynamic aspects of real-time systems and complex scenarios involving few objects.
An interaction results in a message being sent between objects. The sequence diagram makes it possible to show the objects intervening in the interaction; the description of the interaction and the interactions between stakeholders.
Object lifeline
The object is composed of its role and/or the name of the instantiated class. The name is underlined to indicate that it is an instance. An object is always accompanied by its lifeline. It is represented by a vertical line below the object. It represents the period of time during which the instantiated object exists.
To represent an object creation, a message points to the symbol of the object. The destruction of the object is represented by the end of its life line.

Messages and activities
Objects communicate by exchanging messages represented as arrows. The vertical dimension represents the flow of time. A message placed below another will therefore be sent after the first. Messages are often labeled with the name of the operation or signal invoked. The message can represent an activation of the objects, a label, be a sequential sending or a parallel sending of n instances of the same message, and can have arguments.
A results return message is shown in dotted lines. the sending of recursive messages is represented by a doubling of the activation band. An object can send itself a message.
Messages are mainly sent during an activity, and cause other activities. An activity period corresponds to the time during which an object performs a direct or indirect action. It is represented by a vertical stripe along the object's lifeline.
Example
Let's take an example on a condition:
Or a loop: