@Override
  protected DistributionEnvelopeSenderRoute createDistributionEnvelopeSenderRoute(
      final CamelContext context, final CIAOConfig config) throws Exception {
    final DTSDistributionEnvelopeSenderRoute route = new DTSDistributionEnvelopeSenderRoute();

    route.setDTSMessageSenderUri(
        context.resolvePropertyPlaceholders("file://{{dts.rootFolder}}/OUT"));
    route.setDTSMessageSendNotificationReceiverUri("direct:dtsMessageSendNotificationReceiver");
    route.setDTSTemporaryFolder(context.resolvePropertyPlaceholders("{{dts.temporaryFolder}}"));
    route.setDTSFilePrefix(Strings.nullToEmpty(config.getConfigValue("dts.filePrefix")));
    route.setIdGenerator(get(context, IdGenerator.class, "dtsIdGenerator"));

    // File housekeeping
    final DTSFileHousekeeper fileHousekeeper = new DTSFileHousekeeper();
    fileHousekeeper.setDestinationFolder(
        context.resolvePropertyPlaceholders("{{dts.completedFolder}}"));
    route.setFileHousekeeper(fileHousekeeper);

    final DTSFileHousekeeper errorFileHousekeeper = new DTSFileHousekeeper();
    errorFileHousekeeper.setDestinationFolder(
        context.resolvePropertyPlaceholders("{{dts.errorFolder}}"));
    route.setErrorFileHousekeeper(errorFileHousekeeper);

    final ControlFile prototype = new ControlFile();
    prototype.setWorkflowId(config.getConfigValue("dts.workflowId"));
    prototype.setFromDTS(config.getConfigValue("dts.senderMailbox"));
    route.setPrototypeControlFile(prototype);

    return route;
  }
  private void addDTSMessageReceiverRoute(final CamelContext context) throws Exception {
    final DTSMessageReceiverRoute route = new DTSMessageReceiverRoute();

    route.setDTSMessageReceiverUri("direct:dtsMessageReceiver");
    route.setPayloadDestinationUri(getDistributionEnvelopeReceiverUri());

    // File housekeeping
    final DTSFileHousekeeper fileHousekeeper = new DTSFileHousekeeper();
    fileHousekeeper.setDestinationFolder(
        context.resolvePropertyPlaceholders("{{dts.completedFolder}}"));
    route.setFileHousekeeper(fileHousekeeper);

    final DTSFileHousekeeper errorFileHousekeeper = new DTSFileHousekeeper();
    errorFileHousekeeper.setDestinationFolder(
        context.resolvePropertyPlaceholders("{{dts.errorFolder}}"));
    route.setErrorFileHousekeeper(errorFileHousekeeper);

    context.addRoutes(route);
  }