365
}
366
368
>
wtFailedCause *workflowTaskFailedCause
369
>
activityNotStartedCancelled bool
370
>
newMutableState historyi.MutableState
371
>
responseMutations []workflowTaskResponseMutation
372
>
)
373
>
updateRegistry := weContext.UpdateRegistry(ctx)
374
>
// hasBufferedEventsOrMessages indicates if there are any buffered events
375
>
// or admitted updates which should generate a new workflow task.
376
>
377
>
// TODO: HasOutgoingMessages call (=check for admitted updates) is comment out
378
>
// because non-durable admitted updates can't block WF from closing,
379
>
// because everytime WFT is failing, WF context is cleared together with update registry
380
>
// and admitted updates are lost. Uncomment this check when durable admitted is implemented
381
>
// or updates stay in the registry after WFT is failed.
382
>
hasBufferedEventsOrMessages := ms.HasBufferedEvents() // || updateRegistry.HasOutgoingMessages(false)
383
>
if paginationOverflow {
384
// Per-workflow completion buffer overflowed: terminate the workflow
385
wtFailedCause = newWorkflowTaskFailedCause(