a!startProcess on button click executes the save in OnSuccess parameter before process finishes

I am executing a process model from an interface on button click using a!startProcess, and saving some of the process variables (lists) on the OnSuccess parameter of a!startProcess into UI variables. The process model has chaining enabled on all connections, both in the parent process and two sub-processes.  Both sub processes run synchronously, and execute at the same time.  In both sub processes, I loop over an integration using a counter variable (not MNI).

The issue that I am seeing is that the saves on the OnSuccess parameter of a!startProcess execute before the process is complete, so I either get no results from the process at all, or partial lists.  When I monitor the process, it executes successfully and all the expected values are there.

How can I ensure that the entire process executes before the OnSuccess saves execute?   The process typically takes between 1-3 minutes to finish.


Note: The goal of this process is to loop over an integration that can only download 1 document at a time.  If there is a better way to perform this looping, I am open to suggestions.

  Discussion posts and replies are publicly visible