Skip to main content

Class: DoUpdate

Lang is requested to invoke an update handler on the workflow. Lang should invoke the update validator first (if requested). If it accepts the update, immediately invoke the update handler. Lang must reply to the activation containing this job with an UpdateResponse.

Properties​

headers​

headers: object

Headers attached to the update

Index Signature​

[k: string]: $Properties


id​

id: string

A workflow-unique identifier for this update


input​

input: $Properties[]

The input to the update


meta?​

optional meta?: $Properties | null

Remaining metadata associated with the update. The update_id field is stripped from here and moved to id, since it is guaranteed to be present.


name​

name: string

The name of the update handler


propagatedNexusSerializationContext?​

optional propagatedNexusSerializationContext?: $Properties | null

Serialization context of the Nexus operation handler that sent this update, if any. Lang should use it to serialize the update's result and failure, which are returned to the Nexus caller.


protocolInstanceId​

protocolInstanceId: string

The protocol message instance ID - this is used to uniquely track the ID server side and internally.


runValidator​

runValidator: boolean

If set true, lang must run the update's validator before running the handler. This will be set false during replay, since validation is not re-run during replay.

Methods​

toJSON()​

toJSON(): object

Converts this DoUpdate to JSON.

Returns​

object

JSON object


create()​

Call Signature​

static create(properties?): DoUpdate & $Properties

Creates a new DoUpdate instance using the specified properties.

Parameters​
properties?​

$Properties

Properties to set

Returns​

DoUpdate & $Properties

DoUpdate instance

Call Signature​

static create(properties?): DoUpdate

Creates a new DoUpdate instance using the specified properties.

Parameters​
properties?​

$Properties

Properties to set

Returns​

DoUpdate

DoUpdate instance


decode()​

static decode(reader, length?): DoUpdate & $Properties

Decodes a DoUpdate message from the specified reader or buffer.

Parameters​

reader​

Uint8Array<ArrayBufferLike> | Reader

Reader or buffer to decode from

length?​

number

Message length if known beforehand

Returns​

DoUpdate & $Properties

DoUpdate

Throws​

If the payload is not a reader or valid buffer

Throws​

If required fields are missing


decodeDelimited()​

static decodeDelimited(reader): DoUpdate & $Properties

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

Parameters​

reader​

Uint8Array<ArrayBufferLike> | Reader

Reader or buffer to decode from

Returns​

DoUpdate & $Properties

DoUpdate

Throws​

If the payload is not a reader or valid buffer

Throws​

If required fields are missing


encode()​

static encode(message, writer?): Writer

Encodes the specified DoUpdate message. Does not implicitly coresdk.workflow_activation.DoUpdate.verify|verify messages.

Parameters​

message​

$Properties

DoUpdate message or plain object to encode

writer?​

Writer

Writer to encode to

Returns​

Writer

Writer


encodeDelimited()​

static encodeDelimited(message, writer?): Writer

Encodes the specified DoUpdate message, length delimited. Does not implicitly coresdk.workflow_activation.DoUpdate.verify|verify messages.

Parameters​

message​

$Properties

DoUpdate message or plain object to encode

writer?​

Writer

Writer to encode to

Returns​

Writer

Writer


fromObject()​

static fromObject(object): DoUpdate

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

Parameters​

object​

{[k: string]: any; }

Plain object

Returns​

DoUpdate

DoUpdate


toObject()​

static toObject(message, options?): object

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

Parameters​

message​

DoUpdate

DoUpdate

options?​

IConversionOptions

Conversion options

Returns​

object

Plain object