public abstract class BaseWorkflowExecutor extends java.lang.Object implements WorkflowExecutor
Modifier and Type | Class and Description |
---|---|
protected static class |
BaseWorkflowExecutor.BaseWorkflowExecutionResult |
static class |
BaseWorkflowExecutor.StepResultCapture |
Modifier and Type | Field and Description |
---|---|
protected static java.lang.String |
OPTION_KEY |
protected static java.lang.String |
SECURE_OPTION_KEY |
protected static java.lang.String |
SECURE_OPTION_VALUE |
protected static WorkflowStatusResult |
WorkflowResultFailed
Failure result
|
NODE_FIRST, PARALLEL, STEP_FIRST
Constructor and Description |
---|
BaseWorkflowExecutor(IFramework framework) |
Modifier and Type | Method and Description |
---|---|
protected void |
addNodeStepFailureContextData(StepExecutionResult dispatcherStepResult,
ExecutionContextImpl.Builder builder)
Add any node-specific step failure information to the node-specific data contexts
|
protected void |
addStepFailureContextData(StepExecutionResult stepResult,
ExecutionContextImpl.Builder builder)
Add step result failure information to the data context
|
void |
combineNodeResultData(int c,
StepExecutionResult stepResult,
WFSharedContext combinedResultData) |
void |
combineResultData(int c,
DataOutput outputContext,
WFSharedContext combinedResultData,
StepExecutionResult handlerResult) |
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,
int beginStepIndex,
WFSharedContext sharedContext)
Deprecated.
should invoke engine workflow executor
|
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 and log filter.
|
protected IFramework |
getFramework() |
protected WorkflowExecutionListener |
getWorkflowListener(ExecutionContext executionContext) |
protected static NodeStepResult |
nodeStepResultFromNodeStepException(INodeEntry node,
NodeStepException nodeStepException) |
protected ExecutionContextImpl.Builder |
replaceFailedNodesListenerInContext(ExecutionContextImpl.Builder builder,
FailedNodesListener captureFailedNodesListener,
ExecutionListener executionListener) |
void |
reportNodesMatched(StepExecutionContext executionContext,
NodeRecorder stepCaptureFailedNodesListener) |
protected void |
validateNodeSet(ExecutionContext executionContext,
NodesSelector nodeSelector) |
protected static WorkflowStatusDataResult |
workflowResult(boolean status,
java.lang.String statusString,
ControlBehavior behavior,
WFSharedContext sharedContext) |
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
protected static final WorkflowStatusResult WorkflowResultFailed
public BaseWorkflowExecutor(IFramework framework)
protected static WorkflowStatusDataResult workflowResult(boolean status, java.lang.String statusString, ControlBehavior behavior, WFSharedContext sharedContext)
status
- success/failurestatusString
- status stringbehavior
- control behaviorprotected IFramework getFramework()
public final WorkflowExecutionResult executeWorkflow(StepExecutionContext executionContext, WorkflowExecutionItem item)
executeWorkflow
in interface WorkflowExecutor
protected 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, int beginStepIndex, WFSharedContext sharedContext)
executionContext
- contextfailedMap
- failuresresultList
- resultsiWorkflowCmdItems
- list of stepskeepgoing
- true to keepgoing on step failurebeginStepIndex
- beginning step indexprotected void addStepFailureContextData(StepExecutionResult stepResult, ExecutionContextImpl.Builder builder)
stepResult
- resultprotected void addNodeStepFailureContextData(StepExecutionResult dispatcherStepResult, ExecutionContextImpl.Builder builder)
dispatcherStepResult
- resultbuilder
- protected ExecutionContextImpl.Builder replaceFailedNodesListenerInContext(ExecutionContextImpl.Builder builder, FailedNodesListener captureFailedNodesListener, ExecutionListener executionListener)
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
- steppublic void combineResultData(int c, DataOutput outputContext, WFSharedContext combinedResultData, StepExecutionResult handlerResult)
public void reportNodesMatched(StepExecutionContext executionContext, NodeRecorder stepCaptureFailedNodesListener)
protected void validateNodeSet(ExecutionContext executionContext, NodesSelector nodeSelector)
public void combineNodeResultData(int c, StepExecutionResult stepResult, WFSharedContext combinedResultData)