Creating link or reverse link messages

Once a link is created between two classifier roles, you can add messages to it. Link messages are numbered automatically, but can be edited and renumbered, for example, using a subnumbering system.

About this task

You need to use two tools to create the link messages in collaboration diagrams:
  • The Link Message tool Link Message tool creates a message pointing toward the second classifier role in the link.
  • The Reverse Link Message tool Reverse Link Message tool creates a link message pointing in the other direction.

Like classifier and association roles, messages can be <Unspecified>, meaning that they are abstract and not realizations of class operations. Link messages can be instances of existing operations of a class or instances of new operations. However, for a link message to realize some operation, the operation must be a method of the class associated with the target of the message.

Messages, whether abstract or instances of operations, have the notation ReturnValue = MessageName(Arg, Arg, Arg...). You can use this notation in the message name when you first create it, or you can enter these boxes explicitly in the Features window.

A message that is an instance of an operation does not necessarily show the form of the actual call. You can specify just the items of interest in the collaboration. The ReturnValue is optional; the function might not return a value, or you might not want to specify the local variable to which the return value applies.

To create link or reverse link messages:

Procedure

  1. Click either the Link Message tool or Reverse Link Message tool. The cursor changes to a small arrow pointing upwards.
  2. Move the point of the arrow onto the association role, then click with the left mouse button. A text box opens, containing an automatically generated number.
  3. Type the name of the message. If wanted, you can change the numbering; the autonumbering will continue from whatever number you specify.
    Note: If you edit the number, make sure the numbering sequence ends with a
    period (.) to clearly delineate it. If the period is missing, the product will not autonumber the messages correctly.
  4. Press Enter to complete the name.

Results

By default, the new message is <Unspecified>. To make it an instance of a new or existing operation of the target class or actor, open its Features window (see Modifying the features of a message.


Feedback