Vous êtes sur la page 1sur 4

Interaction Overview Diagram - An Introduction

It is possible to organize sequence diagrams into control flow to indicate how they fit together. Interaction diagram combining the power of sequence diagrams and activity diagram together. It can be used to describe an overview of a complex system by embedding of Object Notes of Activity Diagram, inline interaction or InteractionOcurrences inside a control flow structure. Interaction Overview Diagram provides high level structuring mechanism for sequence diagrams. As Interaction Overview Diagram is a special kind of Activity Diagram, you can use the control flow constructs such as decision, merge, fork, join and as well as the looping nodes, as the way you use it in an activity diagram. A typical example for using Interaction Overview Diagram is to model how the different scenarios of a use case are realized together.

Inline Interaction
An Interaction Overview Diagram of any kind may appear inline as an ActivityInvocation. The inline Interaction diagrams may be either anonymous (as here) or named.

Figure 1 - Inline Interaction

InteractionOccurrence
ActivityInvocation in the form of InteractionOccurrence. You may choose to abstract the view of an InteractionOccurrence into a separate sub-diagram (sequence diagram) with the name of the Interaction referred by the occurrence.

Figure 2 - Interaction Occurrence

Frame
The notation shows a rectangular frame around the diagram with a name in a compartment in the upper left corner.

Figure 3 - Frame

Semantics of an Interaction Overview Diagram


As we mentioned before, Interaction Overview Diagram provide us a mechanism to structure sequence diagrams within a control flow structure to model complex system. Nodes are interactions (sequence diagram); edges show the order in which
Page 1 of 4

Interaction Overview Diagram - An Introduction.doc

these interactions occur. Let me use a flattening sequence diagram to represent a semantically equivalent interaction overview diagram for illuminating the concepts.

Figure 4.1 - An Interaction Overview Diagram to structure sequence diagrams

Figure 4.2 - Corresponding Sequence Diagram

An Example Vending Machine


Since the last purchase, the vending machine is initialized into its ready state. The vending will validate the coins the customer inserted into the machine. If the outstanding amount is equal to greater than 0, then the machine will be await for more coins to be inserted into it. Or if the accumulated amount is equal to 0, then the product will be dispensed.

Page 2 of 4

Interaction Overview Diagram - An Introduction.doc

Figure 5 - The Interaction Overview Diagram of Vending Machine

Each of the InteractionOccurrences can be represented by a detailed sub-diagram (sequence diagram). As shown in the above Figure, you can combine the interactions in different ways to create new scenarios. As you may be aware that sequence diagram can normally represent one scenario, so typically, we need to use one sequence diagram for the normal scenario and several sequence diagrams for the alternative scenarios. Now, with the new Interaction Overview Diagrams, you can use a control flow structure to reference the base use case and the <<include>> (normal scenario), and the <<extend>> use cases (alternative scenarios) all together.

An Example Student Enrollment


A student had completed grade 12 can apply for ABC University in person. They have to register and pay for the tuition at least two months prior to the first day of the coming academic year. Student can also apply for the dormitory and the first year student who lives outside the province will have the higher priority to be admitted to one of the dormitories. If the application is accepted, the student will have to go to the cashier to pay for the tuition. However, depending on what programme the student applied for, student who meets the minimum requirements of the University may not be guarantee to offer a place. Now, lets develop an interaction overview diagram to illustrate the scenarios.

Page 3 of 4

Interaction Overview Diagram - An Introduction.doc

initiation

join decision inline interaction

Figure 6 - The Interaction Overview Diagram of Student Enrollment

Page 4 of 4

Vous aimerez peut-être aussi