While trying to remove a process variable during the processes runtime I’m getting the following exception, although the process instance certainly exists since I’m getting its instance id from within. Isn’t the terminology in this exception wrong too? Shouldn’t it be “process instance is null” instead of “execution is null” when calling Delete Process Variable | docs.camunda.org?
WARNING: org.camunda.bpm.engine.rest.exception.RestException: Cannot delete process instance variable ServiceTask_0l4wtja: execution 462a972f-50cf-11ea-93af-00ff29e821a6 doesn't exist: execution is null
at org.camunda.bpm.engine.rest.sub.impl.AbstractVariablesResource.deleteVariable(AbstractVariablesResource.java:184)
at java.base/jdk.internal.reflect.NativeMethodAccessorImpl.invoke0(Native Method)
at java.base/jdk.internal.reflect.NativeMethodAccessorImpl.invoke(NativeMethodAccessorImpl.java:62)
at java.base/jdk.internal.reflect.DelegatingMethodAccessorImpl.invoke(DelegatingMethodAccessorImpl.java:43)
at java.base/java.lang.reflect.Method.invoke(Method.java:567)
After searching this forum for a bit I found a possible solution here in the comments Process instance Id null - #2 by Zelldon, but this doesn’t fix the issue.
How do I reason about the state of my process? Are the asynchronous continuations my only method to reason about the current state of process instances in the database?