Package com.smartgwt.client.util.workflow

# 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()`.

- ## Field Summary

  ### Fields inherited from class com.smartgwt.client.core.DataClass

  `factoryCreated, factoryProperties`

  ### Fields inherited from class com.smartgwt.client.core.JsObject

  `jsObj`

- ## Constructor Summary

  Constructors
  Constructor
  Description
  `TaskResultModifications()`
  `TaskResultModifications(JavaScriptObject jsObj)`

- ## Method Summary

  Modifier and Type
  Method
  Description
  `Map`
  `getErrors()`
  Global validation errors to attach to the current Task.
  `static TaskResultModifications`
  `getOrCreateRef(JavaScriptObject jsObj)`
  `Map`
  `getOutputs()`
  Optional replacement for the Task's outputs.
  `Map`
  `getStateUpdates()`
  Additional declarative updates to apply to `state` before routing.
  `TaskResultModifications`
  `setErrors(Map errors)`
  Global validation errors to attach to the current Task.
  `TaskResultModifications`
  `setOutputs(Map outputs)`
  Optional replacement for the Task's outputs.
  `TaskResultModifications`
  `setStateUpdates(Map stateUpdates)`
  Additional declarative updates to apply to `state` before routing.

  ### Methods inherited from class com.smartgwt.client.core.DataClass

  `applyFactoryProperties, doAddHandler, fireEvent, getAttribute, getAttributeAsBoolean, getAttributeAsBoolean, getAttributeAsDate, getAttributeAsDouble, getAttributeAsDoubleArray, getAttributeAsElement, getAttributeAsFloat, getAttributeAsInt, getAttributeAsIntArray, getAttributeAsJavaScriptObject, getAttributeAsLong, getAttributeAsMap, getAttributeAsObject, getAttributeAsRecord, getAttributeAsString, getAttributeAsStringArray, getAttributes, getHandlerCount, isFactoryCreated, setAttribute, setAttribute, setAttribute, setAttribute, setAttribute, setAttribute, setAttribute, setAttribute, setAttribute, setAttribute, setAttribute, setAttribute, setAttribute, setAttribute, setAttribute, setAttribute, setAttribute, setAttribute, setAttribute, setAttribute, setAttribute, setAttribute, setAttribute, setAttribute, setAttributeAsJavaObject, setFactoryCreated`

  ### Methods inherited from class com.smartgwt.client.core.JsObject

  `equals, getJsObj, hashCode, isCreated, setJavaScriptObject, setJsObj`

  ### Methods inherited from class java.lang.Object

  `clone, finalize, getClass, notify, notifyAll, toString, wait, wait, wait`

- ## 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)
    Global validation errors to attach to the current Task. If provided, the engine treats this as a validation failure (without advancing), merges these errors into the Task's error record, and triggers the normal retry logic (e.g., CoTTask CoTTask.maxRetries). The structure may be a DataSource-style validation response or a simple Array of { field, message } objects.
    Parameters:
      `errors` - New errors value. Default value is null
    Returns:
      `TaskResultModifications` instance, for chaining setter calls

  - ### getErrors

    public Map getErrors()
    Global validation errors to attach to the current Task. If provided, the engine treats this as a validation failure (without advancing), merges these errors into the Task's error record, and triggers the normal retry logic (e.g., CoTTask CoTTask.maxRetries). The structure may be a DataSource-style validation response or a simple Array of { field, message } objects.
    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 `SetterPath` 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 `SetterPath` semantics.
    Returns:
      Current stateUpdates value. Default value is null