Package 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:
  `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.

See Also:
  - `Server-Side Process Execution`

- ## Field Summary

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

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

- ## Constructor Summary

  Constructors
  Constructor
  Description
  `MultiDecisionTask()`
  `MultiDecisionTask(JavaScriptObject jsObj)`

- ## Method Summary

  Modifier and Type
  Method
  Description
  `JavaScriptObject`
  `create()`
  `DecisionBranch[]`
  `getDecisionList()`
  List of `DecisionBranchs` to be processed to find the first with matching criteria.
  `String`
  `getDefaultElement()`
  Next element to pick if no criteria match.
  `static MultiDecisionTask`
  `getOrCreateRef(JavaScriptObject jsObj)`
  `MultiDecisionTask`
  `setDecisionList(DecisionBranch... decisionList)`
  List of `DecisionBranchs` to be processed to find the first with matching criteria.
  `MultiDecisionTask`
  `setDefaultElement(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, getCurrentProcess, getDescription, getDynamicValue, getEditorType, getElementDescription, getForceSingle, getID, getInstanceDescription, getInstanceTitle, getInvalidTaskMessage, getJsObj, getMockMode, getNextElement, getOrCreateJsObj, getPassThruOutput, getProcessElements, getSupportsMultipleInputRecords, getTextFormulaValue, getTypeTitle, getUndefinedComponentMessage, getUnresolvedComponentMessage, getWaitDuration, getWaitFor, getWaitLocator, isCreated, isValid, objectReferencesLastTaskOutput, onInit, reset, setAttribute, setBindOutput, setClassDescription, setCurrentProcess, 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 Details

  - ### MultiDecisionTask

    public MultiDecisionTask()

  - ### MultiDecisionTask

    public MultiDecisionTask(JavaScriptObject jsObj)

- ## Method Details

  - ### getOrCreateRef

    public static MultiDecisionTask getOrCreateRef(JavaScriptObject jsObj)

  - ### create

    public JavaScriptObject create()
    Overrides:
      `create` in class `ProcessElement`

  - ### setDecisionList

    public MultiDecisionTask setDecisionList(DecisionBranch... decisionList) throws 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:
      `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(String defaultElement) throws 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:
      `IllegalStateException` - this property cannot be changed after the underlying component has been created

  - ### getDefaultElement

    public 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