AuditingWorkflowDefinitionStore
AgentPrism.Core.dllWraps IWorkflowDefinitionStore in a decorator that writes an audit trail.
public sealed class AuditingWorkflowDefinitionStore : IWorkflowDefinitionStore, IAuditDecoratedInheritance
Section titled “Inheritance”object ← AuditingWorkflowDefinitionStore
Implements
Section titled “Implements”IWorkflowDefinitionStore, IAuditDecorated
Inherited Members
Section titled “Inherited Members”object.GetType(), object.ToString(), object.Equals(object?), object.Equals(object?, object?), object.ReferenceEquals(object?, object?), object.GetHashCode()
Remarks
Section titled “Remarks”A workflow definition chains catalog agents and can start dozens of model calls
from one request. The workflow.save and workflow.delete actions
therefore always enter the audit trail.
Constructors
Section titled “Constructors”AuditingWorkflowDefinitionStore(IWorkflowDefinitionStore, IAuditLog, IAuditActorResolver, ILogger<AuditingWorkflowDefinitionStore>)
Section titled “ AuditingWorkflowDefinitionStore(IWorkflowDefinitionStore, IAuditLog, IAuditActorResolver, ILogger<AuditingWorkflowDefinitionStore>)”Initializes a new audited workflow definition store.
public AuditingWorkflowDefinitionStore(IWorkflowDefinitionStore inner, IAuditLog auditLog, IAuditActorResolver actorResolver, ILogger<AuditingWorkflowDefinitionStore> logger)Parameters
Section titled “Parameters”inner IWorkflowDefinitionStore
The wrapped store.
auditLog IAuditLog
The audit log.
actorResolver IAuditActorResolver
The actor resolver.
logger ILogger<AuditingWorkflowDefinitionStore>
The logger.
Exceptions
Section titled “Exceptions”A dependency is null.
Properties
Section titled “Properties”AuditedInner
Section titled “ AuditedInner”Gets the real store instance the decorator wraps.
public object AuditedInner { get; }Property Value
Section titled “Property Value”Methods
Section titled “Methods”DeleteAsync(string, string, CancellationToken)
Section titled “ DeleteAsync(string, string, CancellationToken)”Deletes the definition.
public 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.
public 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.
public 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.
public 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.