Package com.dtolabs.rundeck.core.execution.dispatch

Examples of com.dtolabs.rundeck.core.execution.dispatch.DispatcherResult


        if (null != context.getExecutionListener()) {
            context.getExecutionListener().beginNodeDispatch(context, item);
        }
        final NodeDispatcher dispatcher = framework.getNodeDispatcherForContext(context);
        DispatcherResult result = null;
        try {
            result = dispatcher.dispatch(context, item);
        } finally {
            if (null != context.getExecutionListener()) {
                context.getExecutionListener().finishNodeDispatch(result, context, item);
View Full Code Here


                                                 Map<String, Collection<StepExecutionResult>> failures,
                                                 final Map<Integer, StepExecutionResult> stepFailures,
                                                 IWorkflow flowsection)
        throws ExecutionServiceException, DispatcherException {
        logger.debug("Node dispatch for " + flowsection.getCommands().size() + " steps");
        final DispatcherResult dispatch;
        final WorkflowExecutionItem innerLoopItem = createInnerLoopItem(flowsection);
        final WorkflowExecutor executor = framework.getWorkflowExecutionService().getExecutorForItem(innerLoopItem);
        final Dispatchable dispatchedWorkflow = new DispatchedWorkflow(executor,
                                                                       innerLoopItem,
                                                                       stepCount,
                                                                       executionContext.getStepContext());
        //dispatch the sequence of dispatched items to each node
        dispatch = framework.getExecutionService().dispatchToNodes(
            ExecutionContextImpl.builder(executionContext)
                .stepNumber(stepCount)
                .build(),
            dispatchedWorkflow);

        logger.debug("Node dispatch result: " + dispatch);
        extractWFDispatcherResult(dispatch, results, failures, stepFailures,flowsection.getCommands().size(),stepCount);
        return dispatch.isSuccess();
    }
View Full Code Here

        //add a new wrapped DispatcherResults for each original step
        int x = 0;
        for (final HashMap<String, NodeStepResult> map : mergedStepResults) {
            Boolean success = successes.get(x);
            DispatcherResult r = new DispatcherResultImpl(map, null != success ? success : false);
            results.add(NodeDispatchStepExecutor.wrapDispatcherResult(r));
            x++;
        }

        //merge failures for each step
        for (final Integer integer : mergedStepFailures.keySet()) {
            Map<String, NodeStepResult> map = mergedStepFailures.get(integer);

            DispatcherResult r = new DispatcherResultImpl(map, false);
            stepFailures.put(integer, NodeDispatchStepExecutor.wrapDispatcherResult(r));
        }
    }
View Full Code Here

        static List<NodeStepResult> extractNodeStepResults(WorkflowExecutionResult result, INodeEntry node) {
            ArrayList<NodeStepResult> results = new ArrayList<NodeStepResult>();
            for (final StepExecutionResult executionResult : result.getResultSet()) {

                if (NodeDispatchStepExecutor.isWrappedDispatcherResult(executionResult)) {
                    DispatcherResult dispatcherResult
                        = NodeDispatchStepExecutor.extractDispatcherResult(executionResult);
                    NodeStepResult stepResult = dispatcherResult.getResults().get(node.getNodename());
                    if(null!=stepResult){
                        results.add(stepResult);
                    }
                }else if (NodeDispatchStepExecutor.isWrappedDispatcherException(executionResult)) {
                    DispatcherException exception
View Full Code Here

            Map<Integer, NodeStepResult> results = new HashMap<Integer, NodeStepResult>();
            for (final Map.Entry<Integer, StepExecutionResult> entry : result.getStepFailures().entrySet()) {
                int num = entry.getKey();
                StepExecutionResult executionResult = entry.getValue();
                if (NodeDispatchStepExecutor.isWrappedDispatcherResult(executionResult)) {
                    DispatcherResult dispatcherResult
                        = NodeDispatchStepExecutor.extractDispatcherResult(executionResult);
                    NodeStepResult stepResult = dispatcherResult.getResults().get(node.getNodename());
                    if (null != stepResult) {
                        results.put(num, stepResult);
                    }
                } else if (NodeDispatchStepExecutor.isWrappedDispatcherException(executionResult)) {
                    DispatcherException exception
View Full Code Here

TOP

Related Classes of com.dtolabs.rundeck.core.execution.dispatch.DispatcherResult

Copyright © 2018 www.massapicom. All rights reserved.
All source code are property of their respective owners. Java is a trademark of Sun Microsystems, Inc and owned by ORACLE Inc. Contact coftware#gmail.com.