Skip to main content

Class: PollWorkflowTaskQueueResponse

workflowservice.v1.PollWorkflowTaskQueueResponse

Represents a PollWorkflowTaskQueueResponse.

Implements

Constructors

constructor

new PollWorkflowTaskQueueResponse(properties?): PollWorkflowTaskQueueResponse

Constructs a new PollWorkflowTaskQueueResponse.

Parameters

NameTypeDescription
properties?IPollWorkflowTaskQueueResponseProperties to set

Returns

PollWorkflowTaskQueueResponse

Properties

attempt

attempt: number

Starting at 1, the number of attempts to complete this task by any worker.

Implementation of

IPollWorkflowTaskQueueResponse.attempt


backlogCountHint

backlogCountHint: Long

A hint that there are more tasks already present in this task queue. Can be used to prioritize draining a sticky queue before polling from a normal queue.

Implementation of

IPollWorkflowTaskQueueResponse.backlogCountHint


history

Optional history: null | IHistory

The history for this workflow, which will either be complete or partial. Partial histories are sent to workers who have signaled that they are using a sticky queue when completing a workflow task.

Implementation of

IPollWorkflowTaskQueueResponse.history


messages

messages: IMessage[]

Protocol messages piggybacking on a WFT as a transport

Implementation of

IPollWorkflowTaskQueueResponse.messages


nextPageToken

nextPageToken: Uint8Array

Will be set if there are more history events than were included in this response. Such events should be fetched via GetWorkflowExecutionHistory.

Implementation of

IPollWorkflowTaskQueueResponse.nextPageToken


previousStartedEventId

previousStartedEventId: Long

The last workflow task started event which was processed by some worker for this execution. Will be zero if no task has ever started.

Implementation of

IPollWorkflowTaskQueueResponse.previousStartedEventId


queries

queries: Object

Queries that should be executed after applying the history in this task. Responses should be attached to RespondWorkflowTaskCompletedRequest::query_results

Index signature

▪ [k: string]: IWorkflowQuery

Implementation of

IPollWorkflowTaskQueueResponse.queries


query

Optional query: null | IWorkflowQuery

Legacy queries appear in this field. The query must be responded to via RespondQueryTaskCompleted. If the workflow is already closed (queries are permitted on closed workflows) then the history field will be populated with the entire history. It may also be populated if this task originates on a non-sticky queue.

Implementation of

IPollWorkflowTaskQueueResponse.query


scheduledTime

Optional scheduledTime: null | ITimestamp

When this task was scheduled by the server

Implementation of

IPollWorkflowTaskQueueResponse.scheduledTime


startedEventId

startedEventId: Long

The id of the most recent workflow task started event, which will have been generated as a result of this poll request being served. Will be zero if the task does not contain any events which would advance history (no new WFT started). Currently this can happen for queries.

Implementation of

IPollWorkflowTaskQueueResponse.startedEventId


startedTime

Optional startedTime: null | ITimestamp

When the current workflow task started event was generated, meaning the current attempt.

Implementation of

IPollWorkflowTaskQueueResponse.startedTime


taskToken

taskToken: Uint8Array

A unique identifier for this task

Implementation of

IPollWorkflowTaskQueueResponse.taskToken


workflowExecution

Optional workflowExecution: null | IWorkflowExecution

PollWorkflowTaskQueueResponse workflowExecution.

Implementation of

IPollWorkflowTaskQueueResponse.workflowExecution


workflowExecutionTaskQueue

Optional workflowExecutionTaskQueue: null | ITaskQueue

The task queue this task originated from, which will always be the original non-sticky name for the queue, even if this response came from polling a sticky queue.

Implementation of

IPollWorkflowTaskQueueResponse.workflowExecutionTaskQueue


workflowType

Optional workflowType: null | IWorkflowType

PollWorkflowTaskQueueResponse workflowType.

Implementation of

IPollWorkflowTaskQueueResponse.workflowType

Methods

toJSON

toJSON(): Object

Converts this PollWorkflowTaskQueueResponse to JSON.

Returns

Object

JSON object


create

create(properties?): PollWorkflowTaskQueueResponse

Creates a new PollWorkflowTaskQueueResponse instance using the specified properties.

Parameters

NameTypeDescription
properties?IPollWorkflowTaskQueueResponseProperties to set

Returns

PollWorkflowTaskQueueResponse

PollWorkflowTaskQueueResponse instance


decode

decode(reader, length?): PollWorkflowTaskQueueResponse

Decodes a PollWorkflowTaskQueueResponse message from the specified reader or buffer.

Parameters

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

Returns

PollWorkflowTaskQueueResponse

PollWorkflowTaskQueueResponse

Throws

If the payload is not a reader or valid buffer

Throws

If required fields are missing


decodeDelimited

decodeDelimited(reader): PollWorkflowTaskQueueResponse

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

Parameters

NameTypeDescription
readerUint8Array | ReaderReader or buffer to decode from

Returns

PollWorkflowTaskQueueResponse

PollWorkflowTaskQueueResponse

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

Parameters

NameTypeDescription
messageIPollWorkflowTaskQueueResponsePollWorkflowTaskQueueResponse message or plain object to encode
writer?WriterWriter to encode to

Returns

Writer

Writer


encodeDelimited

encodeDelimited(message, writer?): Writer

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

Parameters

NameTypeDescription
messageIPollWorkflowTaskQueueResponsePollWorkflowTaskQueueResponse message or plain object to encode
writer?WriterWriter to encode to

Returns

Writer

Writer


fromObject

fromObject(object): PollWorkflowTaskQueueResponse

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

Parameters

NameTypeDescription
objectObjectPlain object

Returns

PollWorkflowTaskQueueResponse

PollWorkflowTaskQueueResponse


getTypeUrl

getTypeUrl(typeUrlPrefix?): string

Gets the default type url for PollWorkflowTaskQueueResponse

Parameters

NameTypeDescription
typeUrlPrefix?stringyour custom typeUrlPrefix(default "type.googleapis.com")

Returns

string

The default type url


toObject

toObject(message, options?): Object

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

Parameters

NameTypeDescription
messagePollWorkflowTaskQueueResponsePollWorkflowTaskQueueResponse
options?IConversionOptionsConversion options

Returns

Object

Plain object