Skip to main content

Interface: IPollWorkflowTaskQueueResponse


Properties of a PollWorkflowTaskQueueResponse.

Implemented by



Optional attempt: null | number

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


Optional backlogCountHint: null | 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.


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.


Optional messages: null | IMessage[]

Protocol messages piggybacking on a WFT as a transport


Optional nextPageToken: null | Uint8Array

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


Optional previousStartedEventId: null | 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.


Optional queries: null | { [k: string]: IWorkflowQuery; }

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


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.


Optional scheduledTime: null | ITimestamp

When this task was scheduled by the server


Optional startedEventId: null | 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.


Optional startedTime: null | ITimestamp

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


Optional taskToken: null | Uint8Array

A unique identifier for this task


Optional workflowExecution: null | IWorkflowExecution

PollWorkflowTaskQueueResponse workflowExecution


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.


Optional workflowType: null | IWorkflowType

PollWorkflowTaskQueueResponse workflowType