Skip to main content

Class: OneTimeOverride

v1.VersioningOverride.OneTimeOverride

Routes Workflow Tasks for this execution to target_deployment_version until a Workflow Task completes on that version, then clears the override.

This does not force the workflow's normal Versioning Behavior to become Pinned. After the Workflow Task completes on target_deployment_version, the workflow execution's normal Versioning Behavior and Deployment Version are taken from the worker's completion response.

Example: if an execution is one-time moved from version X to version Y, and version Z later becomes current:

  • if worker Y reports Pinned, the execution stays on Y;
  • if worker Y reports AutoUpgrade, the execution routes to Z on a future Workflow Task;
  • if worker Y reports Pinned and the workflow uses upgrade-on-continue-as-new, the current run stays on Y and the execution can route to Z after continue-as-new.

If no Workflow Task completes on target_deployment_version, this override remains pending.

Implements

Constructors

constructor

new OneTimeOverride(properties?): OneTimeOverride

Constructs a new OneTimeOverride.

Parameters

NameTypeDescription
properties?IOneTimeOverrideProperties to set

Returns

OneTimeOverride

Properties

targetDeploymentVersion

Optional targetDeploymentVersion: null | IWorkerDeploymentVersion

Required. Worker Deployment Version to receive the one-time Workflow Task.

Implementation of

IOneTimeOverride.targetDeploymentVersion

Methods

toJSON

toJSON(): Object

Converts this OneTimeOverride to JSON.

Returns

Object

JSON object


create

create(properties?): OneTimeOverride

Creates a new OneTimeOverride instance using the specified properties.

Parameters

NameTypeDescription
properties?IOneTimeOverrideProperties to set

Returns

OneTimeOverride

OneTimeOverride instance


decode

decode(reader, length?): OneTimeOverride

Decodes an OneTimeOverride message from the specified reader or buffer.

Parameters

NameTypeDescription
readerUint8Array | ReaderReader or buffer to decode from
length?numberMessage length if known beforehand

Returns

OneTimeOverride

OneTimeOverride

Throws

If the payload is not a reader or valid buffer

Throws

If required fields are missing


decodeDelimited

decodeDelimited(reader): OneTimeOverride

Decodes an OneTimeOverride message from the specified reader or buffer, length delimited.

Parameters

NameTypeDescription
readerUint8Array | ReaderReader or buffer to decode from

Returns

OneTimeOverride

OneTimeOverride

Throws

If the payload is not a reader or valid buffer

Throws

If required fields are missing


encode

encode(message, writer?): Writer

Encodes the specified OneTimeOverride message. Does not implicitly temporal.api.workflow.v1.VersioningOverride.OneTimeOverride.verify|verify messages.

Parameters

NameTypeDescription
messageIOneTimeOverrideOneTimeOverride message or plain object to encode
writer?WriterWriter to encode to

Returns

Writer

Writer


encodeDelimited

encodeDelimited(message, writer?): Writer

Encodes the specified OneTimeOverride message, length delimited. Does not implicitly temporal.api.workflow.v1.VersioningOverride.OneTimeOverride.verify|verify messages.

Parameters

NameTypeDescription
messageIOneTimeOverrideOneTimeOverride message or plain object to encode
writer?WriterWriter to encode to

Returns

Writer

Writer


fromObject

fromObject(object): OneTimeOverride

Creates an OneTimeOverride message from a plain object. Also converts values to their respective internal types.

Parameters

NameTypeDescription
objectObjectPlain object

Returns

OneTimeOverride

OneTimeOverride


getTypeUrl

getTypeUrl(typeUrlPrefix?): string

Gets the default type url for OneTimeOverride

Parameters

NameTypeDescription
typeUrlPrefix?stringyour custom typeUrlPrefix(default "type.googleapis.com")

Returns

string

The default type url


toObject

toObject(message, options?): Object

Creates a plain object from an OneTimeOverride message. Also converts values to other types if specified.

Parameters

NameTypeDescription
messageOneTimeOverrideOneTimeOverride
options?IConversionOptionsConversion options

Returns

Object

Plain object