Class TaskResultModifications

java.lang.Object
com.smartgwt.client.core.JsObject
com.smartgwt.client.core.DataClass
com.smartgwt.client.util.workflow.TaskResultModifications
All Implemented Interfaces:
HasHandlers

public class TaskResultModifications extends DataClass
Result object for Process.beforeTaskCommit().
  • Constructor Details

    • TaskResultModifications

      public TaskResultModifications()
    • TaskResultModifications

      public TaskResultModifications(JavaScriptObject jsObj)
  • Method Details

    • getOrCreateRef

      public static TaskResultModifications getOrCreateRef(JavaScriptObject jsObj)
    • setErrors

      public TaskResultModifications setErrors(Map errors)
      Validation errors to attach to the current Task, in the standard format used by DSResponse.errors: an Object where each property name is a field name of the Task's outputs and each value is the error information for that field.

      Returning errors rejects the outputs: nothing is committed to state and the process does not advance. For a CoTTask, the errors are automatically fed back to the AI in the next prompt (introduced by the errorsPrimer) and the task is retried, up to CoTTask.maxRetries, so there is normally nothing further to do. See AIRetriesExhausted for what happens when retries run out.

      Parameters:
      errors - New errors value. Default value is null
      Returns:
      TaskResultModifications instance, for chaining setter calls
    • getErrors

      public Map getErrors()
      Validation errors to attach to the current Task, in the standard format used by DSResponse.errors: an Object where each property name is a field name of the Task's outputs and each value is the error information for that field.

      Returning errors rejects the outputs: nothing is committed to state and the process does not advance. For a CoTTask, the errors are automatically fed back to the AI in the next prompt (introduced by the errorsPrimer) and the task is retried, up to CoTTask.maxRetries, so there is normally nothing further to do. See AIRetriesExhausted for what happens when retries run out.

      Returns:
      Current errors value. Default value is null
    • setOutputs

      public TaskResultModifications setOutputs(Map outputs)
      Optional replacement for the Task's outputs. If provided, this replaces the outputs produced by the Task for the purposes of subsequent validation, state updates, history, and routing.
      Parameters:
      outputs - New outputs value. Default value is null
      Returns:
      TaskResultModifications instance, for chaining setter calls
    • getOutputs

      public Map getOutputs()
      Optional replacement for the Task's outputs. If provided, this replaces the outputs produced by the Task for the purposes of subsequent validation, state updates, history, and routing.
      Returns:
      Current outputs value. Default value is null
    • setStateUpdates

      public TaskResultModifications setStateUpdates(Map stateUpdates)
      Additional declarative updates to apply to state before routing. Keys use StatePath semantics.
      Parameters:
      stateUpdates - New stateUpdates value. Default value is null
      Returns:
      TaskResultModifications instance, for chaining setter calls
    • getStateUpdates

      public Map getStateUpdates()
      Additional declarative updates to apply to state before routing. Keys use StatePath semantics.
      Returns:
      Current stateUpdates value. Default value is null