Lifelines and Sequence Diagrams

lifelines and sequence diagrams

Lifelines and Sequence Diagrams focus on the interchange of matter/messages between system components.

A Sequence diagram shows the interaction information with an emphasis on the time sequence. The diagram has two dimensions: the vertical axis representing time and the horizontal axis which represent the participating objects.

Lifelines and Sequence Diagrams: Key Elements

There are two main modeling elements on a sequence diagram, lifelines and messages. Lifelines are the representation of the blocks or part properties they represent.

lifeline lifelines and sequence diagrams

Lifeline

A Lifeline is the representation of a property or class which messages are interacting between.

Activation Bar

An Activation Bar is the period of which an object is performing an action. The length of the activation bar signifies the amount of time required for an action to be completed.

activation bar
alternative fragment lifelines and sequence diagrams

Alternative Fragment

An Alternative Fragment signifies that a choice can be made on the behavior to exercise. In an alternative fragment, at least one operand needs to be chosen. Think of an alternative fragment as an if-else statement.

Parallel Fragment

A Parallel Fragment signifies that multiple behaviors can occur without the obstruction of another, meaning that the behaviors in each operand can be exercised in parallel.

parallel fragment lifelines and sequence diagrams
option fragment lifelines and sequence diagram

Option Fragment

An Option Fragment signifies that a choice can be made on the behavior to exercise. In an option fragment, if one operand does not execute then nothing happens. Think of an option fragment as an if-then statement.

Loop Fragment

A Loop Fragment signifies that an operand will repeat until an interaction constraint is met. Once the interaction constraint is no longer true, the repeating operand will no longer execute.

loop fragment lifelines and sequence diagrams
strict sequencing diagram

Strict Sequencing Fragment

A Strict Sequencing Fragment signifies that a strict sequence must be followed within the fragment in order for the behaviors to execute.

Lifelines and Sequence Diagrams

Lifelines and Sequence Diagrams: Key Relationships

Messages are the interactions between lifelines. Messages are the connectors of sequence diagrams and they connect components together.

Message

A Message is a generic message that typically is not specified. Use this when you do not know what message to accurately use.

call message

Call Message

A Call Message identifies that a specific operation is being requested to be invoked. This seems similar to a send message, so simply put, Call messages call an operation to the target.

Send Message

A Send Message identifies a specific operation is being requested to be invoked. This seems similar to a call message, so simply put, send messages send a signal to the target.

send message
reply message

Reply Message

A Reply Message returns values from previous messages or call messages.

Lifelines and Sequence Diagrams

Things to Consider

Interactions by Behaviors

A common approach to accurately depicting the flow of data through a system is to capture sequence diagrams for each activity diagram developed. Interactions and the flow of matter/messages between system components are based on the systems functional behavior. It would be inaccurate to show the flow of all the matter/messages within your system at one time, since this is not typically not how a system behaves.

Consistent Modeling Method

When developing sequence diagrams, it is important to keep a consistent perspective. A common method to keeping a consistent perspective for sequence diagrams is by portraying the lifeline at common hierarchy levels. One hierarchy level is portrayed on a sequence diagram since a system architecture is segmented. All hierarchy levels must be captured individually in order to capture the interactions of an entire systems architecture.

Architecture Alignment

Signals and identified item flows are used to align Internal Block Diagrams, Activity Diagrams, and Sequence Diagrams.

Required Comprehensive Understanding

Sequence Diagrams are one of the last diagrams developed because a comprehensive understanding of the system is required.

Leave a Reply

Your email address will not be published. Required fields are marked *