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
Hello We had the same issue while using a!startprocess model onsucess in Post API .
on which we were having issue such that onsuccess was giving http 200 success while the process was still in progress and not completed , we had activity chain enabled was fulfilling every criteria but before writing the data to database onsuccess was getting 200 success and not getting updated data
your suggestion would be helpfull
You write "we had activity chain enabled was fulfilling every criteria". What does that mean for you?
I need to see that process model.
Hi Stefan Helzle , harshjan , I am getting this error : Not a valid Web API Response. Received: [Lcom.appiancorp.core.data.Record;@428f85c0 in my community edition site when I Created a Post WebAPI with a process model to consume the data using write records. My observation was the json was getting succesfuly consumed by the process model and was writting in records with no errors but my WEBAPI object was giving me 500 error.
any idea where it is breaking , also when i set content-type to application/json my response after pushing json is showing content-type text/plain; charset=ISO88599-1.
your inputs will be helpful.
thanks in advance.
Can you try to remove the curly brackets around the tojson() call in the body.
removed them nothing changed same error , is there anything special we need to do when we are using record type.
i think it is the records causing error.