Skip to content

InMemoryWorkflowDefinitionStore

Namespace AgentPrism · Assembly AgentPrism.Core.dll

Stores workflow definitions in process memory.

public sealed class InMemoryWorkflowDefinitionStore : IWorkflowDefinitionStore

objectInMemoryWorkflowDefinitionStore

IWorkflowDefinitionStore

object.GetType(), object.ToString(), object.Equals(object?), object.Equals(object?, object?), object.ReferenceEquals(object?, object?), object.GetHashCode()

Its behavior contract matches PostgresWorkflowDefinitionStore and is protected by shared contract tests.

public InMemoryWorkflowDefinitionStore()

DeleteAsync(string, string, CancellationToken)

Section titled “ DeleteAsync(string, string, CancellationToken)”

Deletes the definition.

public ValueTask<bool> DeleteAsync(string tenantId, string name, CancellationToken cancellationToken = default)

tenantId string

The tenant identifier.

name string

The workflow name.

cancellationToken CancellationToken

The cancellation token.

ValueTask<bool>

true if the delete happened.

GetAsync(string, string, CancellationToken)

Section titled “ GetAsync(string, string, CancellationToken)”

Fetches the definition with the given name.

public ValueTask<WorkflowDefinition?> GetAsync(string tenantId, string name, CancellationToken cancellationToken = default)

tenantId string

The tenant identifier.

name string

The workflow name.

cancellationToken CancellationToken

The cancellation token.

ValueTask<WorkflowDefinition?>

The definition; null if it does not exist.

Lists all of a tenant’s definitions, by name.

public ValueTask<IReadOnlyList<WorkflowDefinition>> ListAsync(string tenantId, CancellationToken cancellationToken = default)

tenantId string

The tenant identifier.

cancellationToken CancellationToken

The cancellation token.

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.

public ValueTask<WorkflowDefinition> SaveAsync(string tenantId, WorkflowDefinition definition, CancellationToken cancellationToken = default)

tenantId string

The tenant identifier.

definition WorkflowDefinition

The definition to save.

cancellationToken CancellationToken

The cancellation token.

ValueTask<WorkflowDefinition>

The definition with its version number assigned.