179
}
180
181
>
func (d StartedEventDefinition) Apply(ctx chasm.MutableContext, wf *Workflow, event *historypb.HistoryEvent) error {
nexus_events.go
182
>
attrs := event.GetNexusOperationStartedEventAttributes()
183
>
field, ok := wf.Operations[attrs.GetScheduledEventId()]
184
>
if !ok {
185
return serviceerror.NewNotFoundf("nexus operation not found for scheduled event ID %d", attrs.GetScheduledEventId())
186
}
188
>
189
>
startTime := event.GetEventTime().AsTime()
190
>
return nexusoperation.TransitionStarted.Apply(op, ctx, nexusoperation.EventStarted{
191
>
OperationToken: attrs.GetOperationToken(),
192
>
StartTime: &startTime,
193
>
})
194
}
195