Assembly: OptimaJet.Workflow.Core

Class SingleServerServiceRunner

OptimaJet.Workflow.Core.Runtime.ServiceRunners.SingleServerServiceRunner

Provides a service runner implementation for single-server workflow runtime execution.

public class SingleServerServiceRunner : IWorkflowServiceRunner

Type Hierarchy

Constructors

public SingleServerServiceRunner(WorkflowRuntime runtime, SingleServerSettings singleServerSettings) #
Initializes a new instance of the SingleServerServiceRunner class using in-memory single-server settings.

Parameters

Name
Type
Description
runtime
WorkflowRuntime
The workflow runtime associated with this runner.
singleServerSettings
SingleServerSettings
The settings used to initialize an in-memory single-server settings source.
public SingleServerServiceRunner(WorkflowRuntime runtime, ISingleServerSettingsSource settingSource) #
Initializes a new instance of the SingleServerServiceRunner class.

Parameters

Name
Type
Description
runtime
WorkflowRuntime
The workflow runtime associated with this runner.
settingSource
ISingleServerSettingsSource
The settings source used to load and save single-server settings.

Properties

public bool IsSupportsMultiServer { get; } #
Gets a value indicating that this runner is configured for single-server execution.

Methods

public Task StartAsync(ITimerManager manager) #
Starts single-server initialization, synchronizing runtime status and restoring active processes when configured to do so.

Parameters

Name
Type
Description
manager
ITimerManager
The timer manager to start after startup, if provided and runtime is not cold.

Returns

Type
Description
Task
A task that completes when startup initialization has finished.

Exceptions

Type
Description
InvalidOperationException
Thrown when multi-server runtimes already exist in the same persistence storage.

Remarks

The method checks for incompatible multi-server runtimes in the same persistence storage, ensures the workflow runtime status is RuntimeStatus.Single, and optionally restores running processes before starting the timer manager.