1 Reply Latest reply: Feb 17, 2012 5:20 AM by Arun V G RSS

workflow(API) to retrieve data from table of jBPM internal database(H2)

Karthikeyan Sekar Newbie

Hi Team,

       I am working on jBPM 5.2. Is there any workflow(API) to retrieve data from table of jBPM internal database(H2)?.When will you release jBPM5 book?.

 

 

 

Regards,

Karthikeyan

  • 1. Re: workflow(API) to retrieve data from table of jBPM internal database(H2)
    Arun V G Newbie

    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