-
1. Re: Best way to get audit or history information
swatis Jun 25, 2009 1:59 PM (in response to sbhatti)in web console, you can get the information like number of process instances running, ended, suspended and so on... For each process instance tasks completed, running, assigned user, started date, ended date, etc. this information is available. i will give you piece of code to get the same information tomorrow morning. basically you need to fire queries to database to get the process instance information.
-
2. Re: Best way to get audit or history information
sbhatti Jun 25, 2009 2:24 PM (in response to sbhatti)Let me know if you have any query APIs that I can use as from looking at the JBPM_LOG table, it seems like there are multiple rows per task transition and is not clear how to aggregate all that information for each transition. Thanks.
-
3. Re: Best way to get audit or history information
swatis Jun 26, 2009 12:56 AM (in response to sbhatti)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 instancesQuery query = session.getNamedQuery("GraphSession.findAllProcessInstances ");
For each task instance usetaskIns.getActorId(); taskIns.getStart(); taskIns.getEnd();
-
4. Re: Best way to get audit or history information
sbhatti Jun 29, 2009 1:57 PM (in response to sbhatti)Thanks Swati for the code snippet, I will give it a try.