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 with `lastTask` set to the failing task and `failure` set to `true`.

#### Detecting retry exhaustion

You can observe exhaustion by implementing `Process.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
              }
          }
      });