AnsweredAssumed Answered

processInstance.isEnded never gives correct status

Question asked by gs76pl on May 5, 2011
Latest reply on Jul 7, 2015 by jbarrez
hi,

this seems like a basic question but it looks like any call to processInstance.isEnded never returns TRUE even when the actual process has been completed. I suspect that in in order to get actual process status one should execute a process query like below

ProcessInstanceQuery pq = runtimeService.createProcessInstanceQuery().processInstanceId(pid);
ProcessInstance pi = pq.singleResult();

but even with this query when the process has been completed pi variable is null. Bearing that all in mind what is the purpose of having isEnded method when one never gets correct results while using it?

Outcomes