Class DurableExecutionStrategy
Namespace: Cephalon.Behaviors.Patterns.Strategies
Assembly: Cephalon.Behaviors.Patterns.dll
Executes replayable durable workflows by rebuilding state from an event-store stream, invoking the workflow step, and appending the emitted domain events with optimistic concurrency.
public sealed class DurableExecutionStrategy : IBehaviorExecutionStrategyInheritance
Section titled “Inheritance”object ← DurableExecutionStrategy
Implements
Section titled “Implements”Inherited Members
Section titled “Inherited Members”object.Equals(object?), object.Equals(object?, object?), object.GetHashCode(), object.GetType(), object.ReferenceEquals(object?, object?), object.ToString()
Constructors
Section titled “Constructors”DurableExecutionStrategy(IDurableExecutionRuntimeStateCatalog?)
Section titled “ DurableExecutionStrategy(IDurableExecutionRuntimeStateCatalog?)”Creates a durable execution strategy.
public DurableExecutionStrategy(IDurableExecutionRuntimeStateCatalog? runtimeStateCatalog = null)Parameters
Section titled “Parameters”runtimeStateCatalog IDurableExecutionRuntimeStateCatalog?
An optional runtime-state catalog that can also accept operator-facing observations for active durable streams.
Properties
Section titled “Properties”Pattern
Section titled “ Pattern”Gets the pattern identifier handled by this strategy.
public string Pattern { get; }Property Value
Section titled “Property Value”Methods
Section titled “Methods”ExecuteAsync(BehaviorExecutionContext, CancellationToken)
Section titled “ ExecuteAsync(BehaviorExecutionContext, CancellationToken)”Replays the durable workflow stream, executes one workflow step, validates the returned domain events,
and appends them through
public Task<BehaviorExecutionResult> ExecuteAsync(BehaviorExecutionContext context, CancellationToken ct = default)Parameters
Section titled “Parameters”context BehaviorExecutionContext
The execution context for this invocation.
A token that cancels the execution.
Returns
Section titled “Returns”A result with HTTP 200 when local output exists, HTTP 202 when durable continuation work or pending timer/signal coordination remains without local output, or HTTP 204 when no local output remains and the step completed without follow-up work.
Exceptions
Section titled “Exceptions”Thrown when durable execution is selected for a behavior that does not implement
IDurableExecution<TInput, TState, TOutput>, when the behavior context does not carry an event store,
or when the returned events do not match the expected stream identity or version sequence.