[jboss-user] [JBoss jBPM] - Re: Best way to get audit or history information

swatis do-not-reply at jboss.com
Fri Jun 26 00:56:02 EDT 2009

 to get list of process instances for particular process provide processdefinition id
Query query = session.getNamedQuery("GraphSession.findAllProcessInstancesForADefinition");
  |       query.setLong("processDefinitionId", processDefinitionId);
  |       java.util.List processInstances = query.list();

Iterate these instances and for one instance get list of task instances by invoking method of process instance object
  java.util.List taskList = processInstance.getTaskMgmtInstance().getTaskInstances();

you can also use this query to get list of all process definitions
 Query query = session.getNamedQuery("GraphSession.findAllProcessDefinitions");

to get list of all process instances
Query query = session.getNamedQuery("GraphSession.findAllProcessInstances
  | ");

For each task instance use 
taskIns.getActorId();  taskIns.getStart();  taskIns.getEnd();

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

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

More information about the jboss-user mailing list