Skip to main content

Class: WorkflowTaskStartedEventAttributes

history.v1.WorkflowTaskStartedEventAttributes

Represents a WorkflowTaskStartedEventAttributes.

Properties​

buildIdRedirectCounter​

• buildIdRedirectCounter: Long

Used by server internally to properly reapply build ID redirects to an execution when rebuilding it from events. Deprecated. This field should be cleaned up when versioning-2 API is removed. [cleanup-experimental-wv]


historySizeBytes​

• historySizeBytes: Long

Total history size in bytes, which the workflow might use to decide when to continue-as-new regardless of the suggestion. Note that history event count is just the event id of this event, so we don't include it explicitly here.


identity​

• identity: string

Identity of the worker who picked up this task


requestId​

• requestId: string

This field is populated from the RecordWorkflowTaskStartedRequest. Matching service would set the request_id on the RecordWorkflowTaskStartedRequest to a new UUID. This is useful in case a RecordWorkflowTaskStarted call succeed but matching doesn't get that response, so matching could retry and history service would return success if the request_id matches. In that case, matching will continue to deliver the task to worker. Without this field, history service would return AlreadyStarted error, and matching would drop the task.


scheduledEventId​

• scheduledEventId: Long

The id of the WORKFLOW_TASK_SCHEDULED event this task corresponds to


suggestContinueAsNew​

• suggestContinueAsNew: boolean

True if this workflow should continue-as-new soon. See suggest_continue_as_new_reasons for why.


suggestContinueAsNewReasons​

• suggestContinueAsNewReasons: SuggestContinueAsNewReason[]

The reason(s) that suggest_continue_as_new is true, if it is. Unset if suggest_continue_as_new is false.


targetWorkerDeploymentVersionChanged​

• targetWorkerDeploymentVersionChanged: boolean

True if Workflow's Target Worker Deployment Version is different from its Pinned Version and the workflow is Pinned. Experimental.


workerVersion​

• Optional workerVersion: null | $Properties

Version info of the worker to whom this task was dispatched. Deprecated. This field should be cleaned up when versioning-2 API is removed. [cleanup-experimental-wv]

Methods​

toJSON​

▸ toJSON(): Object

Converts this WorkflowTaskStartedEventAttributes to JSON.

Returns​

Object

JSON object


create​

▸ create(properties?): WorkflowTaskStartedEventAttributes & $Properties

Creates a new WorkflowTaskStartedEventAttributes instance using the specified properties.

Parameters​

NameTypeDescription
properties?$PropertiesProperties to set

Returns​

WorkflowTaskStartedEventAttributes & $Properties

WorkflowTaskStartedEventAttributes instance

▸ create(properties?): WorkflowTaskStartedEventAttributes

Parameters​

NameType
properties?$Properties

Returns​

WorkflowTaskStartedEventAttributes


decode​

▸ decode(reader, length?): WorkflowTaskStartedEventAttributes & $Properties

Decodes a WorkflowTaskStartedEventAttributes message from the specified reader or buffer.

Parameters​

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

Returns​

WorkflowTaskStartedEventAttributes & $Properties

WorkflowTaskStartedEventAttributes

Throws

If the payload is not a reader or valid buffer

Throws

If required fields are missing


decodeDelimited​

▸ decodeDelimited(reader): WorkflowTaskStartedEventAttributes & $Properties

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

Parameters​

NameTypeDescription
readerUint8Array | ReaderReader or buffer to decode from

Returns​

WorkflowTaskStartedEventAttributes & $Properties

WorkflowTaskStartedEventAttributes

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 WorkflowTaskStartedEventAttributes message. Does not implicitly temporal.api.history.v1.WorkflowTaskStartedEventAttributes.verify|verify messages.

Parameters​

NameTypeDescription
message$PropertiesWorkflowTaskStartedEventAttributes message or plain object to encode
writer?WriterWriter to encode to

Returns​

Writer

Writer


encodeDelimited​

▸ encodeDelimited(message, writer?): Writer

Encodes the specified WorkflowTaskStartedEventAttributes message, length delimited. Does not implicitly temporal.api.history.v1.WorkflowTaskStartedEventAttributes.verify|verify messages.

Parameters​

NameTypeDescription
message$PropertiesWorkflowTaskStartedEventAttributes message or plain object to encode
writer?WriterWriter to encode to

Returns​

Writer

Writer


fromObject​

▸ fromObject(object): WorkflowTaskStartedEventAttributes

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

Parameters​

NameTypeDescription
objectObjectPlain object

Returns​

WorkflowTaskStartedEventAttributes

WorkflowTaskStartedEventAttributes


toObject​

▸ toObject(message, options?): Object

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

Parameters​

NameTypeDescription
messageWorkflowTaskStartedEventAttributesWorkflowTaskStartedEventAttributes
options?IConversionOptionsConversion options

Returns​

Object

Plain object