@Component public class BulkWorkflow extends WorkflowDefinition<BulkWorkflow.State>
| Modifier and Type | Class and Description |
|---|---|
static class |
BulkWorkflow.State
Bulk workflow states.
|
| Modifier and Type | Field and Description |
|---|---|
static String |
BULK_WORKFLOW_TYPE
The type of default bulk workflow.
|
static String |
VAR_CHILD_DATA
State variable name for child data.
|
static String |
VAR_CONCURRENCY
State variable to define the maximum concurrency for executing child workflows.
|
allowedTransitions, failureTransitions| Modifier | Constructor and Description |
|---|---|
|
BulkWorkflow()
Create bulk workflow definition.
|
protected |
BulkWorkflow(String type)
Extend bulk workflow definition.
|
| Modifier and Type | Method and Description |
|---|---|
protected boolean |
isRunning(WorkflowInstance instance)
Override this to determine if the child workflow is running or not.
|
NextAction |
splitWork(StateExecution execution,
com.fasterxml.jackson.databind.JsonNode data)
Call
splitWorkImpl to create new child workflows. |
protected boolean |
splitWorkImpl(StateExecution execution,
com.fasterxml.jackson.databind.JsonNode data)
Override this to create child workflows or add the children before starting the parent.
|
protected org.joda.time.DateTime |
waitForChildrenToCompleteUntil()
Override this to customize the time to wait for children to finish.
|
NextAction |
waitForChildrenToFinish(StateExecution execution,
int concurrency)
Check if all child workflows have finished.
|
protected org.joda.time.DateTime |
waitForChildrenUntil()
Override this to customize the time to wait for new children before waking up.
|
getStatesgetAllowedTransitions, getDescription, getErrorState, getFailureTransitions, getInitialState, getMethod, getName, getSettings, getState, getSupportedSignals, getType, isAllowedNextAction, isStartState, permit, permit, setDescription, setNameequals, hashCode, toStringpublic static final String BULK_WORKFLOW_TYPE
public static final String VAR_CHILD_DATA
public static final String VAR_CONCURRENCY
protected BulkWorkflow(String type)
type - The type of the workflow.public BulkWorkflow()
public NextAction splitWork(StateExecution execution, com.fasterxml.jackson.databind.JsonNode data)
splitWorkImpl to create new child workflows.execution - State execution context.data - Child data.protected boolean splitWorkImpl(StateExecution execution, com.fasterxml.jackson.databind.JsonNode data)
execution - State execution context.data - Child data.RuntimeException - Thrown by default implementation if children are not created before the parent is started.protected org.joda.time.DateTime waitForChildrenUntil()
public NextAction waitForChildrenToFinish(StateExecution execution, int concurrency)
execution - State execution context.concurrency - The maximum number of child workflows to start.waitForChildrenToCompleteUntil.protected boolean isRunning(WorkflowInstance instance)
instance - The child workflow instance to check.protected org.joda.time.DateTime waitForChildrenToCompleteUntil()
Copyright © 2014–2020 Nitor Creations. All rights reserved.