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.

Properties

targetDeploymentVersion

Optional targetDeploymentVersion: null | $Properties

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

Methods

toJSON

toJSON(): Object

Converts this OneTimeOverride to JSON.

Returns

Object

JSON object


create

create(properties?): OneTimeOverride & $Properties

Creates a new OneTimeOverride instance using the specified properties.

Parameters

NameTypeDescription
properties?$PropertiesProperties to set

Returns

OneTimeOverride & $Properties

OneTimeOverride instance

create(properties?): OneTimeOverride

Parameters

NameType
properties?$Properties

Returns

OneTimeOverride


decode

decode(reader, length?): OneTimeOverride & $Properties

Decodes a 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 & $Properties

OneTimeOverride

Throws

If the payload is not a reader or valid buffer

Throws

If required fields are missing


decodeDelimited

decodeDelimited(reader): OneTimeOverride & $Properties

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

Parameters

NameTypeDescription
readerUint8Array | ReaderReader or buffer to decode from

Returns

OneTimeOverride & $Properties

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
message$PropertiesOneTimeOverride 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
message$PropertiesOneTimeOverride message or plain object to encode
writer?WriterWriter to encode to

Returns

Writer

Writer


fromObject

fromObject(object): OneTimeOverride

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

Parameters

NameTypeDescription
objectObjectPlain object

Returns

OneTimeOverride

OneTimeOverride


toObject

toObject(message, options?): Object

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

Parameters

NameTypeDescription
messageOneTimeOverrideOneTimeOverride
options?IConversionOptionsConversion options

Returns

Object

Plain object