You can bind operations and parameters to variables to reuse an
operation or parameter or to change operation and parameter names withoutchanging
each instance of the parameter or operation.
Before you begin
You must have the following preferences set:
- You must select the sequence diagram preference to always show signatures.
- You must clear the preference to show operation signatures instead of
message signatures.
- You must have a sequence diagram open with at least two lifelines.
Procedure
- In the Palette, click a type of message.
- In the interaction frame, click a source lifeline and
drag the cursor to a target lifeline.
- Type a name for the message operation.
- In the Project Explorer view, right-click
the newly created message; then click .
- Type a name for the parameter.
- In the Project Explorer view, right-click
the newly created message; then click .
- Type a name for the return parameter.
- Complete the following steps for both the message and its return
message:
- In the interaction frame, right-click the message that you created
in step 2; then click .
- On the Argument page, select Opaque Expression as
the argument type.
- For each opaque expression, complete the following steps:
- On the Argument page, in the body field,
type a name for the value.
What to do next
In the message signature, the synchronous message parameter is
assigned the variable argument that you created. In the return message, the
second variable argument that you created is assigned to the operation.