616
command *commandpb.RequestCancelExternalWorkflowExecutionCommandAttributes,
617
targetNamespaceID namespace.ID,
619
>
event := b.createHistoryEvent(
620
>
enumspb.EVENT_TYPE_REQUEST_CANCEL_EXTERNAL_WORKFLOW_EXECUTION_INITIATED,
621
>
b.timeSource.Now(),
622
>
)
623
>
event.Attributes = &historypb.HistoryEvent_RequestCancelExternalWorkflowExecutionInitiatedEventAttributes{
624
>
RequestCancelExternalWorkflowExecutionInitiatedEventAttributes: &historypb.RequestCancelExternalWorkflowExecutionInitiatedEventAttributes{
625
>
WorkflowTaskCompletedEventId: workflowTaskCompletedEventID,
626
>
Namespace: command.Namespace,
627
>
NamespaceId: targetNamespaceID.String(),
628
>
WorkflowExecution: &commonpb.WorkflowExecution{
629
>
WorkflowId: command.WorkflowId,
630
>
RunId: command.RunId,
631
>
},
632
>
Control: command.Control,
633
>
ChildWorkflowOnly: command.ChildWorkflowOnly,
634
>
Reason: command.Reason,
635
>
},
636
>
}
637
>
return event
638
>
}
639
640
func (b *EventFactory) CreateRequestCancelExternalWorkflowExecutionFailedEvent(