Figure 1: Basic shapes and symbols of UML sequence diagrams
- Example objects of classes are drawn as rectangles arranged
across the top of the diagram
- The name for the object is displayed inside each object rectangle
using the format object-name:class-name.
Either the object-name or the class-name section may be omitted but not
both. Omitting the object name is common. The object-name is only
necessary when two different objects of the the same class participate
in the sequence in different ways. Omitting the class section is not
particularly useful in practice. Strictly speaking, the separating
colon character is required unless the the class name is omitted, but
in practice, when sketching sequence diagrams, it is often also left
out when the object name is omitted.
- Lifelines are drawn as
dashed lines vertically down the page beneath each object.
- Messages representing the calling of operations are drawn as
solid lines with a solid arrowhead from the calling object to the
called object (the object whose type defines the operation being
invoked). The name of the operation is written above the line and may
be followed by a list of parameters for that call.
- The sequence of operation calls progresses from the top of the
page downwards. The messages are also numbered in sequence using a
decimal numbering scheme.
- A thin rectangle drawn on the lifeline indicates the execution
scope of the called operation. All operation calls possible as part of
the execution of an operation are drawn in order from this rectangle.
Officially these rectangles are called execution specifications. When
sketching sequences it is common to leave out the execution
- Calls back to an object or calls to other operations defined for
the object (self-calls or calls to 'this') are drawn as indented
execution specification rectangles.
- Calls that create an instance of an object are drawn as dashed
lines with a stick arrowhead. The object's rectangle is also dropped
down from the top of the diagram to the point where he call is made so
that the dashed line connects to the rectangle instead of its dashed
- Destroying an object is shown by a message line drawn to the
object being destroyed and an X symbol being added to the object's
lifeline immediately afterwards. Take care when using this notation to
ensure that it is clear whether the object is being erased from
persistent storage (database or file system) or simply removed from
- Arbitrary notes are displayed as text within a rectangle with a fold in the top right-hand corner.
Notes are linked to their subjects by optional dashed lines without any