An action is an activity that is executed on a transition.
To add an action to a transition, proceed as follows:
- On the canvas, select and hover over the transition
that you want to modify.
- In the action bar that appears, click the action icon as shown
in this image.

- In the Properties area, click the Details tab.
- Select the Implementation. You
have the following choices:
Option |
Description |
Visual |
Choose this to use the visual snippet
editor to graphically compose Java™ code. |
Java |
Choose this to write the Java code
yourself. |
Invoke |
Choose this to invoke an operation
on a reference. |
Note: When a transition is triggered by a call event, the input
and output parameters of the operation are available to the action so that
the action can set the output parameters that are sent in reply to the operation
after the action completes. When a call event occurs, its input parameters
are copied to the output parameters of the operation so these variables must
have unique names so that they don't conflict with those of other operations.
As a result, for each input parameter of an operation, a variable of the appropriate
type is created with a name of opName_Input_parmName, and
for each output parameter, a variable named opName_Output_parmName is
created. These variables are only available to the action of the transition
that is triggered by that operation.
Your newly created action will appear on the canvas on top of the
transition that it is associated with.