777
externalWorkflowSignal := NewHistoryEventVertex(enumspb.EVENT_TYPE_SIGNAL_EXTERNAL_WORKFLOW_EXECUTION_INITIATED.String())
778
externalWorkflowSignal.SetDataFunc(func(input ...any) any {
780
>
lastGeneratedEvent := input[1].(*historypb.HistoryEvent)
781
>
eventID := lastGeneratedEvent.GetEventId() + 1
782
>
version := input[2].(int64)
783
>
historyEvent := getDefaultHistoryEvent(eventID, version)
784
>
historyEvent.EventType = enumspb.EVENT_TYPE_SIGNAL_EXTERNAL_WORKFLOW_EXECUTION_INITIATED
785
>
historyEvent.Attributes = &historypb.HistoryEvent_SignalExternalWorkflowExecutionInitiatedEventAttributes{SignalExternalWorkflowExecutionInitiatedEventAttributes: &historypb.SignalExternalWorkflowExecutionInitiatedEventAttributes{
786
>
WorkflowTaskCompletedEventId: lastEvent.EventId,
787
>
Namespace: nsName.String(),
788
>
NamespaceId: nsID.String(),
789
>
WorkflowExecution: &commonpb.WorkflowExecution{
790
>
WorkflowId: externalWorkflowID,
791
>
RunId: uuid.NewString(),
792
>
},
793
>
SignalName: "signal",
794
>
ChildWorkflowOnly: false,
795
>
}}
796
>
return historyEvent
797
>
})
798
externalWorkflowSignalFailed := NewHistoryEventVertex(enumspb.EVENT_TYPE_SIGNAL_EXTERNAL_WORKFLOW_EXECUTION_FAILED.String())
799
externalWorkflowSignalFailed.SetDataFunc(func(input ...any) any {