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