Assigning operations to messages

In Unified Modeling Language (UML) sequence diagrams, you can set a message signature by assigning an operation to it. When you create a message, the operation on the target interaction instance is created automatically and you are prompted to name the newly created operation.

You must have a sequence diagram that contains at least two lifelines with messages open in the diagram editor. The property of the target lifeline to which you add the operation must be a class or interface type.
To assign an operation to a message:
  1. In the Package Explorer or Project Explorer view, click and drag a Java™ class or interface to a lifeline in the interaction frame. The interaction instance now represents that class.
  2. In the Package Explorer or Project Explorer view, click and drag an operation to a message in the interaction frame. The operation must belong to the class that is assigned to the target instance.
Related concepts
Lifelines
Messages
Related tasks
Creating synchronous or asynchronous messages
Adding create or destroy messages to lifelines
Deleting messages
Delaying the receipt of asynchronous messages
Feedback
(C) Copyright IBM Corporation 2000, 2005. All Rights Reserved.