Table of Contents

Class InMemoryOutputsRepository

Namespace
FlowOrchestrator.InMemory
Assembly
FlowOrchestrator.InMemory.dll

In-memory implementation of IOutputsRepository and IFlowEventReader. Stores trigger data, step outputs, and events in concurrent dictionaries keyed by RunId. All data is lost on process restart.

public sealed class InMemoryOutputsRepository : IOutputsRepository, IFlowEventReader
Inheritance
InMemoryOutputsRepository
Implements
Inherited Members
Extension Methods

Methods

EndScopeAsync(IExecutionContext, IFlowDefinition, IStepInstance)

Signals that the scoped step (loop iteration) identified by step is complete. Implementations may use this to aggregate loop outputs or release scope-level resources.

public ValueTask EndScopeAsync(IExecutionContext ctx, IFlowDefinition flow, IStepInstance step)

Parameters

ctx IExecutionContext
flow IFlowDefinition
step IStepInstance

Returns

ValueTask

GetRunEventsAsync(Guid, int, int)

Returns a page of events for the given run, ordered by Sequence ascending.

public Task<IReadOnlyList<FlowEventRecord>> GetRunEventsAsync(Guid runId, int skip = 0, int take = 200)

Parameters

runId Guid

The run whose events are requested.

skip int

Number of events to skip (for pagination).

take int

Maximum number of events to return.

Returns

Task<IReadOnlyList<FlowEventRecord>>

GetStepOutputAsync(Guid, string)

Retrieves the output of a step for the given run and step key, or null if the step has not yet completed.

public ValueTask<object?> GetStepOutputAsync(Guid runId, string stepKey)

Parameters

runId Guid
stepKey string

Returns

ValueTask<object>

GetTriggerDataAsync(Guid)

Retrieves the raw trigger payload for the given run, or null if not stored.

public ValueTask<object?> GetTriggerDataAsync(Guid runId)

Parameters

runId Guid

Returns

ValueTask<object>

GetTriggerHeadersAsync(Guid)

Retrieves the trigger headers for the given run, or null if not stored.

public ValueTask<IReadOnlyDictionary<string, string>?> GetTriggerHeadersAsync(Guid runId)

Parameters

runId Guid

Returns

ValueTask<IReadOnlyDictionary<string, string>>

RecordEventAsync(IExecutionContext, IFlowDefinition, IStepInstance, FlowEvent)

Appends a FlowEvent to the event log for the run.

public ValueTask RecordEventAsync(IExecutionContext ctx, IFlowDefinition flow, IStepInstance step, FlowEvent evt)

Parameters

ctx IExecutionContext
flow IFlowDefinition
step IStepInstance
evt FlowEvent

Returns

ValueTask

SaveStepInputAsync(IExecutionContext, IFlowDefinition, IStepInstance)

Persists the resolved inputs for a step (used for audit and retry replay).

public ValueTask SaveStepInputAsync(IExecutionContext ctx, IFlowDefinition flow, IStepInstance step)

Parameters

ctx IExecutionContext
flow IFlowDefinition
step IStepInstance

Returns

ValueTask

SaveStepOutputAsync(IExecutionContext, IFlowDefinition, IStepInstance, IStepResult)

Persists the output of a completed step for later retrieval by downstream steps.

public ValueTask SaveStepOutputAsync(IExecutionContext ctx, IFlowDefinition flow, IStepInstance step, IStepResult result)

Parameters

ctx IExecutionContext
flow IFlowDefinition
step IStepInstance
result IStepResult

Returns

ValueTask

SaveTriggerDataAsync(ITriggerContext, IFlowDefinition, ITrigger)

Persists the trigger payload for the run so steps can access it via @triggerBody().

public ValueTask SaveTriggerDataAsync(ITriggerContext ctx, IFlowDefinition flow, ITrigger trigger)

Parameters

ctx ITriggerContext
flow IFlowDefinition
trigger ITrigger

Returns

ValueTask

SaveTriggerHeadersAsync(ITriggerContext, IFlowDefinition, ITrigger)

Persists the trigger HTTP headers for the run so steps can access them via @triggerHeaders().

public ValueTask SaveTriggerHeadersAsync(ITriggerContext ctx, IFlowDefinition flow, ITrigger trigger)

Parameters

ctx ITriggerContext
flow IFlowDefinition
trigger ITrigger

Returns

ValueTask