MCPcopy Create free account
hub / github.com/temporalio/temporal / CreateMatchingPollWorkflowTaskQueueResponse

Function CreateMatchingPollWorkflowTaskQueueResponse

common/util.go:528–551  ·  view source on GitHub ↗

CreateMatchingPollWorkflowTaskQueueResponse create response for matching's PollWorkflowTaskQueue

(historyResponse *historyservice.RecordWorkflowTaskStartedResponse, workflowExecution *commonpb.WorkflowExecution, token []byte)

Source from the content-addressed store, hash-verified

526
527// CreateMatchingPollWorkflowTaskQueueResponse create response for matching's PollWorkflowTaskQueue
528func CreateMatchingPollWorkflowTaskQueueResponse(historyResponse *historyservice.RecordWorkflowTaskStartedResponse, workflowExecution *commonpb.WorkflowExecution, token []byte) *matchingservice.PollWorkflowTaskQueueResponseWithRawHistory {
529 matchingResp := &matchingservice.PollWorkflowTaskQueueResponseWithRawHistory{
530 TaskToken: token,
531 WorkflowExecution: workflowExecution,
532 WorkflowType: historyResponse.WorkflowType,
533 PreviousStartedEventId: historyResponse.PreviousStartedEventId,
534 StartedEventId: historyResponse.StartedEventId,
535 Attempt: historyResponse.GetAttempt(),
536 NextEventId: historyResponse.NextEventId,
537 StickyExecutionEnabled: historyResponse.StickyExecutionEnabled,
538 TransientWorkflowTask: historyResponse.TransientWorkflowTask,
539 WorkflowExecutionTaskQueue: historyResponse.WorkflowExecutionTaskQueue,
540 BranchToken: historyResponse.BranchToken,
541 ScheduledTime: historyResponse.ScheduledTime,
542 StartedTime: historyResponse.StartedTime,
543 Queries: historyResponse.Queries,
544 Messages: historyResponse.Messages,
545 History: historyResponse.History,
546 NextPageToken: historyResponse.NextPageToken,
547 RawHistory: historyResponse.RawHistoryBytes,
548 }
549
550 return matchingResp
551}
552
553// CreateHistoryStartWorkflowRequest create a start workflow request for history.
554// Assumes startRequest is valid. See frontend workflow_handler for detailed validation logic.

Callers 2

withNewWorkflowTaskMethod · 0.92

Calls 1

GetAttemptMethod · 0.45

Tested by

no test coverage detected