What Is Sequence Diagram
What Is Sequence Diagram
What is Sequence
Diagram?
Purpose of Sequence
Diagram
At a Glance
Object Dimension
Time Dimension
Sequence Fragments
Combined Fragment
Example
We use cookies to offer you a better experience. By visiting our website, you agree to the use of cookies as OK
described in our Cookie Policy (/aboutus/cookie-policy.jsp).
Related Links Sequence Diagrams captures:
the interaction that takes place in a collaboration that either realizes a use case or
an operation (instance diagrams or generic diagrams)
high-level interactions between user of the system and the system, between the
system and other systems, or between subsystems (sometimes known as system
sequence diagrams)
Model the interaction between object instances within a collaboration that realizes
a use case
Either model generic interactions (showing all possible paths through the
interaction) or specific instances of a interaction (showing just one path through
the interaction)
We use cookies to offer you a better experience. By visiting our website, you agree to the use of cookies as OK
Object Dimension
described in our Cookie Policy (/aboutus/cookie-policy.jsp).
The horizontal axis shows the elements that are involved in the interaction
Conventionally, the objects involved in the operation are listed from left to right
according to when they take part in the message sequence. However, the elements
on the horizontal axis may appear in any order
Time Dimension
The vertical axis represents time proceedings (or progressing) down the page.
Note that:
Time in a sequence diagram is all a about ordering, not duration. The vertical space in
an interaction diagram is not relevant for the duration of the interaction.
Below is a sequence diagram for making a hotel reservation. The object initiating the
sequence of messages is a Reservation window.
Note That: Class and object diagrams are static model views. Interaction diagrams are
dynamic. They describe how objects collaborate.
We use cookies to offer you a better experience. By visiting our website, you agree to the use of cookies as OK
described in our Cookie Policy (/aboutus/cookie-policy.jsp).
Sequence Diagram Notation
Actor
Note that:
Lifeline
We use cookies to offer you a better experience. By visiting our website, you agree to the use of cookies as OK
described in our Cookie Policy (/aboutus/cookie-policy.jsp).
Activations
Call Message
Return Message
Self Message
We use cookies to offer you a better experience. By visiting our website, you agree to the use of cookies as OK
described in our Cookie Policy (/aboutus/cookie-policy.jsp).
Recursive Message
Create Message
Destroy Message
Duration Message
We use cookies to offer you a better experience. By visiting our website, you agree to the use of cookies as OK
described in our Cookie Policy (/aboutus/cookie-policy.jsp).
Note
Sequence Fragments
UML 2.0 (http://www.omg.org/spec/UML/2.0/) introduces sequence (or interaction)
fragments. Sequence fragments make it easier to create and maintain accurate
sequence diagrams
The fragment operator (in the top left cornet) indicates the type of fragment
We use cookies to offer you a better experience. By visiting our website, you agree to the use of cookies as OK
described in our Cookie Policy (/aboutus/cookie-policy.jsp).
Operator Fragment Type
opt Optional: the fragment executes only if the supplied condition is true.
Equivalent to an alt only with one trace.
Loop: the fragment may execute multiple times, and the guard
loop indicates the basis of iteration.
region Critical region: the fragment can have only one thread executing it at
once.
Note That:
Combined fragment keywords: alt, opt, break, par, seq, strict, neg, critical, ignore,
consider, assert and loop.
Constraints are usually used to show timing constraints on messages. They can
apply to the timing of one message or intervals between messages.
We use cookies to offer you a better experience. By visiting our website, you agree to the use of cookies as OK
described in our Cookie Policy (/aboutus/cookie-policy.jsp).
Sequence Diagram for Modeling Use Case Scenarios
User requirements are captured as use cases that are refined into scenarios. A use
case is a collection of interactions between external actors and a system. In UML, a
use case is:
"the specification of a sequence of actions, including variants, that a system (or entity)
can perform, interacting with actors of the system."
A scenario is one path or flow through a use case that describes a sequence of events
that occurs during one particular execution of a system which is often represented by
a sequence diagram.
A good sequence diagram is still a bit above the level of the real code
Related Links
We use cookies to offer you a better experience. By visiting our website, you agree to the use of cookies as OK
described in our Cookie Policy (/aboutus/cookie-policy.jsp).
Turn every software project into a successful one.
We use cookies to offer you a better experience. By visiting our website, you agree to the use of cookies as OK
described in our Cookie Policy (/aboutus/cookie-policy.jsp).