Class FlowGraphPlanner
- Namespace
- FlowOrchestrator.Core.Execution
- Assembly
- FlowOrchestrator.Core.dll
Default IFlowGraphPlanner that evaluates the flow's step DAG to determine execution order, supporting nested scoped steps and runtime loop keys.
public sealed class FlowGraphPlanner : IFlowGraphPlanner
- Inheritance
-
FlowGraphPlanner
- Implements
- Inherited Members
Remarks
The implementation is split across three partial files for readability —
the public surface and DAG evaluation live here, validation lives in
FlowGraphPlanner.Validation.cs, and key/scope resolution helpers
live in FlowGraphPlanner.KeyResolution.cs.
Methods
CreateEntrySteps(ITriggerContext)
Returns all entry steps (steps with no runAfter dependencies) as
ready-to-enqueue IStepInstance objects.
public IReadOnlyList<IStepInstance> CreateEntrySteps(ITriggerContext context)
Parameters
contextITriggerContextThe trigger context supplying the flow definition and run metadata.
Returns
Remarks
A step is an entry step when its RunAfter is empty OR contains only the
synthetic empty-string key (RunAfter[""]) used to attach a When
clause directly to the trigger payload.
Evaluate(IFlowDefinition, IReadOnlyDictionary<string, StepStatus>)
Evaluates the current runtime state of a flow run and categorises every known step as
Ready, Blocked, or Waiting.
public FlowGraphEvaluation Evaluate(IFlowDefinition flow, IReadOnlyDictionary<string, StepStatus> statuses)
Parameters
flowIFlowDefinitionThe flow definition to evaluate.
statusesIReadOnlyDictionary<string, StepStatus>A snapshot of step statuses already recorded for the run. Steps absent from this map are considered not-yet-started.
Returns
- FlowGraphEvaluation
A FlowGraphEvaluation grouping step keys by their current readiness.
Validate(IFlowDefinition)
Validates the structural correctness of the flow manifest's step graph at startup. Checks for missing entry steps, unresolvable dependencies, and dependency cycles.
public FlowGraphValidationResult Validate(IFlowDefinition flow)
Parameters
flowIFlowDefinitionThe flow definition to validate.
Returns
- FlowGraphValidationResult
A FlowGraphValidationResult with a list of error messages. IsValid is true when the list is empty.