Package com.smartgwt.client.docs
Interface AIRetriesExhausted
public interface AIRetriesExhausted
A CoTTask can automatically retry when its outputs fail
validation (via CoTTask.outputDS/ CoTTask.outputFields) or when
Process.beforeTaskCommit()
returns errors. The retry budget is controlled by
CoTTask.maxRetries and, if unset on the task, inherits from
CoTProcess.maxRetries.
What happens when retries are exhausted
If every attempt fails up to the retry budget:- No CoTTask.stateUpdates are committed.
- The process halts immediately (no fallback routing).
Process.finished(process,lastTask,failure)
is fired withlastTask
set to the failing task andfailure
set totrue
.
Detecting retry exhaustion
You can observe exhaustion by implementingProcess.finished()
and checking
the
failure
flag. In isolation tests that use runTask()
,
the same notification fires on exhaustion; the task's validation errors remain
available on the task.
isc.CoTProcess.create({ ... finished : function (proc, lastTask, failure) { if (failure) { isc.logWarn("CoT halted: retries exhausted in task: " + lastTask.ID); // lastTask.errors contains the final validation errors } } });