AnsweredAssumed Answered

runtime service does not return running process

Question asked by flavio.donze on Sep 12, 2011
Latest reply on Sep 12, 2011 by flavio.donze

I have a process which in certain cases does not require any userTask.
In one of the serviceTasks I'm accessing the Activiy RuntimeService to receive all the running processes.

for (ProcessInstance processInstance : runtimeService.createProcessInstanceQuery().list()) {
   System.out.println("RUNNING>: " + processInstance.getId());
Well the current running process is not in the query result.
Is this a normal behavior or could this be because of my Spring JPA environment?
As soon as the process comes upon a userTask and afterwards to the mentioned serviceTask, the current process is listed. Probably because it is then written into the database.  

Appreciate any hint or maybe workaround!