Skip to main content

Class: ActivityTaskStartedEventAttributes

Represents an ActivityTaskStartedEventAttributes.

Properties​

attempt​

attempt: number

Starting at 1, the number of times this task has been attempted


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]


identity​

identity: string

id of the worker that picked up this task


lastFailure?​

optional lastFailure?: $Properties | null

Will be set to the most recent failure details, if this task has previously failed and then been retried.


requestId​

requestId: string

This field is populated from the RecordActivityTaskStartedRequest. Matching service would set the request_id on the RecordActivityTaskStartedRequest to a new UUID. This is useful in case a RecordActivityTaskStarted 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 ACTIVITY_TASK_SCHEDULED event this task corresponds to


workerVersion?​

optional workerVersion?: $Properties | null

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 ActivityTaskStartedEventAttributes to JSON.

Returns​

object

JSON object


create()​

Call Signature​

static create(properties?): ActivityTaskStartedEventAttributes & $Shape

Creates a new ActivityTaskStartedEventAttributes instance using the specified properties.

Parameters​
properties?​

$Shape

Properties to set

Returns​

ActivityTaskStartedEventAttributes & $Shape

ActivityTaskStartedEventAttributes instance

Call Signature​

static create(properties?): ActivityTaskStartedEventAttributes

Creates a new ActivityTaskStartedEventAttributes instance using the specified properties.

Parameters​
properties?​

$Properties

Properties to set

Returns​

ActivityTaskStartedEventAttributes

ActivityTaskStartedEventAttributes instance


decode()​

static decode(reader, length?): ActivityTaskStartedEventAttributes & $Shape

Decodes an ActivityTaskStartedEventAttributes 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​

ActivityTaskStartedEventAttributes & $Shape

ActivityTaskStartedEventAttributes

Throws​

If the payload is not a reader or valid buffer

Throws​

If required fields are missing


decodeDelimited()​

static decodeDelimited(reader): ActivityTaskStartedEventAttributes & $Shape

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

Parameters​

reader​

Uint8Array<ArrayBufferLike> | Reader

Reader or buffer to decode from

Returns​

ActivityTaskStartedEventAttributes & $Shape

ActivityTaskStartedEventAttributes

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

Parameters​

message​

$Properties

ActivityTaskStartedEventAttributes message or plain object to encode

writer?​

Writer

Writer to encode to

Returns​

Writer

Writer


encodeDelimited()​

static encodeDelimited(message, writer?): Writer

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

Parameters​

message​

$Properties

ActivityTaskStartedEventAttributes message or plain object to encode

writer?​

Writer

Writer to encode to

Returns​

Writer

Writer


fromObject()​

static fromObject(object): ActivityTaskStartedEventAttributes

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

Parameters​

object​

{[k: string]: any; }

Plain object

Returns​

ActivityTaskStartedEventAttributes

ActivityTaskStartedEventAttributes


toObject()​

static toObject(message, options?): object

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

Parameters​

message​

ActivityTaskStartedEventAttributes

ActivityTaskStartedEventAttributes

options?​

IConversionOptions

Conversion options

Returns​

object

Plain object