Interaction Diagrams
Interaction Diagrams
Overview:
From the name Interaction it is clear that the diagram is used to
describe some type of interactions among the different elements in
the model. So this interaction is a part of dynamic behaviour of the
system.
We have two types of interaction diagrams in UML. One is sequence diagram and
the other is a collaboration diagram. The sequence diagram captures the time
sequence of message flow from one object to another and the collaboration
diagram describes the organization of objects in a system taking part in the
message flow.
So the following things are to identified clearly before drawing the interaction
diagram:
Objects taking part in the interaction.
Message flows among the objects.
The sequence in which the messages are flowing.
Object organization.
Following are two interaction diagrams modeling order management system. The
first diagram is a sequence diagram and the second is a collaboration diagram.
UML – Sequence Diagrams
Sequence Diagrams
A sequence diagram emphasizes the time ordering of messages.
The sequence diagram will be formed by first placing the objects
that participated in the interaction at the top of the diagram,
along the x-axis.
Place the objects which initiates the interaction at the left and
increasingly more subordinate objects to the right.
A sequence diagram shows object interactions arranged in time
sequence. It is a construction of message sequence chart.
Sequence diagram are sometimes called event diagrams or
event scenarios.
Sequence Diagram Notations
Actors – An actor in a UML diagram
represents a type of role where it interacts
with the system and its objects. It is
important to note here that an actor is
always outside the scope of the system we
aim to model using the
We use actors to depict various roles including human users and other
external subjects. We represent an actor in a UML diagram using a
stick person notation. We can have multiple actors in a sequence
diagram. For example – Here the user in seat reservation system is
shown as an actor where it exists outside the system and is not a part
of the system.