com.smartgwt.client.util.workflow

## Class XORGateway

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

-     public class XORGateway
      extends ProcessElement

  Chooses one or another next process element based on AdvancedCriteria applied to `state`.

  If the AdvancedCriteria evaluate to true, the `nextElement` is chosen, otherwise the `failureElement`.

  Note that "XOR" in `XORGateway` means "exclusive or" - only one next element is chosen. - implementation note: we need to allow the propertyName in simple Criteria or the criterion.name in AdvancedCriterion to a be path of the form "orderUser.name". This should be a general enhancement applied across the entire Criteria/AdvancedCriteria system.

- - ### Field Summary

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

      `config, id, scClassName`

  - ### Constructor Summary

    Constructors
    Constructor and Description
    `XORGateway()`
    `XORGateway(com.google.gwt.core.client.JavaScriptObject jsObj)`
    `XORGateway(java.lang.String ID, ProcessElement nextElement, ProcessElement failureElement)`
    `XORGateway(java.lang.String ID, java.lang.String nextElement, java.lang.String failureElement)`

  - ### Method Summary

    Methods
    Modifier and Type | Method and Description
    --- | ---
    `com.google.gwt.core.client.JavaScriptObject` | `create()`
    `Criteria` | `getCriteria()` Simple or `AdvancedCriteria` to be applied to the task inputs.
    `java.lang.String` | `getFailureElement()` ID of the next sequence or element to proceed to if the criteria do not match.
    `java.lang.String` | `getNextElement()` ID of the next `sequence` or {process.elements,element} to procede to if the criteria match the process state.
    `static XORGateway` | `getOrCreateRef(com.google.gwt.core.client.JavaScriptObject jsObj)`
    `void` | `setCriteria(Criteria criteria)` Simple or `AdvancedCriteria` to be applied to the task inputs.
    `void` | `setFailureElement(ProcessElement failureElement)`
    `void` | `setFailureElement(java.lang.String failureElement)` ID of the next sequence or element to proceed to if the criteria do not match.
    `void` | `setJavaScriptObject(com.google.gwt.core.client.JavaScriptObject jsObj)`
    `void` | `setNextElement(ProcessElement nextElement)`
    `void` | `setNextElement(java.lang.String nextElement)` ID of the next `sequence` or {process.elements,element} to procede to if the criteria match the process state.

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

      `convertToJavaScriptArray, getID, getJsObj, getOrCreateJsObj, getProcessElements, isCreated, setAttribute, setID`

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

      `asSGWTComponent, destroy, doAddHandler, doInit, error, error, errorIfNotCreated, fireEvent, getAttribute, getAttributeAsBoolean, getAttributeAsDate, getAttributeAsDouble, getAttributeAsElement, getAttributeAsFloat, getAttributeAsInt, getAttributeAsJavaScriptObject, getAttributeAsMap, getAttributeAsString, getAttributeAsStringArray, getClassName, getConfig, getHandlerCount, getRef, getScClassName, internalSetID, internalSetID, onBind, onInit, registerID, setAttribute, setAttribute, setAttribute, setAttribute, setAttribute, setAttribute, setAttribute, setAttribute, setAttribute, setAttribute, setAttribute, setAttribute, setAttribute, setAttribute, setAttribute, 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

    - #### XORGateway

          public XORGateway()

    - #### XORGateway

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

    - #### XORGateway

          public XORGateway(java.lang.String ID,
                    java.lang.String nextElement,
                    java.lang.String failureElement)

    - #### XORGateway

          public XORGateway(java.lang.String ID,
                    ProcessElement nextElement,
                    ProcessElement failureElement)

  - ### Method Detail

    - #### getOrCreateRef

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

    - #### setJavaScriptObject

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

      Overrides:
        `setJavaScriptObject` in class `ProcessElement`

    - #### create

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

      Overrides:
        `create` in class `ProcessElement`

    - #### setCriteria

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

      Simple or `AdvancedCriteria` to be applied to the task inputs. These will be applied to either the data indicated by the `inputField` or to the "inputRecord" if multiple input fields are declared (see `taskIO`).
      Parameters:
        `criteria` - criteria Default value is IR
      Throws:
        `java.lang.IllegalStateException` - this property cannot be changed after the underlying component has been created

    - #### getCriteria

          public Criteria getCriteria()

      Simple or `AdvancedCriteria` to be applied to the task inputs. These will be applied to either the data indicated by the `inputField` or to the "inputRecord" if multiple input fields are declared (see `taskIO`).
      Returns:
        Criteria

    - #### setFailureElement

          public void setFailureElement(java.lang.String failureElement)
                                 throws java.lang.IllegalStateException

      ID of the next sequence or element to proceed to if the criteria do not match.
      Parameters:
        `failureElement` - . See `String`. 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 the criteria do not match.
      Returns:
        . See `String`

    - #### 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 the criteria match the process state. If this gateway 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` - . See `String`. 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 the criteria match the process state. If this gateway 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:
        . See `String`

    - #### setFailureElement

          public void setFailureElement(ProcessElement failureElement)
                                 throws java.lang.IllegalStateException

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

    - #### setNextElement

          public void setNextElement(ProcessElement nextElement)
                              throws java.lang.IllegalStateException

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