Exit States
An exit state in a workflow is the final state the record enters before a workflow completes. Depending on the layout of a workflow, a single workflow may have multiple exit states. The diagrammer designates any state without a transition to another state as an End, or exit, state.
The following screenshot shows a workflow with two exit states, State 3b Approved and State 4 Rejected:
The diagrammer removes the End state designation when you create a transition from an exit state to another state or you enable the Do Not Exit Workflow property on the state.
Trigger Execution in Exit States
NetSuite only executes the actions for the server trigger on which a record entered an exit state and then completes the workflow. Subsequent server triggers do not execute.
For example, if a record enters an exit state on a Before Record Load trigger, only actions set to trigger on Entry or Before Record Load execute. Then, the record exits the workflow. The Before Record Submit and After Record Submit triggers do not execute. For more information about the order of trigger execution in a state, see SuiteFlow Trigger Execution Model.
You can use one of the following methods to control which actions may execute in an exit state:
-
Enable the Do Not Exit Workflow property for the state. Consequently, the record stays in the state and the workflow never completes.
-
Create a new state as the exit state. On the transition into the new exit state, set the trigger for the transition to a trigger that allows the actions in the exit state to execute. For example, if you have actions that trigger on After Record Submit, make sure the transition into the state uses the Before Record Submit or After Record Submit trigger.
Exit State Guidelines
Use the following guidelines when working with exit states.
Scheduled actions do not execute in the exit state. The workflow completes and leaves the exit state before scheduled actions can execute. See Scheduling an Action.