Adding variable actions to activity diagrams

When you use activity diagrams to model the flow of information, you can create actions that define variables and their data. You can use variable actions to add, read, or remove variable values, as well as to clear all values from the variable values list. You can use variable actions as an alternative or a complement to modeling with object flows, and they are not subject to control flows or other object-related constraints.

Before you begin

An activity diagram must be open in the Modeling perspective.

Procedure

  1. In the Palette, under Actions, click Variable Actions.
  2. In the diagram editor, click anywhere in the activity diagram.
  3. Complete one of the following steps:
    • To add a variable value, click Create Add Variable Value Action.
    • To reference a variable value, click Create Read Variable Action.
    • To remove a variable value, click Create Remove Variable Value Action.
    • To remove all variable values, click Create Clear Variable Action.
  4. To specify the target variable, complete one of the following steps:
    • To act on an existing variable, click Select Existing Element, and browse to the variable.
    • If you do not want to specify a variable when you create the action, you can create an action that does not reference any variable. To do so, click Create Unspecified.
      Note: To specify a variable later, on the Advanced Properties tab of the action, complete the Variable field.
  5. Type a name for the variable action.

Results

The variable action is added to the diagram.

Feedback