Tutorials : UML modeling for information system architecture : Module 2: Create sequence and collaboration diagrams : Lesson 2.2: Create collaboration diagrams
  
Lesson 2.2: Create collaboration diagrams
Create a collaboration diagram to see the relationships between the objects customer, reception, and diary.
The Collaboration diagram is an alternative to the Sequence diagram for modeling the scenarios in your system. Although Sequence diagrams make it easier to see the chronological flow of events, collaboration diagrams enable you to show links between objects, attribute values, and visibility. Collaboration diagrams are good for understanding all of the effects on a given object and are also good for procedural design.
Create a collaboration diagram
1 Open the Tutorial encyclopedia. (Select File > Open Encyclopedia > Existing. Select your Connection name, then highlight the Tutorial encyclopedia, click OK.)
2 With the Sequence diagram open and in focus, select Draw > Synchronize Diagram. System Architect builds a Collaboration diagram and once completed, presents you with a message, The Sequence and Collaboration diagrams have been synchronized. Click OK. The diagram should look like the one below.
Add a message to a link
You can add a new step to this Collaboration diagram and its sister Sequence diagram.
1 Right-click the link line between Diary and Reservation and select Associative.
2 The Link dialog opens. Press New and in the Sequence box, enter 13 (this is the next step on the diagram).
3 Type in Update Status to Reserved in the Message/Stimuli box.
4 From the Synchronize list, select Asynchronous as the synchronization type. This is an asynchronous message, which could happen at any time; opposite of this would be a synchronous message, which happens a preset time after the previous step.
5 Press Add.
Link Dialog box
6 Click OK to close the dialog.
7 View the diagram and note any changes that you have made in the Collaboration diagram. A new message appears on the link between Diary and Reservation. The asynchronous message Update Status to Reserved has a symbol next to it that appears as an arrow with a half arrowhead. This is the UML notation for an asynchronous message.
Modify a message that is attached to a link
1 Right-click the link line between Reception and Customer and select Associative... from the drop-down menu to open the Link dialog.
2 Click Message/Stimuli 1, Query for Available Rooms in the Message/Stimuli list.
3 From the Synchronize drop-down list, select Asynchronous.
4 Click Replace.
5 Click OK to close the dialog.
Note that on the diagram, Query for Available Rooms now has an asynchronous arrow next to it. Because the diagram is crowded, you can move message groups around to make the diagram neater.
Synchronize sequence diagrams
To synchronize the Sequence diagram to include the changes you have made:
1 Select Draw > Synchronize Diagram.
2 Note that the event line Update Status to Reserved has been added between the objects Diary and Reservation, with appropriate synchronization notation. Also the event line for Query for Available Rooms has changed to an asynchronous notation.
Lesson checkpoint
In this lesson you learned how to:
create a collaboration diagram
add a message link
modify a message
synchronize sequence diagrams