com.smartgwt.client.util.workflow

## Class StateTask

- java.lang.Object
- - com.smartgwt.client.core.BaseClass
  - - com.smartgwt.client.util.workflow.ProcessElement
    - - com.smartgwt.client.util.workflow.Task
      - - com.smartgwt.client.util.workflow.StateTask

-     public class StateTask
      extends Task

  StateTask can either copy fields of `state` to other fields, or apply hardcoded values to `state` via `value`.

- - ### Field Summary

    - ### Fields inherited from class com.smartgwt.client.core.BaseClass

      `config, factoryCreated, factoryProperties, id, scClassName`

  - ### Constructor Summary

    Constructors
    Constructor and Description
    `StateTask()`
    `StateTask(JavaScriptObject jsObj)`

  - ### Method Summary

    Methods
    Modifier and Type | Method and Description
    --- | ---
    `JavaScriptObject` | `create()`
    `java.lang.String` | `getFailureElement()` ID of the next sequence or element to proceed to if a failure condition arises, such as the output data not being convertible to the target `type`.
    `java.lang.String` | `getNextElement()` ID of the next `sequence` or {process.elements,element} to procede to if no error condition arises.
    `static StateTask` | `getOrCreateRef(JavaScriptObject jsObj)`
    `void` | `setFailureElement(java.lang.String failureElement)` ID of the next sequence or element to proceed to if a failure condition arises, such as the output data not being convertible to the target `type`.
    `void` | `setNextElement(java.lang.String nextElement)` ID of the next `sequence` or {process.elements,element} to procede to if no error condition arises.

    - ### Methods inherited from class com.smartgwt.client.util.workflow.Task

      `getInputField, getInputFieldList, getOutputField, getOutputFieldList, setInputField, setInputFieldList, setOutputField, setOutputFieldList`

    - ### Methods inherited from class com.smartgwt.client.util.workflow.ProcessElement

      `convertToJavaScriptArray, getID, getJsObj, getOrCreateJsObj, getProcessElements, isCreated, onInit, setAttribute, setID, setJavaScriptObject`

    - ### Methods inherited from class com.smartgwt.client.core.BaseClass

      `applyFactoryProperties, asSGWTComponent, createJsObj, destroy, doAddHandler, doInit, error, error, errorIfNotCreated, fireEvent, getAttribute, getAttributeAsBoolean, getAttributeAsDate, getAttributeAsDouble, getAttributeAsElement, getAttributeAsFloat, getAttributeAsInt, getAttributeAsJavaScriptObject, getAttributeAsMap, getAttributeAsString, getAttributeAsStringArray, getClassName, getConfig, getHandlerCount, getRef, getScClassName, getTestInstance, hasAutoAssignedID, internalSetID, internalSetID, isFactoryCreated, onBind, registerID, setAttribute, setAttribute, setAttribute, setAttribute, setAttribute, setAttribute, setAttribute, setAttribute, setAttribute, setAttribute, setAttribute, setAttribute, setAttribute, setAttribute, setAttribute, setAttribute, setAttribute, setAttribute, setAttribute, setAttribute, setConfig, setFactoryCreated, setProperty, setProperty, setProperty, setProperty, setScClassName`

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

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

- - ### Constructor Detail

    - #### StateTask

          public StateTask()

    - #### StateTask

          public StateTask(JavaScriptObject jsObj)

  - ### Method Detail

    - #### getOrCreateRef

          public static StateTask getOrCreateRef(JavaScriptObject jsObj)

    - #### create

          public JavaScriptObject create()

      Overrides:
        `create` in class `Task`

    - #### setFailureElement

          public void setFailureElement(java.lang.String failureElement)
                                 throws java.lang.IllegalStateException

      ID of the next sequence or element to proceed to if a failure condition arises, such as the output data not being convertible to the target `type`.
      Parameters:
        `failureElement` - Default value is null
      Throws:
        `java.lang.IllegalStateException` - this property cannot be changed after the underlying component has been created

    - #### getFailureElement

          public java.lang.String getFailureElement()

      ID of the next sequence or element to proceed to if a failure condition arises, such as the output data not being convertible to the target `type`.
      Returns:
        String

    - #### setNextElement

          public void setNextElement(java.lang.String nextElement)
                              throws java.lang.IllegalStateException

      ID of the next `sequence` or {process.elements,element} to procede to if no error condition arises.

      If this `stateTask` is part of a `sequence` and has a next element in the sequence, `nextElement` does not need to be specified.

      Overrides:
        `setNextElement` in class `ProcessElement`
      Parameters:
        `nextElement` - Default value is null
      Throws:
        `java.lang.IllegalStateException` - this property cannot be changed after the underlying component has been created

    - #### getNextElement

          public java.lang.String getNextElement()

      ID of the next `sequence` or {process.elements,element} to procede to if no error condition arises.

      If this `stateTask` is part of a `sequence` and has a next element in the sequence, `nextElement` does not need to be specified.

      Overrides:
        `getNextElement` in class `ProcessElement`
      Returns:
        String