In UML, the behavior of an Operation of a Class can be defined using a Behavior element called the method of the Operation. You can use the Alf editor to create an Alf body for a new Operation method or to edit the existing Alf body of a method.
To create an Alf body for a new method
- Right click on the Operation (in the Model Browser or as it appears on a Class diagram), and select Create Method > Behavior.
- As the kind of Behavior, select either Activity, Opaque Behavior or Function Behavior (which is a kind of Opaque Behavior).
- Select the Operation and open the Alf editor window (select Windows > Alf), if it isn't already open.
- Enter the Alf code for the Operation and press OK to compile and save the code.
To edit an existing Alf body for an Operation