Dear Flowable experts,
we have observed the following behavior in our application. In a JavaDelegate
extension and in Flowable Event Listeners we have, we query for the process instance of interest with the following query (or equivalent):
ProcessInstance processInstance = processEngineConfiguration.getRuntimeService().createProcessInstanceQuery()
.processInstanceId(execution.getProcessInstanceId()).singleResult();
For some occasions, the ProcessInstance
object returned contains a proper processDefinitionKey
, for the others - not. As we need the processDefinitionKey
in our scenario, we are forced to make an additional ProcessDefinitionQuery
.
Is it an expected behavior that the processDefinitionKey
of a ProcessInstance
is not always in place? If yes, could you maybe give some guidance on when we could expect it and when not?
Thank you!
Best regards,
Vasil