Class BaseWorkflowExecutor

    • Constructor Detail

      • BaseWorkflowExecutor

        public BaseWorkflowExecutor​(IFramework framework)
    • Method Detail

      • workflowResult

        protected static WorkflowStatusDataResult workflowResult​(boolean status,
                                                                 java.lang.String statusString,
                                                                 ControlBehavior behavior,
                                                                 WFSharedContext sharedContext)
        Parameters:
        status - success/failure
        statusString - status string
        behavior - control behavior
        Returns:
        result with the given input
      • getFramework

        protected IFramework getFramework()
      • executeWFItem

        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. This method will throw an exception if the workflow item fails and the Workflow is has keepgoing==false.
        Parameters:
        executionContext - context
        failedMap - List to add any messages if the item fails
        c - index of the WF item
        cmd - WF item descriptor
        Returns:
        true if the execution succeeds, false otherwise
      • executeWorkflowItemsForNodeSet

        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
        Execute the sequence of ExecutionItems within the context, and with the given keepgoing value
        Parameters:
        executionContext - context
        failedMap - failures
        resultList - results
        iWorkflowCmdItems - list of steps
        keepgoing - true to keepgoing on step failure
        beginStepIndex - beginning step index
        Returns:
        true if successful
      • addNodeStepFailureContextData

        protected void addNodeStepFailureContextData​(StepExecutionResult dispatcherStepResult,
                                                     ExecutionContextImpl.Builder builder)
        Add any node-specific step failure information to the node-specific data contexts
        Parameters:
        dispatcherStepResult - result
        builder -
      • convertFailures

        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
        Parameters:
        failedMap - failures
        Returns:
        converted
      • nodeStepResultFromNodeStepException

        protected static NodeStepResult nodeStepResultFromNodeStepException​(INodeEntry node,
                                                                            NodeStepException nodeStepException)
        Parameters:
        node - node
        nodeStepException - exception
        Returns:
        a failure result with components from an exception
      • createPrintableDataContext

        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. This does not modify the original data context. "secureOption" map values will always be obfuscated. "option" entries that are also in "secureOption" will have their values obfuscated. All other maps within the data context will be added directly to the copy.
        Parameters:
        dataContext - data
        Returns:
        printable data
      • createPrintableDataContext

        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. This does not modify the original data context. "secureOption" map values will always be obfuscated. "option" entries that are also in "secureOption" will have their values obfuscated. All other maps within the data context will be added directly to the copy.
        Parameters:
        optionKey - key
        secureOptionKey - secure key
        secureOptionValue - secure value
        dataContext - data
        Returns:
        printable data