Package com.appiancorp.suiteapi.process
Class Spawning
java.lang.Object
com.appiancorp.suiteapi.process.Spawning
- All Implemented Interfaces:
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
Modifier and TypeFieldDescriptionstatic 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
-
Method Summary
Modifier and TypeMethodDescriptionReturns the expression that needs to be true when multiple instances of nodes are running in parallel and parallelMergeType is set toPARALL_FLOW_COMPLEX_NODE
Returns theInstances
configuration.Returns the merge property when the node instances are running in parallel.boolean
Returns true if more thanServerProcessCommonConfiguration#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 thanServerProcessCommonConfiguration#getMaxNodeInstances
nodes is allowedvoid
setComplexNodeMergeExpression
(String nmMergeExpression_) Sets the expression that needs to be true when multiple instances of nodes are running in parallel and parallelMergeType is set toPARALL_FLOW_COMPLEX_NODE
void
setInstances
(Instances instances_) Sets theInstances
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.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.void
toXML
(StringBuilder buffer_) Appends an XML representation of this object (including all child objects) to the given buffer.
-
Field Details
-
EXEC_TYPE_SEQUENTIAL
public static final int EXEC_TYPE_SEQUENTIALSpawned nodes will be executed in sequence.- See Also:
-
EXEC_TYPE_PARALLEL
public static final int EXEC_TYPE_PARALLELSpawned nodes will be executed in parallel.- See Also:
-
PARALL_FLOW_RUN_ALL
public static final int PARALL_FLOW_RUN_ALLWhen 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_ONCEWhen 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_ALLWhen 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_NODEThe 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
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. -
toXML
Description copied from interface:XMLable
Appends an XML representation of this object (including all child objects) to the given buffer. Override for performance. -
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 thanServerProcessCommonConfiguration#getMaxNodeInstances
nodes can be spawned in batches. -
setAllowMNIBatching
public void setAllowMNIBatching(boolean allowMNIBatching) Sets if the MNI batching of more thanServerProcessCommonConfiguration#getMaxNodeInstances
nodes is allowed- Parameters:
_allowMNIBatching
- true if the nodes are set to execute in parallel
-
getInstances
Returns theInstances
configuration.- Returns:
- instances object
-
setInstances
Sets theInstances
configuration.- Parameters:
instances_
- instances object
-
getComplexNodeMergeExpression
Returns the expression that needs to be true when multiple instances of nodes are running in parallel and parallelMergeType is set toPARALL_FLOW_COMPLEX_NODE
- Returns:
- String representing the expression
-
setComplexNodeMergeExpression
Sets the expression that needs to be true when multiple instances of nodes are running in parallel and parallelMergeType is set toPARALL_FLOW_COMPLEX_NODE
- Parameters:
nmMergeExpression_
- String representing the expression
-
getParallelMergeType
Returns the merge property when the node instances are running in parallel.- Returns:
- Integer representing parallel merge type
- See Also:
-
setParallelMergeType
Sets the merge property when the node instances are running in parallel.- Parameters:
parallelMergeType_
- integer representing parallel merge- See Also:
-