Async calls to REST API

Hi I have a microflow that retrieves a list of ids, then retrieves and creates a list of objects based upon those ids. These calls are all made against our RESTful API. Is there any way in which the calls to retrieve the objects may be made in parallel, similar to a parallel foreach in .NET? Alternatively, if the list of ids is passed to the page, is there a widget that runs asynchronously to retrieve the object for display? Cheers, James
2 answers

Hi James,

For parallellism you may want to look into CommunityCommons:

or task queues:

Depending on the use case, you could also use data views with datasource microflows to make the client retrieve data in parallel. See

It is not exactly the same as a parallel forEach in .net, but would one of these solutions fit your needs?


Hi Michiel, thank you for your reply. I’ve taken a look at the suggested approaches.

In the case of using the actions CommunityCommons.RunMicroflowAsyncInQueue or CommunityCommons.ExecuteMicroflowInBackground, I may be misunderstanding these, but the return type appears to be a boolean, whereas I would like it to be the individual object that I may then append to a list.

Ideally, I’d like the bit in the loop to call out in parallel, or asynchronously, and append the result to the claims. I don’t believe that this is possible?

The other approach is via the UI, as below:

Is this the data source microflow solution? In which case, I’m not convinced that the calls are happening in parallel. The page produced appears to be filling in the values sequentially, from the top of the page to the bottom. I will check though,

Thank you