Skip to Content
Evaluate Get Started Plugins Glossary

Running Workflows

Running Workflows defines the Workflow Engine terms used after Workflow Runtime builds a Scheme and creates a Process Instance. The terms distinguish the runtime component, one durable execution, operations that redirect or simulate execution, and the lifecycle values reported as Process Status.

Runtime and process instances

Workflow Runtime executes Process Instances created from Schemes. Each Process Instance has a Process ID and carries its current Activity and optional State, Scheme information, and Parameters. Persistence Provider stores its Process Status, timers, and history as separate records associated with the same Process ID.

Workflow Runtime: The canonical display name for the component that builds Schemes, executes Process Instances, and coordinates persistence, timers, and runtime events. The exact .NET type is WorkflowRuntime in OptimaJet.Workflow.Core.Runtime. After the first mention, the runtime is an accepted short form. Workflow Engine Runtime is a former non-canonical display name, not a second component.

Process Instance: One execution created from a Scheme and identified by a Process ID. In code, ProcessInstance carries the current Activity and optional State, Scheme information, and Parameters. Persistence Provider stores its Process Status, timers, and history as separate records associated with the same Process ID. Workflow instance is an accepted introductory alias. The short word process is an accepted alias when the surrounding text cannot confuse the execution with its Scheme.

Process ID: The unique identifier of one Process Instance. Process ID is not a Scheme Code or Scheme ID.

Process Status: The runtime lifecycle value of a Process Instance, separate from its current Activity and optional State. The exact .NET type is ProcessStatus in OptimaJet.Workflow.Core.Persistence. See the ProcessStatus API reference for the complete list of values and the description of each one.

Subprocess: A child Process Instance created by Workflow Runtime when a Parent Process executes a ForkStart Transition. It has its own Process ID, Process Status, Parameters, and Scheme version, but not an independent lifecycle: it belongs to the Root Process tree, and the Parent Process can remove it when the parent leaves its allowed Activities. Its completion can merge Parameters into and continue the Parent Process. ParentProcessId identifies the immediate parent, while RootProcessId identifies the top-level Process Instance. Unlike Scheme Inlining, a Subprocess remains a separate persisted Process Instance.

Parallel Processes: The Workflow Engine capability for starting and coordinating multiple Subprocess branches that can execute concurrently with their Parent Process and with one another. Fork Transitions define the branch boundaries. Parallel Processes is not the same as Parallel Approval, which collects several decisions in one Process Instance.

Durable Execution: Workflow Engine's checkpoint-and-recovery model. Persistence stores confirmed process progress so an idled Process Instance can continue from its last stored Activity when a later Command, Timer, or API operation arrives. If a host stops during an Action, Workflow Runtime applies its recovery policy; it does not resume arbitrary code from the exact interrupted instruction.

Interrupted Process Recovery: The handling of a Process Instance left in Running after its executing host stops. By default, Workflow Runtime changes it to Error when Commands or active Timers can still continue it, and to Terminated otherwise; it does not automatically run the interrupted Activity again. An application can provide another policy through IProcessRestorer and RestoreDecision.

Direct State Control: The capability for moving a Process Instance to a selected State or Activity, or continuing it from its current or a selected Activity, without first reaching that point through normal Transition selection. SetStateAsync finds an Activity through its State value and IsForSetState setting. The lower-level SetActivityWithExecutionAsync and SetActivityWithoutExecutionAsync methods target an ActivityDefinition directly. ResumeAsync continues from the current Activity or an Activity named in ResumeParams, skipping that starting Activity's Implementation and evaluating its outgoing automatic Transitions. Set State Directly is a task description for this capability, not a separate feature.

Pre-Execution (Simulation): A preview of the Activity path that Workflow Runtime predicts from a selected Activity of an existing Process Instance. During the preview, Workflow Runtime evaluates Transitions and uses each reached Activity's PreExecutionImplementation instead of its normal Implementation. It does not automatically save the simulated Activity and State changes. Pre-Execution Actions can still save data explicitly or change external systems, so running the preview can have real side effects. Pre-Execution is the accepted short form; PreExecution is the spelling used inside code identifiers such as PreExecutionImplementation and IsPreExecution.

See also

These pages explain the runtime entities and execution behavior in more depth.

Frequently asked questions

What is the difference between Workflow Runtime and a Process Instance?

Workflow Runtime is the component that builds Schemes and coordinates execution. A Process Instance is one durable execution that Workflow Runtime creates from a Scheme.

What is the difference between Activity, State, and Process Status?

Activity is the current execution position. State is an optional business label on an Activity. Process Status is the Process Instance's runtime lifecycle value.

Does Durable Execution resume an Action at the interrupted code line?

No. Workflow Engine persists confirmed checkpoints. If the host stops during an Action, Workflow Runtime applies its recovery policy instead of resuming arbitrary code at the exact interrupted instruction.