Table of Contents

Class WorkflowHistory

Namespace
Temporalio.Common
Assembly
Temporalio.dll

History for a workflow.

public record WorkflowHistory : IEquatable<WorkflowHistory>
Inheritance
WorkflowHistory
Implements
Inherited Members

Constructors

WorkflowHistory(string, IReadOnlyCollection<HistoryEvent>)

History for a workflow.

public WorkflowHistory(string Id, IReadOnlyCollection<HistoryEvent> Events)

Parameters

Id string

ID of the workflow.

Events IReadOnlyCollection<HistoryEvent>

Collection of events.

Properties

Events

Collection of events.

public IReadOnlyCollection<HistoryEvent> Events { get; init; }

Property Value

IReadOnlyCollection<HistoryEvent>

Id

ID of the workflow.

public string Id { get; init; }

Property Value

string

Methods

FromJson(string, string)

Create workflow history from the given JSON. While this works with "ToJson" from this class, it also works with CLI and UI exported JSON.

public static WorkflowHistory FromJson(string workflowId, string json)

Parameters

workflowId string

Workflow ID.

json string

JSON to create history from.

Returns

WorkflowHistory

Created history.

ToJson()

Convert this workflow history to JSON. Note, the JSON does not contain the ID.

public string ToJson()

Returns

string

String with the workflow history.

ToJson(TextWriter)

Convert this workflow history to JSON and write to writer. Note, the JSON does not contain the ID.

public void ToJson(TextWriter writer)

Parameters

writer TextWriter

Where to write the JSON.