Class Spawning

java.lang.Object
com.appiancorp.suiteapi.process.Spawning
All Implemented Interfaces:
XMLable, Serializable

public class Spawning extends Object implements XMLable, Serializable
Nodes that are set to Spawn create multiple instances of themselves, when the process reaches that node. The number of nodes to be spawned is set using the Instances property. By default the nodes are executed in EXEC_TYPE_SEQUENCE but they can be configured to execute in EXEC_TYPE_PARALLEL. When the nodes are executed in parallel, how the flow if the process should continue also needs to be configured. There are four patterns available, which specify the behavior of the process flow then the nodes are executed in parallel. This class defines the spawning properties for a node.
See Also:
  • Field Summary

    Fields
    Modifier and Type
    Field
    Description
    static final int
    Spawned nodes will be executed in parallel.
    static final int
    Spawned nodes will be executed in sequence.
    static final int
    The next node in the process is executed, only when the complex node expression evaluates to true.
    static final int
    When the spawned node are executing in parallel, the next node will be executed for all the spawned instances.
    static final int
    When the spawned nodes are executing in parallel, the next node in the process will be executed only once (for the spawned node instance that executes first).
    static final int
    When the spawned nodes are executing in parallel, the next node in the process is executed only when all the spawned instances have finished execution.

    Fields inherited from interface com.appiancorp.suiteapi.common.XMLable

    DEFAULT_BUFFER_SIZE
  • Constructor Summary

    Constructors
    Constructor
    Description
     
  • Method Summary

    Modifier and Type
    Method
    Description
    Returns the expression that needs to be true when multiple instances of nodes are running in parallel and parallelMergeType is set to PARALL_FLOW_COMPLEX_NODE
    Returns the Instances configuration.
    Returns the merge property when the node instances are running in parallel.
    boolean
    Returns true if more than ServerProcessCommonConfiguration#getMaxNodeInstances nodes can be spawned in batches.
    boolean
    Returns true if the nodes will be executed in parallel.
    void
    setAllowMNIBatching(boolean allowMNIBatching)
    Sets if the MNI batching of more than ServerProcessCommonConfiguration#getMaxNodeInstances nodes is allowed
    void
    Sets the expression that needs to be true when multiple instances of nodes are running in parallel and parallelMergeType is set to PARALL_FLOW_COMPLEX_NODE
    void
    setInstances(Instances instances_)
    Sets the Instances configuration.
    void
    setParallelExecution(boolean executionType_)
    Sets how the spawned nodes are executed.
    void
    setParallelMergeType(Integer parallelMergeType_)
    Sets the merge property when the node instances are running in parallel.
    Spawn instances equal to the difference in the number of elements in Process Variable array and the number of instances created in the previous execution.
    void
    Appends an XML representation of this object (including all child objects) to the given buffer.

    Methods inherited from class java.lang.Object

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

    Methods inherited from interface com.appiancorp.suiteapi.common.XMLable

    toXML
  • Field Details

    • EXEC_TYPE_SEQUENTIAL

      public static final int EXEC_TYPE_SEQUENTIAL
      Spawned nodes will be executed in sequence.
      See Also:
    • EXEC_TYPE_PARALLEL

      public static final int EXEC_TYPE_PARALLEL
      Spawned nodes will be executed in parallel.
      See Also:
    • PARALL_FLOW_RUN_ALL

      public static final int PARALL_FLOW_RUN_ALL
      When the spawned node are executing in parallel, the next node will be executed for all the spawned instances.
      See Also:
    • PARALL_FLOW_RUN_ONCE

      public static final int PARALL_FLOW_RUN_ONCE
      When the spawned nodes are executing in parallel, the next node in the process will be executed only once (for the spawned node instance that executes first).
      See Also:
    • PARALL_FLOW_WAIT_FOR_ALL

      public static final int PARALL_FLOW_WAIT_FOR_ALL
      When the spawned nodes are executing in parallel, the next node in the process is executed only when all the spawned instances have finished execution.
      See Also:
    • PARALL_FLOW_COMPLEX_NODE

      public static final int PARALL_FLOW_COMPLEX_NODE
      The next node in the process is executed, only when the complex node expression evaluates to true.
      See Also:
  • Constructor Details

    • Spawning

      public Spawning()
  • Method Details

    • toXML

      public String toXML()
      Spawn instances equal to the difference in the number of elements in Process Variable array and the number of instances created in the previous execution.
      Specified by:
      toXML in interface XMLable
      Returns:
      The XML representation of this object.
    • toXML

      public void toXML(StringBuilder buffer_)
      Description copied from interface: XMLable
      Appends an XML representation of this object (including all child objects) to the given buffer. Override for performance.
      Specified by:
      toXML in interface XMLable
      Parameters:
      buffer_ - The buffer on which to append the XML representation.
    • isParallelExecution

      public boolean isParallelExecution()
      Returns true if the nodes will be executed in parallel.
      See Also:
    • setParallelExecution

      public void setParallelExecution(boolean executionType_)
      Sets how the spawned nodes are executed. The nodes can either be executed in parallel (all nodes execute at the same time) or in sequence.
      Parameters:
      executionType_ - true if the nodes are set to execute in parallel
      See Also:
    • isAllowMNIBatching

      public boolean isAllowMNIBatching()
      Returns true if more than ServerProcessCommonConfiguration#getMaxNodeInstances nodes can be spawned in batches.
    • setAllowMNIBatching

      public void setAllowMNIBatching(boolean allowMNIBatching)
      Sets if the MNI batching of more than ServerProcessCommonConfiguration#getMaxNodeInstances nodes is allowed
      Parameters:
      _allowMNIBatching - true if the nodes are set to execute in parallel
    • getInstances

      public Instances getInstances()
      Returns the Instances configuration.
      Returns:
      instances object
    • setInstances

      public void setInstances(Instances instances_)
      Sets the Instances configuration.
      Parameters:
      instances_ - instances object
    • getComplexNodeMergeExpression

      public String getComplexNodeMergeExpression()
      Returns the expression that needs to be true when multiple instances of nodes are running in parallel and parallelMergeType is set to PARALL_FLOW_COMPLEX_NODE
      Returns:
      String representing the expression
    • setComplexNodeMergeExpression

      public void setComplexNodeMergeExpression(String nmMergeExpression_)
      Sets the expression that needs to be true when multiple instances of nodes are running in parallel and parallelMergeType is set to PARALL_FLOW_COMPLEX_NODE
      Parameters:
      nmMergeExpression_ - String representing the expression
    • getParallelMergeType

      public Integer getParallelMergeType()
      Returns the merge property when the node instances are running in parallel.
      Returns:
      Integer representing parallel merge type
      See Also:
    • setParallelMergeType

      public void setParallelMergeType(Integer parallelMergeType_)
      Sets the merge property when the node instances are running in parallel.
      Parameters:
      parallelMergeType_ - integer representing parallel merge
      See Also: