Table of Contents

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

context ITriggerContext

The trigger context supplying the flow definition and run metadata.

Returns

IReadOnlyList<IStepInstance>

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

flow IFlowDefinition

The flow definition to evaluate.

statuses IReadOnlyDictionary<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

flow IFlowDefinition

The flow definition to validate.

Returns

FlowGraphValidationResult

A FlowGraphValidationResult with a list of error messages. IsValid is true when the list is empty.