Lifelines

In sequence diagrams, a lifeline represents a connectable element, such as an object or a role, that describes how each instance participates in the interaction over a period of time. Each participant in an interaction is represented by a lifeline.

As the following figure illustrates, a lifeline consists of a name in a rectangle, which is the head, on top of a vertical dashed line, which is the stem, in an interaction frame.

The head of the lifeline is displayed as a rectangle, with the stem of the lifeline displayed as a vertical dashed line that connects to the center bottom of the rectangle.

The participant name and participant type appears in the head of the lifeline. The stem represents the length of time it takes to complete a single interaction. Messages, which the participant sends and receives, appear on the lifeline in a chronological order.

As the following table illustrates, lifelines can indicate several actions in sequence diagrams.

Action Description
Creation You can create an instance during the interaction by using a create message. The "created" lifeline repositions itself at the level of the create message. Otherwise, the lifeline can start at the top of the diagram to indicate that it existed before the interaction.
Communication You indicate messages between instances with arrows. The arrow originates from the source lifeline that sends it and ends at the target lifeline that terminates it.
Execution An execution occurrence shows the time during which an instance is active (either executing an operation directly or through a subordinate operation).
Destruction If you destroy an instance during the interaction with a destroy message or a stop node, its stem ends at the level of the stop node. Otherwise, its lifeline extends beyond the final message to indicate that it exists during the entire interaction.
Related tasks
Creating lifelines in sequence diagrams
Adding lifelines
Moving lifelines
Deleting lifelines
Feedback
(C) Copyright IBM Corporation 2004, 2005. All Rights Reserved.