Table of Contents

Class WorkflowExecutionVersioningInfo

Namespace
Temporalio.Api.Workflow.V1
Assembly
Temporalio.dll

Holds all the information about versioning for a workflow execution. Experimental. Versioning info is experimental and might change in the future.

public sealed class WorkflowExecutionVersioningInfo : IMessage<WorkflowExecutionVersioningInfo>, IEquatable<WorkflowExecutionVersioningInfo>, IDeepCloneable<WorkflowExecutionVersioningInfo>, IBufferMessage, IMessage
Inheritance
WorkflowExecutionVersioningInfo
Implements
IBufferMessage
IMessage
Inherited Members

Constructors

WorkflowExecutionVersioningInfo()

public WorkflowExecutionVersioningInfo()

WorkflowExecutionVersioningInfo(WorkflowExecutionVersioningInfo)

public WorkflowExecutionVersioningInfo(WorkflowExecutionVersioningInfo other)

Parameters

other WorkflowExecutionVersioningInfo

Fields

BehaviorFieldNumber

Field number for the "behavior" field.

public const int BehaviorFieldNumber = 1

Field Value

int

DeploymentFieldNumber

Field number for the "deployment" field.

public const int DeploymentFieldNumber = 2

Field Value

int

DeploymentTransitionFieldNumber

Field number for the "deployment_transition" field.

public const int DeploymentTransitionFieldNumber = 4

Field Value

int

VersioningOverrideFieldNumber

Field number for the "versioning_override" field.

public const int VersioningOverrideFieldNumber = 3

Field Value

int

Properties

Behavior

Versioning behavior determines how the server should treat this execution when workers are upgraded. When present it means this workflow execution is versioned; UNSPECIFIED means unversioned. See the comments in VersioningBehavior enum for more info about different behaviors. This field is first set after an execution completes its first workflow task on a versioned worker, and set again on completion of every subsequent workflow task. Note that behavior is overridden by versioning_override if the latter is present.

public VersioningBehavior Behavior { get; set; }

Property Value

VersioningBehavior

Deployment

The worker deployment that completed the last workflow task of this workflow execution. Must be present if behavior is set. Absent value means no workflow task is completed, or the last workflow task was completed by an unversioned worker. Unversioned workers may still send a deployment value which will be stored here, so the right way to check if an execution is versioned if an execution is versioned or not is via the behavior field. Note that deployment is overridden by versioning_override if the latter is present.

public Deployment Deployment { get; set; }

Property Value

Deployment

DeploymentTransition

When present, indicates the workflow is transitioning to a different deployment. Can indicate one of the following transitions: unversioned -> versioned, versioned -> versioned on a different deployment, or versioned -> unversioned. Not applicable to workflows with PINNED behavior. When a workflow with AUTO_UPGRADE behavior creates a new workflow task, it will automatically start a transition to the task queue's current deployment if the task queue's current deployment is different from the workflow's deployment. If the AUTO_UPGRADE workflow is stuck due to backlogged activity or workflow tasks, those tasks will be redirected to the task queue's current deployment. As soon as a poller from that deployment is available to receive the task, the workflow will automatically start a transition to that deployment and continue execution there. A deployment transition can only exist while there is a pending or started workflow task. Once the pending workflow task completes on the transition's target deployment, the transition completes and the workflow's deployment and behavior fields are updated per the worker's task completion response. Pending activities will not start new attempts during a transition. Once the transition is completed, pending activities will start their next attempt on the new deployment.

public DeploymentTransition DeploymentTransition { get; set; }

Property Value

DeploymentTransition

Descriptor

public static MessageDescriptor Descriptor { get; }

Property Value

MessageDescriptor

Parser

public static MessageParser<WorkflowExecutionVersioningInfo> Parser { get; }

Property Value

MessageParser<WorkflowExecutionVersioningInfo>

VersioningOverride

Present if user has set an execution-specific versioning override. This override takes precedence over SDK-sent behavior (and deployment when override is PINNED). An override can be set when starting a new execution, as well as afterwards by calling the UpdateWorkflowExecutionOptions API.

public VersioningOverride VersioningOverride { get; set; }

Property Value

VersioningOverride

Methods

CalculateSize()

Calculates the size of this message in Protocol Buffer wire format, in bytes.

public int CalculateSize()

Returns

int

The number of bytes required to write this message to a coded output stream.

Clone()

Creates a deep clone of this object.

public WorkflowExecutionVersioningInfo Clone()

Returns

WorkflowExecutionVersioningInfo

A deep clone of this object.

Equals(object)

Determines whether the specified object is equal to the current object.

public override bool Equals(object other)

Parameters

other object

Returns

bool

true if the specified object is equal to the current object; otherwise, false.

Equals(WorkflowExecutionVersioningInfo)

Indicates whether the current object is equal to another object of the same type.

public bool Equals(WorkflowExecutionVersioningInfo other)

Parameters

other WorkflowExecutionVersioningInfo

An object to compare with this object.

Returns

bool

true if the current object is equal to the other parameter; otherwise, false.

GetHashCode()

Serves as the default hash function.

public override int GetHashCode()

Returns

int

A hash code for the current object.

MergeFrom(CodedInputStream)

Merges the data from the specified coded input stream with the current message.

public void MergeFrom(CodedInputStream input)

Parameters

input CodedInputStream

Remarks

See the user guide for precise merge semantics.

MergeFrom(WorkflowExecutionVersioningInfo)

Merges the given message into this one.

public void MergeFrom(WorkflowExecutionVersioningInfo other)

Parameters

other WorkflowExecutionVersioningInfo

Remarks

See the user guide for precise merge semantics.

ToString()

Returns a string that represents the current object.

public override string ToString()

Returns

string

A string that represents the current object.

WriteTo(CodedOutputStream)

Writes the data to the given coded output stream.

public void WriteTo(CodedOutputStream output)

Parameters

output CodedOutputStream

Coded output stream to write the data to. Must not be null.