Skip to main content

Class: WorkflowTaskAttempt

One attempt of a workflow task, from the poll response and the history of that attempt.

Properties​

attempt​

attempt: number

WorkflowTaskAttempt attempt.


failedTasks​

failedTasks: Long[]

The started event ids of the run's last 100 failed and timed out workflow tasks in history, in event order. The cap keeps each start small. A transient attempt has no such event.


previousAttempt​

previousAttempt: number

The attempt and the started time of the task at previous_started_event_id, from its WorkflowTaskScheduled and WorkflowTaskStarted events. Unset when no task has completed.


previousStartedEventId​

previousStartedEventId: Long

The started event id of the run's last completed workflow task, from the poll response. 0 when no task of the run has completed.


previousStartedTime?​

optional previousStartedTime?: $Properties | null

WorkflowTaskAttempt previousStartedTime.


startedEventId​

startedEventId: Long

The event id of the task's WorkflowTaskStarted event.


startedTime?​

optional startedTime?: $Properties | null

When the server started the task.

Methods​

toJSON()​

toJSON(): object

Converts this WorkflowTaskAttempt to JSON.

Returns​

object

JSON object


create()​

Call Signature​

static create(properties?): WorkflowTaskAttempt & $Properties

Creates a new WorkflowTaskAttempt instance using the specified properties.

Parameters​
properties?​

$Properties

Properties to set

Returns​

WorkflowTaskAttempt & $Properties

WorkflowTaskAttempt instance

Call Signature​

static create(properties?): WorkflowTaskAttempt

Creates a new WorkflowTaskAttempt instance using the specified properties.

Parameters​
properties?​

$Properties

Properties to set

Returns​

WorkflowTaskAttempt

WorkflowTaskAttempt instance


decode()​

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

Decodes a WorkflowTaskAttempt 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​

WorkflowTaskAttempt & $Properties

WorkflowTaskAttempt

Throws​

If the payload is not a reader or valid buffer

Throws​

If required fields are missing


decodeDelimited()​

static decodeDelimited(reader): WorkflowTaskAttempt & $Properties

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

Parameters​

reader​

Uint8Array<ArrayBufferLike> | Reader

Reader or buffer to decode from

Returns​

WorkflowTaskAttempt & $Properties

WorkflowTaskAttempt

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 WorkflowTaskAttempt message. Does not implicitly coresdk.activity_task.WorkflowTaskAttempt.verify|verify messages.

Parameters​

message​

$Properties

WorkflowTaskAttempt message or plain object to encode

writer?​

Writer

Writer to encode to

Returns​

Writer

Writer


encodeDelimited()​

static encodeDelimited(message, writer?): Writer

Encodes the specified WorkflowTaskAttempt message, length delimited. Does not implicitly coresdk.activity_task.WorkflowTaskAttempt.verify|verify messages.

Parameters​

message​

$Properties

WorkflowTaskAttempt message or plain object to encode

writer?​

Writer

Writer to encode to

Returns​

Writer

Writer


fromObject()​

static fromObject(object): WorkflowTaskAttempt

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

Parameters​

object​

{[k: string]: any; }

Plain object

Returns​

WorkflowTaskAttempt

WorkflowTaskAttempt


toObject()​

static toObject(message, options?): object

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

Parameters​

message​

WorkflowTaskAttempt

WorkflowTaskAttempt

options?​

IConversionOptions

Conversion options

Returns​

object

Plain object