248
workflowComplete := NewHistoryEventVertex(enumspb.EVENT_TYPE_WORKFLOW_EXECUTION_COMPLETED.String())
249
workflowComplete.SetDataFunc(func(input ...any) any {
251
>
eventID := lastEvent.GetEventId() + 1
252
>
version := input[2].(int64)
253
>
historyEvent := getDefaultHistoryEvent(eventID, version)
254
>
historyEvent.EventType = enumspb.EVENT_TYPE_WORKFLOW_EXECUTION_COMPLETED
255
>
historyEvent.Attributes = &historypb.HistoryEvent_WorkflowExecutionCompletedEventAttributes{WorkflowExecutionCompletedEventAttributes: &historypb.WorkflowExecutionCompletedEventAttributes{
256
>
WorkflowTaskCompletedEventId: lastEvent.EventId,
257
>
}}
258
>
return historyEvent
259
>
})
260
continueAsNew := NewHistoryEventVertex(enumspb.EVENT_TYPE_WORKFLOW_EXECUTION_CONTINUED_AS_NEW.String())
261
continueAsNew.SetDataFunc(func(input ...any) any {