// add exception handlers as top children
route.getOutputs().addAll(exceptionHandlers);
// add the interceptor but we must do some pre configuration beforehand
intercept.afterPropertiesSet();
InterceptDefinition proxy = intercept.createProxy();
route.addOutput(proxy);
route.pushBlock(proxy.getProceed());
// if there is a proceed in the interceptor proxy then we should add
// the current outputs to out route so we will proceed and continue to route to them
ProceedDefinition proceed = ProcessorTypeHelper.findFirstTypeInOutputs(proxy.getOutputs(), ProceedDefinition.class);
if (proceed != null) {
proceed.getOutputs().addAll(outputs);
}
}