0

I am getting doctorCodes as (Dr1124914 ,Dr1074955).

My clinic API gives above response taking one doctorCode a time ,I have to extract a value from my response. But I want to make parallel calls to my API with all values of doctorCodes as shown above in one go , extracting required field from it and accumulating finally to my resultant payload .

emphasized text

Roman Pokrovskij
  • 9,449
  • 21
  • 87
  • 142
Developer
  • 21
  • 1
  • 7
  • Do you want to perform parallel calls to requestClinicList and accumulate the result in the client Mule flow? – aled Feb 19 '19 at 21:52
  • @AlejandroDobniewski - Yes exactly want to perform parallel calls to requestClinicList and accumulate the result in client Mule Flow . – Developer Mar 03 '19 at 09:25

1 Answers1

0

You can use the Scatter-Gather component to perform parallel calls and aggregate the results using DataWeave. See the documentation at https://docs.mulesoft.com/mule-runtime/4.1/scatter-gather-concept

Note that it works for a fixed number of parallel way, not for dynamic routes. I don't think there is no way to do a dynamic number of routes in Mule 4. If you are interested in that you would have to implement it by yourself in custom Java or scripting code somehow.

aled
  • 21,330
  • 3
  • 27
  • 34