Sequence Diagram Components

Posted : admin On 1/25/2022


Overview

The Sequence diagram is a type of Interaction diagram that focuses on the Message interchange between various Lifelines.

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 representing the participating objects. The time axis could be an actual reference point by placing the time labels as text boxes. The horizontal ordering of the objects is not significant to the operation, and you can rearrange them as necessary.

SequenceDiagram.org is an online tool / software for creating UML sequence diagrams. Founded in 2014 with the purpose to improve the efficiency when creating and working with sequence diagrams by combining text notation scripting and drawing by clicking and dragging in the same model.

  1. Sequence Diagrams Dan Fleck Interaction Diagrams UML Specifies a number of Interaction diagrams to model dynamic aspects of the system Model dynamic aspects of the system Messages moving among objects/classes Flow of control among objects Sequences of events Dynamic Diagram Types Interaction Diagrams Set of objects or roles and the messages that can be passed among them.
  2. Since the core components are the messages that are exchanged between objects, we can build communication diagrams the same way we would make a sequence diagram. The only difference between the two is that objects in communication diagrams are shown with association connections.
  3. Sequence diagram is an absolute must when designing a new feature you add to the system. It shows the affected parts of the system, points of integrations with external software and contracts which the team will have to create or update. Sequence diagram is valuable for QA engineers as well.
  4. When drawing a sequence diagram, remember that lifeline notation elements are placed across the top of the diagram. Lifelines are representative of roles or object instances that partake in the sequence being modeled. From a visual perspective, lifelines are shown as a box with a dashed line descending from the center of the bottom edge.

There are two Sequence Diagram modeling approaches:

  • Activation bars as the lifelines.
  • Activation bars as the Execution Specifications (new modeling approach).

Purpose

Sequence Diagram Components List

The purpose of the Sequence diagram is to represent some aspect of the communication between objects to perform a task. The main benefit of the diagram is that it helps to identify the messages exchanged between objects.

Usage

A Sequence diagram can be used to:

  • represent the details of a UML Use Case
  • model the logic of a sophisticated procedure, function, or operation
  • analyze the interaction of objects and components to complete a process
  • plan and understand the detailed functionality of an existing or future scenario.

Summary

Sequence diagrams are valuable because they:

Activity diagram
  • allow seeing the specific questions, commands, and data being communicated during the execution of a specific task
  • identify the communication required to fulfill an interaction
  • identify the objects that participate in an interaction
  • identify the data that is passed as part of the interactions.
Example of a Sequence diagram

Related pages

  • Working with Execution Specifications

Sequence Diagram Tool

Notation DescriptionVisual Representation

Actor

  • a type of role played by an entity that interacts with the subject (e.g., by exchanging signals and data)
  • external to the subject (i.e., in the sense that an instance of an actor is not a part of the instance of its corresponding subject).
  • represent roles played by human users, external hardware, or other subjects.

Note that:

  • An actor does not necessarily represent a specific physical entity but merely a particular role of some entity
  • A person may play the role of several different actors and, conversely, a given actor may be played by multiple different person.

Lifeline

  • A lifeline represents an individual participant in the Interaction.

Activations

  • A thin rectangle on a lifeline) represents the period during which an element is performing an operation.
  • The top and the bottom of the of the rectangle are aligned with the initiation and the completion time respectively

Call Message

  • A message defines a particular communication between Lifelines of an Interaction.
  • Call message is a kind of message that represents an invocation of operation of target lifeline.

Return Message

  • A message defines a particular communication between Lifelines of an Interaction.
  • Return message is a kind of message that represents the pass of information back to the caller of a corresponded former message.

Self Message

  • A message defines a particular communication between Lifelines of an Interaction.
  • Self message is a kind of message that represents the invocation of message of the same lifeline.

Recursive Message

  • A message defines a particular communication between Lifelines of an Interaction.
  • Recursive message is a kind of message that represents the invocation of message of the same lifeline. It's target points to an activation on top of the activation where the message was invoked from.

Create Message

  • A message defines a particular communication between Lifelines of an Interaction.
  • Create message is a kind of message that represents the instantiation of (target) lifeline.

Destroy Message

  • A message defines a particular communication between Lifelines of an Interaction.
  • Destroy message is a kind of message that represents the request of destroying the lifecycle of target lifeline.

Duration Message

  • A message defines a particular communication between Lifelines of an Interaction.
  • Duration message shows the distance between two time instants for a message invocation.

Note

A note (comment) gives the ability to attach various remarks to elements. A comment carries no semantic force, but may contain information that is useful to a modeler.