[jboss-user] [JBoss jBPM] - Finding all running process instances for a process definiti

nbhatia do-not-reply at jboss.com
Tue Oct 7 18:01:53 EDT 2008

How do I find all running process instances for a process definition? I tried GraphSession.findProcessInstances(long processDefinitionId), but this method returns all process instances including those that have ended (potentially a very expensive query).

I found the following named query in hibernate.queries.hbm.xml. This is exactly what I need, but I cannot find any method in the source that uses this query.

  |   <query name="GraphSession.findAllRunningProcessInstancesWithProcessName">
  |     <![CDATA[
  |       select pi
  |       from org.jbpm.graph.exe.ProcessInstance as pi
  |       where pi.processDefinition.name = :processDefinitionName
  |         and pi.end = null
  |       order by pi.start desc
  |     ]]>
  |   </query>

Can someone tell me how I can leverage this query? (I am using jBPM 3.2.3).


View the original post : http://www.jboss.com/index.html?module=bb&op=viewtopic&p=4180894#4180894

Reply to the post : http://www.jboss.com/index.html?module=bb&op=posting&mode=reply&p=4180894

More information about the jboss-user mailing list