use of org.mule.runtime.core.privileged.routing.CompositeRoutingException in project mule by mulesoft.
the class AbstractForkJoinStrategyFactory method createCompositeRoutingException.
private CompositeRoutingException createCompositeRoutingException(List<CoreEvent> results) {
Map<String, Message> successMap = new LinkedHashMap<>();
Map<String, Error> errorMap = new LinkedHashMap<>();
for (CoreEvent event : results) {
String key = Integer.toString(event.getGroupCorrelation().get().getSequence());
if (event.getError().isPresent()) {
errorMap.put(key, event.getError().get());
} else {
successMap.put(key, event.getMessage());
}
}
return new CompositeRoutingException(new RoutingResult(successMap, errorMap));
}
Aggregations