Table of Contents

Class PersistenceOptions

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

Configuration options for Persistence middleware. Controls workflow state persistence behavior and resumable workflows across processes. Inherits common options functionality from WorkflowForgeOptionsBase.

public sealed class PersistenceOptions : WorkflowForgeOptionsBase, ICloneable
Inheritance
PersistenceOptions
Implements
Inherited Members

Constructors

PersistenceOptions()

Initializes a new instance with default section name.

public PersistenceOptions()

PersistenceOptions(string)

Initializes a new instance with custom section name.

public PersistenceOptions(string sectionName)

Parameters

sectionName string

Custom configuration section name.

Fields

DefaultSectionName

Default configuration section name for binding from appsettings.json.

public const string DefaultSectionName = "WorkflowForge:Extensions:Persistence"

Field Value

string

Properties

InstanceId

Optional stable instance identifier to correlate a foundry across process restarts. When set, a deterministic key will be used instead of the transient ExecutionId.

public string? InstanceId { get; set; }

Property Value

string

PersistOnFailure

Gets or sets whether to persist workflow state when workflow fails. When true, failure state is persisted for recovery. When false, failure state is not persisted. Default is true.

public bool PersistOnFailure { get; set; }

Property Value

bool

PersistOnOperationComplete

Gets or sets whether to persist workflow state after each operation completes. When true, creates checkpoints after each operation. When false, only persists on workflow completion or failure. Default is true.

public bool PersistOnOperationComplete { get; set; }

Property Value

bool

PersistOnWorkflowComplete

Gets or sets whether to persist workflow state when workflow completes successfully. When true, final workflow state is persisted. When false, only intermediate state is persisted. Default is true.

public bool PersistOnWorkflowComplete { get; set; }

Property Value

bool

WorkflowKey

Optional stable workflow key to correlate a workflow definition across runs. When set, a deterministic key will be used instead of the auto-generated Workflow.Id.

public string? WorkflowKey { get; set; }

Property Value

string

Methods

Clone()

Creates a deep copy of this options instance.

public override object Clone()

Returns

object

A new instance with the same configuration values.

Validate()

Validates the configuration settings and returns any validation errors.

public override IList<string> Validate()

Returns

IList<string>

A list of validation error messages, empty if valid.