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