I have one array and want to run startProcess() for each value in the array. I have implemented the following, but I get an error (Non-Save Reactions should be unwrapped individually and not processed as a list)
localVariables( local!array:{"1", "2", "3"}, . . . . saveInto:a!forEach( items: local!array, expression: a!startProcess( processModel: cons!AAAAAAA, processParameters: { value: fv!item, }, onSuccess: { a!save(ri!result,fv!processInfo.pv.result) } ) ) ) )
Discussion posts and replies are publicly visible
Hello hiron0583 ,
Instead doing the loop in the interface, you directly configure the process parameter as multiple and pass the whole list of values to that process variable. And you can configure the rest directly in the process model to write the data individually.
Rithani Vivekananthan Thank you for your answer. Actually, I could have implemented looping in the process model by passing the array as it is, but then the number of processing nodes would exceed 50 when the length of the array becomes large. Therefore, I thought of looping in the interface. Is there another way to implement this?
No. The nodes will not increase. Why would they? You will have a fixed number of nodes that will be executed in a loop. I you are talking about the nodes with chaining, then yes.
What are you doing in the process with this data?
you can create a parent process where looping will take place and the current process will be a sub-process of that parent process.