847
ctx context.Context,
848
task *tasks.StateMachineTimerTask,
850
>
ctx, cancel := context.WithTimeout(ctx, taskTimeout)
851
>
defer cancel()
852
>
853
>
wfCtx, release, err := getWorkflowExecutionContextForTask(ctx, t.shardContext, t.cache, task)
854
>
if err != nil {
855
return err
856
}
858
860
>
if err != nil {
861
return err
862
}
864
release(nil) // release(nil) so mutable state is not unloaded from cache
865
return consts.ErrWorkflowExecutionNotFound
866
}
867
869
>
ctx,
870
>
wfCtx,
871
>
ms,
872
>
task,
873
>
func(node *hsm.Node, task hsm.Task) error {
874
return t.shardContext.StateMachineRegistry().ExecuteTimerTask(t, node, task)
875
},
876
)
878
return err
879
}