- 
        1. Re: How to view historical process instances in bpm6.0.1?jay.guidos-bidstrading.com Feb 18, 2014 9:34 AM (in response to suraj.bahl.50)If you are using CDI you can inject an instance of RuntimeDataService which will query the JPA database: @Inject private RuntimeDataService rds; public void reportProcessInstances(List<Integer> states, String processId) { for (ProcessInstanceDesc pid : rds.getProcessInstancesByProcessId(allStates, processId, null)) ... }HTH, Jay 
- 
        2. Re: How to view historical process instances in bpm6.0.1?swiderski.maciej Feb 19, 2014 4:29 AM (in response to jay.guidos-bidstrading.com)on top of what Jay has already provided you can use directly the AuditLogService to get access to history data. HTH 
- 
        3. Re: How to view historical process instances in bpm6.0.1?suraj.bahl.50 Feb 19, 2014 12:22 PM (in response to suraj.bahl.50)Hi, I tried to fetch the process instance by injecting RuntimeDataService as mentioned by Jay using following method: ProcessIntanceDesc processInstanceDesc = rds.getProcessInstanceById(processID); But I am getting following error: java.lang.IllegalArgumentException: Named query not found: getProcessInstanceById Do i need to include add some other jar to include the queries executed by RuntimeDataServiceImpl? regards, Suraj 
 
- 
        4. Re: How to view historical process instances in bpm6.0.1?jay.guidos-bidstrading.com Feb 19, 2014 2:02 PM (in response to suraj.bahl.50)HI Suraj, That particular query is in jbpm-kie-services. If you want, you can include all these maven dependencies (below). You may or may not need them all, so if you prefer you can add them one at a time. Jay <dependency> <groupId>org.jbpm</groupId> <artifactId>jbpm-flow</artifactId> <scope>compile</scope> </dependency> <dependency> <groupId>org.jbpm</groupId> <artifactId>jbpm-flow-builder</artifactId> <scope>compile</scope> </dependency> <dependency> <groupId>org.jbpm</groupId> <artifactId>jbpm-bpmn2</artifactId> <scope>compile</scope> </dependency> <dependency> <groupId>org.jbpm</groupId> <artifactId>jbpm-persistence-jpa</artifactId> <scope>compile</scope> </dependency> <dependency> <groupId>org.jbpm</groupId> <artifactId>jbpm-human-task-core</artifactId> <scope>compile</scope> </dependency> <dependency> <groupId>org.jbpm</groupId> <artifactId>jbpm-human-task-audit</artifactId> <scope>compile</scope> </dependency> <dependency> <groupId>org.jbpm</groupId> <artifactId>jbpm-runtime-manager</artifactId> <scope>compile</scope> </dependency> <dependency> <groupId>org.jbpm</groupId> <artifactId>jbpm-kie-services</artifactId> <scope>compile</scope> </dependency> <dependency> <groupId>org.jbpm</groupId> <artifactId>jbpm-executor</artifactId> <scope>compile</scope> </dependency> <dependency> <groupId>org.jbpm</groupId> <artifactId>jbpm-kie-services</artifactId> <scope>compile</scope> </dependency> <dependency> <groupId>org.kie</groupId> <artifactId>kie-internal</artifactId> <scope>compile</scope> </dependency> <dependency> <groupId>org.jbpm</groupId> <artifactId>jbpm-workitems</artifactId> <scope>compile</scope> </dependency> 
- 
        5. Re: How to view historical process instances in bpm6.0.1?suraj.bahl.50 Feb 20, 2014 9:38 AM (in response to suraj.bahl.50)Hi Jay, I have already included all the jars which are generated in jBPM runtime folder at the time of installation. The jar "jbpm-kie-services-6.0.1.Final.jar" already exist in my lib folder then any clue why it would not be able to find the query... Thanks, Suraj 
- 
        6. Re: How to view historical process instances in bpm6.0.1?swiderski.maciej Feb 20, 2014 10:38 AM (in response to suraj.bahl.50)Suraj, you need to include Servicesorm.xml mapping file in your persistence.xml so the named queries will be available. See here for an example. HTH 
- 
        7. Re: How to view historical process instances in bpm6.0.1?suraj.bahl.50 Feb 21, 2014 7:22 AM (in response to suraj.bahl.50)Hi Maciej, I'll try that... However, in general i have a question that where can i find all this information? is there any documentation available? I went through jbpm 6 documentation but didn't find anything mentioning about RunTimeDataService or Servicesorm.xml... Regards, Suraj 
- 
        8. Re: How to view historical process instances in bpm6.0.1?swiderski.maciej Feb 21, 2014 7:31 AM (in response to suraj.bahl.50)
- 
        9. Re: How to view historical process instances in bpm6.0.1?suraj.bahl.50 Feb 21, 2014 12:13 PM (in response to suraj.bahl.50)I have added Servicesorm.xml in my persistence.xml and now i am getting following error on calling: ProcessInstanceDesc processInstanceLog = runtimeDataService.getProcessInstanceById(processInstance.getId()); Error: 12:05:01,705 ERROR [stderr] (http-localhost-127.0.0.1-8080-1) java.lang.IndexOutOfBoundsException: Index: 0, Size: 0 12:05:01,705 ERROR [stderr] (http-localhost-127.0.0.1-8080-1) at java.util.ArrayList.RangeCheck(Unknown Source) 12:05:01,705 ERROR [stderr] (http-localhost-127.0.0.1-8080-1) at java.util.ArrayList.get(Unknown Source) 12:05:01,705 ERROR [stderr] (http-localhost-127.0.0.1-8080-1) at org.jbpm.kie.services.impl.RuntimeDataServiceImpl.getProcessInstanceById(RuntimeDataServiceImpl.java:169) 
- 
        10. Re: How to view historical process instances in bpm6.0.1?swiderski.maciej Feb 26, 2014 2:57 AM (in response to suraj.bahl.50)that indicates there is no such process instance, with given id. Might be that logging was not enabled and thus it does not store any data. HTH 
- 
        11. Re: How to view historical process instances in bpm6.0.1?suraj.bahl.50 Feb 26, 2014 4:13 PM (in response to swiderski.maciej)Process instance was there. How can i enable the logging? 
- 
        12. Re: How to view historical process instances in bpm6.0.1?suraj.bahl.50 Feb 26, 2014 8:52 PM (in response to suraj.bahl.50)I am able to see the process from auditservice after removing InjectableRegisterableItemsFactory from my RuntimeEnvironment. 
 
     
    