// Handle error exchanges
} else if (exchange.getStatus() == ExchangeStatus.ERROR) {
return;
}
InOut enricherTargetME = getExchangeFactory().createInOutExchange();
enricherTarget.configureTarget(enricherTargetME, getContext());
MessageUtil.transferInToIn(exchange, enricherTargetME);
sendSync(enricherTargetME);
if (enricherTargetME.getStatus() == ExchangeStatus.ERROR) {
fail(exchange, enricherTargetME.getError());
return;
}
Document document = combineToDOMDocument(exchange.getMessage("in"), enricherTargetME.getMessage("out"));
done(enricherTargetME);
MessageExchange outExchange = getExchangeFactory().createInOnlyExchange();
NormalizedMessage out = outExchange.createMessage();