AnsweredAssumed Answered

Activiti random behaviour

Question asked by ravenblackdusk on Nov 28, 2017
Latest reply on Nov 29, 2017 by ravenblackdusk

I'm creating a process instance as such:

 

processInstance = runtimeService.startProcessInstanceByKeyAndTenantId(key, initialParameters, tenantId + (isTest ? TEST_TENANT_SUFFIX : PRODUCTION_TENANT_SUFFIX));

 

which always returns a processInstance, but sometimes(seemingly randomly) the returned process instance does not exist in the database:

 

historyService.createHistoricProcessInstanceQuery().processInstanceId(processInstance.getId()).singleResult() == null

runtimeService.createProcessInstanceQuery().processInstanceId(processInstance.getId()).singleResult() == null

 

I've also logged the mariadb queries and I've noticed that the times that the instance does not exist; no insert queries are logged in the database, so the process instance was not inserted and then deleted.

 

these problems started appearing after migrating to activiti6

Outcomes