Discussion posts and replies are publicly visible
Is your process model chained? I thought the web API would return the values of the variables at the point that chaining stops.
Yes, all the process has the activity chaining until the End Event node, the problem is the function a!starprocess used in the web Api , this function start the process asynchornously and we need to collect the values of the process variables when it had finished and it doesnt do that, the web api return the values when the process is not finished yet.
The documentation for the Start Process Smart Service suggests that the function does take account of activity chaining.
"This smart service follows activity-chaining, completing only when the activity chain is complete or broken. The smart service then returns the process variables as of the completion of activity chaining through the processInfo.pv output"
processInfo.pv
We dont use the startprocess smart service, we use a web api and in that web api we use a!startprocess and we pass to the process the input parameters of that webapi since this webapi is called from angular (front) and runs the engines internally, the processes have all the activity chaining, The objective is when this process had finished , return in the hhtpresponse of the webapi the process variables because Angular needs the values of the completed process to work with them.
a!startProcess is provided by the Start Process Smart Service (https://docs.appian.com/suite/help/18.4/Start_Process_Smart_Service.html)
Yes, but the process starts asynchronously and therefore the web api returns data without having finished the process, we need to return the process variables once the process is finished.
We are testing the web api with which starts the process from Postman and returns empty data when the process is very long even put the Activity Chaining.
So how are you starting the process model asynchronously via a!startProcess as there does not appear to be a parameter for that?
Also, have you ensured that the initiator of the Web API has Viewer access to the process model? If they only have Initiator access they will not be able to see the process instance properties, process variables, etc.?
The first point is that you had said and the second , we have editor privilegies.
Sorry the question was how are you starting the process model asynchronously as the function a!startProcess does not appear to have a parameter that allows you to specify that you want the process model started asynchronously?
Actually the context sensitive help for the a!startprocess function states 'Asynchronously starts a process using the provided parameters', which suggests that it does only start a process model asynchronously (but a simple test process model and Web API expression suggests that is not the case)