Table of Contents

Interface IFlowExecutor

Namespace
FlowOrchestrator.Core.Execution
Assembly
FlowOrchestrator.Core.dll

Drives the high-level flow execution lifecycle: bootstrapping the first step on trigger and resolving the next step after each step completes.

public interface IFlowExecutor

Methods

GetNextStep(IExecutionContext, IFlowDefinition, IStepInstance, IStepResult)

Evaluates the flow graph after currentStep completes and returns the next IStepInstance to enqueue, or null if the run is finished.

ValueTask<IStepInstance?> GetNextStep(IExecutionContext context, IFlowDefinition flow, IStepInstance currentStep, IStepResult result)

Parameters

context IExecutionContext

The ambient execution context for this run.

flow IFlowDefinition

The flow definition being executed.

currentStep IStepInstance

The step that just finished.

result IStepResult

The result of the completed step, used to check runAfter conditions.

Returns

ValueTask<IStepInstance>

TriggerFlow(ITriggerContext)

Persists trigger data, then builds and returns the first IStepInstance to be enqueued as a Hangfire job.

ValueTask<IStepInstance> TriggerFlow(ITriggerContext context)

Parameters

context ITriggerContext

The trigger context carrying the flow, trigger event, and run metadata.

Returns

ValueTask<IStepInstance>

The entry step instance ready for enqueueing.

Exceptions

InvalidOperationException

Thrown when the flow manifest contains no step with an empty runAfter.