UML Designer User's Guide

Creating method calls

To create a method call from one object to another, follow these steps:

  1. Select Method call figure icon Method call from the tool bar.
  2. For a call to an instance method, click mouse button 1 on the sender's lifeline within an activation.

    For a call to a class method, hold down the Alt key and click mouse button 1 on the sender's lifeline within an activation.

  3. Click mouse button 1 on the receiver's lifeline.
    Note:For a call to self, click mouse button 1 on the same object's lifeline for both sender and receiver.
  4. In the dialog that appears, specify the message you want to send:
  5. Select OK. The new method call and its return appear as a method call figure. In addition, the receiver's lifeline now shows activation between the message send and return.

Moving and resizing method call figures

After you create a method call figure, you can then move it and resize the activation to make room for other method calls.

To move a method call figure, select the activation and then drag it up or down with mouse button 1. This moves the entire method call, including the activation and return call.

To resize an activation, select the activation and then drag its bottom selection handle. This changes the amount of space between the method send and the return; you can do this to make room for more method calls.

Conditions and iteration

A method call can have a condition, an annotation (written in natural language or pseudocode) that limits the conditions under which the message is sent.

To add or change the condition of a method call, select the message send figure (the arrow going from sender to receiver) and then select Edit Condition from the pop-up menu. Type the text of the condition (for example, x>0) and press Enter.

Iteration indicates that the message is sent multiple times to multiple receivers (for example, iterating over a collection). To indicate iteration, select the message send figure and then select Is Iterated from the pop-up menu. An asterisk (*) appears beside the message send label to indicate iteration.


[ Top of Page | Previous Page | Next Page | Table of Contents | Index ]