SlideShare a Scribd company logo
 There are 3 types of Interaction diagrams in UML
• Sequence diagrams
• Communication diagrams
• Timing diagrams
 Interaction diagrams are used to illustrate interactions of
parts within a system.
 Out of these 3 types, sequence diagrams are preferred by
both developers and readers alike for their simplicity.
What is a Sequence Diagram?
 Sequence diagrams, commonly used by developers, model
the interactions between objects in a single use case.
 They illustrate how the different parts of a system interact
with each other to carry out a function, and the order in
which the interactions occur when a particular use case is
executed.
Drawing Sequence Diagrams with Creately
 Creately is a web based diagramming tool that can be used to draw sequence
diagrams including all other UML diagram types as well as flowcharts, Gantt charts
and many other diagram types
 It offers tools, professionally designed sequence diagram templates and resources
to help draw sequence diagrams
 It comes with real-time collaboration features that allow users to work together
and share diagrams with a team
 It has a desktop version for offline diagramming and a mobile app to manage and
browse diagrams on the go
Sequence Diagram Notations
 A sequence diagram is structured in such a way that it
represents a timeline which begins at the top and descends
gradually to mark the sequence of interactions.
 Each object has a column and the messages exchanged
between them are represented with arrows.
• Lifeline Notation
• Activation Bars
• Message Arrows
• Comment
Lifeline Notation
 A sequence diagram is made up of several of these
lifeline notations
 They should be arranged horizontally across the top of
the diagram
 No two lifeline notations should overlap each other
 They represent the different objects that interact with
each other in the system
 A lifeline notation with an actor element symbol is used
when the sequence diagram is owned by a use case
Activation Bars
 Activation bar is the box placed on the
lifeline
 It indicates that an object is active ((or
instantiated) during an interaction
between two objects
 The length of the rectangle indicates the
duration of the interaction
Message Arrows
 An arrow from the Message Caller to the Message Receiver
specifies a message
 The message can flow in any direction; from left to right, right to
left and back to the caller itself
 The description of the message should go on the arrow
 Arrow heads may change according to different message types
 Different message types;
• Synchronous message
• Asynchronous message
• Return message
• Participant creation message
• Participant destruction message
• Reflexive message
• The message signature is (all parts except the message_name is optional);
attribute = message_name (arguments): return_type
 A synchronous message is used when the sender waits for the receiver to
process the message and return before carrying on with another message
 An asynchronous message is used when the message caller does not wait
for the receiver to process the message and return before sending other
messages to other objects within the system
 A return message is used to indicate that the message receiver is
done processing the message and is returning control over to the
message caller.
Tip: You can avoid cluttering up your diagrams by minimizing the use of return
messages since the return value can be specified in the initial message arrow
itself.
 When an object sends a message to itself, it is called a reflexive
message. It is indicated with a message arrow that starts and ends
at the same lifeline
• Participant creation message; objects can be created in the middle
of a sequence. The dropped participant box notation is used when
you need to show that the particular participant did not exist until
the create call was sent.
• Participant destruction message; participants, when no longer
needed, can also be deleted from a sequence diagram. This is done
by adding an ‘X’ at the end of the lifeline of the said participant.
Comments
 UML generally permits the annotation of comments in all UML diagram
types.
 The comment object is a rectangle with a folded-over corner as shown
below. The comment can be linked to the related object with a dashed
line.
How to Draw a Sequence Diagram
 A sequence diagram represents the scenario or flow of events in
one single use case. The message flow of the sequence diagram is
based on the narrative of the particular use case.
 Before you start drawing the sequence diagram or decide what
interactions should be included in it, you need to ready a
comprehensive description of the particular use case.
Example:
Use case example - Create
new online library account
 From the use case diagram example of ‘Create New Online Library
Account’, we will focus on the use case named ‘Create New User
Account’ to draw our sequence diagram.
Step 1
Identify the objects or participants in the use case ‘Create New User
Account’
• Librarian
• Online Library Management system
• User credentials data base
• Email system
Step 2
 List down the steps involved in the execution of the use case
• The librarian requires the system to create a new online library account
• The librarian selects the library user account type
• The librarian enters the user’s details
• The user’s details are checked using the user Credentials Database
• The new library user account is created
• A summary of the new account’s details is emailed to the user
Step 3
Identify which messages should be passed between the objects we identified
earlier as the system executes these steps. Then draw the sequence diagram.
Sequence Diagram Best Practices
 Manage complex interactions with sequence fragments
• Sequence fragments are used to show complex interactions such as
alternative flows and loops in a more structured way.
• A sequence diagram is drawn as a box that frames a section of
interactions between objects in a sequence diagrams.
• On the top left corner of the fragment sits an operator. This – the
fragment operator - specifies what sort of a fragment it is.
Alternative Combination Fragment
• It is used when a choice needs to be made between two or more
message sequences. It models the “if then else” logic
• It is specified by mentioning ‘alt’ inside the frame’s name box
• To show 2 or more alternatives, the frame is divided into what is
called interaction operands using a dashed line
• Each operand has a guard to test against and it is placed at the top
left corner of the operand
Example of an alternative combination fragment
Option Combination Fragment
• The option fragment is used to indicate a sequence that will only occur
under a certain condition, otherwise the sequence won’t occur
• It models the “if then” statement
• It is represented with a rectangular frame where ‘opt’ is placed inside the
name box
• Unlike the alternative fragment, the option fragment is not divided to
operands
Example of an option combination fragment
Loop Fragment
• It is used to show a repetitive sequence
• It is drawn as a frame and specified by placing ‘loop’ in the name
box
• It can be used
– for the Boolean test
– to test minimum iterations (the loop must execute not less than the
number mentioned)
– to test maximum iterations (the loop mustn’t execute more than the
number mentioned)
Example of a Loop Fragment
Reference Fragment
• It allows you to reuse or refer to a part of one sequence diagram in
another
• It helps manage the size of large sequence diagrams
• Include ‘ref’ in the name box of the frame to specify the reference
fragment
• Mention the name of the sequence diagram being referred to
inside the frame
Example of a reference fragment
 Draw smaller sequence diagrams that capture the
essence of the use case
• Several objects and messages across a sequence diagram clutters it
up
• Convey how your system functions with a few smaller sequence
diagrams
• Make sure the diagram fits on a single page and leaves room for
additional comments
• Find out what is common about the diagrams and focus on the
commonality when drawing
Sequence Diagram Common Mistakes
• Adding too much detail that makes it difficult to read the diagram
• Obsolete sequence diagrams that are irrelevant when compared to the
interfaces, actual architectures of the system
• Leaving no blank space between the use case text and the message arrow
• Not considering the origins of message arrows carefully
See these common mistakes explained in detail here.
Templates and examples
Sequence Diagram Example of an Online Exam System
Sequence Diagram Example of a School Management System
Sequence Diagram Example of an Online Movie Ticket Booking System
Follow Us On

More Related Content

What's hot

Uml diagrams
Uml diagramsUml diagrams
Uml diagrams
barney92
 
Sequence diagram
Sequence diagramSequence diagram
Sequence diagram
Rahul Pola
 
State chart diagram
State chart diagramState chart diagram
State chart diagram
Preeti Mishra
 
Uml class diagram and packages ppt for dot net
Uml class diagram and packages ppt for dot netUml class diagram and packages ppt for dot net
Uml class diagram and packages ppt for dot net
mekhap
 
Uml Activity Diagram
Uml Activity DiagramUml Activity Diagram
Uml Activity DiagramNiloy Rocker
 
Lecture6 activity diagrams
Lecture6 activity diagramsLecture6 activity diagrams
Lecture6 activity diagrams
Shahid Riaz
 
Slide 5 Class Diagram
Slide 5 Class DiagramSlide 5 Class Diagram
Slide 5 Class DiagramNiloy Rocker
 
OOAD - UML - Sequence and Communication Diagrams - Lab
OOAD - UML - Sequence and Communication Diagrams - LabOOAD - UML - Sequence and Communication Diagrams - Lab
OOAD - UML - Sequence and Communication Diagrams - Lab
Victer Paul
 
11 deployment diagrams
11 deployment diagrams11 deployment diagrams
11 deployment diagrams
Baskarkncet
 
Activity diagram
Activity diagramActivity diagram
Activity diagram
LOKENDRA PRAJAPATI
 
Architectural structures and views
Architectural structures and viewsArchitectural structures and views
Architectural structures and views
Dr Reeja S R
 
Object Oriented Relationships
Object Oriented RelationshipsObject Oriented Relationships
Object Oriented Relationships
Taher Barodawala
 
Analysis modeling
Analysis modelingAnalysis modeling
Analysis modeling
Inocentshuja Ahmad
 
Object-Oriented Analysis and Design
Object-Oriented Analysis and DesignObject-Oriented Analysis and Design
Object-Oriented Analysis and Design
RiazAhmad786
 
Software requirement and specification
Software requirement and specificationSoftware requirement and specification
Software requirement and specification
Aman Adhikari
 
REQUIREMENT ENGINEERING
REQUIREMENT ENGINEERINGREQUIREMENT ENGINEERING
REQUIREMENT ENGINEERING
Saqib Raza
 

What's hot (20)

Uml class-diagram
Uml class-diagramUml class-diagram
Uml class-diagram
 
Uml diagrams
Uml diagramsUml diagrams
Uml diagrams
 
Sequence diagram
Sequence diagramSequence diagram
Sequence diagram
 
State chart diagram
State chart diagramState chart diagram
State chart diagram
 
Uml class diagram and packages ppt for dot net
Uml class diagram and packages ppt for dot netUml class diagram and packages ppt for dot net
Uml class diagram and packages ppt for dot net
 
Uml Activity Diagram
Uml Activity DiagramUml Activity Diagram
Uml Activity Diagram
 
Lecture6 activity diagrams
Lecture6 activity diagramsLecture6 activity diagrams
Lecture6 activity diagrams
 
Slide 5 Class Diagram
Slide 5 Class DiagramSlide 5 Class Diagram
Slide 5 Class Diagram
 
OOAD - UML - Sequence and Communication Diagrams - Lab
OOAD - UML - Sequence and Communication Diagrams - LabOOAD - UML - Sequence and Communication Diagrams - Lab
OOAD - UML - Sequence and Communication Diagrams - Lab
 
11 deployment diagrams
11 deployment diagrams11 deployment diagrams
11 deployment diagrams
 
Activity diagram
Activity diagramActivity diagram
Activity diagram
 
Architectural structures and views
Architectural structures and viewsArchitectural structures and views
Architectural structures and views
 
Object Oriented Relationships
Object Oriented RelationshipsObject Oriented Relationships
Object Oriented Relationships
 
Uml sequence diagrams
Uml sequence diagramsUml sequence diagrams
Uml sequence diagrams
 
Mvc architecture
Mvc architectureMvc architecture
Mvc architecture
 
Analysis modeling
Analysis modelingAnalysis modeling
Analysis modeling
 
Object-Oriented Analysis and Design
Object-Oriented Analysis and DesignObject-Oriented Analysis and Design
Object-Oriented Analysis and Design
 
Software requirement and specification
Software requirement and specificationSoftware requirement and specification
Software requirement and specification
 
Uml
UmlUml
Uml
 
REQUIREMENT ENGINEERING
REQUIREMENT ENGINEERINGREQUIREMENT ENGINEERING
REQUIREMENT ENGINEERING
 

Viewers also liked

PABRE System - Software Requirement Patterns
PABRE System - Software Requirement PatternsPABRE System - Software Requirement Patterns
PABRE System - Software Requirement Patterns
GESSI UPC
 
State Diagram
State DiagramState Diagram
State Machine Diagram
State Machine DiagramState Machine Diagram
State Machine DiagramNiloy Rocker
 
Ooad presentatin crc cards
Ooad presentatin crc cardsOoad presentatin crc cards
Ooad presentatin crc cards
Hitachi Systems Micro Clinic
 
5.state diagrams
5.state diagrams5.state diagrams
5.state diagramsAPU
 

Viewers also liked (6)

Carte blanche
Carte blancheCarte blanche
Carte blanche
 
PABRE System - Software Requirement Patterns
PABRE System - Software Requirement PatternsPABRE System - Software Requirement Patterns
PABRE System - Software Requirement Patterns
 
State Diagram
State DiagramState Diagram
State Diagram
 
State Machine Diagram
State Machine DiagramState Machine Diagram
State Machine Diagram
 
Ooad presentatin crc cards
Ooad presentatin crc cardsOoad presentatin crc cards
Ooad presentatin crc cards
 
5.state diagrams
5.state diagrams5.state diagrams
5.state diagrams
 

Similar to The Ultimate Sequence Diagram Tutorial

Slide 4 Interaction Diagram
Slide 4 Interaction DiagramSlide 4 Interaction Diagram
Slide 4 Interaction DiagramNiloy Rocker
 
Basic Behavioral Modeling
Basic Behavioral ModelingBasic Behavioral Modeling
Basic Behavioral Modeling
AMITJain879
 
Chapter3
Chapter3Chapter3
Chapter3
Fahad Sheref
 
Lecture#03, uml diagrams
Lecture#03, uml diagramsLecture#03, uml diagrams
Lecture#03, uml diagramsbabak danyal
 
CASE Tools lab.ppt
CASE Tools lab.pptCASE Tools lab.ppt
CASE Tools lab.ppt
RAJESH S
 
Sequence diagrame
Sequence diagrameSequence diagrame
Sequence diagrame
City University
 
An introduction to uml
An introduction to umlAn introduction to uml
An introduction to umlTony Huynh
 
UML tutorial
UML tutorialUML tutorial
UML tutorial
Eliza Wright
 
UML Diagram @ Software engineering discussion
UML Diagram @ Software engineering discussionUML Diagram @ Software engineering discussion
UML Diagram @ Software engineering discussion
CherryBerry2
 
Modeling software with UML
Modeling software with UMLModeling software with UML
Modeling software with UML
6020 peaks
 
Introduction to Rational Rose
Introduction to Rational RoseIntroduction to Rational Rose
Introduction to Rational Rose
Munaam Munawar
 
Intoduction to uml
Intoduction to umlIntoduction to uml
Intoduction to uml
Mahesh Bhalerao
 
Case tool lab-Reg2013 by Karthick Raja
Case tool lab-Reg2013 by Karthick RajaCase tool lab-Reg2013 by Karthick Raja
Case tool lab-Reg2013 by Karthick Raja
ursKarthick Raja
 
Use case Diagram and Sequence Diagram
Use case Diagram and Sequence DiagramUse case Diagram and Sequence Diagram
Use case Diagram and Sequence Diagram
Nikhil Pandit
 
Uml Omg Fundamental Certification 5
Uml Omg Fundamental Certification 5Uml Omg Fundamental Certification 5
Uml Omg Fundamental Certification 5Ricardo Quintero
 
Types of UML diagrams
Types of UML diagramsTypes of UML diagrams
Types of UML diagrams
Mukesh Tekwani
 
usecase (1).pptx
usecase (1).pptxusecase (1).pptx
usecase (1).pptx
Nadir438180
 
UNIT-3 Design Using UML (1).pptx
UNIT-3 Design Using UML (1).pptxUNIT-3 Design Using UML (1).pptx
UNIT-3 Design Using UML (1).pptx
viju001
 

Similar to The Ultimate Sequence Diagram Tutorial (20)

Slide 4 Interaction Diagram
Slide 4 Interaction DiagramSlide 4 Interaction Diagram
Slide 4 Interaction Diagram
 
Basic Behavioral Modeling
Basic Behavioral ModelingBasic Behavioral Modeling
Basic Behavioral Modeling
 
Chapter3
Chapter3Chapter3
Chapter3
 
Lecture#03, uml diagrams
Lecture#03, uml diagramsLecture#03, uml diagrams
Lecture#03, uml diagrams
 
CASE Tools lab.ppt
CASE Tools lab.pptCASE Tools lab.ppt
CASE Tools lab.ppt
 
Sequence diagrame
Sequence diagrameSequence diagrame
Sequence diagrame
 
An introduction to uml
An introduction to umlAn introduction to uml
An introduction to uml
 
UML tutorial
UML tutorialUML tutorial
UML tutorial
 
UML Diagram @ Software engineering discussion
UML Diagram @ Software engineering discussionUML Diagram @ Software engineering discussion
UML Diagram @ Software engineering discussion
 
Modeling software with UML
Modeling software with UMLModeling software with UML
Modeling software with UML
 
Introduction to Rational Rose
Introduction to Rational RoseIntroduction to Rational Rose
Introduction to Rational Rose
 
Intoduction to uml
Intoduction to umlIntoduction to uml
Intoduction to uml
 
Case tool lab-Reg2013 by Karthick Raja
Case tool lab-Reg2013 by Karthick RajaCase tool lab-Reg2013 by Karthick Raja
Case tool lab-Reg2013 by Karthick Raja
 
UML
UMLUML
UML
 
Use case Diagram and Sequence Diagram
Use case Diagram and Sequence DiagramUse case Diagram and Sequence Diagram
Use case Diagram and Sequence Diagram
 
Uml Omg Fundamental Certification 5
Uml Omg Fundamental Certification 5Uml Omg Fundamental Certification 5
Uml Omg Fundamental Certification 5
 
Types of UML diagrams
Types of UML diagramsTypes of UML diagrams
Types of UML diagrams
 
Uml examples
Uml examplesUml examples
Uml examples
 
usecase (1).pptx
usecase (1).pptxusecase (1).pptx
usecase (1).pptx
 
UNIT-3 Design Using UML (1).pptx
UNIT-3 Design Using UML (1).pptxUNIT-3 Design Using UML (1).pptx
UNIT-3 Design Using UML (1).pptx
 

More from Creately

The Impact of Covid-19 on Education
The Impact of Covid-19 on EducationThe Impact of Covid-19 on Education
The Impact of Covid-19 on Education
Creately
 
Visual tools for Risk Management Process
Visual tools for Risk Management ProcessVisual tools for Risk Management Process
Visual tools for Risk Management Process
Creately
 
Deployment Diagram Example Templates
Deployment Diagram Example TemplatesDeployment Diagram Example Templates
Deployment Diagram Example Templates
Creately
 
Workflow Diagram Examples and Templates
Workflow Diagram Examples and TemplatesWorkflow Diagram Examples and Templates
Workflow Diagram Examples and Templates
Creately
 
Component Diagram Example Templates
Component Diagram Example TemplatesComponent Diagram Example Templates
Component Diagram Example Templates
Creately
 
SWOT Analysis Example Diagrams with Editable Templates
SWOT Analysis Example Diagrams with Editable TemplatesSWOT Analysis Example Diagrams with Editable Templates
SWOT Analysis Example Diagrams with Editable Templates
Creately
 
Gantt Chart Examples with Editable Templates
Gantt Chart Examples with Editable TemplatesGantt Chart Examples with Editable Templates
Gantt Chart Examples with Editable Templates
Creately
 
Block Diagram Examples with Editable Templates
Block Diagram Examples with Editable TemplatesBlock Diagram Examples with Editable Templates
Block Diagram Examples with Editable Templates
Creately
 
Flowchart Examples with Editable Templates
Flowchart Examples with Editable TemplatesFlowchart Examples with Editable Templates
Flowchart Examples with Editable Templates
Creately
 
Improve Organizational Performance Using Diagrams by Creately
Improve Organizational Performance Using Diagrams by CreatelyImprove Organizational Performance Using Diagrams by Creately
Improve Organizational Performance Using Diagrams by Creately
Creately
 
Activity Diagram Examples by Creately
Activity Diagram Examples by Creately Activity Diagram Examples by Creately
Activity Diagram Examples by Creately
Creately
 
The Ultimate Guide for UML Class Diagrams by Creately
The Ultimate Guide for UML Class Diagrams by CreatelyThe Ultimate Guide for UML Class Diagrams by Creately
The Ultimate Guide for UML Class Diagrams by Creately
Creately
 
iOS Mockup Templates by Creately
iOS Mockup Templates by CreatelyiOS Mockup Templates by Creately
iOS Mockup Templates by Creately
Creately
 
Optimize Sales Processes Using Diagrams by Creately
Optimize Sales Processes Using Diagrams by CreatelyOptimize Sales Processes Using Diagrams by Creately
Optimize Sales Processes Using Diagrams by Creately
Creately
 
Infographic Templates by Creately
Infographic Templates by CreatelyInfographic Templates by Creately
Infographic Templates by Creately
Creately
 
Conversion Optimization Plan Tools
Conversion Optimization Plan ToolsConversion Optimization Plan Tools
Conversion Optimization Plan Tools
Creately
 
Essential HR Diagram Templates by Creately
Essential HR Diagram Templates by CreatelyEssential HR Diagram Templates by Creately
Essential HR Diagram Templates by Creately
Creately
 
Concept Map Templates by Creately
Concept Map Templates by CreatelyConcept Map Templates by Creately
Concept Map Templates by Creately
Creately
 
Change Management Tools
Change Management ToolsChange Management Tools
Change Management Tools
Creately
 
Marketing Strategy Planning Tools
Marketing Strategy Planning ToolsMarketing Strategy Planning Tools
Marketing Strategy Planning Tools
Creately
 

More from Creately (20)

The Impact of Covid-19 on Education
The Impact of Covid-19 on EducationThe Impact of Covid-19 on Education
The Impact of Covid-19 on Education
 
Visual tools for Risk Management Process
Visual tools for Risk Management ProcessVisual tools for Risk Management Process
Visual tools for Risk Management Process
 
Deployment Diagram Example Templates
Deployment Diagram Example TemplatesDeployment Diagram Example Templates
Deployment Diagram Example Templates
 
Workflow Diagram Examples and Templates
Workflow Diagram Examples and TemplatesWorkflow Diagram Examples and Templates
Workflow Diagram Examples and Templates
 
Component Diagram Example Templates
Component Diagram Example TemplatesComponent Diagram Example Templates
Component Diagram Example Templates
 
SWOT Analysis Example Diagrams with Editable Templates
SWOT Analysis Example Diagrams with Editable TemplatesSWOT Analysis Example Diagrams with Editable Templates
SWOT Analysis Example Diagrams with Editable Templates
 
Gantt Chart Examples with Editable Templates
Gantt Chart Examples with Editable TemplatesGantt Chart Examples with Editable Templates
Gantt Chart Examples with Editable Templates
 
Block Diagram Examples with Editable Templates
Block Diagram Examples with Editable TemplatesBlock Diagram Examples with Editable Templates
Block Diagram Examples with Editable Templates
 
Flowchart Examples with Editable Templates
Flowchart Examples with Editable TemplatesFlowchart Examples with Editable Templates
Flowchart Examples with Editable Templates
 
Improve Organizational Performance Using Diagrams by Creately
Improve Organizational Performance Using Diagrams by CreatelyImprove Organizational Performance Using Diagrams by Creately
Improve Organizational Performance Using Diagrams by Creately
 
Activity Diagram Examples by Creately
Activity Diagram Examples by Creately Activity Diagram Examples by Creately
Activity Diagram Examples by Creately
 
The Ultimate Guide for UML Class Diagrams by Creately
The Ultimate Guide for UML Class Diagrams by CreatelyThe Ultimate Guide for UML Class Diagrams by Creately
The Ultimate Guide for UML Class Diagrams by Creately
 
iOS Mockup Templates by Creately
iOS Mockup Templates by CreatelyiOS Mockup Templates by Creately
iOS Mockup Templates by Creately
 
Optimize Sales Processes Using Diagrams by Creately
Optimize Sales Processes Using Diagrams by CreatelyOptimize Sales Processes Using Diagrams by Creately
Optimize Sales Processes Using Diagrams by Creately
 
Infographic Templates by Creately
Infographic Templates by CreatelyInfographic Templates by Creately
Infographic Templates by Creately
 
Conversion Optimization Plan Tools
Conversion Optimization Plan ToolsConversion Optimization Plan Tools
Conversion Optimization Plan Tools
 
Essential HR Diagram Templates by Creately
Essential HR Diagram Templates by CreatelyEssential HR Diagram Templates by Creately
Essential HR Diagram Templates by Creately
 
Concept Map Templates by Creately
Concept Map Templates by CreatelyConcept Map Templates by Creately
Concept Map Templates by Creately
 
Change Management Tools
Change Management ToolsChange Management Tools
Change Management Tools
 
Marketing Strategy Planning Tools
Marketing Strategy Planning ToolsMarketing Strategy Planning Tools
Marketing Strategy Planning Tools
 

Recently uploaded

2024.06.01 Introducing a competency framework for languag learning materials ...
2024.06.01 Introducing a competency framework for languag learning materials ...2024.06.01 Introducing a competency framework for languag learning materials ...
2024.06.01 Introducing a competency framework for languag learning materials ...
Sandy Millin
 
BÀI TẬP BỔ TRỢ TIẾNG ANH GLOBAL SUCCESS LỚP 3 - CẢ NĂM (CÓ FILE NGHE VÀ ĐÁP Á...
BÀI TẬP BỔ TRỢ TIẾNG ANH GLOBAL SUCCESS LỚP 3 - CẢ NĂM (CÓ FILE NGHE VÀ ĐÁP Á...BÀI TẬP BỔ TRỢ TIẾNG ANH GLOBAL SUCCESS LỚP 3 - CẢ NĂM (CÓ FILE NGHE VÀ ĐÁP Á...
BÀI TẬP BỔ TRỢ TIẾNG ANH GLOBAL SUCCESS LỚP 3 - CẢ NĂM (CÓ FILE NGHE VÀ ĐÁP Á...
Nguyen Thanh Tu Collection
 
Multithreading_in_C++ - std::thread, race condition
Multithreading_in_C++ - std::thread, race conditionMultithreading_in_C++ - std::thread, race condition
Multithreading_in_C++ - std::thread, race condition
Mohammed Sikander
 
Group Presentation 2 Economics.Ariana Buscigliopptx
Group Presentation 2 Economics.Ariana BuscigliopptxGroup Presentation 2 Economics.Ariana Buscigliopptx
Group Presentation 2 Economics.Ariana Buscigliopptx
ArianaBusciglio
 
Supporting (UKRI) OA monographs at Salford.pptx
Supporting (UKRI) OA monographs at Salford.pptxSupporting (UKRI) OA monographs at Salford.pptx
Supporting (UKRI) OA monographs at Salford.pptx
Jisc
 
Best Digital Marketing Institute In NOIDA
Best Digital Marketing Institute In NOIDABest Digital Marketing Institute In NOIDA
Best Digital Marketing Institute In NOIDA
deeptiverma2406
 
Home assignment II on Spectroscopy 2024 Answers.pdf
Home assignment II on Spectroscopy 2024 Answers.pdfHome assignment II on Spectroscopy 2024 Answers.pdf
Home assignment II on Spectroscopy 2024 Answers.pdf
Tamralipta Mahavidyalaya
 
Introduction to AI for Nonprofits with Tapp Network
Introduction to AI for Nonprofits with Tapp NetworkIntroduction to AI for Nonprofits with Tapp Network
Introduction to AI for Nonprofits with Tapp Network
TechSoup
 
Unit 8 - Information and Communication Technology (Paper I).pdf
Unit 8 - Information and Communication Technology (Paper I).pdfUnit 8 - Information and Communication Technology (Paper I).pdf
Unit 8 - Information and Communication Technology (Paper I).pdf
Thiyagu K
 
Marketing internship report file for MBA
Marketing internship report file for MBAMarketing internship report file for MBA
Marketing internship report file for MBA
gb193092
 
Azure Interview Questions and Answers PDF By ScholarHat
Azure Interview Questions and Answers PDF By ScholarHatAzure Interview Questions and Answers PDF By ScholarHat
Azure Interview Questions and Answers PDF By ScholarHat
Scholarhat
 
A Survey of Techniques for Maximizing LLM Performance.pptx
A Survey of Techniques for Maximizing LLM Performance.pptxA Survey of Techniques for Maximizing LLM Performance.pptx
A Survey of Techniques for Maximizing LLM Performance.pptx
thanhdowork
 
Chapter 3 - Islamic Banking Products and Services.pptx
Chapter 3 - Islamic Banking Products and Services.pptxChapter 3 - Islamic Banking Products and Services.pptx
Chapter 3 - Islamic Banking Products and Services.pptx
Mohd Adib Abd Muin, Senior Lecturer at Universiti Utara Malaysia
 
The Accursed House by Émile Gaboriau.pptx
The Accursed House by Émile Gaboriau.pptxThe Accursed House by Émile Gaboriau.pptx
The Accursed House by Émile Gaboriau.pptx
DhatriParmar
 
Thesis Statement for students diagnonsed withADHD.ppt
Thesis Statement for students diagnonsed withADHD.pptThesis Statement for students diagnonsed withADHD.ppt
Thesis Statement for students diagnonsed withADHD.ppt
EverAndrsGuerraGuerr
 
1.4 modern child centered education - mahatma gandhi-2.pptx
1.4 modern child centered education - mahatma gandhi-2.pptx1.4 modern child centered education - mahatma gandhi-2.pptx
1.4 modern child centered education - mahatma gandhi-2.pptx
JosvitaDsouza2
 
How libraries can support authors with open access requirements for UKRI fund...
How libraries can support authors with open access requirements for UKRI fund...How libraries can support authors with open access requirements for UKRI fund...
How libraries can support authors with open access requirements for UKRI fund...
Jisc
 
Biological Screening of Herbal Drugs in detailed.
Biological Screening of Herbal Drugs in detailed.Biological Screening of Herbal Drugs in detailed.
Biological Screening of Herbal Drugs in detailed.
Ashokrao Mane college of Pharmacy Peth-Vadgaon
 
Language Across the Curriculm LAC B.Ed.
Language Across the  Curriculm LAC B.Ed.Language Across the  Curriculm LAC B.Ed.
Language Across the Curriculm LAC B.Ed.
Atul Kumar Singh
 
STRAND 3 HYGIENIC PRACTICES.pptx GRADE 7 CBC
STRAND 3 HYGIENIC PRACTICES.pptx GRADE 7 CBCSTRAND 3 HYGIENIC PRACTICES.pptx GRADE 7 CBC
STRAND 3 HYGIENIC PRACTICES.pptx GRADE 7 CBC
kimdan468
 

Recently uploaded (20)

2024.06.01 Introducing a competency framework for languag learning materials ...
2024.06.01 Introducing a competency framework for languag learning materials ...2024.06.01 Introducing a competency framework for languag learning materials ...
2024.06.01 Introducing a competency framework for languag learning materials ...
 
BÀI TẬP BỔ TRỢ TIẾNG ANH GLOBAL SUCCESS LỚP 3 - CẢ NĂM (CÓ FILE NGHE VÀ ĐÁP Á...
BÀI TẬP BỔ TRỢ TIẾNG ANH GLOBAL SUCCESS LỚP 3 - CẢ NĂM (CÓ FILE NGHE VÀ ĐÁP Á...BÀI TẬP BỔ TRỢ TIẾNG ANH GLOBAL SUCCESS LỚP 3 - CẢ NĂM (CÓ FILE NGHE VÀ ĐÁP Á...
BÀI TẬP BỔ TRỢ TIẾNG ANH GLOBAL SUCCESS LỚP 3 - CẢ NĂM (CÓ FILE NGHE VÀ ĐÁP Á...
 
Multithreading_in_C++ - std::thread, race condition
Multithreading_in_C++ - std::thread, race conditionMultithreading_in_C++ - std::thread, race condition
Multithreading_in_C++ - std::thread, race condition
 
Group Presentation 2 Economics.Ariana Buscigliopptx
Group Presentation 2 Economics.Ariana BuscigliopptxGroup Presentation 2 Economics.Ariana Buscigliopptx
Group Presentation 2 Economics.Ariana Buscigliopptx
 
Supporting (UKRI) OA monographs at Salford.pptx
Supporting (UKRI) OA monographs at Salford.pptxSupporting (UKRI) OA monographs at Salford.pptx
Supporting (UKRI) OA monographs at Salford.pptx
 
Best Digital Marketing Institute In NOIDA
Best Digital Marketing Institute In NOIDABest Digital Marketing Institute In NOIDA
Best Digital Marketing Institute In NOIDA
 
Home assignment II on Spectroscopy 2024 Answers.pdf
Home assignment II on Spectroscopy 2024 Answers.pdfHome assignment II on Spectroscopy 2024 Answers.pdf
Home assignment II on Spectroscopy 2024 Answers.pdf
 
Introduction to AI for Nonprofits with Tapp Network
Introduction to AI for Nonprofits with Tapp NetworkIntroduction to AI for Nonprofits with Tapp Network
Introduction to AI for Nonprofits with Tapp Network
 
Unit 8 - Information and Communication Technology (Paper I).pdf
Unit 8 - Information and Communication Technology (Paper I).pdfUnit 8 - Information and Communication Technology (Paper I).pdf
Unit 8 - Information and Communication Technology (Paper I).pdf
 
Marketing internship report file for MBA
Marketing internship report file for MBAMarketing internship report file for MBA
Marketing internship report file for MBA
 
Azure Interview Questions and Answers PDF By ScholarHat
Azure Interview Questions and Answers PDF By ScholarHatAzure Interview Questions and Answers PDF By ScholarHat
Azure Interview Questions and Answers PDF By ScholarHat
 
A Survey of Techniques for Maximizing LLM Performance.pptx
A Survey of Techniques for Maximizing LLM Performance.pptxA Survey of Techniques for Maximizing LLM Performance.pptx
A Survey of Techniques for Maximizing LLM Performance.pptx
 
Chapter 3 - Islamic Banking Products and Services.pptx
Chapter 3 - Islamic Banking Products and Services.pptxChapter 3 - Islamic Banking Products and Services.pptx
Chapter 3 - Islamic Banking Products and Services.pptx
 
The Accursed House by Émile Gaboriau.pptx
The Accursed House by Émile Gaboriau.pptxThe Accursed House by Émile Gaboriau.pptx
The Accursed House by Émile Gaboriau.pptx
 
Thesis Statement for students diagnonsed withADHD.ppt
Thesis Statement for students diagnonsed withADHD.pptThesis Statement for students diagnonsed withADHD.ppt
Thesis Statement for students diagnonsed withADHD.ppt
 
1.4 modern child centered education - mahatma gandhi-2.pptx
1.4 modern child centered education - mahatma gandhi-2.pptx1.4 modern child centered education - mahatma gandhi-2.pptx
1.4 modern child centered education - mahatma gandhi-2.pptx
 
How libraries can support authors with open access requirements for UKRI fund...
How libraries can support authors with open access requirements for UKRI fund...How libraries can support authors with open access requirements for UKRI fund...
How libraries can support authors with open access requirements for UKRI fund...
 
Biological Screening of Herbal Drugs in detailed.
Biological Screening of Herbal Drugs in detailed.Biological Screening of Herbal Drugs in detailed.
Biological Screening of Herbal Drugs in detailed.
 
Language Across the Curriculm LAC B.Ed.
Language Across the  Curriculm LAC B.Ed.Language Across the  Curriculm LAC B.Ed.
Language Across the Curriculm LAC B.Ed.
 
STRAND 3 HYGIENIC PRACTICES.pptx GRADE 7 CBC
STRAND 3 HYGIENIC PRACTICES.pptx GRADE 7 CBCSTRAND 3 HYGIENIC PRACTICES.pptx GRADE 7 CBC
STRAND 3 HYGIENIC PRACTICES.pptx GRADE 7 CBC
 

The Ultimate Sequence Diagram Tutorial

  • 1.
  • 2.  There are 3 types of Interaction diagrams in UML • Sequence diagrams • Communication diagrams • Timing diagrams  Interaction diagrams are used to illustrate interactions of parts within a system.  Out of these 3 types, sequence diagrams are preferred by both developers and readers alike for their simplicity.
  • 3. What is a Sequence Diagram?  Sequence diagrams, commonly used by developers, model the interactions between objects in a single use case.  They illustrate how the different parts of a system interact with each other to carry out a function, and the order in which the interactions occur when a particular use case is executed.
  • 4. Drawing Sequence Diagrams with Creately  Creately is a web based diagramming tool that can be used to draw sequence diagrams including all other UML diagram types as well as flowcharts, Gantt charts and many other diagram types  It offers tools, professionally designed sequence diagram templates and resources to help draw sequence diagrams  It comes with real-time collaboration features that allow users to work together and share diagrams with a team  It has a desktop version for offline diagramming and a mobile app to manage and browse diagrams on the go
  • 6.  A sequence diagram is structured in such a way that it represents a timeline which begins at the top and descends gradually to mark the sequence of interactions.  Each object has a column and the messages exchanged between them are represented with arrows. • Lifeline Notation • Activation Bars • Message Arrows • Comment
  • 7. Lifeline Notation  A sequence diagram is made up of several of these lifeline notations  They should be arranged horizontally across the top of the diagram  No two lifeline notations should overlap each other  They represent the different objects that interact with each other in the system  A lifeline notation with an actor element symbol is used when the sequence diagram is owned by a use case
  • 8. Activation Bars  Activation bar is the box placed on the lifeline  It indicates that an object is active ((or instantiated) during an interaction between two objects  The length of the rectangle indicates the duration of the interaction
  • 9. Message Arrows  An arrow from the Message Caller to the Message Receiver specifies a message  The message can flow in any direction; from left to right, right to left and back to the caller itself  The description of the message should go on the arrow  Arrow heads may change according to different message types
  • 10.  Different message types; • Synchronous message • Asynchronous message • Return message • Participant creation message • Participant destruction message • Reflexive message • The message signature is (all parts except the message_name is optional); attribute = message_name (arguments): return_type
  • 11.  A synchronous message is used when the sender waits for the receiver to process the message and return before carrying on with another message  An asynchronous message is used when the message caller does not wait for the receiver to process the message and return before sending other messages to other objects within the system
  • 12.
  • 13.  A return message is used to indicate that the message receiver is done processing the message and is returning control over to the message caller. Tip: You can avoid cluttering up your diagrams by minimizing the use of return messages since the return value can be specified in the initial message arrow itself.  When an object sends a message to itself, it is called a reflexive message. It is indicated with a message arrow that starts and ends at the same lifeline
  • 14.
  • 15. • Participant creation message; objects can be created in the middle of a sequence. The dropped participant box notation is used when you need to show that the particular participant did not exist until the create call was sent. • Participant destruction message; participants, when no longer needed, can also be deleted from a sequence diagram. This is done by adding an ‘X’ at the end of the lifeline of the said participant.
  • 16.
  • 17. Comments  UML generally permits the annotation of comments in all UML diagram types.  The comment object is a rectangle with a folded-over corner as shown below. The comment can be linked to the related object with a dashed line.
  • 18. How to Draw a Sequence Diagram  A sequence diagram represents the scenario or flow of events in one single use case. The message flow of the sequence diagram is based on the narrative of the particular use case.  Before you start drawing the sequence diagram or decide what interactions should be included in it, you need to ready a comprehensive description of the particular use case.
  • 19. Example: Use case example - Create new online library account
  • 20.  From the use case diagram example of ‘Create New Online Library Account’, we will focus on the use case named ‘Create New User Account’ to draw our sequence diagram. Step 1 Identify the objects or participants in the use case ‘Create New User Account’ • Librarian • Online Library Management system • User credentials data base • Email system
  • 21. Step 2  List down the steps involved in the execution of the use case • The librarian requires the system to create a new online library account • The librarian selects the library user account type • The librarian enters the user’s details • The user’s details are checked using the user Credentials Database • The new library user account is created • A summary of the new account’s details is emailed to the user
  • 22. Step 3 Identify which messages should be passed between the objects we identified earlier as the system executes these steps. Then draw the sequence diagram.
  • 23. Sequence Diagram Best Practices  Manage complex interactions with sequence fragments • Sequence fragments are used to show complex interactions such as alternative flows and loops in a more structured way. • A sequence diagram is drawn as a box that frames a section of interactions between objects in a sequence diagrams. • On the top left corner of the fragment sits an operator. This – the fragment operator - specifies what sort of a fragment it is.
  • 24. Alternative Combination Fragment • It is used when a choice needs to be made between two or more message sequences. It models the “if then else” logic • It is specified by mentioning ‘alt’ inside the frame’s name box • To show 2 or more alternatives, the frame is divided into what is called interaction operands using a dashed line • Each operand has a guard to test against and it is placed at the top left corner of the operand
  • 25. Example of an alternative combination fragment
  • 26. Option Combination Fragment • The option fragment is used to indicate a sequence that will only occur under a certain condition, otherwise the sequence won’t occur • It models the “if then” statement • It is represented with a rectangular frame where ‘opt’ is placed inside the name box • Unlike the alternative fragment, the option fragment is not divided to operands
  • 27. Example of an option combination fragment
  • 28. Loop Fragment • It is used to show a repetitive sequence • It is drawn as a frame and specified by placing ‘loop’ in the name box • It can be used – for the Boolean test – to test minimum iterations (the loop must execute not less than the number mentioned) – to test maximum iterations (the loop mustn’t execute more than the number mentioned)
  • 29. Example of a Loop Fragment
  • 30. Reference Fragment • It allows you to reuse or refer to a part of one sequence diagram in another • It helps manage the size of large sequence diagrams • Include ‘ref’ in the name box of the frame to specify the reference fragment • Mention the name of the sequence diagram being referred to inside the frame
  • 31. Example of a reference fragment
  • 32.  Draw smaller sequence diagrams that capture the essence of the use case • Several objects and messages across a sequence diagram clutters it up • Convey how your system functions with a few smaller sequence diagrams • Make sure the diagram fits on a single page and leaves room for additional comments • Find out what is common about the diagrams and focus on the commonality when drawing
  • 33. Sequence Diagram Common Mistakes • Adding too much detail that makes it difficult to read the diagram • Obsolete sequence diagrams that are irrelevant when compared to the interfaces, actual architectures of the system • Leaving no blank space between the use case text and the message arrow • Not considering the origins of message arrows carefully See these common mistakes explained in detail here.
  • 34. Templates and examples Sequence Diagram Example of an Online Exam System
  • 35. Sequence Diagram Example of a School Management System
  • 36. Sequence Diagram Example of an Online Movie Ticket Booking System