Transition-Related Contexts

In transition-related contexts, a script executes as a transition executes. For each context, a workflow setting determines which script, if any, executes. Pre-Transition and Post-Transition scripts can be associated with transitions at the workflow level at which the transition is created. Pre-State scripts and Post-State scripts can be associated with states at the workflow level at which the state is created.

The four transition-related contexts in order of execution are:

When a transition executes, it proceeds through the stages shown in the following diagram. After all associated scripts have executed successfully, the transition is complete and new field values are written to the database. Note that scripts only execute as configured by the workflow.

transition execution sequence
Note: When invalid values are provided by the user on a form, the script runs again when the user is prompted to provide valid values if the Re-run Script if Form Is Invalid check box (located on the Script/Web Service tab for the transition) is selected for a Pre-Transition script. If the check box is cleared, the script is not automatically run again.
Note: For efficiency, the second "Auto" resolution is skipped if there are no scripts to run after the form is submitted (i.e., there is no corresponding Post-Transition, Post-State, or Pre-State script). When there are no such scripts, the two "Auto" resolution steps are redundant because they would execute back to back.