537
timerFired := NewHistoryEventVertex(enumspb.EVENT_TYPE_TIMER_FIRED.String())
538
timerFired.SetDataFunc(func(input ...any) any {
540
>
lastGeneratedEvent := input[1].(*historypb.HistoryEvent)
541
>
eventID := lastGeneratedEvent.GetEventId() + 1
542
>
version := input[2].(int64)
543
>
historyEvent := getDefaultHistoryEvent(eventID, version)
544
>
historyEvent.EventType = enumspb.EVENT_TYPE_TIMER_FIRED
545
>
historyEvent.Attributes = &historypb.HistoryEvent_TimerFiredEventAttributes{TimerFiredEventAttributes: &historypb.TimerFiredEventAttributes{
546
>
TimerId: lastEvent.GetTimerStartedEventAttributes().TimerId,
547
>
StartedEventId: lastEvent.EventId,
548
>
}}
549
>
return historyEvent
550
>
})
551
timerCancel := NewHistoryEventVertex(enumspb.EVENT_TYPE_TIMER_CANCELED.String())
552
timerCancel.SetDataFunc(func(input ...any) any {