643
childWorkflowCancel := NewHistoryEventVertex(enumspb.EVENT_TYPE_CHILD_WORKFLOW_EXECUTION_CANCELED.String())
644
childWorkflowCancel.SetDataFunc(func(input ...any) any {
646
>
lastGeneratedEvent := input[1].(*historypb.HistoryEvent)
647
>
eventID := lastGeneratedEvent.GetEventId() + 1
648
>
version := input[2].(int64)
649
>
historyEvent := getDefaultHistoryEvent(eventID, version)
650
>
historyEvent.EventType = enumspb.EVENT_TYPE_CHILD_WORKFLOW_EXECUTION_CANCELED
651
>
historyEvent.Attributes = &historypb.HistoryEvent_ChildWorkflowExecutionCanceledEventAttributes{ChildWorkflowExecutionCanceledEventAttributes: &historypb.ChildWorkflowExecutionCanceledEventAttributes{
652
>
Namespace: nsName.String(),
653
>
NamespaceId: nsID.String(),
654
>
WorkflowType: &commonpb.WorkflowType{Name: childWorkflowPrefix + workflowType},
655
>
InitiatedEventId: lastEvent.GetChildWorkflowExecutionStartedEventAttributes().InitiatedEventId,
656
>
WorkflowExecution: &commonpb.WorkflowExecution{
657
>
WorkflowId: childWorkflowID,
658
>
RunId: lastEvent.GetChildWorkflowExecutionStartedEventAttributes().GetWorkflowExecution().RunId,
659
>
},
660
>
StartedEventId: lastEvent.EventId,
661
>
}}
662
>
return historyEvent
663
>
})
664
childWorkflowComplete := NewHistoryEventVertex(enumspb.EVENT_TYPE_CHILD_WORKFLOW_EXECUTION_COMPLETED.String())
665
childWorkflowComplete.SetDataFunc(func(input ...any) any {