Hi Neil, I just was working on the problem of requiring specific exchange rates from specific sources using orchestrator. It's not easy!
In my case, one source was the free exchange rates API (rest output) and another is a national bank (XML output). I ended up having to create Groovy parsing scripts for each so that I could map specific "addresses" in the return file to specific form request inputs on the JDE side. It's not simple and it requires some coding to do. I did figure it out by myself with lots of Google help, but I'll say that JSONSlurper, JSONBuilder, XMLSlurper, and XMLBuilder should become your friend really fast
Learning these objects within groovy will pay dividends. Exchange rate is a perfect entry into that pool because of how few fields you need to "map".
For each source, I am doing an API call, returning the API dataset (XML or JSON) to an API-specific groovy script where I parse the return, extract the data I need, and then format that into JSON for JDE to consume via form request.
In this orchestration I'm doing it for 2 different exchange rate sources. The orchestration calls are the identical, and are just a single form request component that involves loading exchange rates into the z file frontend grid. Rather than merge the datasets and have all rates go into a single Z file batch # this is a "lazy" implement meaning we'll have
n number of batches each day for
n number of exchange rate sources. If we need to consolidate later that would be another custom script.
Hope this is somewhat helpful!