@Override public void addRoutesToCamelContext(CamelContext context) throws Exception { super.addRoutesToCamelContext(context); // Receivers addDTSIncomingFileRouter(context); addDTSMessageReceiverRoute(context); }
/** * Updated default behaviour to inject the DTS workflow details into outgoing responses * * @throws Exception */ @Override protected void configureDistributionEnvelopeReceiverRoute( final CamelContext context, final DistributionEnvelopeReceiverRoute route) throws Exception { super.configureDistributionEnvelopeReceiverRoute(context, route); // have the injector pass the updated messages on to the original target route final DTSResponseDetailsInjectorRoute injectorRoute = new DTSResponseDetailsInjectorRoute(); injectorRoute.setFromDistributionEnvelopeReceiverUri("direct:dts-workflow-details-injector"); injectorRoute.setToDistributionEnvelopeSenderUri(route.getDistributionEnvelopeSenderUri()); // Update the sender to route it's messages through the injector route.setDistributionEnvelopeSenderUri("direct:dts-workflow-details-injector"); context.addRoutes(injectorRoute); }