RAD Studio (Common)
ContentsIndex
PreviousUpNext
Working with a UML 1.5 Message

This section describes techniques for working with messages in Sequence and Collaboration diagrams. Although the two diagram types are equivalent, the techniques for dealing with messages differ.  

In a Collaboration diagram, all messages between the two objects are displayed as a generic link line, and a list of messages is created above it. The link line is present as long as there is at least one message between the objects. Messages display in time-ordered sequence from top to bottom of the messages list. In addition to the message links, you can add links that show association and aggregation relationships. These links do not display if you view the diagram as a sequence diagram. 

When you draw messages between objects in a sequence diagram, each message is represented by its own link line. Messages in sequence diagrams have more editable properties than messages in collaboration diagrams.

Use the following techniques for messages:

  1. Сreate a self message
  2. Reorder a message link
  3. Specify creation of an object with a message
  4. Specify destruction of an object with a message
  5. Specifying a return link by using the Tool Palette
  6. Specify a return link by using the Object Inspector

To create a self message:

  1. Click the Self Message button on the Tool Palette.
  2. For a Sequence diagram, click the lifeline of the object at the point where you want the message to appear. Clicking the object places the message-to-self first on the lifeline. For a Collaboration diagram, click the object.

To reorder a message link:

  1. Open a diagram.
  2. To reorder messages, perform one of the following actions:
    • Drag message links up and down the object lifeline in the Diagram View. Reordering automatically updates the message link numbers.
    • Change the Sequence Number field in the Object Inspector.
    • In the Diagram View, use the in-place editor to change the sequence number.

To specify creation of an object with a message:

  1. Select a message link in the Sequence diagram.
  2. In the Object Inspector of the message link, click the Creation field.
  3. Choose True from the list box.
Result: The message link points to the recipient object icon rather than to its lifeline. The created object moves downward along the lifeline to show that it exists at a point later in time from its creator. 

By default, the Creation property is set to False in the Object Inspector.

To specify destruction of an object with a message:

  1. Select a message link in the Sequence diagram.
  2. In the Object Inspector of the message link, click the Destruction field.
  3. Choose True from the list box.
Result: The object is destroyed. 

By default, the Destruction property is set to False in the Object Inspector.

To specifying a return link by using the Tool Palette :

  1. Click the Return link button in the Tool Palette.
  2. On the sequence diagram, click the object lifeline element at the supplier end of the message link to draw the return link.

To specify a return link by using the Object Inspector :

  1. Select the message link on the sequence diagram.
  2. Choose ViewObject Inspector on the main menu or press F4.
  3. In the Object Inspector, click the drop-down arrow for the Return Arrow field and select True.

Copyright(C) 2009 Embarcadero Technologies, Inc. All Rights Reserved.
What do you think about this topic? Send feedback!