Adding Enter and Exit Actions

See Also

As an item enters or exits a state, you can specify conditions that validate whether the item can leave or enter that state. Although the Enter and Exit actions are typically used for evaluating conditions, you can add script to perform additional actions as well.

To specify script that executes immediately before entering and after exiting a state

  1. In the Workflow Process pane, select the Design tab.

  2. In the workflow diagram, right-click the state, and select Add Action.

  3. In the Add Action dialog box, select an action type.
    If you want to Select
    Execute script when moving into the state

    Enter

    Execute script when leaving the state

    Exit


  4. In the Action name field, enter a name, and click OK.

  5. If you want to add script to the action, double-click the action in the Actions list.

  6. In the Shared Script tab, modify the validation function, or add script to the action procedure directly below it. By default, the validation script procedure returns True.

  7. Click Verify Script to test the syntax of your script.

  8. Click Save.