com.smartgwt.client.util.workflow

## Class TaskDecision

- java.lang.Object
- - com.smartgwt.client.core.BaseClass
  - - com.smartgwt.client.util.workflow.TaskDecision

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

      public class TaskDecision
      extends BaseClass

  Identifies a potential decision (branch) within a `DecisionGateway`. Each decision has a criteria and a target ProcessElement ID.

- - ### Field Summary

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

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

  - ### Constructor Summary

    Constructors
    Constructor and Description
    `TaskDecision()`
    `TaskDecision(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()`
    `Criteria` | `getCriteria()` Criteria identifying when the `targetTask` should be chosen within a `DecisionGateway.decisionList`.
    `com.google.gwt.core.client.JavaScriptObject` | `getJsObj()`
    `com.google.gwt.core.client.JavaScriptObject` | `getOrCreateJsObj()`
    `static TaskDecision` | `getOrCreateRef(com.google.gwt.core.client.JavaScriptObject jsObj)`
    `java.lang.String` | `getTargetTask()` `ProcessElement.ID` of element to be used as next element if `criteria` matches.
    `boolean` | `isCreated()`
    `TaskDecision` | `setCriteria(Criteria criteria)` Criteria identifying when the `targetTask` should be chosen within a `DecisionGateway.decisionList`.
    `void` | `setJavaScriptObject(com.google.gwt.core.client.JavaScriptObject jsObj)`
    `TaskDecision` | `setTargetTask(java.lang.String targetTask)` `ProcessElement.ID` of element to be used as next element if `criteria` matches.

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

      `addDynamicProperty, addDynamicProperty, addDynamicProperty, applyFactoryProperties, asSGWTComponent, clearDynamicProperty, createJsObj, destroy, doAddHandler, doInit, error, error, errorIfNotCreated, fireEvent, getAttribute, getAttributeAsBoolean, getAttributeAsDate, getAttributeAsDouble, getAttributeAsElement, getAttributeAsFloat, getAttributeAsInt, getAttributeAsJavaScriptObject, getAttributeAsMap, getAttributeAsString, getAttributeAsStringArray, getClassName, getConfig, getHandlerCount, getID, getRef, getRuleScope, getScClassName, getTestInstance, hasAutoAssignedID, hasDynamicProperty, internalSetID, internalSetID, isConfigOnly, isFactoryCreated, onBind, onInit, registerID, setAttribute, setAttribute, setAttribute, setAttribute, setAttribute, setAttribute, setAttribute, setAttribute, setAttribute, setAttribute, setAttribute, setAttribute, setAttribute, setAttribute, setAttribute, setAttribute, setAttribute, setAttribute, setAttribute, setAttribute, setConfig, setConfigOnly, setFactoryCreated, setID, setProperty, setProperty, setProperty, setProperty, setRuleScope, setScClassName`

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

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

- - ### Constructor Detail

    - #### TaskDecision

          public TaskDecision()

    - #### TaskDecision

          public TaskDecision(com.google.gwt.core.client.JavaScriptObject jsObj)

  - ### Method Detail

    - #### getOrCreateRef

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

    - #### setJavaScriptObject

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

      Overrides:
        `setJavaScriptObject` in class `BaseClass`

    - #### create

          public com.google.gwt.core.client.JavaScriptObject create()

      Specified by:
        `create` in class `BaseClass`

    - #### isCreated

          public boolean isCreated()

      Overrides:
        `isCreated` in class `BaseClass`

    - #### getJsObj

          public com.google.gwt.core.client.JavaScriptObject getJsObj()

      Overrides:
        `getJsObj` in class `BaseClass`

    - #### getOrCreateJsObj

          public com.google.gwt.core.client.JavaScriptObject getOrCreateJsObj()

      Overrides:
        `getOrCreateJsObj` in class `BaseClass`

    - #### setCriteria

          public TaskDecision setCriteria(Criteria criteria)
                                   throws java.lang.IllegalStateException

      Criteria identifying when the `targetTask` should be chosen within a `DecisionGateway.decisionList`.

      Data values in this criteria prefixed with "$" will be treated as dynamic expressions as detailed in `TaskInputExpression`. Specifically, this means that for simple criteria, any property value that is a String and is prefixed with "$" will be assumed to be an expression, and for AdvancedCriteria, the same treatment will be applied to `Criterion.value`.

      Note that dynamic expressions starting with "$input" are not applicable in this context but "$inputRecord" can be used for direct reference to `Process.state`.

      This property supports `DynamicCriteria` - use `Criterion.valuePath` to refer to values in the `Process.ruleScope`.

      Parameters:
        `criteria` - New criteria value. Default value is null
      Returns:
        `TaskDecision` instance, for chaining setter calls
      Throws:
        `java.lang.IllegalStateException` - this property cannot be changed after the underlying component has been created

    - #### getCriteria

          public Criteria getCriteria()

      Criteria identifying when the `targetTask` should be chosen within a `DecisionGateway.decisionList`.

      Data values in this criteria prefixed with "$" will be treated as dynamic expressions as detailed in `TaskInputExpression`. Specifically, this means that for simple criteria, any property value that is a String and is prefixed with "$" will be assumed to be an expression, and for AdvancedCriteria, the same treatment will be applied to `Criterion.value`.

      Note that dynamic expressions starting with "$input" are not applicable in this context but "$inputRecord" can be used for direct reference to `Process.state`.

      This property supports `DynamicCriteria` - use `Criterion.valuePath` to refer to values in the `Process.ruleScope`.

      Returns:
        Current criteria value. Default value is null

    - #### setTargetTask

          public TaskDecision setTargetTask(java.lang.String targetTask)
                                     throws java.lang.IllegalStateException

      `ProcessElement.ID` of element to be used as next element if `criteria` matches.
      Parameters:
        `targetTask` - New targetTask value. Default value is null
      Returns:
        `TaskDecision` instance, for chaining setter calls
      Throws:
        `java.lang.IllegalStateException` - this property cannot be changed after the underlying component has been created

    - #### getTargetTask

          public java.lang.String getTargetTask()

      `ProcessElement.ID` of element to be used as next element if `criteria` matches.
      Returns:
        Current targetTask value. Default value is null