Class RestorerBase
OptimaJet.Workflow.Core.Runtime.ServiceRunners.RestorerBase
Provides shared logic for creating asynchronous restore operations for workflow process instances.
Namespace: OptimaJet.Workflow.Core.Runtime.ServiceRunners
public abstract class RestorerBaseType Hierarchy
- RestorerBase Current type
Constructors
protected RestorerBase(WorkflowRuntime runtimeOwner, bool isMultiServer, CancellationToken token) #Initializes a new instance of the RestorerBase class.
Parameters
Name
Type
Description
runtimeOwnerWorkflowRuntimeThe runtime that owns the restore process.
isMultiServerBooleanIndicates whether multi-server lock validation should be performed.
tokenCancellationTokenA token that can cancel restore execution before it starts.
Methods
protected Func<Task> GetRestorerAsyncAction(Guid processId, string runtimeId = null, bool isSelfRestore = false, Guid runtimeLock = default) #Creates an asynchronous function that restores a workflow process based on its current status.
Parameters
Name
Type
Description
processIdGuidIdentifier of the process instance to restore.
runtimeIdStringRuntime identifier used when checking lock ownership in multi-server mode.
isSelfRestoreBooleanTrue when restore is initiated by the same runtime that owns the process lock.
runtimeLockGuidExpected lock identifier to compare with the current runtime lock.
Returns
Type
Description
Func<Task>An awaitable delegate that executes the restore routine.
Exceptions
Type
Description
SelfRestoreConcurrencyExceptionThrown when the runtime lock changes during a self restore attempt.
OperationCanceledExceptionThrown when the provided cancellation token is canceled.
Remarks
The delegate runs through custom IProcessRestorer decisions when available, or performs default status and timer restoration when no custom decision applies.
Remarks
Implementations of this class execute a restore action through RestorerBase.GetRestorerAsyncAction(Guid, string, bool, Guid) and can host custom and default recovery behavior.