Understanding a Stateful Orchestration

The lifespan of an orchestration consists of a request, a prescribed set of steps, and a response. However, certain business processes must be long-lived and allow for intermediate processes that are sometimes dependent on third-party services or humans.

By defining an orchestration as Stateful, you can enable it to tolerate time gaps in processing, pauses for external systems to respond, starting and stopping between steps, and other asynchronous behaviors. This is done by using the new Pause step. When a Pause step is encountered, the state of the orchestration is stored with an instance ID in a new table (F980080), which can be viewed using the Stateful Orchestrations application (P980080) through the new Stateful Orchestrations link in the Tools menu of Orchestrator Studio. To resume an instance, you can run the same orchestration while passing the instance ID.

The system will create a new version of the stateful orchestration when making changes if there are active instances. If there are no active stateful instances when you save the changes, the version will remain the same. If there are active instances, the orchestration is saved with a new version number. Any new instances will be processed using the new version. The old version is saved and is used when instances that were started with the old version are resumed. Once all the instances for the old version are completed, it can be deleted.

You can view the version of the stateful orchestration you want by using the Stateful Version drop-down list. Only the latest version is editable. Additionally, the system also displays the number of active instances in the Active Stateful Instances (non-editable) field.