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

- All Implemented Interfaces:
    com.google.gwt.event.shared.HasHandlers

      public class StateTask
      extends Task

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

- - ### Field Summary

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

      `config, configOnly, factoryCreated, factoryProperties, id, scClassName`

  - ### Constructor Summary

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

  - ### Method Summary

    All Methods Static Methods Instance Methods Concrete 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` | `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, isConfigOnly, isFactoryCreated, onBind, registerID, setAttribute, setAttribute, setAttribute, setAttribute, setAttribute, setAttribute, setAttribute, setAttribute, setAttribute, setAttribute, setAttribute, setAttribute, setAttribute, setAttribute, setAttribute, setAttribute, setAttribute, setAttribute, setAttribute, setAttribute, setConfig, setConfigOnly, 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(com.google.gwt.core.client.JavaScriptObject jsObj)

  - ### Method Detail

    - #### getOrCreateRef

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

    - #### 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` - New failureElement value. 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:
        Current failureElement value. Default value is null

    - #### 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` - New nextElement value. 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:
        Current nextElement value. Default value is null