798
externalWorkflowSignalFailed := NewHistoryEventVertex(enumspb.EVENT_TYPE_SIGNAL_EXTERNAL_WORKFLOW_EXECUTION_FAILED.String())
799
externalWorkflowSignalFailed.SetDataFunc(func(input ...any) any {
801
>
lastGeneratedEvent := input[1].(*historypb.HistoryEvent)
802
>
eventID := lastGeneratedEvent.GetEventId() + 1
803
>
version := input[2].(int64)
804
>
historyEvent := getDefaultHistoryEvent(eventID, version)
805
>
historyEvent.EventType = enumspb.EVENT_TYPE_SIGNAL_EXTERNAL_WORKFLOW_EXECUTION_FAILED
806
>
historyEvent.Attributes = &historypb.HistoryEvent_SignalExternalWorkflowExecutionFailedEventAttributes{SignalExternalWorkflowExecutionFailedEventAttributes: &historypb.SignalExternalWorkflowExecutionFailedEventAttributes{
807
>
Cause: enumspb.SIGNAL_EXTERNAL_WORKFLOW_EXECUTION_FAILED_CAUSE_EXTERNAL_WORKFLOW_EXECUTION_NOT_FOUND,
808
>
WorkflowTaskCompletedEventId: lastEvent.GetSignalExternalWorkflowExecutionInitiatedEventAttributes().WorkflowTaskCompletedEventId,
809
>
Namespace: nsName.String(),
810
>
NamespaceId: nsID.String(),
811
>
WorkflowExecution: &commonpb.WorkflowExecution{
812
>
WorkflowId: lastEvent.GetSignalExternalWorkflowExecutionInitiatedEventAttributes().GetWorkflowExecution().WorkflowId,
813
>
RunId: lastEvent.GetSignalExternalWorkflowExecutionInitiatedEventAttributes().GetWorkflowExecution().RunId,
814
>
},
815
>
InitiatedEventId: lastEvent.EventId,
816
>
}}
817
>
return historyEvent
818
>
})
819
externalWorkflowSignaled := NewHistoryEventVertex(enumspb.EVENT_TYPE_EXTERNAL_WORKFLOW_EXECUTION_SIGNALED.String())
820
externalWorkflowSignaled.SetDataFunc(func(input ...any) any {