com.smartgwt.client.util.workflow

## Class MultiDecisionTask

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

- All Implemented Interfaces:
    com.google.gwt.event.shared.HasHandlers
  Direct Known Subclasses:
    DecisionGateway

      public class MultiDecisionTask
      extends ProcessElement

  Chooses a next element in a `Process` by evaluating a series of criteria against the `Process.state` and choosing the element associated with the criteria that matched, or a `defaultElement` if none of the criteria match.

- - ### Field Summary

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

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

  - ### Constructor Summary

    Constructors
    Constructor and Description
    `MultiDecisionTask()`
    `MultiDecisionTask(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()`
    `DecisionBranch[]` | `getDecisionList()` List of `DecisionBranchs` to be processed to find the first with matching criteria.
    `java.lang.String` | `getDefaultElement()` Next element to pick if no criteria match.
    `static MultiDecisionTask` | `getOrCreateRef(com.google.gwt.core.client.JavaScriptObject jsObj)`
    `MultiDecisionTask` | `setDecisionList(DecisionBranch... decisionList)` List of `DecisionBranchs` to be processed to find the first with matching criteria.
    `MultiDecisionTask` | `setDefaultElement(java.lang.String defaultElement)` Next element to pick if no criteria match.

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

      `completeElement, convertToJavaScriptArray, executeElement, getBindOutput, getClassDescription, getComponentReferences, getDescription, getDynamicValue, getEditorType, getElementDescription, getForceSingle, getID, getInvalidTaskMessage, getJsObj, getMockMode, getNextElement, getOrCreateJsObj, getPassThruOutput, getProcessElements, getSupportsMultipleInputRecords, getTextFormulaValue, getTypeTitle, getUndefinedComponentMessage, getUnresolvedComponentMessage, getWaitDuration, getWaitFor, getWaitLocator, isCreated, isValid, objectReferencesLastTaskOutput, onInit, reset, setAttribute, setBindOutput, setClassDescription, setDescription, setEditorType, setForceSingle, setID, setJavaScriptObject, setMockMode, setNextElement, setPassThruOutput, setSupportsMultipleInputRecords, setTypeTitle, setUndefinedComponentMessage, setUnresolvedComponentMessage, setWaitDuration, setWaitFor, setWaitLocator, updateGlobalIDInCriteria, updateGlobalIDInTextFormula, updateGlobalIDInValueProperty, updateGlobalIDInValues, updateGlobalIDReferences, updateLastElementBindingReferences, updateLastElementInCriteria, updateLastElementInValueProperty, updateLastElementInValues`

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

      `addDynamicProperty, 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, getRef, getRuleScope, getScClassName, getTestInstance, hasAutoAssignedID, hasDynamicProperty, 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, setRuleScope, setScClassName`

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

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

- - ### Constructor Detail

    - #### MultiDecisionTask

          public MultiDecisionTask()

    - #### MultiDecisionTask

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

  - ### Method Detail

    - #### getOrCreateRef

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

    - #### create

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

      Overrides:
        `create` in class `ProcessElement`

    - #### setDecisionList

          public MultiDecisionTask setDecisionList(DecisionBranch... decisionList)
                                            throws java.lang.IllegalStateException

      List of `DecisionBranchs` to be processed to find the first with matching criteria. The specified `DecisionBranch.targetTask` is then used to identify the the next element.

      If no criteria is matched the next element is `defaultElement` or the workflow is finished.

      When providing a MultiDecisionTask in XML, the `decisionList` is expressed as:

                <MultiDecisionTask ID="continentDecision" description="Which continent?" defaultElement="summary">
                    <decisionList>
                        <decisionBranch targetTask="europeVATTask">
                            <criteria fieldName="order.continent" operator="equals" value="Europe" />
                        </decisionBranch>
                        ...
                    </decisionList>
                <MultiDecisionTask>

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

    - #### getDecisionList

          public DecisionBranch[] getDecisionList()

      List of `DecisionBranchs` to be processed to find the first with matching criteria. The specified `DecisionBranch.targetTask` is then used to identify the the next element.

      If no criteria is matched the next element is `defaultElement` or the workflow is finished.

      When providing a MultiDecisionTask in XML, the `decisionList` is expressed as:

                <MultiDecisionTask ID="continentDecision" description="Which continent?" defaultElement="summary">
                    <decisionList>
                        <decisionBranch targetTask="europeVATTask">
                            <criteria fieldName="order.continent" operator="equals" value="Europe" />
                        </decisionBranch>
                        ...
                    </decisionList>
                <MultiDecisionTask>

      Returns:
        Current decisionList value. Default value is null

    - #### setDefaultElement

          public MultiDecisionTask setDefaultElement(java.lang.String defaultElement)
                                              throws java.lang.IllegalStateException

      Next element to pick if no criteria match. If this decision is part of a `sequence` and has a next element in the sequence, the `defaultElement` is assumed to be the next element and does not need to be specified.
      Parameters:
        `defaultElement` - New defaultElement value. Default value is null
      Returns:
        `MultiDecisionTask` instance, for chaining setter calls
      Throws:
        `java.lang.IllegalStateException` - this property cannot be changed after the underlying component has been created

    - #### getDefaultElement

          public java.lang.String getDefaultElement()

      Next element to pick if no criteria match. If this decision is part of a `sequence` and has a next element in the sequence, the `defaultElement` is assumed to be the next element and does not need to be specified.
      Returns:
        Current defaultElement value. Default value is null