Table of Contents

Interface IRecoveryCoordinator

Namespace
WorkflowForge.Extensions.Persistence.Recovery
Assembly
WorkflowForge.Extensions.Persistence.Recovery.dll

Coordinates validation and resumption for one or many snapshots.

public interface IRecoveryCoordinator

Methods

ResumeAllAsync(Func<IWorkflowFoundry>, Func<IWorkflow>, IRecoveryCatalog, CancellationToken)

Resumes all pending workflow executions returned by the specified catalog.

Task<int> ResumeAllAsync(Func<IWorkflowFoundry> foundryFactory, Func<IWorkflow> workflowFactory, IRecoveryCatalog catalog, CancellationToken cancellationToken = default)

Parameters

foundryFactory Func<IWorkflowFoundry>

Factory that creates a fresh IWorkflowFoundry for each resumed execution.

workflowFactory Func<IWorkflow>

Factory that creates the IWorkflow to re-execute.

catalog IRecoveryCatalog

The catalog providing pending snapshots.

cancellationToken CancellationToken

Token to cancel the resume operation.

Returns

Task<int>

The number of successfully resumed executions.

ResumeAsync(Func<IWorkflowFoundry>, Func<IWorkflow>, Guid, Guid, CancellationToken)

Resumes a single workflow execution from a persisted snapshot identified by the given keys.

Task ResumeAsync(Func<IWorkflowFoundry> foundryFactory, Func<IWorkflow> workflowFactory, Guid foundryKey, Guid workflowKey, CancellationToken cancellationToken = default)

Parameters

foundryFactory Func<IWorkflowFoundry>

Factory that creates a fresh IWorkflowFoundry for the resumed execution.

workflowFactory Func<IWorkflow>

Factory that creates the IWorkflow to re-execute.

foundryKey Guid

The persisted foundry execution identifier.

workflowKey Guid

The persisted workflow identifier.

cancellationToken CancellationToken

Token to cancel the resume operation.

Returns

Task