Interface IFlowRunControlStore
- Namespace
- FlowOrchestrator.Core.Storage
- Assembly
- FlowOrchestrator.Core.dll
Persistence contract for run-level control signals: cancellation, timeout, and idempotency. Decoupled from IFlowRunStore so control records can be written before the run is committed.
public interface IFlowRunControlStore
Methods
ConfigureRunAsync(Guid, Guid, string, string?, DateTimeOffset?)
Persists the control record for a new run, including an optional idempotency key and an absolute timeout deadline.
Task ConfigureRunAsync(Guid runId, Guid flowId, string triggerKey, string? idempotencyKey, DateTimeOffset? timeoutAtUtc)
Parameters
runIdGuidflowIdGuidtriggerKeystringidempotencyKeystringtimeoutAtUtcDateTimeOffset?
Returns
FindRunIdByIdempotencyKeyAsync(Guid, string, string)
Looks up an existing run that was started with the given idempotency key. Returns the RunId of the existing run, or null if none exists.
Task<Guid?> FindRunIdByIdempotencyKeyAsync(Guid flowId, string triggerKey, string idempotencyKey)
Parameters
Returns
GetRunControlAsync(Guid)
Returns the control record for the given run, or null if not found.
Task<FlowRunControlRecord?> GetRunControlAsync(Guid runId)
Parameters
runIdGuid
Returns
MarkTimedOutAsync(Guid, string?)
Marks the run as timed out. Called by the timeout-enforcement background service.
Task<bool> MarkTimedOutAsync(Guid runId, string? reason)
Parameters
Returns
RequestCancelAsync(Guid, string?)
Marks a cancellation request for the run. Steps check this flag before executing.
Task<bool> RequestCancelAsync(Guid runId, string? reason)
Parameters
Returns
TryRegisterIdempotencyKeyAsync(Guid, string, string, Guid)
Atomically registers an idempotency key for the given run.
Task<bool> TryRegisterIdempotencyKeyAsync(Guid flowId, string triggerKey, string idempotencyKey, Guid runId)