Skip to main content
January 17, 2024
Question

Start the process model multiple times using a!startprocess() in the button's saveInto.

  • January 17, 2024
  • 4 replies
  • 0 views

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)
                }
              )
            )
 )

)

    4 replies

    rithanir5887
    January 17, 2024

    Hello [mention:b24ee39fbc9e4227b0316562e1fc79fd:e9ed411860ed4f2ba0265705b8793d05] ,

    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. 

    hiron0583Author
    January 17, 2024

    [mention:07e65f9e440e41fdad9b01615263f43d:e9ed411860ed4f2ba0265705b8793d05]  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?

    harshitb6843
    January 17, 2024

    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?