522
timerStart := NewHistoryEventVertex(enumspb.EVENT_TYPE_TIMER_STARTED.String())
523
timerStart.SetDataFunc(func(input ...any) any {
525
>
lastGeneratedEvent := input[1].(*historypb.HistoryEvent)
526
>
eventID := lastGeneratedEvent.GetEventId() + 1
527
>
version := input[2].(int64)
528
>
historyEvent := getDefaultHistoryEvent(eventID, version)
529
>
historyEvent.EventType = enumspb.EVENT_TYPE_TIMER_STARTED
530
>
historyEvent.Attributes = &historypb.HistoryEvent_TimerStartedEventAttributes{TimerStartedEventAttributes: &historypb.TimerStartedEventAttributes{
531
>
TimerId: uuid.NewString(),
532
>
StartToFireTimeout: durationpb.New(10 * time.Second),
533
>
WorkflowTaskCompletedEventId: lastEvent.EventId,
534
>
}}
535
>
return historyEvent
536
>
})
537
timerFired := NewHistoryEventVertex(enumspb.EVENT_TYPE_TIMER_FIRED.String())
538
timerFired.SetDataFunc(func(input ...any) any {