Tool Mentor: Using Rational Rose® to Manage Sequence
Diagrams
Purpose
This tool mentor describes how to use Rational Rose®98 to create sequence diagrams to
show the interactions between objects.
Related Rational Unified Process activities
Overview
To describe the interactions between objects using sequence diagrams:
- Create a sequence diagram under the use case realization.
- Place the participating objects and actors in the sequence
diagram.
- Describe the messages between the objects.
- Describe what an object does when it receives a message.
To create a sequence diagram for a use case realization:
- Right-click to select the use case in the browser and make the short-cut menu visible.
- Select Sequence Diagram from the New option on the short-cut menu. A
"NewDiagram" sequence diagram icon is added to the browser.
- With the new sequence diagram selected, type the name of the sequence diagram. It is
recommended that you 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.
- Double-click on the new sequence diagram to bring it up in the diagram window.
- In the documentation window, enter a brief description of the scenario that the sequence
diagram depicts.
To create objects in sequence diagrams:
- Double-click on the sequence diagram in the browser to open it up in the diagram window.
- Click to select the actor in the browser.
- Drag-and-drop the actor onto the sequence diagram.
- Click to select the object icon from the toolbar. The cursor changes to a cross-hair
when positioned over the diagram window.
- Click over the desired position in the sequence diagram window to place the object.
- 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.
- In the Name field, enter the name of the object (optional).
- 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.
- Repeat the preceding steps for each object and actor in the scenario.
To show the class of an object:
- 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.
- Select the class from the Class drop-down list box.
- Select the OK button to close the specification.
- The class name is displayed in the object icon on the diagram to the right of the
objects name.
To create a message in a sequence diagram:
- Click to select the object message symbol from the toolbar.
- Click on the actor or object sending the message and drag the message line to the actor
or object receiving the message.
- Enter the name of the message while the message line is still selected.
- Repeat the preceding steps for each message in the scenario.
To document a message:
- Open the Message Specification dialog box for the message, either by
double-clicking on the message, or by right-clicking and selecting the Specification
option in the short-cut menu.
- Enter the documentation in the Documentation field.
- Select OK to close the specification.
To rearrange the time order of messages in a sequence diagram, select the message arrow
and drag-and-drop messages up and down the time axis to rearrange the order.
To attach a script to a message:
- Select the Text Box symbol in the sequence diagram toolbar.
- Click on the position where you want to insert the script in the diagram.
- Enter the script in the text box.
- Select both the script and the message arrow by selecting the two symbols while holding
down the shift-key.
- Select the Attach Script option from the Edit menu. This attaches the script to the
message. Note that the script disappears if the message is removed.
Scripts can be formatted by selecting their text box and dragging the corner markers.
| |

|