664
childWorkflowComplete := NewHistoryEventVertex(enumspb.EVENT_TYPE_CHILD_WORKFLOW_EXECUTION_COMPLETED.String())
665
childWorkflowComplete.SetDataFunc(func(input ...any) any {
667
>
lastGeneratedEvent := input[1].(*historypb.HistoryEvent)
668
>
eventID := lastGeneratedEvent.GetEventId() + 1
669
>
version := input[2].(int64)
670
>
historyEvent := getDefaultHistoryEvent(eventID, version)
671
>
historyEvent.EventType = enumspb.EVENT_TYPE_CHILD_WORKFLOW_EXECUTION_COMPLETED
672
>
historyEvent.Attributes = &historypb.HistoryEvent_ChildWorkflowExecutionCompletedEventAttributes{ChildWorkflowExecutionCompletedEventAttributes: &historypb.ChildWorkflowExecutionCompletedEventAttributes{
673
>
Namespace: nsName.String(),
674
>
NamespaceId: nsID.String(),
675
>
WorkflowType: &commonpb.WorkflowType{Name: childWorkflowPrefix + workflowType},
676
>
InitiatedEventId: lastEvent.GetChildWorkflowExecutionStartedEventAttributes().InitiatedEventId,
677
>
WorkflowExecution: &commonpb.WorkflowExecution{
678
>
WorkflowId: childWorkflowID,
679
>
RunId: lastEvent.GetChildWorkflowExecutionStartedEventAttributes().GetWorkflowExecution().RunId,
680
>
},
681
>
StartedEventId: lastEvent.EventId,
682
>
}}
683
>
return historyEvent
684
>
})
685
childWorkflowFail := NewHistoryEventVertex(enumspb.EVENT_TYPE_CHILD_WORKFLOW_EXECUTION_FAILED.String())
686
childWorkflowFail.SetDataFunc(func(input ...any) any {