Class 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.
  • 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