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
Hi walkers0001,
Seems like your process might break the activity chain and hence the save executes sooner. To know why a chain breaks, please refer to this link- https://docs.appian.com/suite/help/21.3/Process_Model_Recipes.html#breaking-a-chain
I assume that your goal is to get the documents on a button click and show it to the users - If that's the case & if your process takes 1 - 3 minutes to complete. then I would recommend having a follow-up query on the process details rather than saving it on success. We can get the process ID from the onsuccess part & then use it to query data after some delay in the interface.
Chaining has some restrictions. AFAIK it is not more than 50 nodes and also a limit in time. I am pretty sure it is less than 1-3 minutes.
You will need to change your approach. You might try to refresh the UI in an interval checking for process status. Once completed, read the data from process and display it to the user.
Thank you Selvakumar Kumarasamy and . I am unfamiliar with querying data from a process, would this be done with a process report? Any guidance on how to query the process status and its data would be greatly appreciated!
That would be a process report. Yes. Check this
docs.appian.com/.../Process_Reports.html
https://docs.appian.com/suite/help/21.3/fnc_system_a_queryprocessanalytics.html