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
contextIExecutionContextThe ambient execution context for this run.
flowIFlowDefinitionThe flow definition being executed.
currentStepIStepInstanceThe step that just finished.
resultIStepResultThe result of the completed step, used to check
runAfterconditions.
Returns
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
contextITriggerContextThe 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.