Table of Contents

Interface IFlowStore

Namespace
FlowOrchestrator.Core.Storage
Assembly
FlowOrchestrator.Core.dll

Persistence contract for flow definitions. Implementations are provided by UseSqlServer, UsePostgreSql, and UseInMemory.

public interface IFlowStore

Methods

DeleteAsync(Guid)

Permanently deletes the flow definition with the given id.

Task DeleteAsync(Guid id)

Parameters

id Guid

Returns

Task

GetAllAsync()

Returns all registered flow definitions, ordered by name.

Task<IReadOnlyList<FlowDefinitionRecord>> GetAllAsync()

Returns

Task<IReadOnlyList<FlowDefinitionRecord>>

GetByIdAsync(Guid)

Returns the flow definition with the given id, or null if not found.

Task<FlowDefinitionRecord?> GetByIdAsync(Guid id)

Parameters

id Guid

Returns

Task<FlowDefinitionRecord>

SaveAsync(FlowDefinitionRecord)

Inserts or updates the flow definition record (upsert by Id).

Task<FlowDefinitionRecord> SaveAsync(FlowDefinitionRecord record)

Parameters

record FlowDefinitionRecord

Returns

Task<FlowDefinitionRecord>

The persisted record, including any server-set timestamps.

SetEnabledAsync(Guid, bool)

Enables or disables a flow without deleting it. Disabled flows are not triggered by the scheduler and are hidden from the active flow list.

Task<FlowDefinitionRecord> SetEnabledAsync(Guid id, bool enabled)

Parameters

id Guid
enabled bool

Returns

Task<FlowDefinitionRecord>

The updated record.