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
stringID of the workflow.
Events
IReadOnlyCollection<HistoryEvent>Collection of events.
Properties
Events
Collection of events.
public IReadOnlyCollection<HistoryEvent> Events { get; init; }
Property Value
Id
ID of the workflow.
public string Id { get; init; }
Property Value
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
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
TextWriterWhere to write the JSON.