Hi.
My camunda spring boot app sometimes could not find again generated process instance id.
My start instance code:
ProcessInstance processInstance = camunda.getRuntimeService().startProcessInstanceByKey(theProcessName, variables);
My retrieve code after few minutes:
RuntimeService runtimeService = camunda.getRuntimeService();
ProcessInstanceQuery instanceQuery = runtimeService.createProcessInstanceQuery().processInstanceId(instanceId);
ProcessInstance pi = instanceQuery.singleResult();
Do you have any same experience? And what is your solutions?
It’s a little sensitive so I can show U the image.
After I retried to submit it worked correctly and I could found the Process Instance at the Review step
@aravindhrs
I couldn’t found any incident.
An other thing, It seems the instance was not committed to the database. So I couldn’t found any relate record to the process instance id in any history table.
We are using camunda 7.10.0 with Oracle Database 11g Enterprise Edition Release 11.2.0.1.0 - 64bit Production.
Do you think the database session was terminated somehow?
@quang0804 if the process is executed in synchronous manner and if any exceptions occurred in between before the execution reaches the user task, engine won’t commit the instance data to db. Check if there are any exceptions in server logs.
You can try to reproduce the issue by starting the process asynchronously. This way engine will persist the data even if the execution failed.
Is it possible that the process is already completed by the time you query it? Then you won’t find it via the runtime service. You should use the history service then.