727
childWorkflowTimedOut := NewHistoryEventVertex(enumspb.EVENT_TYPE_CHILD_WORKFLOW_EXECUTION_TIMED_OUT.String())
728
childWorkflowTimedOut.SetDataFunc(func(input ...any) any {
730
>
lastGeneratedEvent := input[1].(*historypb.HistoryEvent)
731
>
eventID := lastGeneratedEvent.GetEventId() + 1
732
>
version := input[2].(int64)
733
>
historyEvent := getDefaultHistoryEvent(eventID, version)
734
>
historyEvent.EventType = enumspb.EVENT_TYPE_CHILD_WORKFLOW_EXECUTION_TIMED_OUT
735
>
historyEvent.Attributes = &historypb.HistoryEvent_ChildWorkflowExecutionTimedOutEventAttributes{ChildWorkflowExecutionTimedOutEventAttributes: &historypb.ChildWorkflowExecutionTimedOutEventAttributes{
736
>
Namespace: nsName.String(),
737
>
NamespaceId: nsID.String(),
738
>
WorkflowType: &commonpb.WorkflowType{Name: childWorkflowPrefix + workflowType},
739
>
InitiatedEventId: lastEvent.GetChildWorkflowExecutionStartedEventAttributes().InitiatedEventId,
740
>
WorkflowExecution: &commonpb.WorkflowExecution{
741
>
WorkflowId: childWorkflowID,
742
>
RunId: lastEvent.GetChildWorkflowExecutionStartedEventAttributes().GetWorkflowExecution().RunId,
743
>
},
744
>
StartedEventId: lastEvent.EventId,
745
>
RetryState: enumspb.RETRY_STATE_TIMEOUT,
746
>
}}
747
>
return historyEvent
748
>
})
749
workflowTaskCompleteToChildWorkflowInitial := NewHistoryEventEdge(workflowTaskComplete, childWorkflowInitial)
750
childWorkflowInitialToFail := NewHistoryEventEdge(childWorkflowInitial, childWorkflowInitialFail)