08_notes
08_notes
Massimo Felici
• Interactions Diagrams
– Sequence diagrams
– Interaction overview diagrams
– Timing diagrams
– Communication diagrams
• show the order of the interaction visually by using the vertical axis of the
diagram to represent time what messages are sent and when
• Participants – the system parts that interact each other during the sequence
• In UML 2.0, as general modeling language, participants are also at the level of
system parts.
Notations 4
Sequence Diagrams
• Frames
• Lifelines
• Messages and Focus Control
• Combined Fragments
• Interaction Occurrences
• States
• Continuations
• Textual Annotation
• Tabular Notation
Frames
Time. 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.
Objects. 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.
6
Lifelines
Lifelines Names
Syntax Explanation
seoclecturer An object named secolecturer
seoclecturer:Lecturer An object named seoclecturer of class
Lectuer
:Lecturer An anonymous object of class Lecturer
lecturer[i] The object lecturer that is selected by the
index value i
s ref sd3 A subsystem s whose internal interaction
is shown in sequence diagram sd3
(decomposition)
self The connectable element that owns the
interaction shown in the sequence diagram
Messages
• Messages (or signals) on a sequence diagram are specified using an arrow
from the participant (message caller) that wants to pass the message to the
participant (message receiver) that is to receive the message
Message Syntax
[attribute=] signal-or-operation-name [(argument)] [:return-value]|*
Argument syntax
[parameter-name=] argument-value| attribute=out-parameter-name [:argument-value]
| -
Slide 11: Types of Communications
Sequence Fragments
• UML 2.0 introduces sequence (or interaction) fragments
• The fragment operator (in the top left cornet) indicates the type of fragment
Sequence Fragments
• Combined fragment keywords: alt, opt, break, par, seq, strict, neg, critical,
ignore, consider, assert and loop
Interaction Frames
Other Notations
• States - it is possible to place states on lifelines (e.g., pre and post conditions)
• Tabular notation
Timing
• Constraints are usually used to show timing constraints on messages. They
can apply to the timing of one message or intervals between messages.
• Label the points of issue and return for a message. Use these labels in
expressing timing constraints. This technique also works for message sending
that takes time (so arrows are sloping down).
Timing
• Check class can provide an operation – showing how a class realizes some
operation by interacting with other objects
Required Readings
• UML course textbook, Chapter 9 on Interaction Sequence Diagrams
Summary
• Sequence Diagrams
– capture some elements of the dynamics of systems
– support a number of different activities
– describe interaction in some detail, including timing
• Timing