EDUCBA

EDUCBA

MENUMENU
  • Free Tutorials
  • Free Courses
  • Certification Courses
  • 600+ Courses All in One Bundle
  • Login

UML Sequence Diagram

By Priya PedamkarPriya Pedamkar

Home » Software Development » Software Development Tutorials » Software Engineering Tutorial » UML Sequence Diagram

UML Sequence Diagram

Unified Modelling Language Structure Diagram

Unified Modelling Language (UML) is a modeling language, which means, instead of using it for programming apps and websites in an IDE, a user will use a UML to visualize the design of a system. One of the most important aspects of UML is that it sets standards for systems which means if you are familiar with UML, you can easily understand system designs using UML Sequence Diagram.

What is a Sequence Diagram in UML?

  • We can design diagrams using the Unified Modelling Language in many ways. Some of these are Interaction Diagrams, Structure diagrams, and behavior diagrams.
  • A Sequence Diagram is one such type of diagram that can be designed with UML.
  • As you can guess from its name, the Sequence diagram shows the order in which interactions take place. The diagram is used to depict the interaction between several objects in a system.
  • Sequence Diagrams are used mostly by software developers to note down and understand the requirements of new and pre-existing systems. Many Businessmen also use these diagrams to understand and establish systems too.

Symbol and Components of a UML Sequence Diagram

UML Sequence Diagrams are designed so that they can depict a timeline. On the top, you can see the beginning, and then the diagram flow descends downwards to mark the sequence of all interactions in the system. These interactions and objects have some symbols and notations that are used to standardize UML Structure Diagrams.

Start Your Free Software Development Course

Web development, programming languages, Software testing & others

1. Lifeline

Lifelines in a UML Structure diagram are used to represent each instance in interaction.

UML Sequence Diagram - Lifeline

2. Actor

An actor is used in UML to specify a role that is either played by a user or any system that is going to interact with the objects of the system.

UML Sequence Diagram - Actor

3. Activity

In Unified Modelling Language, Activity is a shape that is used to show a major task that must be completed to fulfill an operation contract.

UML Sequence Diagram - Activity

4. State

The shape of a State is used to denote the condition of an event or activity in the system. We also use it to describe state changes that trigger by events.

Popular Course in this category
Sale
All in One Software Development Bundle (600+ Courses, 50+ projects)600+ Online Courses | 3000+ Hours | Verifiable Certificates | Lifetime Access
4.6 (3,144 ratings)
Course Price

View Course

Related Courses
Software Testing Training (9 Courses, 2 Projects)Cyber Security Training (10 Courses, 3 Projects)

UML Sequence Diagram - State

5. Object Flow

Simply put, Object flow shows the path along which the data passes.

 

UML Sequence Diagram - Object flow

6. Bars

These are used to show the start or end of concurrent activities in the diagram.

bars

7. Initial State

The initial state is shown by a circle, and as you can guess, we use it to denote the initial state of the workflow. Just like the Initial State, there is a notation for the final state too, which shows the final state of the workflow in the diagram.

initial state

8. Control Flow

The Control flow is used to show the order in which statements, function calls and instructions of the program are executed. This is shown in the diagram with the use of an arrow pointing towards the direction.

UML Sequence Diagram - control flow

9. Decision Activity

These are used to show where a decision will be taken in the system. The activity is depicted with a diamond shape in the diagram. Decisions are used to reflect the previous activity.

decision activity

10. Objects

Depicted with a rectangle shape, objects represent an instance of a class. If needed, an object can also represent more than one class.

object attributes

11. Package

A package symbol is used to contain interactive elements of the diagram. The Package is depicted in a rectangular shape just like objects, but it has an inner rectangle that is used to label the diagram.

pacakage

Common Message Symbols

Following are some of the commonly used message symbols that are used to show how the information is transmitted between different objects in the Structure Diagram.

1. Synchronous Message

When the sender has to wait for a response to a message before it can continue, the symbol for the synchronous message is used.

Synchronous Message

2. Asynchronous Message

The asynchronous message does not need to wait for a reply from the receiver to continue in the diagram; we use a lined arrowhead to denote an Asynchronous message in a structure diagram.

Asynchronous Message

3. Create Message

This message is used when we create a new object in the sequence diagram. This is represented with the created word on top of a dotted arrow.

Create Message

4. Delete Message

The Delete Message symbol is used to delete an object. This is represented by adding an “X” at the end of an arrow.

Delete Message

5. Self Message

In the case where an object needs to send a message to itself, the self message notation is used. It is done using a U-Shaped arrow.

self Message

Example of Sequence Diagram

Sequence Diagram - shopping cart

  • Above is an example of a Sequence Diagram of an Online Shopping Cart. Starting from the top, you can see that the actor of the diagram will be the customer that logs in to the e-commerce website and adds an item to the shopping cart in order to complete the purchase. Let’s take a look at the diagram and try to understand how the task is completed in the system.
  • The Shopping cart then asks the Order Controller for the total price of the items in the cart using the getTotal() function.
  • Once the request has been received, the Order Controller uses the getPrice() function for each item to get the item price.
  • Once the price for all items in the cart has been received by the Order Controller, the total amount of items in the cart will be calculated using calculateTotal() function, which uses the data already available to the Order Controller.
  • Once calculated, the totalPrice is sent to the Shopping Cart UI so that the customer can proceed with the checkout process.

Conclusion

Unified Modelling Language (UML) has been a great help in standardizing the diagrams of systems for software developers and businessmen. Among the various type of UML diagrams, the Structure diagram is one of the most used by programmers. Not only a development team can model the system using a Structure Diagram, but it also helps in understanding the requirements of the system and planning the product development in a better way.

Recommended Articles

This has been a guide to UML Sequence Diagram. Here we discussed what is sequence diagram in UML? symbol and components of a UML Sequence Diagram. Common Message Symbols as well as the example of a Sequence Diagram. You can also go through our other suggested articles to learn more –

  1. Class Diagram
  2. What is Assembly Language?
  3. UML Use Case Diagram
  4. UML Interaction Diagrams

All in One Software Development Bundle (600+ Courses, 50+ projects)

600+ Online Courses

3000+ Hours

Verifiable Certificates

Lifetime Access

Learn More

0 Shares
Share
Tweet
Share
Primary Sidebar
Software Engineering Tutorial
  • UML Daigram
    • StarUML
    • Architecture of UML
    • StarUML? Download
    • Types of UML Diagrams
    • UML Activity Diagram
    • UML Component?Diagram
    • UML Deployment Diagram
    • UML Diagram Softwares
    • UML Object?Diagram
    • UML Sequence Diagram
    • UML Use Case Diagram
    • State Diagram
    • Class Diagram
    • UML Dependency
    • UML Interaction Diagrams
    • Data Flow Diagrams
  • Basic
    • What is Software Engineering?
    • What is SDET
    • What Is SDLC
    • SDLC Methodologies
    • Software Classification
    • Software Design
    • Software Design Principles
    • Software Metrics
    • Utility Software Types
    • UI Design Tools
    • User Interface Design Principles
    • Architectural Design in Software Engineering
    • Software Configuration Management
    • Software Configuration Management Tools
    • What is Risk Management?
    • System Engineering
    • ES6 Features
    • Object oriented programming paradigm
    • CASE Tools
  • Models
    • Prototype Model
    • What is Spiral Model
    • Waterfall?Model
    • Prototyping Tools
    • Incremental Model
    • Iterative Model
    • RAD Model
    • Fish Model
    • What is Scrum Methodology?
    • RUP? Methodology
    • COCOMO Model
    • Big Bang Model
    • System Models
    • People Capability Maturity Model
    • Analysis Modeling
    • User Interface Design
    • Capability Maturity Model Integration
    • What is Agile Development?
    • Agile Process Model
    • Rational Unified Process
  • Advanced
    • Functional Point Analysis
    • Software Quality Control
    • Quality Assurance Tools
    • Prototype model advantages and disadvantages
    • UML Modelling Tools
    • Tomcat Server
    • Quality Software
    • UI Prototyping
    • Hybrid Model
    • Behavioral Model in Software Engineering
    • Flowchart symbols
    • Critical System
    • Legacy System
    • SOA Architecture
    • Software Quality Attributes
    • Software Maintenance
    • Software Cost Estimation
    • Software Inspection
    • Cohesion in Software Engineering
    • Coupling in Software Engineering
    • Component-based Software Engineering
    • Design Modeling in Software Engineering
    • Iterative Methodology
    • System Flow Diagram
    • Data Flow Architecture
    • SEICMM
    • Function Oriented Design
  • Interview Questions
    • Software Engineering Interview Questions
    • SDLC Interview Questions

Related Courses

Software Testing Course

Cyber Security Training

Software Development Course Training

Footer
About Us
  • Blog
  • Who is EDUCBA?
  • Sign Up
  • Live Classes
  • Corporate Training
  • Certificate from Top Institutions
  • Contact Us
  • Verifiable Certificate
  • Reviews
  • Terms and Conditions
  • Privacy Policy
  •  
Apps
  • iPhone & iPad
  • Android
Resources
  • Free Courses
  • Java Tutorials
  • Python Tutorials
  • All Tutorials
Certification Courses
  • All Courses
  • Software Development Course - All in One Bundle
  • Become a Python Developer
  • Java Course
  • Become a Selenium Automation Tester
  • Become an IoT Developer
  • ASP.NET Course
  • VB.NET Course
  • PHP Course

© 2022 - EDUCBA. ALL RIGHTS RESERVED. THE CERTIFICATION NAMES ARE THE TRADEMARKS OF THEIR RESPECTIVE OWNERS.

EDUCBA
Free Software Development Course

Web development, programming languages, Software testing & others

*Please provide your correct email id. Login details for this Free course will be emailed to you

By signing up, you agree to our Terms of Use and Privacy Policy.

EDUCBA
Free Software Development Course

Web development, programming languages, Software testing & others

*Please provide your correct email id. Login details for this Free course will be emailed to you

By signing up, you agree to our Terms of Use and Privacy Policy.

EDUCBA Login

Forgot Password?

By signing up, you agree to our Terms of Use and Privacy Policy.

Let’s Get Started

By signing up, you agree to our Terms of Use and Privacy Policy.

EDUCBA

*Please provide your correct email id. Login details for this Free course will be emailed to you

By signing up, you agree to our Terms of Use and Privacy Policy.

This website or its third-party tools use cookies, which are necessary to its functioning and required to achieve the purposes illustrated in the cookie policy. By closing this banner, scrolling this page, clicking a link or continuing to browse otherwise, you agree to our Privacy Policy

Loading . . .
Quiz
Question:

Answer:

Quiz Result
Total QuestionsCorrect AnswersWrong AnswersPercentage

Explore 1000+ varieties of Mock tests View more

Special Offer - All in One Software Development Bundle (600+ Courses, 50+ projects) Learn More