Table of Contents

Interface IStepHandler

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

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.

public interface IStepHandler

Methods

ExecuteAsync(IExecutionContext, IFlowDefinition, IStepInstance)

Executes the step and returns an optional result value. Return a IStepResult (e.g. StepResult or StepResult<T>) to control status, output, and retry delay; return any other value to implicitly succeed.

ValueTask<object?> ExecuteAsync(IExecutionContext context, IFlowDefinition flow, IStepInstance step)

Parameters

context IExecutionContext

The ambient execution context for this run (RunId, trigger data, etc.).

flow IFlowDefinition

The flow definition currently executing.

step IStepInstance

The step instance with resolved inputs.

Returns

ValueTask<object>

The step output, or a IStepResult to control execution behaviour.