Purpose

This tool mentor describes how to use Rational Rose®98 to create collaboration diagrams to show the interactions between objects.

Related Rational Unified Process activities

Overview

To describe the interactions between objects using collaboration diagrams:

  1. Create a collaboration diagram under the use case realization.
  2. Creating an object in a collaboration diagram.
  3. Creating links between the objects.
  4. Creating messages between objects.

1.   Create a Collaboration Diagram Under the Use Case Realization To top of page

To create a collaboration diagram under the Use-Case Realization:

  1. Right-click to select the use-case realization in the browser and make the short-cut menu visible.
  2. Select Collaboration Diagram from the New option on the short-cut menu. A "NewDiagram" collaboration diagram icon is added to the browser.
  3. With the new collaboration diagram selected, type the name of the diagram. Name the diagram "<use-case name> - <flow type>". This naming convention simplifies future tracing of objects to the use-case realization that they participate in.
  4. Double-click on the new collaboration diagram to bring it up in the diagram window.

2. Creating an Object in a Collaboration Diagram To top of page

To create an object in a collaboration diagram:

  1. Double-click on the collaboration diagram in the browser to open it up in the diagram window.
  2. Click to select the actor in the browser.
  3. Drag-and-drop the actor onto the collaboration diagram.
  4. Click to select the object icon from the toolbar. The cursor changes to a cross-hair when positioned over the diagram window.
  5. Click over the desired position in the collaboration diagram window to place the object.
  6. Open the Object Specification dialog box for the object, either by double-clicking on the object symbol, or by right-clicking and selecting the Specification option in the short-cut menu.
  7. In the Name field, enter the name of the object (optional).
  8. In the Class field, if not already defined, select its class from the scroll list. The scroll list contains all classes that are defined in the whole design model.
  9. Repeat the preceding steps for each object and actor in the use-case realization.

3. Creating Links between Objects To top of page

Links provide a way for two objects/actors to exchange messages.  To create a link between two objects in a collaboration diagram, do the following:

  1. Double-click on the collaboration diagram in the browser to open the diagram.
  2. Click to select the link symbol from the toolbar.
  3. Click on the actor or object on one end of the link and drag the message line to the actor or object at the other end of the link.
  4. Repeat the preceding steps for each link required between objects or actors in the scenario.

4. Creating Messages between Objects To top of page

To create messages in the collaboration diagram between two objects, do the following:

  1. Select the Object Link symbol from the collaboration diagram toolbar.
  2. Left-click on the sending object and drag it to the destination object. An object link is created between the two objects.
  3. Select the Link Message symbol from the collaboration diagram toolbar.
  4. Left-click on the created object link. This creates an anonymous link message.
  5. Right-click on the link message. This displays the full interface of the destination object in a pop-up list.
  6. Select the relevant operation from the pop-up list. This inserts the operation in the collaboration and assigns it the next available collaboration number.

To create a message from an object to the object itself, do the following:

  1. Select the Link to Self symbol from the collaboration diagram toolbar.
  2. Left-click on the designated object to insert the recursive link.
  3. Select Link Message from the toolbar.
  4. Left-click on the inserted link to add a message arrow to the link.
  5. Right-click to open a list of operations on the object.
  6. You may now select one of the existing operations or select the <new operation> alternative to create a new operation on the object’s class.
  7. If a new operation is created, an Operation Specification dialog box for this operation is opened. Give the new operation a name and a brief description. Click OK. Right-click on the message arrow again and select the new operation, which now appears on the list.
  8. The name of the selected operation is displayed as the name of the link message.

To select or deselect the collaboration number display, do the following:

  1. Select Options… from the Tools menu to open the Options dialog box.
  2. Select the Diagram tab.
  3. Select or deselect the Collaboration Numbering check box.
  4. Click OK to close the Options dialog box.
 

Display Rational Unified Process using frames

 

© Rational Software Corporation 1998 Rational Unified Process 5.1 (build 43)