I have a system that I need to integrate with that needs files dropped in one folder and it copies that file to a "success" folder or an "error" folder depending on if it was processed correctly. I currently have a flow defined in DSL like so
return f -> f.channel("orders.in")
.transform(Transformers.marshaller(marshaller(), resultTransformer(), true))
.handle(Files.outboundAdapter(properties.getInputDirectory()));
With a gateway defined as
@Gateway(requestChannel="orders.in")
public void submitOrder(Order order);
What I would like is to have a response instead public String submitOrder(Order order)
where the returned String is an order number if sucessful and null if failed. I've been playing around for a few hours now and am stumped on how to accomplish this without introducing AMQ or something but feel like it should be possible. I don't even know if this is how I'll end up using it as I might handle the responses async later and notify the user through other means, but am stubborn and wanted to try and get it to work this way first if possible. Any help appreciated.