UML Sequence Diagram Tutorial

A sequence diagram models communication among objects in sequential order. It shows objects, classes, and actors involved in the scenario and exact order of messages. It consists of vertical lines which belong to lifelines and horizontal lines of messages.

Sequence Diagram in UML

According to UML notation, a sequence diagram is a type of behavior diagram that belongs to the interaction diagrams group.
Sequence Diagram in UML
Sequence Diagram in UML

Sequence Diagram Symbols

Software Ideas Modeler offers tools for following elements of a sequence diagram:

  • Lifeline
  • Actor
  • Boundary
  • Control
  • Entity
  • Execution Occurrence
  • Call Message
  • Reply Message
  • Send Message
  • Create Message
  • Delete Message
  • Self Message
  • Recursive Message
  • Destroy Occurrence
  • Duration Message
  • Lost Message
  • Found Message
  • Gate
  • Interaction Operand
  • Opt Fragment
  • Alt Fragment
  • Loop Fragment
  • Sd Fragment
  • Par Fragment
  • Neg Fragment
  • Interaction Use
  • State Invariant
  • Duration Constraint
  • Coregion
  • Concurrent

Lifeline

A lifeline is an element that represents an individual participant (object, actor, component, or process) in the interaction. It is rendered as a box with a name and vertical line. The line shows a time-ordered sequence of messages (from top to bottom).

UML Lifeline

Actor

An actor represents an external participant. An actor is rendered as a lifeline with a sticky man on the top in sequence diagrams.

UML Actor

Execution Occurrence

An execution occurrence represents a timespan from a lifetime of a participant when an operation is executed.

Synchronous Call Message

A synchronous call sends a message from a source lifeline to a target lifeline while all other calls of the source lifeline are blocked. Messages can be associated with a class operation. Synchronous call message is displayed as a line with a solid arrow pointing from a calling lifeline to a called lifeline.

UML Call Message

Asynchronous Call Message

An asynchronous call sends a message from a source lifeline to a target lifeline. Other calls of the source lifeline are not blocked, the next message is called immediately. Messages can be associated with a class operation. The asynchronous call message is displayed as a line with an open arrow pointing from a calling lifeline to a called lifeline.

UML Assynchronous Message

Reply Message

A reply message sends a result of execution started by call message. Reply message is displayed as a dashed line with an open arrow pointing from a replying lifeline to a calling lifeline.

UML Reply Message

Create Message

A create message instances a new object. A create message is displayed as a dashed line with an open arrow pointing from a creating lifeline to the head of a newly created lifeline.

UML Create Message

Delete Message

A delete message performs disposing of an object. It is displayed as a line with a solid arrow pointing from a lifeline which calls a delete action to a lifeline which will be deleted. The delete messages are labeled with «destroy» stereotype. A deleted lifeline has to be ended with the X symbol (destruction occurrence).

UML Delete Message

Self Message

A self message is a call message that is sent from a lifeline execution occurrence to the same occurrence.

UML Self Message

Recursive Message

A recursive message is a special case of a self-message. It models recursive calls.

UML Recursive Message

Found Message

A found message is a message with a known participant of a receiving event, but with no or unknown sending participant.

UML Found Message

Lost Message

A lost message is a message with a known participant of an sending event, but with no or unknown receiving participant.

UML Lost Message

State Invariant

A state invariant represents a constraint that has to be true in the time of execution. It is displayed as a rounded rectangle.

UML State Invariant

Duration Constraint

UML Duration Constraint

Combined Fragment

A combined fragment combines interaction operands using an interaction operator. Interaction operator of the fragment can be one of these values:

  • alt - abbreviation for alternatives. It defines alternative paths of execution.
  • opt - abbreviation for option. It defines optional parts of execution.
  • par - abbreviation for parallel.It defines parts which can be executed parallely. Operands can be called in any order, but the order of calls inside operands has to be preserved. Operands can be freely interleaved.
  • critical - abbreviation for critical region. It represents atomic calls which cannot be interleaved with another calls.
  • loop - defines iteration in execution.
  • neg - abbreviation for negative. It defines calls for invalid or incorrect states of system.
  • assert - abbreviation for assertion.
  • strict - strict sequencing
  • seq - weak sequencing
  • ignore
  • consider

How to Draw a Sequence Diagram?

You can create a new sequence diagram in multiple ways:

  • Click on a Plus button in the tab switch bar, navigate to UML group and click on the UML Sequence Diagram item
  • Press CTRL+SHIFT+D, choose Sequence Diagram from the UML group, enter the name and click on the OK button.
  • Switch to Project tab in the ribbon and click on the Sequence Diagram item in the Content gallery.
  • Open Project sidebar, right-click on a project (or a folder) node, and in the Add Diagram submenu, choose UML Sequence Diagram.
Create a new UML sequence diagram
Create a new UML sequence diagram

Sequence Diagram Examples

New Comment

Comment