What are the steps to reproduce your problem?
1. Deploy the attached process (one user task with output mapping)
2. Start the process instance (you can try to complete the task from Tasklist without providing any variables, you should get the error in return)
3. Delete process instance with with skipIoMapping set to false - no matter from Cockpit or from REST API.
What is the problem?
Following error will be returned:
The deletion of the process instance failed. Process instance with id 6132d4bc-e660-11e8-b962-34f39ab71d4e does not exist
What would be the expected behavior:
The real error is related with output mapping failure and is shown in log like PropertyNotFoundException: Cannot resolve identifier 'var'. The error shown in Cockpit and reported in REST API should reflect the real problem (rather than saying that process instance does not exist).
- The Java API should raise a NotFoundException when a process instance does not exist
- Instead of converting any ProcessEngineException into a 404, the REST API should only do this for NotFoundException. Other exceptions should lead to status code 500.