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.) Instantiation
Dereferencing
<<create>> <<destroy>>
obj : Class

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 64 - 68

• Pilone, D 2004, UML Kurz & Gut, O’Reilly, S. • Hamilton, K, Russell, M, 2006, Learning UML
2.0, O’Reilly, Chapter 7

Sign up to vote on this title
UsefulNot useful