Creating an instance line
An instance line (or classifier role) is a vertical timeline labeled with the name of an instance. It represents a typical instance or class in the scenario being described. It can receive messages from or send messages to other instance lines.
About this task
In addition to creating, deleting, and modifying the name of an instance line, you can realize the instance line to a class or actor in the static model.
Procedure
- Click the Instance line button .
- Move the cursor over the diagram.
- Move the line to a suitable location, then click to dock the line into place.
- Type the name of a class or an instance to replace the default name.
-
If you specified design mode, Rhapsody® names
the instance line
:class_n
by default. If the specified class does not exist, the product asks if you want to create it. Click OK. - You can continue creating instance lines, or return to select mode by clicking the Select tool.
- Optional: If you want to add a free-text box to an instance line (for example, for a calculation), click the Action Block button and then click the instance line.
Results
If you prefer, you can place several lines and rename them later. The product gives them default names until you rename them. For information about renaming instance lines, see Modifying the features of a message. The sequence diagram automatically expands the diagram as necessary as you add more instance lines.
Note: To shift one or more messages to different instance lines, select the relevant
messages and press Ctrl+right-arrow, or Ctrl+Left
arrow. The messages
jumpto the new source and destination instance lines. This replaces the cut and paste (or drag) functionality of messages between instance lines in the same diagram.