Home » Software Engineering

The Sequence Diagram | Software Engineering

This article is about the Sequence Diagram. In this article, we will briefly study the basic sequence diagram notations aim to capture. We will cover the types of messages in the Sequence diagram.
Submitted by Monika Sharma, on October 24, 2019

What is Sequence Diagram?

Sequence Diagram is a "Connection Diagram" that represents a single structure or storyline executing in a system. It is the second most used UML diagram behind the class diagram. Sequence Diagram shows what message is to be sent and when.

A sequence diagram is a good way to visualize and ratify various runtime framework.

Sequence diagram

the sequence diagram (1)


Basic Sequence Diagram Notation

  1. Lifeline: Lifelines are vertical dotted lines that indicate the object's activity over time. Lifeline is a named element that represents an individual participant in the connection. While parts and structural properties may have multiplicity, lifelines represent only one interconnected entity.
  2. Messages: Messages are nothing but the arrows that represent calls between objects. Half-arrowed lines are used to represent asynchronous messages. Asynchronous messages are sent from an object that will not wait for a reply from the receiver before continuing its tasks.
  3. Execution Occurrence: Execution boxes present the time an object needs to complete a task. When an object is busy executing a process or waiting for a reply message, use a thin gray rectangle placed vertically on its lifeline.
  4. Interaction Fragment: It is the named element that represents the most general interaction segment. Example of Interaction Fragment:
    • Occurrence
    • Execution
    • Interaction use

Types of message in sequence diagram

  1. Synchronous Message: It requires a response before the interaction can proceed. It's usually drawn using a line with a solid arrowhead pointing from one object to another.
  2. Asynchronous Message: It does not require a response before the interaction can proceed. It is usually drawn using an arrow.
  3. Reply Message: It is drawn by the dotted arrow moving backward to the original message.
  4. Self Message: A message sent to itself and it is represented by the U shaped arrow.
  5. Found Message: A message sent from an unknown beneficiary, shown by an arrow from an endpoint to a lifeline.
  6. Lost Message: A message sent to an unknown beneficiary. It's shown by an arrow going from a lifeline to an endpoint, a filled circle or a cross(x).

Simple E2E Diagram

the sequence diagram (2)

Image Reference: https://www.sparxsystems.eu/resources/project-development-with-uml-and-ea/interaction-diagram/








Comments and Discussions

Ad: Are you a blogger? Join our Blogging forum.




Languages: » C » C++ » C++ STL » Java » Data Structure » C#.Net » Android » Kotlin » SQL
Web Technologies: » PHP » Python » JavaScript » CSS » Ajax » Node.js » Web programming/HTML
Solved programs: » C » C++ » DS » Java » C#
Aptitude que. & ans.: » C » C++ » Java » DBMS
Interview que. & ans.: » C » Embedded C » Java » SEO » HR
CS Subjects: » CS Basics » O.S. » Networks » DBMS » Embedded Systems » Cloud Computing
» Machine learning » CS Organizations » Linux » DOS
More: » Articles » Puzzles » News/Updates


© https://www.includehelp.com some rights reserved.