You are on page 1of 10

Modeling Scenarios

with Sequence Diagrams

Mustafa K. Isik

April 23rd, 2007


Scenario - Definition
• sequence of processing steps
• to be executed under certain circumstances
• defined goal
• begins with a triggering event
• ends by completing task successfully or
failing
Scenario - Definition (2)

• can document business processes (n : 1)


• visualization of a specific execution instance of the
respective business process

• two fundamental description categories


• successful execution of a process

• failed execution of a process


UML - Visualization of
dynamic activities
• Object Diagram

• system snapshot on object level, not suitable for


modeling scenarios

• Communication Diagram (formerly known as


Collaboration Diagram)

• models object collaboration during operation


execution

• Sequence Diagram

• precise depiction of chronological execution order


Sequence Diagram

• precise description of activities


• permits for discussion of technical correctness

• suitable as means for design and


implementation communication

• emphasizes chronological aspect of dynamic


behavior
Sequence Diagram -
Components

objName : ClassName Object

life line

end of life
X
Sequence Diagram -
Components (2)

objA : ClassName objB : ClassName

message(parameter)

activation
bar (optional)
Sequence Diagram -
Messages / Actions

synchronous
asynchronous

Return (opt.)
<<create>> obj : Class
Instantiation
<<destroy>>
Dereferencing X
Example
order : OrderControl chk : CardChecker

checkCredit()
<<create>>
card : CreditCard

charge(card)

<<destroy>>
X
Literature
• Balzert, H 2000, Lehrbuch der
Softwaretechnik - Software-Entwicklung, 2.
Aufl., Spektrum Akad. Verlag, Heidelberg,
Chapter 2.9.5
• Pilone, D 2004, UML Kurz & Gut, O’Reilly, S.
64 - 68
• Hamilton, K, Russell, M, 2006, Learning UML
2.0, O’Reilly, Chapter 7

You might also like