com.smartgwt.client.util.workflow

## Class DecisionGateway

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

-     public class DecisionGateway
      extends ProcessElement

  Chooses a next element in a `Process` by evaluating a series of criteria against the `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, factoryCreated, factoryProperties, id, scClassName`

  - ### Constructor Summary

    Constructors
    Constructor and Description
    `DecisionGateway()`
    `DecisionGateway(JavaScriptObject jsObj)`

  - ### Method Summary

    Methods
    Modifier and Type | Method and Description
    --- | ---
    `JavaScriptObject` | `create()`
    `java.util.LinkedHashMap` | `getCriteriaMap()` A Map from `ID` to Criteria that will cause this ProcessElement to be chosen as the next element if the criteria matches.
    `java.lang.String` | `getDefaultElement()` Next element to pick if no criteria match.
    `static DecisionGateway` | `getOrCreateRef(JavaScriptObject jsObj)`
    `void` | `setCriteriaMap(java.util.Map<java.lang.String,Criteria> criteriaMap)` A Map from `ID` to Criteria that will cause this ProcessElement to be chosen as the next element if the criteria matches.
    `void` | `setDefaultElement(ProcessElement defaultElement)`
    `void` | `setDefaultElement(java.lang.String defaultElement)` Next element to pick if no criteria match.

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

      `convertToJavaScriptArray, getID, getJsObj, getNextElement, getOrCreateJsObj, getProcessElements, isCreated, onInit, setAttribute, setID, setJavaScriptObject, setNextElement`

    - ### 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, isFactoryCreated, onBind, registerID, setAttribute, setAttribute, setAttribute, setAttribute, setAttribute, setAttribute, setAttribute, setAttribute, setAttribute, setAttribute, setAttribute, setAttribute, setAttribute, setAttribute, setAttribute, setAttribute, setAttribute, setAttribute, setAttribute, setAttribute, setConfig, 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

    - #### DecisionGateway

          public DecisionGateway()

    - #### DecisionGateway

          public DecisionGateway(JavaScriptObject jsObj)

  - ### Method Detail

    - #### getOrCreateRef

          public static DecisionGateway getOrCreateRef(JavaScriptObject jsObj)

    - #### create

          public JavaScriptObject create()

      Overrides:
        `create` in class `ProcessElement`

    - #### setCriteriaMap

          public void setCriteriaMap(java.util.Map<java.lang.String,Criteria> criteriaMap)
                              throws java.lang.IllegalStateException

      A Map from `ID` to Criteria that will cause this ProcessElement to be chosen as the next element if the criteria matches.
      Parameters:
        `criteriaMap` - Default value is null
      Throws:
        `java.lang.IllegalStateException` - this property cannot be changed after the underlying component has been created

    - #### setDefaultElement

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

      Next element to pick if no criteria match. If this gateway 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` - Default value is null
      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 gateway 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:
        String

    - #### getCriteriaMap

          public java.util.LinkedHashMap getCriteriaMap()

      A Map from `ID` to Criteria that will cause this ProcessElement to be chosen as the next element if the criteria matches.
      Returns:
        LinkedHashMap

    - #### setDefaultElement

          public void setDefaultElement(ProcessElement defaultElement)
                                 throws java.lang.IllegalStateException

      Throws:
        `java.lang.IllegalStateException`
      See Also:
        `setDefaultElement(String)`