Defining the Orchestration as Stateful
To define the orchestration as Stateful:
-
Click the Start node of the orchestration and click Run Options.
-
In the Run Options window, enable the Stateful option. You can pause or resume the stateful orchestration using the system generated Stateful Instance ID.
When the Stateful option is enabled, the system:
-
generates an input called
Stateful_Instance_ID
in the Orchestration Inputs tab of the Inputs and Values window (Start -> Inputs and Values). When you run a stateful orchestration without passingStateful_Instance_ID
, the system will generate a new one to be saved on Pause. IfStateful_Instance_ID
is passed in the inputs, the state is retrieved using the instance ID to resume. -
adds the Key option next to the non-array inputs in the Inputs and Values window.When you designate one or more inputs as keys, the system will save the passed key values along with the stateful instance. If any other instance with a matching key is started before the prior instance is completed, the system will end that process with an error. Only one active instance for each unique key is allowed. Keys are optional, and therefore, if the keys are not specified, there will be no restrictions when you start new instances.
-
displays the Require Step ID to Resume option. When you enable this option, the system generates an input called
Step_Instance_ID
in the Inputs tab of the Inputs and Values window. TheStep_Instance_ID
identifies a specific Pause point and changes each time the orchestration is paused. This can be used to invalidate old links used to resume a stateful orchestration, so once the link in a message or notification is used, it will no longer work. -
displays an indicator pause (Stateful) icon besides the Start node of the orchestration.
enables you to add the Pause step to your orchestration from the New Step Type window. You can add the Pause step any number of times between the other steps as required. See Adding Steps to an Orchestration.
-
Optionally, you can designate a resuming orchestration to resume your paused instances from a scheduled orchestration. You can select any Pause step in the orchestration and select Edit, click Resuming Orchestration, and then search for and select the orchestration. A resuming orchestration is a special orchestration that runs on a schedule and can resume any paused stateful orchestration on that schedule.