ข้ามไปยังเนื้อหา

Class ProcessManagerExecutionStrategy

เนื้อหานี้ยังไม่ได้แปลเป็นภาษาไทย แสดงเป็นภาษาอังกฤษแทน

Namespace: Cephalon.Behaviors.Patterns.Strategies
Assembly: Cephalon.Behaviors.Patterns.dll

Executes behaviors that follow the process-manager pattern. Loads the process checkpoint before invocation, saves it after a successful step, and deletes it when the process signals completion via .

public sealed class ProcessManagerExecutionStrategy : IBehaviorExecutionStrategy

objectProcessManagerExecutionStrategy

IBehaviorExecutionStrategy

object.Equals(object?), object.Equals(object?, object?), object.GetHashCode(), object.GetType(), object.ReferenceEquals(object?, object?), object.ToString()

ProcessManagerExecutionStrategy(IProcessCheckpointStore, ILogger<ProcessManagerExecutionStrategy>)

Section titled “ ProcessManagerExecutionStrategy(IProcessCheckpointStore, ILogger<ProcessManagerExecutionStrategy>)”

Initializes a new instance of .

public ProcessManagerExecutionStrategy(IProcessCheckpointStore store, ILogger<ProcessManagerExecutionStrategy> logger)

store IProcessCheckpointStore

The checkpoint store used to load and persist process checkpoints.

logger ILogger<ProcessManagerExecutionStrategy>

The logger used to report warnings and errors.

Gets the pattern identifier handled by this strategy.

public string Pattern { get; }

string

ExecuteAsync(BehaviorExecutionContext, CancellationToken)

Section titled “ ExecuteAsync(BehaviorExecutionContext, CancellationToken)”

Loads the current process checkpoint, invokes the behavior slot, and saves the resulting checkpoint. If the output implements , the checkpoint is deleted to signal completion. If the output is null, a warning is logged and the checkpoint is preserved. The process identifier is read from ; if not set, an is thrown.

public Task<BehaviorExecutionResult> ExecuteAsync(BehaviorExecutionContext context, CancellationToken ct = default)

context BehaviorExecutionContext

The execution context for this invocation.

ct CancellationToken

A token that cancels the execution.

Task<BehaviorExecutionResult>

A result with HTTP 200 and the behavior output.

InvalidOperationException

Thrown when CorrelationId is null.