If we want to delete super process instance and sub process instance via deleteProcessInstances we get a NPE.
If we use the async method we got:
org.camunda.bpm.engine.BadUserRequestException: No process instance found for id '10': processInstance is null .
We should ensure that if the subprocess is already deleted, we should skip deleting it again.
How to reproduce:
- Change RuntimeServiceAsyncOperationsTest#testDeleteProcessInstancesAsyncWithoutSkipSubprocesses to:
- Add test in CallActivityTest: