I have a scenario where I need to call an integration multiple times for an array of items.
That needs to be done in parallel as the result is then presented to the user in a form.
The problem I have is that I need to save the output of the function (the output of the api is then processed further)
in a process variable, and I am not sure how to do that. If I set a node to run multiple times with an output
variable, when all the instances end it will have saved only the result of the first instance (which is a CDT), while I would
like the output variable to contain an array with all the replies. How can this be done?
Discussion posts and replies are publicly visible
You need a multiple output variable to store outputs of integration in an array. After a successful integration run, in the output node instead of using Operator 'is stored as', create a custom output using operator 'is stored at index' of the output variable.
Example, if you have 5 array items then as per my understanding process will call 5 integration nodes or the same integration nodes 5 times using MNI. Think of each node as index 1 to 5 of integrations and save output at respective index. For 3rd integration store output at index 3 of output variable and so on. If using MNI you can use tp!instanceIndex as well to store at particular index of output variable.
However I have never tried this scenario with an MNI yet so after trying you can let me know how it goes!
Thank you Harsha, that indeed does the trick (I can use the "is appended to" option). I was oblivious of this as I never used it before
Yeah is appended to also works the same way by appending each execution result after previous one ! Glad its working now!