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