Greetings. As part of our application, I need to display all running process 
instances. I originally wrote some code to get all definitions 
(GraphSession.findAllProcessDefinitions()) and then, for each definition get 
the process instances (GraphSession.findProcessInstances(defnId)). It does what 
I need, but is very slow.

I am trying to write a hib query to get the process instances in one db access. 
 I'd like the results grouped by process definition name and version.


  | String q = "from org.jbpm.graph.exe.ProcessInstance as pi" + 
  |     " where pi.end is null" +
  |     " order by pi.processDefinition.name pi.processDefinition.version 
pi.start " ;
  |     Query qry = jbpmContext.getSession().createQuery(q);
  |     result = qry.list();
  | 

This produces the following error:

  | 12:52:18,962 ERROR ErrorCounter : line 1:82: unexpected token: pi
  | 12:52:18,962 WARN  HqlParser : processEqualityExpression() : No expression 
to process!
  | 12:52:18,962 ERROR Utility : unexpected token: pi near line 1, column 82 
[from org.jbpm.graph.exe.ProcessInstance as pi
  | order by pi.processDefinition.name pi.processDefinition.version pi.start ]
  | 

Any suggestions? Thanx.



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

Reply to the post : 
http://www.jboss.com/index.html?module=bb&op=posting&mode=reply&p=3959966
_______________________________________________
jboss-user mailing list
jboss-user@lists.jboss.org
https://lists.jboss.org/mailman/listinfo/jboss-user

Reply via email to