I have a GET web API which is consumed by third party, my GET API calls other POST API and there I am triggering a process and generating a user task, in my GET API i am also generating a process report to get task id using process id i get from POST API and than generating a url for the task and redirecting url as response of GET API.
But sometime i am getting 500 error message and after initial analysis I get to know process report is slow and by the time web api triggers process and query report, entry is not added in report and so task id is return as null because of this, third party getting 500 server error.
Any suggestion how can I resolve this error ?
Discussion posts and replies are publicly visible
In your process model can you not implement a loop with a short wait so as to ensure that the process report is successfully returning the required Task Id and only then returning control to the GET API?
Ok but AFAIK a!startprocess is asynchronous process, even i add a timer and try delay process, web api will just trigger process and come back, it will not wait for timer activity to finish. Please suggest if i am wrong here and if there is any other way to delay response of a!startprocess in post api.
According to the documentation you can chain the process model than thus prevent returning control to the calling WebAPI until it is completed:
docs.appian.com/.../Start_Process_Smart_Service.html