SlideShare une entreprise Scribd logo
1  sur  37
Télécharger pour lire hors ligne
Ramakant Soni
Assistant Professor
Dept. of Computer Science
B K Birla Institute of Engineering & Technology, Pilani, India
ramakant.soni1988@gmail.com
2nd December 2014
14h 00-17h 00
Ramakant Soni @ EISTI Cergy 12/2/2014
1
12/2/2014Ramakant Soni @ EISTI Cergy 2
Sequence Diagram Definition
A Sequence diagram is an interaction diagram that
shows
-- how the objects and classes involved in the scenario
operate with one another.
-- the sequence of messages exchanged .
12/2/2014Ramakant Soni @ EISTI Cergy 3
Its Significance
An organization's technical staff can find sequence
diagrams useful in documenting how a future system
should behave.
During the design phase, architects and developers
can use the diagram to force out the system's object
interactions, thus fleshing out overall system design.
12/2/2014Ramakant Soni @ EISTI Cergy 4
Its Use
One of the primary uses of sequence diagrams is in the
transition from requirements expressed as use cases to
the next level of refinement.
Use cases are often refined into one or more sequence
diagrams.
In addition to their use in designing new systems,
sequence diagrams can be used to document how
objects in an existing system currently interact.
This documentation is very useful when transitioning a
system to another person or organization.
12/2/2014Ramakant Soni @ EISTI Cergy 5
Targets
Objects as well as classes can be targets which means
that messages can be sent to them.
A target is displayed as a rectangle with some text in it.
Below the target, its lifeline(vertical dashed line) extends
for as long as the target exists.
Target
Lifeline
12/2/2014Ramakant Soni @ EISTI Cergy 6
Multi Object
To show how a client interacts with the elements of a
collection, you can use a multi-object.
Its basic notation is:
12/2/2014Ramakant Soni @ EISTI Cergy 7
Class
The basic notation for a class is:
Only class messages (e.g. shared or static methods in some
programming languages) can be sent to a class. Generally text of
a class is not underlined, which is how you can distinguish it from an
object.
12/2/2014Ramakant Soni @ EISTI Cergy 8
Messages
Message is a named element that defines one specific
kind of communication between lifelines of an
interaction.
The message specifies not only the kind of
communication, but also the sender and the receiver.
12/2/2014Ramakant Soni @ EISTI Cergy 9
Message Notation
A message is represented by an arrow between the life
lines of two objects.
-Self calls are also allowed
-The time required by the receiver object to process
the message is denoted by an activation-box.
A message is labeled at minimum with the message
name.
12/2/2014Ramakant Soni @ EISTI Cergy 10
Message Types & representation
12/2/2014Ramakant Soni @ EISTI Cergy 11
Call Message
Call message is a kind of message that represents an
invocation of operation of target lifeline.
Its type:
- Synchronous Call
- Asynchronous Call
12/2/2014Ramakant Soni @ EISTI Cergy 12
Synchronous Call
Synchronous call typically represents operation call -
send message and suspend execution while waiting for
response. Synchronous call messages are shown with
filled arrow head.
12/2/2014Ramakant Soni @ EISTI Cergy 13
Asynchronous Call- Send
Asynchronous call - send message and proceed
immediately without waiting for return value.
Asynchronous messages have an open arrow head.
12/2/2014Ramakant Soni @ EISTI Cergy 14
Create Message
Create message is sent to a lifeline to create itself. It is
shown as a dashed line with open arrowhead.
12/2/2014Ramakant Soni @ EISTI Cergy 15
Destroy Message
Delete message is sent to terminate another lifeline. The
lifeline usually ends with a cross in the form of an X at
the bottom denoting destruction occurrence.
12/2/2014Ramakant Soni @ EISTI Cergy 16
Return Message
Reply message to an operation call is shown as a
dashed line with open arrow head (looks similar to
creation message).
12/2/2014Ramakant Soni @ EISTI Cergy 17
Self Message
A self message can represent a
recursive call of an operation, or one
method calling another method
belonging to the same object.
It is shown as creating a nested focus
of control in the lifeline’s execution
occurrence.
12/2/2014Ramakant Soni @ EISTI Cergy 18
Combined Fragments
A combined fragment is one or more processing
sequence enclosed in a frame and executed under
specific named circumstances.
The fragments available are:
alt- Alternative fragment models if…then…else constructs. Only one
sequence occurs on any occasion.
opt- Optional. Encloses a sequence that might or might not happen.
You can specify, in the guard, the condition under which it
occurs.
break- If this fragment is executed, the rest of the sequence is
abandoned.
Par- Parallel fragment denotes concurrent processing.
12/2/2014Ramakant Soni @ EISTI Cergy 19
fragments
Seq - There are two or more operand fragments. Messages
involving the same lifeline must occur in the order of the fragments.
Where they do not involve the same lifelines, messages from
different fragments may be interleaved in parallel.
strict - Strict sequencing fragment encloses a series of messages
which must occur in the given order.
neg - Negative fragment encloses an invalid series of messages.
loop - Loop fragment encloses a series of messages which are
repeated.
Loop combined fragments have the properties Min and Max,
which indicate the minimum and maximum number of times that
the fragment can be repeated. The default is no restriction.
12/2/2014Ramakant Soni @ EISTI Cergy 20
fragments
ignore - Ignore fragment declares a message or message to be of
no interest if it appears in the current context.
consider - Consider fragment is in effect the opposite of the ignore
fragment: any message not included in the consider fragment
should be ignored.
assert - Assertion fragment designates that any sequence not
shown as an operand of the assertion is invalid.
12/2/2014Ramakant Soni @ EISTI Cergy 21
Combined Fragment Example
12/2/2014Ramakant Soni @ EISTI Cergy 22
Combined Fragment Example
12/2/2014Ramakant Soni @ EISTI Cergy 23
12/2/2014Ramakant Soni @ EISTI Cergy 24
Interaction Operands
Interaction operand is a named element representing
the most general interaction unit. Each interaction
fragment is conceptually like an interaction by itself.
Every combined fragment contains at least one
interaction operand, which can contain messages,
interaction uses, and smaller combined fragments.
12/2/2014Ramakant Soni @ EISTI Cergy 25
Interaction Operands Example
12/2/2014Ramakant Soni @ EISTI Cergy 26
Sequence Diagram Examples
Example 1:
Order booking
scenario
12/2/2014Ramakant Soni @ EISTI Cergy 27
Example: Facebook Authentication
Scenario:- Facebook uses OAuth 2.0 protocol framework which enables
web application (called "client"), which is usually not the FB resource
owner but is acting on the FB user's behalf, to request access to
resources controlled by the FB user and hosted by the FB server. Instead
of using the FB user credentials to access protected resources, the web
application obtains an access token.
Web application should be registered by Facebook to have an
application ID (client_id) and secret (client_secret). When request to
some protected Facebook resources is received, web browser ("user
agent") is redirected to Facebook's authorization server with application
ID and the URL the user should be redirected back to after the
authorization process.
User receives back Request for Permission form. If the user authorizes the
application to get his/her data, Facebook authorization server redirects
back to the URI that was specified before together with authorization
code ("verification string"). The authorization code can be exchanged
by web application for an OAuth access token.
12/2/2014Ramakant Soni @ EISTI Cergy 28
If web application obtains the access token for a FB user, it can
perform authorized requests on behalf of that FB user by including the
access token in the Facebook Graph API requests. If the user did not
authorize web application, Facebook issues redirect request to the URI
specified before, and adds the error_reason parameter to notify the
web application that authorization request was denied.
12/2/2014Ramakant Soni @ EISTI Cergy 29
Sequence
Diagram
For
Facebook
Authentication
Process
12/2/2014Ramakant Soni @ EISTI Cergy 30
UML Diagrams for ATM: Use Case
12/2/2014Ramakant Soni @ EISTI Cergy 31
UML Diagrams for ATM: Sequence diagram
12/2/2014Ramakant Soni @ EISTI Cergy 32
UML Diagrams for ATM: class diagram
12/2/2014Ramakant Soni @ EISTI Cergy 33
Exercise:
To generate sequence diagram using use case
Steps:-
1. Designate actors and business system—Who is taking part?
2. Designate initiators—Who starts interactions?
3. Describe the message exchange between actors and business
system—Which messages are being exchanged?
4. Identify the course of interactions—What is the order?
5. Insert additional information—What else is important?
6. Verify the view—Is everything correct?
12/2/2014Ramakant Soni @ EISTI Cergy 34
Exercise: Home heating system
Home Owner
Power Up
Power Down
Change Temp.
Home Heating
Adjust Temp
Temp. High
Temp. Low
«includes»
«includes»
«includes»
«includes»
12/2/2014Ramakant Soni @ EISTI Cergy 35
Exercise: Credit card processing system Use case
12/2/2014Ramakant Soni @ EISTI Cergy 36
Exercise: Online Shopping
12/2/2014Ramakant Soni @ EISTI Cergy 37
References:
[1] http://www.uml-diagrams.org/
[2] http://www.wikipedia.com/UML%diagrams
[3] http://staruml.sourceforge.net/docs/user-guide%28en%29/ch05_3.html
[4] http://www.ibm.com/developerworks/rational/library/3101. html
[5] http://www.uml-diagrams.org/sequence-diagrams-examples.html

Contenu connexe

Tendances (20)

object oriented methodologies
object oriented methodologiesobject oriented methodologies
object oriented methodologies
 
Uml class-diagram
Uml class-diagramUml class-diagram
Uml class-diagram
 
Cohesion and coupling
Cohesion and couplingCohesion and coupling
Cohesion and coupling
 
Sequence Diagram
Sequence DiagramSequence Diagram
Sequence Diagram
 
CS8592-OOAD Lecture Notes Unit-3
CS8592-OOAD Lecture Notes Unit-3CS8592-OOAD Lecture Notes Unit-3
CS8592-OOAD Lecture Notes Unit-3
 
INTRODUCTION TO UML DIAGRAMS
INTRODUCTION TO UML DIAGRAMSINTRODUCTION TO UML DIAGRAMS
INTRODUCTION TO UML DIAGRAMS
 
Overview of UML Diagrams
Overview of UML DiagramsOverview of UML Diagrams
Overview of UML Diagrams
 
Unit 1( modelling concepts & class modeling)
Unit  1( modelling concepts & class modeling)Unit  1( modelling concepts & class modeling)
Unit 1( modelling concepts & class modeling)
 
Object Oriented Design
Object Oriented DesignObject Oriented Design
Object Oriented Design
 
Sequence diagram
Sequence diagramSequence diagram
Sequence diagram
 
Waterfall model
Waterfall modelWaterfall model
Waterfall model
 
Diagrams
DiagramsDiagrams
Diagrams
 
Unit 2(advanced class modeling & state diagram)
Unit  2(advanced class modeling & state diagram)Unit  2(advanced class modeling & state diagram)
Unit 2(advanced class modeling & state diagram)
 
Introduction to UML
Introduction to UMLIntroduction to UML
Introduction to UML
 
Object Oriented Modeling and Design with UML
Object Oriented Modeling and Design with UMLObject Oriented Modeling and Design with UML
Object Oriented Modeling and Design with UML
 
Grasp patterns and its types
Grasp patterns and its typesGrasp patterns and its types
Grasp patterns and its types
 
08 state diagram and activity diagram
08 state diagram and activity diagram08 state diagram and activity diagram
08 state diagram and activity diagram
 
Ooad presentatin crc cards
Ooad presentatin crc cardsOoad presentatin crc cards
Ooad presentatin crc cards
 
Activity diagram-UML diagram
Activity diagram-UML diagramActivity diagram-UML diagram
Activity diagram-UML diagram
 
Oomd unit1
Oomd unit1Oomd unit1
Oomd unit1
 

En vedette (6)

Sequence diagrams in UML
Sequence diagrams in UMLSequence diagrams in UML
Sequence diagrams in UML
 
Sequence diagrams
Sequence diagramsSequence diagrams
Sequence diagrams
 
Uml sequence diagrams
Uml sequence diagramsUml sequence diagrams
Uml sequence diagrams
 
Domain Modeling
Domain ModelingDomain Modeling
Domain Modeling
 
Lecture#08 sequence diagrams
Lecture#08 sequence diagramsLecture#08 sequence diagrams
Lecture#08 sequence diagrams
 
Use case-diagrams
Use case-diagramsUse case-diagrams
Use case-diagrams
 

Similaire à Sequence diagram- UML diagram

Transaction handling in com, ejb and .net
Transaction handling in com, ejb and .netTransaction handling in com, ejb and .net
Transaction handling in com, ejb and .netijseajournal
 
Local Service Search Engine Management System LSSEMS
Local Service Search Engine Management System LSSEMSLocal Service Search Engine Management System LSSEMS
Local Service Search Engine Management System LSSEMSYogeshIJTSRD
 
Architectural patterns part 4
Architectural patterns part 4Architectural patterns part 4
Architectural patterns part 4assinha
 
Darshan sem4 140703_ooad_2014 (diagrams)
Darshan sem4 140703_ooad_2014 (diagrams)Darshan sem4 140703_ooad_2014 (diagrams)
Darshan sem4 140703_ooad_2014 (diagrams)Gajeshwar Bahekar
 
Password protected diary
Password protected diaryPassword protected diary
Password protected diarySHARDA SHARAN
 
Tcs NQTExam technical questions
Tcs NQTExam technical questionsTcs NQTExam technical questions
Tcs NQTExam technical questionsAniketBhandare2
 
Realizing an Application Use Case
Realizing an Application Use CaseRealizing an Application Use Case
Realizing an Application Use CaseLeslie Munday
 
NEr using N-Gram techniqueppt
NEr using N-Gram techniquepptNEr using N-Gram techniqueppt
NEr using N-Gram techniquepptGyandeep Kansal
 
ActionScript 3.0 Fundamentals
ActionScript 3.0 FundamentalsActionScript 3.0 Fundamentals
ActionScript 3.0 FundamentalsSaurabh Narula
 
Design patterns through java
Design patterns through javaDesign patterns through java
Design patterns through javaAditya Bhuyan
 
Use Case and Activity Diagrams Modeling Notation
Use Case and Activity Diagrams Modeling NotationUse Case and Activity Diagrams Modeling Notation
Use Case and Activity Diagrams Modeling NotationLeslie Munday
 
Introduction to UML
Introduction to UMLIntroduction to UML
Introduction to UMLyndaravind
 
Oop2011 actor presentation_stal
Oop2011 actor presentation_stalOop2011 actor presentation_stal
Oop2011 actor presentation_stalMichael Stal
 
Report on mini project(Student database handling using RMI)
Report on mini project(Student database handling using RMI)Report on mini project(Student database handling using RMI)
Report on mini project(Student database handling using RMI)shraddha mane
 

Similaire à Sequence diagram- UML diagram (20)

Transaction handling in com, ejb and .net
Transaction handling in com, ejb and .netTransaction handling in com, ejb and .net
Transaction handling in com, ejb and .net
 
Local Service Search Engine Management System LSSEMS
Local Service Search Engine Management System LSSEMSLocal Service Search Engine Management System LSSEMS
Local Service Search Engine Management System LSSEMS
 
C# concepts
C# conceptsC# concepts
C# concepts
 
Architectural patterns part 4
Architectural patterns part 4Architectural patterns part 4
Architectural patterns part 4
 
Darshan sem4 140703_ooad_2014 (diagrams)
Darshan sem4 140703_ooad_2014 (diagrams)Darshan sem4 140703_ooad_2014 (diagrams)
Darshan sem4 140703_ooad_2014 (diagrams)
 
Lecture-7.ppt
Lecture-7.pptLecture-7.ppt
Lecture-7.ppt
 
Password protected diary
Password protected diaryPassword protected diary
Password protected diary
 
Tcs NQTExam technical questions
Tcs NQTExam technical questionsTcs NQTExam technical questions
Tcs NQTExam technical questions
 
Realizing an Application Use Case
Realizing an Application Use CaseRealizing an Application Use Case
Realizing an Application Use Case
 
Encapsulation
EncapsulationEncapsulation
Encapsulation
 
OOP design patterns
OOP design patternsOOP design patterns
OOP design patterns
 
NEr using N-Gram techniqueppt
NEr using N-Gram techniquepptNEr using N-Gram techniqueppt
NEr using N-Gram techniqueppt
 
Final ppt
Final pptFinal ppt
Final ppt
 
ActionScript 3.0 Fundamentals
ActionScript 3.0 FundamentalsActionScript 3.0 Fundamentals
ActionScript 3.0 Fundamentals
 
Asp.net main
Asp.net mainAsp.net main
Asp.net main
 
Design patterns through java
Design patterns through javaDesign patterns through java
Design patterns through java
 
Use Case and Activity Diagrams Modeling Notation
Use Case and Activity Diagrams Modeling NotationUse Case and Activity Diagrams Modeling Notation
Use Case and Activity Diagrams Modeling Notation
 
Introduction to UML
Introduction to UMLIntroduction to UML
Introduction to UML
 
Oop2011 actor presentation_stal
Oop2011 actor presentation_stalOop2011 actor presentation_stal
Oop2011 actor presentation_stal
 
Report on mini project(Student database handling using RMI)
Report on mini project(Student database handling using RMI)Report on mini project(Student database handling using RMI)
Report on mini project(Student database handling using RMI)
 

Plus de Ramakant Soni

GATE 2021 Exam Information
GATE 2021 Exam InformationGATE 2021 Exam Information
GATE 2021 Exam InformationRamakant Soni
 
What is Algorithm - An Overview
What is Algorithm - An OverviewWhat is Algorithm - An Overview
What is Algorithm - An OverviewRamakant Soni
 
Role of Data Cleaning in Data Warehouse
Role of Data Cleaning in Data WarehouseRole of Data Cleaning in Data Warehouse
Role of Data Cleaning in Data WarehouseRamakant Soni
 
NOSQL- Presentation on NoSQL
NOSQL- Presentation on NoSQLNOSQL- Presentation on NoSQL
NOSQL- Presentation on NoSQLRamakant Soni
 
Huffman and Arithmetic coding - Performance analysis
Huffman and Arithmetic coding - Performance analysisHuffman and Arithmetic coding - Performance analysis
Huffman and Arithmetic coding - Performance analysisRamakant Soni
 
UML daigrams for Bank ATM system
UML daigrams for Bank ATM systemUML daigrams for Bank ATM system
UML daigrams for Bank ATM systemRamakant Soni
 
Class diagram- UML diagram
Class diagram- UML diagramClass diagram- UML diagram
Class diagram- UML diagramRamakant Soni
 
Use Case diagram-UML diagram-2
Use Case diagram-UML diagram-2Use Case diagram-UML diagram-2
Use Case diagram-UML diagram-2Ramakant Soni
 
Use Case diagram-UML diagram-1
Use Case diagram-UML diagram-1Use Case diagram-UML diagram-1
Use Case diagram-UML diagram-1Ramakant Soni
 
UML Diagrams- Unified Modeling Language Introduction
UML Diagrams- Unified Modeling Language IntroductionUML Diagrams- Unified Modeling Language Introduction
UML Diagrams- Unified Modeling Language IntroductionRamakant Soni
 

Plus de Ramakant Soni (11)

GATE 2021 Exam Information
GATE 2021 Exam InformationGATE 2021 Exam Information
GATE 2021 Exam Information
 
What is Algorithm - An Overview
What is Algorithm - An OverviewWhat is Algorithm - An Overview
What is Algorithm - An Overview
 
Role of Data Cleaning in Data Warehouse
Role of Data Cleaning in Data WarehouseRole of Data Cleaning in Data Warehouse
Role of Data Cleaning in Data Warehouse
 
Internet of things
Internet of thingsInternet of things
Internet of things
 
NOSQL- Presentation on NoSQL
NOSQL- Presentation on NoSQLNOSQL- Presentation on NoSQL
NOSQL- Presentation on NoSQL
 
Huffman and Arithmetic coding - Performance analysis
Huffman and Arithmetic coding - Performance analysisHuffman and Arithmetic coding - Performance analysis
Huffman and Arithmetic coding - Performance analysis
 
UML daigrams for Bank ATM system
UML daigrams for Bank ATM systemUML daigrams for Bank ATM system
UML daigrams for Bank ATM system
 
Class diagram- UML diagram
Class diagram- UML diagramClass diagram- UML diagram
Class diagram- UML diagram
 
Use Case diagram-UML diagram-2
Use Case diagram-UML diagram-2Use Case diagram-UML diagram-2
Use Case diagram-UML diagram-2
 
Use Case diagram-UML diagram-1
Use Case diagram-UML diagram-1Use Case diagram-UML diagram-1
Use Case diagram-UML diagram-1
 
UML Diagrams- Unified Modeling Language Introduction
UML Diagrams- Unified Modeling Language IntroductionUML Diagrams- Unified Modeling Language Introduction
UML Diagrams- Unified Modeling Language Introduction
 

Dernier

Porous Ceramics seminar and technical writing
Porous Ceramics seminar and technical writingPorous Ceramics seminar and technical writing
Porous Ceramics seminar and technical writingrakeshbaidya232001
 
Introduction and different types of Ethernet.pptx
Introduction and different types of Ethernet.pptxIntroduction and different types of Ethernet.pptx
Introduction and different types of Ethernet.pptxupamatechverse
 
Call Girls in Nagpur Suman Call 7001035870 Meet With Nagpur Escorts
Call Girls in Nagpur Suman Call 7001035870 Meet With Nagpur EscortsCall Girls in Nagpur Suman Call 7001035870 Meet With Nagpur Escorts
Call Girls in Nagpur Suman Call 7001035870 Meet With Nagpur EscortsCall Girls in Nagpur High Profile
 
Introduction to Multiple Access Protocol.pptx
Introduction to Multiple Access Protocol.pptxIntroduction to Multiple Access Protocol.pptx
Introduction to Multiple Access Protocol.pptxupamatechverse
 
HARMONY IN THE NATURE AND EXISTENCE - Unit-IV
HARMONY IN THE NATURE AND EXISTENCE - Unit-IVHARMONY IN THE NATURE AND EXISTENCE - Unit-IV
HARMONY IN THE NATURE AND EXISTENCE - Unit-IVRajaP95
 
247267395-1-Symmetric-and-distributed-shared-memory-architectures-ppt (1).ppt
247267395-1-Symmetric-and-distributed-shared-memory-architectures-ppt (1).ppt247267395-1-Symmetric-and-distributed-shared-memory-architectures-ppt (1).ppt
247267395-1-Symmetric-and-distributed-shared-memory-architectures-ppt (1).pptssuser5c9d4b1
 
CCS335 _ Neural Networks and Deep Learning Laboratory_Lab Complete Record
CCS335 _ Neural Networks and Deep Learning Laboratory_Lab Complete RecordCCS335 _ Neural Networks and Deep Learning Laboratory_Lab Complete Record
CCS335 _ Neural Networks and Deep Learning Laboratory_Lab Complete RecordAsst.prof M.Gokilavani
 
Top Rated Pune Call Girls Budhwar Peth ⟟ 6297143586 ⟟ Call Me For Genuine Se...
Top Rated  Pune Call Girls Budhwar Peth ⟟ 6297143586 ⟟ Call Me For Genuine Se...Top Rated  Pune Call Girls Budhwar Peth ⟟ 6297143586 ⟟ Call Me For Genuine Se...
Top Rated Pune Call Girls Budhwar Peth ⟟ 6297143586 ⟟ Call Me For Genuine Se...Call Girls in Nagpur High Profile
 
MANUFACTURING PROCESS-II UNIT-2 LATHE MACHINE
MANUFACTURING PROCESS-II UNIT-2 LATHE MACHINEMANUFACTURING PROCESS-II UNIT-2 LATHE MACHINE
MANUFACTURING PROCESS-II UNIT-2 LATHE MACHINESIVASHANKAR N
 
Sheet Pile Wall Design and Construction: A Practical Guide for Civil Engineer...
Sheet Pile Wall Design and Construction: A Practical Guide for Civil Engineer...Sheet Pile Wall Design and Construction: A Practical Guide for Civil Engineer...
Sheet Pile Wall Design and Construction: A Practical Guide for Civil Engineer...Dr.Costas Sachpazis
 
VIP Call Girls Service Kondapur Hyderabad Call +91-8250192130
VIP Call Girls Service Kondapur Hyderabad Call +91-8250192130VIP Call Girls Service Kondapur Hyderabad Call +91-8250192130
VIP Call Girls Service Kondapur Hyderabad Call +91-8250192130Suhani Kapoor
 
OSVC_Meta-Data based Simulation Automation to overcome Verification Challenge...
OSVC_Meta-Data based Simulation Automation to overcome Verification Challenge...OSVC_Meta-Data based Simulation Automation to overcome Verification Challenge...
OSVC_Meta-Data based Simulation Automation to overcome Verification Challenge...Soham Mondal
 
IMPLICATIONS OF THE ABOVE HOLISTIC UNDERSTANDING OF HARMONY ON PROFESSIONAL E...
IMPLICATIONS OF THE ABOVE HOLISTIC UNDERSTANDING OF HARMONY ON PROFESSIONAL E...IMPLICATIONS OF THE ABOVE HOLISTIC UNDERSTANDING OF HARMONY ON PROFESSIONAL E...
IMPLICATIONS OF THE ABOVE HOLISTIC UNDERSTANDING OF HARMONY ON PROFESSIONAL E...RajaP95
 
Coefficient of Thermal Expansion and their Importance.pptx
Coefficient of Thermal Expansion and their Importance.pptxCoefficient of Thermal Expansion and their Importance.pptx
Coefficient of Thermal Expansion and their Importance.pptxAsutosh Ranjan
 
UNIT-III FMM. DIMENSIONAL ANALYSIS
UNIT-III FMM.        DIMENSIONAL ANALYSISUNIT-III FMM.        DIMENSIONAL ANALYSIS
UNIT-III FMM. DIMENSIONAL ANALYSISrknatarajan
 
Call for Papers - African Journal of Biological Sciences, E-ISSN: 2663-2187, ...
Call for Papers - African Journal of Biological Sciences, E-ISSN: 2663-2187, ...Call for Papers - African Journal of Biological Sciences, E-ISSN: 2663-2187, ...
Call for Papers - African Journal of Biological Sciences, E-ISSN: 2663-2187, ...Christo Ananth
 
High Profile Call Girls Nagpur Meera Call 7001035870 Meet With Nagpur Escorts
High Profile Call Girls Nagpur Meera Call 7001035870 Meet With Nagpur EscortsHigh Profile Call Girls Nagpur Meera Call 7001035870 Meet With Nagpur Escorts
High Profile Call Girls Nagpur Meera Call 7001035870 Meet With Nagpur EscortsCall Girls in Nagpur High Profile
 
Call for Papers - Educational Administration: Theory and Practice, E-ISSN: 21...
Call for Papers - Educational Administration: Theory and Practice, E-ISSN: 21...Call for Papers - Educational Administration: Theory and Practice, E-ISSN: 21...
Call for Papers - Educational Administration: Theory and Practice, E-ISSN: 21...Christo Ananth
 
Call Girls Service Nashik Vaishnavi 7001305949 Independent Escort Service Nashik
Call Girls Service Nashik Vaishnavi 7001305949 Independent Escort Service NashikCall Girls Service Nashik Vaishnavi 7001305949 Independent Escort Service Nashik
Call Girls Service Nashik Vaishnavi 7001305949 Independent Escort Service NashikCall Girls in Nagpur High Profile
 

Dernier (20)

Porous Ceramics seminar and technical writing
Porous Ceramics seminar and technical writingPorous Ceramics seminar and technical writing
Porous Ceramics seminar and technical writing
 
Introduction and different types of Ethernet.pptx
Introduction and different types of Ethernet.pptxIntroduction and different types of Ethernet.pptx
Introduction and different types of Ethernet.pptx
 
Call Girls in Nagpur Suman Call 7001035870 Meet With Nagpur Escorts
Call Girls in Nagpur Suman Call 7001035870 Meet With Nagpur EscortsCall Girls in Nagpur Suman Call 7001035870 Meet With Nagpur Escorts
Call Girls in Nagpur Suman Call 7001035870 Meet With Nagpur Escorts
 
Introduction to Multiple Access Protocol.pptx
Introduction to Multiple Access Protocol.pptxIntroduction to Multiple Access Protocol.pptx
Introduction to Multiple Access Protocol.pptx
 
HARMONY IN THE NATURE AND EXISTENCE - Unit-IV
HARMONY IN THE NATURE AND EXISTENCE - Unit-IVHARMONY IN THE NATURE AND EXISTENCE - Unit-IV
HARMONY IN THE NATURE AND EXISTENCE - Unit-IV
 
DJARUM4D - SLOT GACOR ONLINE | SLOT DEMO ONLINE
DJARUM4D - SLOT GACOR ONLINE | SLOT DEMO ONLINEDJARUM4D - SLOT GACOR ONLINE | SLOT DEMO ONLINE
DJARUM4D - SLOT GACOR ONLINE | SLOT DEMO ONLINE
 
247267395-1-Symmetric-and-distributed-shared-memory-architectures-ppt (1).ppt
247267395-1-Symmetric-and-distributed-shared-memory-architectures-ppt (1).ppt247267395-1-Symmetric-and-distributed-shared-memory-architectures-ppt (1).ppt
247267395-1-Symmetric-and-distributed-shared-memory-architectures-ppt (1).ppt
 
CCS335 _ Neural Networks and Deep Learning Laboratory_Lab Complete Record
CCS335 _ Neural Networks and Deep Learning Laboratory_Lab Complete RecordCCS335 _ Neural Networks and Deep Learning Laboratory_Lab Complete Record
CCS335 _ Neural Networks and Deep Learning Laboratory_Lab Complete Record
 
Top Rated Pune Call Girls Budhwar Peth ⟟ 6297143586 ⟟ Call Me For Genuine Se...
Top Rated  Pune Call Girls Budhwar Peth ⟟ 6297143586 ⟟ Call Me For Genuine Se...Top Rated  Pune Call Girls Budhwar Peth ⟟ 6297143586 ⟟ Call Me For Genuine Se...
Top Rated Pune Call Girls Budhwar Peth ⟟ 6297143586 ⟟ Call Me For Genuine Se...
 
MANUFACTURING PROCESS-II UNIT-2 LATHE MACHINE
MANUFACTURING PROCESS-II UNIT-2 LATHE MACHINEMANUFACTURING PROCESS-II UNIT-2 LATHE MACHINE
MANUFACTURING PROCESS-II UNIT-2 LATHE MACHINE
 
Sheet Pile Wall Design and Construction: A Practical Guide for Civil Engineer...
Sheet Pile Wall Design and Construction: A Practical Guide for Civil Engineer...Sheet Pile Wall Design and Construction: A Practical Guide for Civil Engineer...
Sheet Pile Wall Design and Construction: A Practical Guide for Civil Engineer...
 
VIP Call Girls Service Kondapur Hyderabad Call +91-8250192130
VIP Call Girls Service Kondapur Hyderabad Call +91-8250192130VIP Call Girls Service Kondapur Hyderabad Call +91-8250192130
VIP Call Girls Service Kondapur Hyderabad Call +91-8250192130
 
OSVC_Meta-Data based Simulation Automation to overcome Verification Challenge...
OSVC_Meta-Data based Simulation Automation to overcome Verification Challenge...OSVC_Meta-Data based Simulation Automation to overcome Verification Challenge...
OSVC_Meta-Data based Simulation Automation to overcome Verification Challenge...
 
IMPLICATIONS OF THE ABOVE HOLISTIC UNDERSTANDING OF HARMONY ON PROFESSIONAL E...
IMPLICATIONS OF THE ABOVE HOLISTIC UNDERSTANDING OF HARMONY ON PROFESSIONAL E...IMPLICATIONS OF THE ABOVE HOLISTIC UNDERSTANDING OF HARMONY ON PROFESSIONAL E...
IMPLICATIONS OF THE ABOVE HOLISTIC UNDERSTANDING OF HARMONY ON PROFESSIONAL E...
 
Coefficient of Thermal Expansion and their Importance.pptx
Coefficient of Thermal Expansion and their Importance.pptxCoefficient of Thermal Expansion and their Importance.pptx
Coefficient of Thermal Expansion and their Importance.pptx
 
UNIT-III FMM. DIMENSIONAL ANALYSIS
UNIT-III FMM.        DIMENSIONAL ANALYSISUNIT-III FMM.        DIMENSIONAL ANALYSIS
UNIT-III FMM. DIMENSIONAL ANALYSIS
 
Call for Papers - African Journal of Biological Sciences, E-ISSN: 2663-2187, ...
Call for Papers - African Journal of Biological Sciences, E-ISSN: 2663-2187, ...Call for Papers - African Journal of Biological Sciences, E-ISSN: 2663-2187, ...
Call for Papers - African Journal of Biological Sciences, E-ISSN: 2663-2187, ...
 
High Profile Call Girls Nagpur Meera Call 7001035870 Meet With Nagpur Escorts
High Profile Call Girls Nagpur Meera Call 7001035870 Meet With Nagpur EscortsHigh Profile Call Girls Nagpur Meera Call 7001035870 Meet With Nagpur Escorts
High Profile Call Girls Nagpur Meera Call 7001035870 Meet With Nagpur Escorts
 
Call for Papers - Educational Administration: Theory and Practice, E-ISSN: 21...
Call for Papers - Educational Administration: Theory and Practice, E-ISSN: 21...Call for Papers - Educational Administration: Theory and Practice, E-ISSN: 21...
Call for Papers - Educational Administration: Theory and Practice, E-ISSN: 21...
 
Call Girls Service Nashik Vaishnavi 7001305949 Independent Escort Service Nashik
Call Girls Service Nashik Vaishnavi 7001305949 Independent Escort Service NashikCall Girls Service Nashik Vaishnavi 7001305949 Independent Escort Service Nashik
Call Girls Service Nashik Vaishnavi 7001305949 Independent Escort Service Nashik
 

Sequence diagram- UML diagram

  • 1. Ramakant Soni Assistant Professor Dept. of Computer Science B K Birla Institute of Engineering & Technology, Pilani, India ramakant.soni1988@gmail.com 2nd December 2014 14h 00-17h 00 Ramakant Soni @ EISTI Cergy 12/2/2014 1
  • 2. 12/2/2014Ramakant Soni @ EISTI Cergy 2 Sequence Diagram Definition A Sequence diagram is an interaction diagram that shows -- how the objects and classes involved in the scenario operate with one another. -- the sequence of messages exchanged .
  • 3. 12/2/2014Ramakant Soni @ EISTI Cergy 3 Its Significance An organization's technical staff can find sequence diagrams useful in documenting how a future system should behave. During the design phase, architects and developers can use the diagram to force out the system's object interactions, thus fleshing out overall system design.
  • 4. 12/2/2014Ramakant Soni @ EISTI Cergy 4 Its Use One of the primary uses of sequence diagrams is in the transition from requirements expressed as use cases to the next level of refinement. Use cases are often refined into one or more sequence diagrams. In addition to their use in designing new systems, sequence diagrams can be used to document how objects in an existing system currently interact. This documentation is very useful when transitioning a system to another person or organization.
  • 5. 12/2/2014Ramakant Soni @ EISTI Cergy 5 Targets Objects as well as classes can be targets which means that messages can be sent to them. A target is displayed as a rectangle with some text in it. Below the target, its lifeline(vertical dashed line) extends for as long as the target exists. Target Lifeline
  • 6. 12/2/2014Ramakant Soni @ EISTI Cergy 6 Multi Object To show how a client interacts with the elements of a collection, you can use a multi-object. Its basic notation is:
  • 7. 12/2/2014Ramakant Soni @ EISTI Cergy 7 Class The basic notation for a class is: Only class messages (e.g. shared or static methods in some programming languages) can be sent to a class. Generally text of a class is not underlined, which is how you can distinguish it from an object.
  • 8. 12/2/2014Ramakant Soni @ EISTI Cergy 8 Messages Message is a named element that defines one specific kind of communication between lifelines of an interaction. The message specifies not only the kind of communication, but also the sender and the receiver.
  • 9. 12/2/2014Ramakant Soni @ EISTI Cergy 9 Message Notation A message is represented by an arrow between the life lines of two objects. -Self calls are also allowed -The time required by the receiver object to process the message is denoted by an activation-box. A message is labeled at minimum with the message name.
  • 10. 12/2/2014Ramakant Soni @ EISTI Cergy 10 Message Types & representation
  • 11. 12/2/2014Ramakant Soni @ EISTI Cergy 11 Call Message Call message is a kind of message that represents an invocation of operation of target lifeline. Its type: - Synchronous Call - Asynchronous Call
  • 12. 12/2/2014Ramakant Soni @ EISTI Cergy 12 Synchronous Call Synchronous call typically represents operation call - send message and suspend execution while waiting for response. Synchronous call messages are shown with filled arrow head.
  • 13. 12/2/2014Ramakant Soni @ EISTI Cergy 13 Asynchronous Call- Send Asynchronous call - send message and proceed immediately without waiting for return value. Asynchronous messages have an open arrow head.
  • 14. 12/2/2014Ramakant Soni @ EISTI Cergy 14 Create Message Create message is sent to a lifeline to create itself. It is shown as a dashed line with open arrowhead.
  • 15. 12/2/2014Ramakant Soni @ EISTI Cergy 15 Destroy Message Delete message is sent to terminate another lifeline. The lifeline usually ends with a cross in the form of an X at the bottom denoting destruction occurrence.
  • 16. 12/2/2014Ramakant Soni @ EISTI Cergy 16 Return Message Reply message to an operation call is shown as a dashed line with open arrow head (looks similar to creation message).
  • 17. 12/2/2014Ramakant Soni @ EISTI Cergy 17 Self Message A self message can represent a recursive call of an operation, or one method calling another method belonging to the same object. It is shown as creating a nested focus of control in the lifeline’s execution occurrence.
  • 18. 12/2/2014Ramakant Soni @ EISTI Cergy 18 Combined Fragments A combined fragment is one or more processing sequence enclosed in a frame and executed under specific named circumstances. The fragments available are: alt- Alternative fragment models if…then…else constructs. Only one sequence occurs on any occasion. opt- Optional. Encloses a sequence that might or might not happen. You can specify, in the guard, the condition under which it occurs. break- If this fragment is executed, the rest of the sequence is abandoned. Par- Parallel fragment denotes concurrent processing.
  • 19. 12/2/2014Ramakant Soni @ EISTI Cergy 19 fragments Seq - There are two or more operand fragments. Messages involving the same lifeline must occur in the order of the fragments. Where they do not involve the same lifelines, messages from different fragments may be interleaved in parallel. strict - Strict sequencing fragment encloses a series of messages which must occur in the given order. neg - Negative fragment encloses an invalid series of messages. loop - Loop fragment encloses a series of messages which are repeated. Loop combined fragments have the properties Min and Max, which indicate the minimum and maximum number of times that the fragment can be repeated. The default is no restriction.
  • 20. 12/2/2014Ramakant Soni @ EISTI Cergy 20 fragments ignore - Ignore fragment declares a message or message to be of no interest if it appears in the current context. consider - Consider fragment is in effect the opposite of the ignore fragment: any message not included in the consider fragment should be ignored. assert - Assertion fragment designates that any sequence not shown as an operand of the assertion is invalid.
  • 21. 12/2/2014Ramakant Soni @ EISTI Cergy 21 Combined Fragment Example
  • 22. 12/2/2014Ramakant Soni @ EISTI Cergy 22 Combined Fragment Example
  • 23. 12/2/2014Ramakant Soni @ EISTI Cergy 23
  • 24. 12/2/2014Ramakant Soni @ EISTI Cergy 24 Interaction Operands Interaction operand is a named element representing the most general interaction unit. Each interaction fragment is conceptually like an interaction by itself. Every combined fragment contains at least one interaction operand, which can contain messages, interaction uses, and smaller combined fragments.
  • 25. 12/2/2014Ramakant Soni @ EISTI Cergy 25 Interaction Operands Example
  • 26. 12/2/2014Ramakant Soni @ EISTI Cergy 26 Sequence Diagram Examples Example 1: Order booking scenario
  • 27. 12/2/2014Ramakant Soni @ EISTI Cergy 27 Example: Facebook Authentication Scenario:- Facebook uses OAuth 2.0 protocol framework which enables web application (called "client"), which is usually not the FB resource owner but is acting on the FB user's behalf, to request access to resources controlled by the FB user and hosted by the FB server. Instead of using the FB user credentials to access protected resources, the web application obtains an access token. Web application should be registered by Facebook to have an application ID (client_id) and secret (client_secret). When request to some protected Facebook resources is received, web browser ("user agent") is redirected to Facebook's authorization server with application ID and the URL the user should be redirected back to after the authorization process. User receives back Request for Permission form. If the user authorizes the application to get his/her data, Facebook authorization server redirects back to the URI that was specified before together with authorization code ("verification string"). The authorization code can be exchanged by web application for an OAuth access token.
  • 28. 12/2/2014Ramakant Soni @ EISTI Cergy 28 If web application obtains the access token for a FB user, it can perform authorized requests on behalf of that FB user by including the access token in the Facebook Graph API requests. If the user did not authorize web application, Facebook issues redirect request to the URI specified before, and adds the error_reason parameter to notify the web application that authorization request was denied.
  • 29. 12/2/2014Ramakant Soni @ EISTI Cergy 29 Sequence Diagram For Facebook Authentication Process
  • 30. 12/2/2014Ramakant Soni @ EISTI Cergy 30 UML Diagrams for ATM: Use Case
  • 31. 12/2/2014Ramakant Soni @ EISTI Cergy 31 UML Diagrams for ATM: Sequence diagram
  • 32. 12/2/2014Ramakant Soni @ EISTI Cergy 32 UML Diagrams for ATM: class diagram
  • 33. 12/2/2014Ramakant Soni @ EISTI Cergy 33 Exercise: To generate sequence diagram using use case Steps:- 1. Designate actors and business system—Who is taking part? 2. Designate initiators—Who starts interactions? 3. Describe the message exchange between actors and business system—Which messages are being exchanged? 4. Identify the course of interactions—What is the order? 5. Insert additional information—What else is important? 6. Verify the view—Is everything correct?
  • 34. 12/2/2014Ramakant Soni @ EISTI Cergy 34 Exercise: Home heating system Home Owner Power Up Power Down Change Temp. Home Heating Adjust Temp Temp. High Temp. Low «includes» «includes» «includes» «includes»
  • 35. 12/2/2014Ramakant Soni @ EISTI Cergy 35 Exercise: Credit card processing system Use case
  • 36. 12/2/2014Ramakant Soni @ EISTI Cergy 36 Exercise: Online Shopping
  • 37. 12/2/2014Ramakant Soni @ EISTI Cergy 37 References: [1] http://www.uml-diagrams.org/ [2] http://www.wikipedia.com/UML%diagrams [3] http://staruml.sourceforge.net/docs/user-guide%28en%29/ch05_3.html [4] http://www.ibm.com/developerworks/rational/library/3101. html [5] http://www.uml-diagrams.org/sequence-diagrams-examples.html