Defining the Orchestration as Stateful

To define the orchestration as Stateful:

  1. Click the Start node of the orchestration and click Run Options.

  2. 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 passing Stateful_Instance_ID, the system will generate a new one to be saved on Pause. If Stateful_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. The Step_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.

      This image is described in surrounding text.

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.

Note: For reference, the JDE_ORCH_H98I_Resume_Stateful_Orchs_Every_15_Mins orchestration is available as an ESU on Update Center. By choosing this orchestration as the Resuming Orchestration for a Pause step, whenever an orchestration instance is paused at that step, it will get automatically resumed every 15 minutes (provided JDE_ORCH_H98I_Resume_Stateful_Orchs_Every_15_Mins is started in the Scheduler). This can be used in conjunction with a While step to periodically check on the status of a long running process and/or send update emails on the status. You can download this orchestration, save it with an appropriate name, and associate it with a different schedule as needed.