Class FlowSignalDispatcher
- Namespace
- FlowOrchestrator.Core.Execution
- Assembly
- FlowOrchestrator.Core.dll
Default implementation that delegates persistence to IFlowSignalStore and re-dispatch to ScheduleStepAsync(IExecutionContext, IFlowDefinition, IStepInstance, TimeSpan, CancellationToken).
public sealed class FlowSignalDispatcher : IFlowSignalDispatcher
- Inheritance
-
FlowSignalDispatcher
- Implements
- Inherited Members
Constructors
FlowSignalDispatcher(IFlowSignalStore, IFlowRunStore, IFlowRepository, IStepDispatcher, IOutputsRepository, FlowOrchestratorTelemetry?)
Initialises the dispatcher with its dependencies. telemetry is optional — when omitted, signal-wait metrics are not emitted.
public FlowSignalDispatcher(IFlowSignalStore signalStore, IFlowRunStore runStore, IFlowRepository flowRepository, IStepDispatcher dispatcher, IOutputsRepository outputsRepository, FlowOrchestratorTelemetry? telemetry = null)
Parameters
signalStoreIFlowSignalStorerunStoreIFlowRunStoreflowRepositoryIFlowRepositorydispatcherIStepDispatcheroutputsRepositoryIOutputsRepositorytelemetryFlowOrchestratorTelemetry
Methods
DispatchAsync(Guid, string, string, CancellationToken)
Validates the run, persists the payload on the matching waiter, and nudges the engine to re-execute the parked step so it observes the delivered payload.
public ValueTask<SignalDeliveryResult> DispatchAsync(Guid runId, string signalName, string payloadJson, CancellationToken ct = default)
Parameters
runIdGuidThe run whose
WaitForSignalstep should receive the signal.signalNamestringLogical signal name configured on the step's
signalNameinput.payloadJsonstringPre-serialised JSON payload supplied by the caller.
ctCancellationTokenCancellation token.