1617
requestCancelInfo *persistencespb.RequestCancelInfo,
1618
attributes *historypb.RequestCancelExternalWorkflowExecutionInitiatedEventAttributes,
1620
>
request := &historyservice.RequestCancelWorkflowExecutionRequest{
1621
>
NamespaceId: targetNamespaceID.String(),
1622
>
CancelRequest: &workflowservice.RequestCancelWorkflowExecutionRequest{
1623
>
Namespace: targetNamespace.String(),
1624
>
WorkflowExecution: attributes.GetWorkflowExecution(),
1625
>
Identity: consts.IdentityHistoryService,
1626
>
// Use the same request ID to dedupe RequestCancelWorkflowExecution calls
1627
>
RequestId: requestCancelInfo.GetCancelRequestId(),
1628
>
Reason: attributes.Reason,
1629
>
},
1630
>
ExternalInitiatedEventId: task.InitiatedEventID,
1631
>
ExternalWorkflowExecution: &commonpb.WorkflowExecution{
1632
>
WorkflowId: task.WorkflowID,
1633
>
RunId: task.RunID,
1634
>
},
1635
>
ChildWorkflowOnly: attributes.GetChildWorkflowOnly(),
1636
>
}
1637
>
1638
>
_, err := t.historyRawClient.RequestCancelWorkflowExecution(ctx, request)
1639
>
return err
1640
>
}
1641
1642
func (t *transferQueueActiveTaskExecutor) signalExternalExecution(