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, id, scClassName`

  - ### Constructor Summary

    Constructors
    Constructor and Description
    `StateTask()`
    `StateTask(com.google.gwt.core.client.JavaScriptObject jsObj)`

  - ### Method Summary

    Methods
    Modifier and Type | Method and Description
    --- | ---
    `com.google.gwt.core.client.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(com.google.gwt.core.client.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` | `setJavaScriptObject(com.google.gwt.core.client.JavaScriptObject jsObj)`
    `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, getInputFields, getOutputField, getOutputFields, setInputField, setInputFields, setOutputField, setOutputFields`

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

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

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

      `asSGWTComponent, destroy, doAddHandler, doInit, error, error, errorIfNotCreated, fireEvent, getAttribute, getAttributeAsBoolean, getAttributeAsDate, getAttributeAsDouble, getAttributeAsElement, getAttributeAsFloat, getAttributeAsInt, getAttributeAsJavaScriptObject, getAttributeAsMap, getAttributeAsString, getAttributeAsStringArray, getClassName, getConfig, getHandlerCount, getRef, getScClassName, internalSetID, internalSetID, onBind, onInit, registerID, setAttribute, setAttribute, setAttribute, setAttribute, setAttribute, setAttribute, setAttribute, setAttribute, setAttribute, setAttribute, setAttribute, setAttribute, setAttribute, setAttribute, setAttribute, 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(com.google.gwt.core.client.JavaScriptObject jsObj)

  - ### Method Detail

    - #### getOrCreateRef

          public static StateTask getOrCreateRef(com.google.gwt.core.client.JavaScriptObject jsObj)

    - #### setJavaScriptObject

          public void setJavaScriptObject(com.google.gwt.core.client.JavaScriptObject jsObj)

      Overrides:
        `setJavaScriptObject` in class `Task`

    - #### create

          public com.google.gwt.core.client.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` - . See `String`. 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:
        . See `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` - . See `String`. 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:
        . See `String`