Table of Contents

Class PollWorkflowTaskQueueResponse

Namespace
Temporalio.Api.WorkflowService.V1
Assembly
Temporalio.dll
public sealed class PollWorkflowTaskQueueResponse : IMessage<PollWorkflowTaskQueueResponse>, IEquatable<PollWorkflowTaskQueueResponse>, IDeepCloneable<PollWorkflowTaskQueueResponse>, IBufferMessage, IMessage
Inheritance
PollWorkflowTaskQueueResponse
Implements
IBufferMessage
IMessage
Inherited Members

Constructors

PollWorkflowTaskQueueResponse()

public PollWorkflowTaskQueueResponse()

PollWorkflowTaskQueueResponse(PollWorkflowTaskQueueResponse)

public PollWorkflowTaskQueueResponse(PollWorkflowTaskQueueResponse other)

Parameters

other PollWorkflowTaskQueueResponse

Fields

AttemptFieldNumber

Field number for the "attempt" field.

public const int AttemptFieldNumber = 6

Field Value

int

BacklogCountHintFieldNumber

Field number for the "backlog_count_hint" field.

public const int BacklogCountHintFieldNumber = 7

Field Value

int

HistoryFieldNumber

Field number for the "history" field.

public const int HistoryFieldNumber = 8

Field Value

int

MessagesFieldNumber

Field number for the "messages" field.

public const int MessagesFieldNumber = 15

Field Value

int

NextPageTokenFieldNumber

Field number for the "next_page_token" field.

public const int NextPageTokenFieldNumber = 9

Field Value

int

PreviousStartedEventIdFieldNumber

Field number for the "previous_started_event_id" field.

public const int PreviousStartedEventIdFieldNumber = 4

Field Value

int

QueriesFieldNumber

Field number for the "queries" field.

public const int QueriesFieldNumber = 14

Field Value

int

QueryFieldNumber

Field number for the "query" field.

public const int QueryFieldNumber = 10

Field Value

int

ScheduledTimeFieldNumber

Field number for the "scheduled_time" field.

public const int ScheduledTimeFieldNumber = 12

Field Value

int

StartedEventIdFieldNumber

Field number for the "started_event_id" field.

public const int StartedEventIdFieldNumber = 5

Field Value

int

StartedTimeFieldNumber

Field number for the "started_time" field.

public const int StartedTimeFieldNumber = 13

Field Value

int

TaskTokenFieldNumber

Field number for the "task_token" field.

public const int TaskTokenFieldNumber = 1

Field Value

int

WorkflowExecutionFieldNumber

Field number for the "workflow_execution" field.

public const int WorkflowExecutionFieldNumber = 2

Field Value

int

WorkflowExecutionTaskQueueFieldNumber

Field number for the "workflow_execution_task_queue" field.

public const int WorkflowExecutionTaskQueueFieldNumber = 11

Field Value

int

WorkflowTypeFieldNumber

Field number for the "workflow_type" field.

public const int WorkflowTypeFieldNumber = 3

Field Value

int

Properties

Attempt

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

public int Attempt { get; set; }

Property Value

int

BacklogCountHint

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

Specifically, the returned number is the number of tasks remaining in the in-memory buffer for this partition, which is currently capped at 1000. Because sticky queues only have one partition, this number is more useful when draining them. Normal queues, typically having more than one partition, will return a number representing only some portion of the overall backlog. Subsequent RPCs may not hit the same partition as this call.

public long BacklogCountHint { get; set; }

Property Value

long

Descriptor

public static MessageDescriptor Descriptor { get; }

Property Value

MessageDescriptor

History

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.

public History History { get; set; }

Property Value

History

Messages

Protocol messages piggybacking on a WFT as a transport

public RepeatedField<Message> Messages { get; }

Property Value

RepeatedField<Message>

NextPageToken

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

public ByteString NextPageToken { get; set; }

Property Value

ByteString

Parser

public static MessageParser<PollWorkflowTaskQueueResponse> Parser { get; }

Property Value

MessageParser<PollWorkflowTaskQueueResponse>

PreviousStartedEventId

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

public long PreviousStartedEventId { get; set; }

Property Value

long

Queries

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

public MapField<string, WorkflowQuery> Queries { get; }

Property Value

MapField<string, WorkflowQuery>

Query

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.

public WorkflowQuery Query { get; set; }

Property Value

WorkflowQuery

ScheduledTime

When this task was scheduled by the server

public Timestamp ScheduledTime { get; set; }

Property Value

Timestamp

StartedEventId

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.

public long StartedEventId { get; set; }

Property Value

long

StartedTime

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

public Timestamp StartedTime { get; set; }

Property Value

Timestamp

TaskToken

A unique identifier for this task

public ByteString TaskToken { get; set; }

Property Value

ByteString

WorkflowExecution

public WorkflowExecution WorkflowExecution { get; set; }

Property Value

WorkflowExecution

WorkflowExecutionTaskQueue

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.

public TaskQueue WorkflowExecutionTaskQueue { get; set; }

Property Value

TaskQueue

WorkflowType

public WorkflowType WorkflowType { get; set; }

Property Value

WorkflowType

Methods

CalculateSize()

Calculates the size of this message in Protocol Buffer wire format, in bytes.

public int CalculateSize()

Returns

int

The number of bytes required to write this message to a coded output stream.

Clone()

Creates a deep clone of this object.

public PollWorkflowTaskQueueResponse Clone()

Returns

PollWorkflowTaskQueueResponse

A deep clone of this object.

Equals(object)

Determines whether the specified object is equal to the current object.

public override bool Equals(object other)

Parameters

other object

Returns

bool

true if the specified object is equal to the current object; otherwise, false.

Equals(PollWorkflowTaskQueueResponse)

Indicates whether the current object is equal to another object of the same type.

public bool Equals(PollWorkflowTaskQueueResponse other)

Parameters

other PollWorkflowTaskQueueResponse

An object to compare with this object.

Returns

bool

true if the current object is equal to the other parameter; otherwise, false.

GetHashCode()

Serves as the default hash function.

public override int GetHashCode()

Returns

int

A hash code for the current object.

MergeFrom(CodedInputStream)

Merges the data from the specified coded input stream with the current message.

public void MergeFrom(CodedInputStream input)

Parameters

input CodedInputStream

Remarks

See the user guide for precise merge semantics.

MergeFrom(PollWorkflowTaskQueueResponse)

Merges the given message into this one.

public void MergeFrom(PollWorkflowTaskQueueResponse other)

Parameters

other PollWorkflowTaskQueueResponse

Remarks

See the user guide for precise merge semantics.

ToString()

Returns a string that represents the current object.

public override string ToString()

Returns

string

A string that represents the current object.

WriteTo(CodedOutputStream)

Writes the data to the given coded output stream.

public void WriteTo(CodedOutputStream output)

Parameters

output CodedOutputStream

Coded output stream to write the data to. Must not be null.