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.
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.
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();
Thanks Swati for the code snippet, I will give it a try.