Sequence Diagram Tutorial
Sequence Diagram Tutorial
From:
UML Distilled, Third Edition, Chapter 4
M. Fowler
Then: 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.
Phone
Recipient
Picks up
Dial tone
Dial
Ring
Ring notification
Picks up
Hello
Hello
Representing Objects
Squares with object type, optionally preceded by "name :"
write object's name if it clarifies the diagram
object's "life line" represented by dashed vert. line
Messages, continued
messages (method calls) indicated by arrow to other object
dashed arrow back indicates return
different arrowheads for normal / concurrent
(asynchronous) calls
Lifetime of objects
creation: arrow with 'new' written
above it
notice that an object created
after the start of the scenario
appears lower than the
others
deletion: an X at bottom of object's
lifeline
Java doesn't explicitly delete
objects; they fall out of scope
and are garbage-collected
Activation
Nesting
Poker
sequence
diagram