This content has been marked as final.
Show 1 reply
-
1. Re: workflow(API) to retrieve data from table of jBPM internal database(H2)
arunvg Feb 17, 2012 5:20 AM (in response to a02918)If you want to get the data of
- ProcessInstances , Session details - Use the methods in the object of knowledgeSession you have created (org.drools.runtime.StatefulKnowledgeSession)
- Tasks - Use the methods in the task client object connected to the task server (org.jbpm.task.service.TaskClient)
- ProcessInstanceLog,NodeInstanceLog,VariableInstanceLog - Use the methods in JPAProcessInstanceDbLog object create after enabling the JPAWorkingMemoryDbLogger (org.jbpm.process.audit.JPAProcessInstanceDbLog)
Check the code attached to https://community.jboss.org/people/bpmn2user/blog/2011/09/21/jbpm5-web-example for how to create Session , task client
For creating JPAProcessInstanceDbLog object refer the below code
//Enabling the history Service JPAWorkingMemoryDbLogger workingMemoryDbLogger = new JPAWorkingMemoryDbLogger(knowledgeSession); // Get the JPA interface for History service JPAProcessInstanceDbLog historyService = new JPAProcessInstanceDbLog(knowledgeSession.getEnvironment());
Cheers