-
1. Re: How to find the last action party
salaboy21 Oct 21, 2011 8:35 AM (in response to ossa)Hm.. I'm trying to understand your requirements here..
So you want to find out who was the last person of completing a task related with a process right?
If that's the requirement, yes a named query will be the answer.
Take a look at the orm.xml file provided inside the jbpm-human-task module to add an extra query that recieves the process instance ID and order the task by the last completed within that process instance. The syntax for the named queries is standard (JPAQL - HQL) syntax so you can find tons of examples if you google JPA named queries or JPA QL.
Cheers
PS: first hit-> http://download.oracle.com/javaee/5/tutorial/doc/bnbtg.html
-
2. Re: How to find the last action party
ossa Oct 23, 2011 9:33 PM (in response to salaboy21)Thanks for the fast reponse. I will try it out.
-
3. Re: How to find the last action party
ossa Oct 23, 2011 10:38 PM (in response to salaboy21)Hi Mauricio, I had briefly went through the tutorial and some other pages on the internet.
So should I create my own EntityManager and use its createNamedQuery(String arg0) method to execute the query?
Or I can actually use the query(qlString, size, offset, responseHandler) method of org.jbpm.task.service.TaskClient class for convinience?
If I can, how do I pass in the processInstanceId into this query method?