Table of Contents

Class OrchestrationRuntimeState

Namespace
DurableTask.Core
Assembly
DurableTask.Core.dll

Represents the runtime state of an orchestration

public class OrchestrationRuntimeState
Inheritance
OrchestrationRuntimeState
Inherited Members

Constructors

OrchestrationRuntimeState()

Creates a new instance of the OrchestrationRuntimeState

public OrchestrationRuntimeState()

OrchestrationRuntimeState(IList<HistoryEvent>)

Creates a new instance of the OrchestrationRuntimeState with the supplied events

public OrchestrationRuntimeState(IList<HistoryEvent> events)

Parameters

events IList<HistoryEvent>

List of events for this runtime state

Fields

CompressedSize

Compressed size of the serialized state

public long CompressedSize

Field Value

long

Size

Size of the serialized state (uncompressed)

public long Size

Field Value

long

Status

The string status of the runtime state

public string Status

Field Value

string

Properties

CompletedTime

Gets the created time of the ExecutionCompletedEvent if completed else a safe (from timezone shift) max datetime

public DateTime CompletedTime { get; }

Property Value

DateTime

CreatedTime

Gets the created time of the ExecutionStartedEvent

public DateTime CreatedTime { get; }

Property Value

DateTime

Events

List of all history events for this runtime state

public IList<HistoryEvent> Events { get; }

Property Value

IList<HistoryEvent>

ExecutionStartedEvent

Gets the execution started event

public ExecutionStartedEvent ExecutionStartedEvent { get; }

Property Value

ExecutionStartedEvent

Input

Gets the serialized input of the ExecutionStartedEvent

public string Input { get; }

Property Value

string

Name

Gets the orchestration name of the ExecutionStartedEvent

public string Name { get; }

Property Value

string

NewEvents

List of new events added during an execution to keep track of the new events that were added during a particular execution should not be serialized

public IList<HistoryEvent> NewEvents { get; }

Property Value

IList<HistoryEvent>

OrchestrationInstance

Gets the OrchestrationInstance of the ExecutionStartedEvent else null

public OrchestrationInstance OrchestrationInstance { get; }

Property Value

OrchestrationInstance

OrchestrationStatus

Gets the status of the orchestration If complete then the status from the ExecutionCompletedEvent else Running.

public OrchestrationStatus OrchestrationStatus { get; }

Property Value

OrchestrationStatus

Output

Gets the serialized output of the ExecutionCompletedEvent if completed else null

public string Output { get; }

Property Value

string

ParentInstance

Gets the ParentInstance of the ExecutionStartedEvent else null

public ParentInstance ParentInstance { get; }

Property Value

ParentInstance

Tags

Gets the tags from the ExecutionStartedEvent

public IDictionary<string, string> Tags { get; }

Property Value

IDictionary<string, string>

Version

Gets the orchestration version of the ExecutionStartedEvent

public string Version { get; }

Property Value

string

Methods

AddEvent(HistoryEvent)

Adds a new history event to the Events list and NewEvents list

public void AddEvent(HistoryEvent historyEvent)

Parameters

historyEvent HistoryEvent

The new history event to add

GetOrchestrationRuntimeStateDump()

Gets a statedump of the current list of events

public OrchestrationRuntimeStateDump GetOrchestrationRuntimeStateDump()

Returns

OrchestrationRuntimeStateDump