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();
}