Interface IHangfireStepRunner
- Namespace
- FlowOrchestrator.Hangfire
- Assembly
- FlowOrchestrator.Hangfire.dll
Executes individual flow steps as Hangfire background jobs. Implemented by FlowOrchestrator.Hangfire.HangfireFlowOrchestrator.
public interface IHangfireStepRunner
Methods
RetryStepAsync(Guid, Guid, string, PerformContext?)
Resets a Failed step and dispatches a fresh attempt of it; see
RetryStepAsync(Guid, Guid, string, CancellationToken). The attempt runs as its own job, not inside this one,
and the returned value is a StepRetryResult.
ValueTask<object?> RetryStepAsync(Guid flowId, Guid runId, string stepKey, PerformContext? performContext = null)
Parameters
flowIdGuidThe flow that owns the run.
runIdGuidThe run containing the step to retry.
stepKeystringThe key of the step to retry.
performContextPerformContextHangfire job context.
Returns
RunStepAsync(IExecutionContext, Guid, IStepInstance, PerformContext?)
Back-compat entry point for step jobs enqueued by FlowOrchestrator 1.17 – 1.x, which passed the full execution context and step instance as job arguments. Hangfire resolves a stored job by its exact method signature, so this overload keeps those in-flight jobs runnable across the upgrade. New dispatches always use RunStepAsync(HangfireStepEnvelope, PerformContext?).
[Obsolete("Only resolves step jobs enqueued before 2.0. New jobs use RunStepAsync(HangfireStepEnvelope, PerformContext?). Drain those queues before the next major release removes this overload.")]
ValueTask<object?> RunStepAsync(IExecutionContext ctx, Guid flowId, IStepInstance step, PerformContext? performContext = null)
Parameters
ctxIExecutionContextThe execution context deserialised from the legacy job payload.
flowIdGuidThe flow that owns the step.
stepIStepInstanceThe step instance deserialised from the legacy job payload.
performContextPerformContextHangfire job context; null when called outside a Hangfire job.
Returns
RunStepAsync(HangfireStepEnvelope, PerformContext?)
Executes the step described by envelope, persists its output, and enqueues
any subsequent ready steps. Called by Hangfire when the step's background job fires.
ValueTask<object?> RunStepAsync(HangfireStepEnvelope envelope, PerformContext? performContext = null)
Parameters
envelopeHangfireStepEnvelopeIds, inputs and scheduling data of the step. The flow definition is resolved from
FlowRegistryand the trigger payload from the run's stored trigger data, so neither travels through Hangfire's argument store.performContextPerformContextHangfire job context; null when called outside a Hangfire job.