This section describes techniques for working with messages in sequence and communication diagrams. Although the two diagram types are equivalent, the techniques for dealing with messages differ.
When you manage UML 2.0 messages, you have the following options:
- Show or hide reply message
- Nest messages
- Create a message from a lifeline back to itself
- Create a message link that corresponds to an operation call
To show or hide reply message:
- Select a call message in an interaction diagram.
- In the Link tab of the Object Inspector, check or clear show reply message.
To nest messages:
- You can nest messages by originating message links from an execution specification. The nested message inherits the numbering of the parent message. For example, if the parent message has the number 1, its first nested message is 1.1.
- It is also possible to create message links back to the parent execution specifications.
To create a message from a lifeline back to itself:
- Click the Message button on the Tool Palette.
- In a Sequence diagram, click twice the lifeline in the place where you want this message to appear. In a Communication diagram, click twice the lifeline anywhere.
To create a message link that corresponds to an operation call:
- Create an interaction.
- Create a message link between two lifelines in the interaction.
- Open the Link tab of the message link Object Inspector.
- In the signature field, click the browse button.
- In the Model or Favorites, select the desired operation.
- Click OK.
The message link is named according to the name of the operation.