Class PostgreSqlOutputsRepository
- Namespace
- FlowOrchestrator.PostgreSQL
- Assembly
- FlowOrchestrator.PostgreSQL.dll
Dapper-based PostgreSQL implementation of IOutputsRepository and IFlowEventReader.
Persists step inputs/outputs and trigger data to the flow_outputs table,
and events to the flow_events table with a sequence generated by a PostgreSQL sequence object.
public sealed class PostgreSqlOutputsRepository : IOutputsRepository, IFlowEventReader
- Inheritance
-
PostgreSqlOutputsRepository
- Implements
- Inherited Members
- Extension Methods
Constructors
PostgreSqlOutputsRepository(string)
public PostgreSqlOutputsRepository(string connectionString)
Parameters
connectionStringstring
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
ctxIExecutionContextflowIFlowDefinitionstepIStepInstance
Returns
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
runIdGuidThe run whose events are requested.
skipintNumber of events to skip (for pagination).
takeintMaximum number of events to return.
Returns
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
Returns
GetTriggerDataAsync(Guid)
Retrieves the raw trigger payload for the given run, or null if not stored.
public ValueTask<object?> GetTriggerDataAsync(Guid runId)
Parameters
runIdGuid
Returns
GetTriggerHeadersAsync(Guid)
Retrieves the trigger headers for the given run, or null if not stored.
public ValueTask<IReadOnlyDictionary<string, string>?> GetTriggerHeadersAsync(Guid runId)
Parameters
runIdGuid
Returns
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
ctxIExecutionContextflowIFlowDefinitionstepIStepInstanceevtFlowEvent
Returns
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
ctxIExecutionContextflowIFlowDefinitionstepIStepInstance
Returns
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
ctxIExecutionContextflowIFlowDefinitionstepIStepInstanceresultIStepResult
Returns
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
ctxITriggerContextflowIFlowDefinitiontriggerITrigger
Returns
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
ctxITriggerContextflowIFlowDefinitiontriggerITrigger