IWorkflowDefinitionStore
AgentPrism.Abstractions.dllThe store for workflow definitions stored in the database.
public interface IWorkflowDefinitionStoreRemarks
Section titled “Remarks”Unlike agent definitions, no version history is kept. A workflow definition carries only a name list and a pattern; the information needed to roll back already exists in the audit trail (IAuditLog). An agent definition, on the other hand, carries instruction text, and the old form of that text cannot be reconstructed anywhere else.
Methods
Section titled “Methods”DeleteAsync(string, string, CancellationToken)
Section titled “ DeleteAsync(string, string, CancellationToken)”Deletes the definition.
ValueTask<bool> DeleteAsync(string tenantId, string name, CancellationToken cancellationToken = default)Parameters
Section titled “Parameters”tenantId string
The tenant identifier.
name string
The workflow name.
cancellationToken CancellationToken
The cancellation token.
Returns
Section titled “Returns”true if the delete happened.
GetAsync(string, string, CancellationToken)
Section titled “ GetAsync(string, string, CancellationToken)”Fetches the definition with the given name.
ValueTask<WorkflowDefinition?> GetAsync(string tenantId, string name, CancellationToken cancellationToken = default)Parameters
Section titled “Parameters”tenantId string
The tenant identifier.
name string
The workflow name.
cancellationToken CancellationToken
The cancellation token.
Returns
Section titled “Returns”ValueTask<WorkflowDefinition?>
The definition; null if it does not exist.
ListAsync(string, CancellationToken)
Section titled “ ListAsync(string, CancellationToken)”Lists all of a tenant’s definitions, by name.
ValueTask<IReadOnlyList<WorkflowDefinition>> ListAsync(string tenantId, CancellationToken cancellationToken = default)Parameters
Section titled “Parameters”tenantId string
The tenant identifier.
cancellationToken CancellationToken
The cancellation token.
Returns
Section titled “Returns”ValueTask<IReadOnlyList<WorkflowDefinition>>
The definitions.
SaveAsync(string, WorkflowDefinition, CancellationToken)
Section titled “ SaveAsync(string, WorkflowDefinition, CancellationToken)”Saves the definition. The incoming WorkflowDefinition.Version
value is ignored; the store determines the version number.
ValueTask<WorkflowDefinition> SaveAsync(string tenantId, WorkflowDefinition definition, CancellationToken cancellationToken = default)Parameters
Section titled “Parameters”tenantId string
The tenant identifier.
definition WorkflowDefinition
The definition to save.
cancellationToken CancellationToken
The cancellation token.
Returns
Section titled “Returns”The definition with its version number assigned.