Table of Contents

Class WorkflowRunHistory

Namespace
JD.AI.Workflows.Consensus
Assembly
JD.AI.Workflows.dll

Append-only persistent history of workflow executions. Each run is logged with metadata, outcome, and step-level detail for auditing and compliance requirements.

public sealed class WorkflowRunHistory
Inheritance
WorkflowRunHistory
Inherited Members

Constructors

WorkflowRunHistory(string)

public WorkflowRunHistory(string historyPath)

Parameters

historyPath string

Methods

CountAsync(string?, CancellationToken)

Gets the total number of runs recorded for a workflow.

public Task<int> CountAsync(string? workflowName = null, CancellationToken ct = default)

Parameters

workflowName string
ct CancellationToken

Returns

Task<int>

QueryAsync(string?, ExecutionStatus?, string?, DateTimeOffset?, int, CancellationToken)

Queries history entries with optional filters.

public Task<IReadOnlyList<RunHistoryEntry>> QueryAsync(string? workflowName = null, ExecutionStatus? status = null, string? initiator = null, DateTimeOffset? since = null, int limit = 100, CancellationToken ct = default)

Parameters

workflowName string
status ExecutionStatus?
initiator string
since DateTimeOffset?
limit int
ct CancellationToken

Returns

Task<IReadOnlyList<RunHistoryEntry>>

RecordAsync(RunHistoryEntry, CancellationToken)

Records a completed or failed execution run to the history log.

public Task RecordAsync(RunHistoryEntry entry, CancellationToken ct = default)

Parameters

entry RunHistoryEntry
ct CancellationToken

Returns

Task