OCUP Interaction Diagrams
Jump to navigation
Jump to search
Interaction⌘
- An interaction is a unit of behavior that focuses on the visible exchange of information between participants (limited in time).
- 4 interaction diagrams in UML 2.0:
- Sequence diagrams - sequence in which messages are exchanged (OCUP Fundamental)
- Communication diagrams - relationship between the participants
- Timing diagrams - state changes of the participants relative to the time
- Interaction overview diagrams - order of interactions in an activity-like notation
Sequence Diagram⌘
- Participants are represented by a rectangle and a dashed line (lifeline)
- Messages are represented by arrows between lifelines
- Time runs from top to bottom
- The entire diagram represents one interaction
Connectable Element⌘
Connectable Element
- a set of instances
- can be considered as objects of the specified type
- lifelines (participants) represent connectable elements
The header of a lifeline can also show the keyword self.
In this case, the lifeline represents an instance of the classifier to which the interaction belongs.
Selector⌘
- If the ConnectableElement is multivalued (i.e, has a multiplicity > 1), then the Lifeline may have an expression (the "selector").
- Selector specifies which particular part is represented by this Lifeline.
- If the selector is omitted, this means that an arbitrary representative of the multivalued ConnectableElement is chosen.
Execution Specification (Execution Occurrence)⌘
- Specification of the execution of a unit of behavior within the lifeline.
- Sending and receiving messages determine start and end of execution specification.
Message⌘
Message Types⌘
- Synchronous message (filled arrowhead):
- caller waits until called behavior terminates
- reply message represented by dashed line with open arrowhead
- Asynchronous message (open arrowhead):
- caller doesn't wait but continues after call, no reply
- Found message (open arrowhead originating from a filled circle):
- receiver known, sender not known
- Lost message (open arrowhead pointing to a filled circle)
- sender known, receiver not known
- Create message (dashed line with open arrowhead pointing to header of lifeline):
- new lifeline is created at this point in the diagram
- Delete message (open arrowhead):
- object destruction, stop (destruction of an object is represented by a cross on the lifeline)
Event Occurrences⌘
- send event is denoted by an exclamation mark (!p)
- receive event is denoted by question mark (?p)
- A valid sequence for the interaction: < !p, ?p, !q, ?q >
- It's not the only valid sequence!
Event Occurrences valid trace⌘
Event Occurrences Rule⌘
- Send event before receive event
- The order of events along one lifeline is relevant.
- The position of one event relative to an event on another lifeline is insignificant.
Event Occurrences Example⌘
General Ordering⌘
- relationship between two events (on different lifelines)
- one event must occur before the other in a valid trace
- Notation: a dotted line between a centre filled triangle - Triangle points to later event
Other Interaction Diagrams⌘
- Communication Diagram
- Timing Diagram
- Interaction Overview Diagram
Communication Diagram⌘
Timing Diagram⌘
Interaction Overview Diagram⌘
Questions⌘
- What is an interaction?
- What does a lifeline represent?
- What is an execution occurrence?
- What types of message are there?
- How is the semantics of an interaction defined?











