public abstract class BaseWorkflowExecutor extends java.lang.Object implements WorkflowExecutor
| Modifier and Type | Class and Description |
|---|---|
static class |
BaseWorkflowExecutor.StepResultCapture |
| Modifier and Type | Field and Description |
|---|---|
protected static java.lang.String |
DATA_CONTEXT_PREFIX |
protected static java.lang.String |
OPTION_KEY |
protected static java.lang.String |
SECURE_OPTION_KEY |
protected static java.lang.String |
SECURE_OPTION_VALUE |
NODE_FIRST, PARALLEL, STEP_FIRST| Constructor and Description |
|---|
BaseWorkflowExecutor(Framework framework) |
| Modifier and Type | Method and Description |
|---|---|
protected StepExecutionContext |
addNodeStepFailureContextData(StepExecutionResult dispatcherStepResult,
StepExecutionContext handlerExecContext)
Add any node-specific step failure information to the node-specific data contexts
|
protected StepExecutionContext |
addStepFailureContextData(StepExecutionResult stepResult,
StepExecutionContext handlerExecContext)
Add step result failure information to the data context
|
protected java.util.Map<java.lang.String,java.util.Collection<StepExecutionResult>> |
convertFailures(java.util.Map<java.lang.Integer,StepExecutionResult> failedMap)
Convert map of step execution results keyed by step number, to a collection of step execution results
keyed by node name
|
protected java.util.Map<java.lang.String,java.util.Map<java.lang.String,java.lang.String>> |
createPrintableDataContext(java.util.Map<java.lang.String,java.util.Map<java.lang.String,java.lang.String>> dataContext)
Creates a copy of the given data context with the secure option values obfuscated.
|
protected java.util.Map<java.lang.String,java.util.Map<java.lang.String,java.lang.String>> |
createPrintableDataContext(java.lang.String optionKey,
java.lang.String secureOptionKey,
java.lang.String secureOptionValue,
java.util.Map<java.lang.String,java.util.Map<java.lang.String,java.lang.String>> dataContext)
Creates a copy of the given data context with the secure option values obfuscated.
|
protected StepExecutionResult |
executeWFItem(StepExecutionContext executionContext,
java.util.Map<java.lang.Integer,StepExecutionResult> failedMap,
int c,
StepExecutionItem cmd)
Execute a workflow item, returns true if the item succeeds.
|
WorkflowExecutionResult |
executeWorkflow(StepExecutionContext executionContext,
WorkflowExecutionItem item) |
abstract WorkflowExecutionResult |
executeWorkflowImpl(StepExecutionContext executionContext,
WorkflowExecutionItem item) |
protected WorkflowStatusResult |
executeWorkflowItemsForNodeSet(StepExecutionContext executionContext,
java.util.Map<java.lang.Integer,StepExecutionResult> failedMap,
java.util.List<StepExecutionResult> resultList,
java.util.List<StepExecutionItem> iWorkflowCmdItems,
boolean keepgoing)
Execute the sequence of ExecutionItems within the context, and with the given keepgoing value
|
protected WorkflowStatusResult |
executeWorkflowItemsForNodeSet(StepExecutionContext executionContext,
java.util.Map<java.lang.Integer,StepExecutionResult> failedMap,
java.util.List<StepExecutionResult> resultList,
java.util.List<StepExecutionItem> iWorkflowCmdItems,
boolean keepgoing,
int beginStepIndex)
Execute the sequence of ExecutionItems within the context, and with the given keepgoing value
|
BaseWorkflowExecutor.StepResultCapture |
executeWorkflowStep(StepExecutionContext executionContext,
java.util.Map<java.lang.Integer,StepExecutionResult> failedMap,
java.util.List<StepExecutionResult> resultList,
boolean keepgoing,
WorkflowExecutionListener wlistener,
int c,
StepExecutionItem cmd)
Execute a step and handle flow control and error handler.
|
protected StepExecutionResult |
executeWorkflowStep(WorkflowExecutionListener wlistener,
StepExecutionItem cmd,
StepExecutionContext executionContext,
java.util.Map<java.lang.Integer,StepExecutionResult> stepFailedMap,
int stepNum)
|
protected WorkflowExecutionListener |
getWorkflowListener(ExecutionContext executionContext) |
protected static NodeStepResult |
nodeStepResultFromNodeStepException(INodeEntry node,
NodeStepException nodeStepException) |
protected StepExecutionContext |
replaceFailedNodesListenerInContext(StepExecutionContext executionContext,
FailedNodesListener captureFailedNodesListener) |
protected static final java.lang.String DATA_CONTEXT_PREFIX
protected static final java.lang.String OPTION_KEY
protected static final java.lang.String SECURE_OPTION_KEY
protected static final java.lang.String SECURE_OPTION_VALUE
public BaseWorkflowExecutor(Framework framework)
protected StepExecutionResult executeWorkflowStep(WorkflowExecutionListener wlistener, StepExecutionItem cmd, StepExecutionContext executionContext, java.util.Map<java.lang.Integer,StepExecutionResult> stepFailedMap, int stepNum)
executeWorkflowStep(StepExecutionContext, Map, List, boolean, WorkflowExecutionListener, int, StepExecutionItem)wlistener - listenercmd - stepexecutionContext - contextstepFailedMap - failuresstepNum - indexpublic final WorkflowExecutionResult executeWorkflow(StepExecutionContext executionContext, WorkflowExecutionItem item)
executeWorkflow in interface WorkflowExecutorprotected WorkflowExecutionListener getWorkflowListener(ExecutionContext executionContext)
public abstract WorkflowExecutionResult executeWorkflowImpl(StepExecutionContext executionContext, WorkflowExecutionItem item)
protected StepExecutionResult executeWFItem(StepExecutionContext executionContext, java.util.Map<java.lang.Integer,StepExecutionResult> failedMap, int c, StepExecutionItem cmd)
executionContext - contextfailedMap - List to add any messages if the item failsc - index of the WF itemcmd - WF item descriptorprotected WorkflowStatusResult executeWorkflowItemsForNodeSet(StepExecutionContext executionContext, java.util.Map<java.lang.Integer,StepExecutionResult> failedMap, java.util.List<StepExecutionResult> resultList, java.util.List<StepExecutionItem> iWorkflowCmdItems, boolean keepgoing)
executionContext - contextfailedMap - failuresresultList - resultsiWorkflowCmdItems - list of stepskeepgoing - true to keepgoing on step failureprotected WorkflowStatusResult executeWorkflowItemsForNodeSet(StepExecutionContext executionContext, java.util.Map<java.lang.Integer,StepExecutionResult> failedMap, java.util.List<StepExecutionResult> resultList, java.util.List<StepExecutionItem> iWorkflowCmdItems, boolean keepgoing, int beginStepIndex)
executionContext - contextfailedMap - failuresresultList - resultsiWorkflowCmdItems - list of stepskeepgoing - true to keepgoing on step failurebeginStepIndex - beginning step indexprotected StepExecutionContext addStepFailureContextData(StepExecutionResult stepResult, StepExecutionContext handlerExecContext)
stepResult - resulthandlerExecContext - contextprotected StepExecutionContext addNodeStepFailureContextData(StepExecutionResult dispatcherStepResult, StepExecutionContext handlerExecContext)
dispatcherStepResult - resulthandlerExecContext - contextprotected StepExecutionContext replaceFailedNodesListenerInContext(StepExecutionContext executionContext, FailedNodesListener captureFailedNodesListener)
protected java.util.Map<java.lang.String,java.util.Collection<StepExecutionResult>> convertFailures(java.util.Map<java.lang.Integer,StepExecutionResult> failedMap)
failedMap - failuresprotected static NodeStepResult nodeStepResultFromNodeStepException(INodeEntry node, NodeStepException nodeStepException)
node - nodenodeStepException - exceptionprotected java.util.Map<java.lang.String,java.util.Map<java.lang.String,java.lang.String>> createPrintableDataContext(java.util.Map<java.lang.String,java.util.Map<java.lang.String,java.lang.String>> dataContext)
dataContext - dataprotected java.util.Map<java.lang.String,java.util.Map<java.lang.String,java.lang.String>> createPrintableDataContext(java.lang.String optionKey,
java.lang.String secureOptionKey,
java.lang.String secureOptionValue,
java.util.Map<java.lang.String,java.util.Map<java.lang.String,java.lang.String>> dataContext)
optionKey - keysecureOptionKey - secure keysecureOptionValue - secure valuedataContext - datapublic BaseWorkflowExecutor.StepResultCapture executeWorkflowStep(StepExecutionContext executionContext, java.util.Map<java.lang.Integer,StepExecutionResult> failedMap, java.util.List<StepExecutionResult> resultList, boolean keepgoing, WorkflowExecutionListener wlistener, int c, StepExecutionItem cmd)
executionContext - contextfailedMap - map for placing failure resultsresultList - list of step resultskeepgoing - true if the workflow should keepgoing on errorwlistener - listenerc - step numbercmd - step