we have one business process that sends data to a target system and awaits acknowledgement. It happens often, that the acknowledgement does not arrive on time and the process times out and fails. Simply increasing timeout will not solve the problem, as the system that generates the acknowledgements is often down / unreachable.
The issue we are facing is that after we resubmit a failed process, it will fail again because acknowledgement will never arrive. But data have been sent successfully.
We would like to handle these timeouts as follows:
When a process is resubmitted and step that sends data finished successfully, the process should (after it times out) be marked as completed instead of failed. So the solution support can get rid of resubmitted processes that finished successfully, but timed out again. These should be marked as completed.
I can get process iteration from service pub.monitor.process.instance:getInstance and when data/instanceIteration > 1 => the process was resubmitted.
I can get status of the step that sends data by calling service pub.monitor.process.instanceSteps:getStepDetails and find out whether that step completed successfully or failed.
If completed successfully, I need to change process status to completed.
And my question is, how can I achieve that?
I found services:
According to documentation, both services can change status only to SUSPEND, RESUME, CANCEL or FAIL. What is not what I am looking for. I need to change process status to COMPLETED.
Furthermore, what is the difference between these two services? We mostly use pub.prt.admin:changeProcessStatus only.
I hope there exists a way how to change it using a service. I really do not want to change process status directly in WM database.