Table of Contents

Namespace FlowOrchestrator.Core.Execution

Classes

DefaultStepExecutor

Default implementation of IStepExecutor that resolves the matching IStepHandlerMetadata by type name, evaluates @triggerBody(), @triggerHeaders(), and @steps() input expressions via the FlowOrchestrator.Core.Execution.Internal.InputResolutionPipeline + FlowOrchestrator.Core.Execution.Internal.StepExpressionResolutionPipeline, and delegates execution to the registered handler.

ExecutionContext

Default mutable implementation of IExecutionContext. Constructed by HangfireFlowOrchestrator and passed through the step execution pipeline.

ExecutionContextAccessor

Default scoped implementation of IExecutionContextAccessor. One instance per DI scope (one per Hangfire job), populated immediately before step handler invocation.

ExecutionContextTypedExtensions

Extension methods for retrieving strongly-typed trigger data from an IExecutionContext.

FlowExecutor

Default IFlowExecutor implementation. Persists trigger data via IOutputsRepository and resolves the entry and successor steps based on linear runAfter relationships.

FlowGraphEvaluation

Snapshot of a flow run's DAG evaluation at a point in time, produced by Evaluate(IFlowDefinition, IReadOnlyDictionary<string, StepStatus>).

FlowGraphPlanner

Default IFlowGraphPlanner that evaluates the flow's step DAG to determine execution order, supporting nested scoped steps and runtime loop keys.

FlowGraphValidationResult

Result of Validate(IFlowDefinition), listing any structural errors found in the flow manifest's step dependency graph.

FlowOrchestratorEngine

DAG-continuation partial of FlowOrchestratorEngine: legacy sequential next-step resolution, full-graph evaluation with When-skip propagation, and the terminal-status decision via FlowOrchestrator.Core.Execution.Internal.RunTerminationClassifier.

FlowSignalDispatcher

Default implementation that delegates persistence to IFlowSignalStore and re-dispatch to ScheduleStepAsync(IExecutionContext, IFlowDefinition, IStepInstance, TimeSpan, CancellationToken).

ForEachStepHandler

Built-in step handler for the "ForEach" step type. Resolves the iteration source via FlowOrchestrator.Core.Execution.Internal.ForEachSourceResolver, then returns a StepDispatchHint instructing the engine to enqueue each child step.

PollableStepHandler<TInput>

Base class for step handlers that need to repeatedly query an external system until a condition is met, using Hangfire's delayed scheduling for pacing.

RecurringTriggerInfo

Runtime metadata snapshot for a single recurring trigger job.

StepDispatchHint

Optional hint returned by a step handler to instruct the engine to spawn dynamic child steps (e.g. ForEach iterations) after the handler completes.

StepDispatchRequest

Describes a single dynamic child step to be dispatched by the engine when a handler returns a StepDispatchHint.

StepInstance

Default mutable implementation of IStepInstance, constructed by FlowExecutor and FlowGraphPlanner when a step is ready to run.

StepResult

General-purpose IStepResult implementation for step handlers that return untyped output or no output at all.

StepResult<T>

Typed IStepResult that carries a strongly-typed Value. The Result property round-trips through JSON conversion so downstream steps can retrieve the value regardless of how the result was stored.

Trigger

Immutable ITrigger implementation constructed at trigger time by HangfireFlowOrchestrator.TriggerAsync.

TriggerContext

Default mutable implementation of ITriggerContext. Constructed by HangfireFlowOrchestrator.TriggerAsync before execution begins.

WaitForSignalHandler

Built-in handler for the WaitForSignal step type. Parks the step in Pending until either an external signal is delivered via DeliverSignalAsync(Guid, string, string, CancellationToken) or the configured timeout elapses.

WaitForSignalInput

Strongly-typed inputs for the built-in WaitForSignal step type.

Interfaces

IExecutionContext

Carries the ambient state for a single flow run, shared across all steps in that run. Populated once by TriggerAsync and propagated via IExecutionContextAccessor.

IExecutionContextAccessor

Provides scoped access to the IExecutionContext for the currently executing step. Registered as a scoped service; each Hangfire job scope gets its own instance populated by DefaultStepExecutor before the step handler is invoked.

IFlowExecutor

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

IFlowGraphPlanner

Analyses a flow's step dependency graph (DAG) to determine execution order, validate structural correctness, and evaluate runtime state.

IFlowOrchestrator

Runtime-neutral entry point for the FlowOrchestrator execution engine. Implemented by FlowOrchestratorEngine; consumed by runtime adapters (Hangfire, in-memory pump, queue consumer) that handle the actual job dispatch.

IFlowSignalDispatcher

Application-facing entry point for delivering signals to parked WaitForSignal steps. Used by the dashboard signal endpoint and by tests/applications that prefer not to talk to HTTP.

IPollableInput

Marks a step input POCO as supporting the polling pattern. When implemented, the PollableStepHandler<TInput> base class manages retry scheduling, timeout enforcement, and condition evaluation automatically.

IRecurringTriggerDispatcher

Bridges the engine to the recurring-job scheduler (Hangfire, Quartz, etc.) for cron-based flow triggers. Implementations live in the runtime adapter package; the Core engine and Dashboard only depend on this interface.

IRecurringTriggerInspector

Read-only view of the scheduler's registered recurring trigger jobs. Allows the Dashboard to list cron schedules without a direct Hangfire dependency.

IRecurringTriggerSync

Synchronises the runtime scheduler's recurring jobs for a flow's cron triggers (e.g. after a pause/resume or cron override from the dashboard).

IStepDispatcher

Bridges the core engine to the runtime that physically invokes RunStepAsync(IExecutionContext, IFlowDefinition, IStepInstance, CancellationToken) — Hangfire today, a queue consumer or in-memory channel tomorrow — without the engine knowing which one is active.

IStepExecutor

Orchestrates the full lifecycle of a single step execution: resolving the handler, evaluating input expressions, invoking the handler, and persisting the output. Implemented by DefaultStepExecutor in the Hangfire layer.

IStepHandler

Untyped step handler contract. Implement this interface (or prefer IStepHandler<TInput>) to define the business logic for a step type. Register via AddStepHandler<THandler>(typeName) in DI.

IStepHandlerMetadata

Registered singleton that associates a step type name with its handler implementation, and provides the bridge to resolve and invoke the handler from DI at execution time.

IStepHandler<TInput>

Typed step handler contract. Prefer this over IStepHandler when inputs are well-defined — the framework deserialises Inputs to TInput before invoking the handler.

IStepInstance

Untyped IStepInstance<TInput> variant using a raw input dictionary. Used internally when the handler is untyped or inputs have not yet been deserialised.

IStepInstance<TInput>

Represents a single, concrete invocation of a step within a flow run, carrying its resolved inputs and the ambient execution context.

IStepResult

The outcome of a step execution returned by IStepHandler or IStepHandler<TInput>. Controls the orchestrator's next action.

ITrigger

Represents the event that started a flow run, providing the payload and metadata that are persisted and made available to steps via expression resolution.

ITriggerContext

Combines IExecutionContext with the flow definition and the trigger event that started the run. Passed to TriggerFlow(ITriggerContext) and CreateEntrySteps(ITriggerContext) to bootstrap execution.