-
1. Re: Jbpm 5 listing processes
swiderski.maciej Jan 3, 2013 5:26 AM (in response to roxy1987)Take a look at api docs and most important for you will be StatefulKnowledgeSession.getKnowledgeBase().getProcesses()
HTH
-
2. Re: Jbpm 5 listing processes
roxy1987 Jan 3, 2013 10:15 AM (in response to swiderski.maciej)Thanks for a quick reply Maciej.
I have tried using StatefulKnowledgeSession.
StatefulKnowledgeSession ksession = createKnowledgeSession(kBase);
ksession.getProcessInstances();
But it returns me an empty string always. May be I am not creating the session well?
What I am doing is the following.
I am mostly doing hit and trial as the version is pretty different from previous one and I am in a little bit if a hasty situation with the project. I am guessing that the WorkItemHandler should not be registered as string Human Task? but it works with starting the process so may be.
Anyway may be you could help with this. Thanks a million.
-
3. Re: Jbpm 5 listing processes
swiderski.maciej Jan 3, 2013 10:54 AM (in response to roxy1987)1 of 1 people found this helpfulso you want to list processes or process instances?
for processes use kBase.getProcesses()
for process instances you should enable history log and then use query methods to get active process instances from log entries as (you already noticed) runtime will load process instance only when it's needed - while it being executed.
HTH
-
4. Re: Jbpm 5 listing processes
roxy1987 Jan 3, 2013 11:23 AM (in response to swiderski.maciej)No. I am looking for process instances, whether running, completed or terminated. Could you please tell me how the history logging is enabled? Thanks.
-
5. Re: Jbpm 5 listing processes
swiderski.maciej Jan 3, 2013 11:55 AM (in response to roxy1987)Here you can find details on how to configure it and then you can use org.jbpm.process.audit.JPAProcessInstanceDbLog to query for stored information.
HTH
-
6. Re: Jbpm 5 listing processes
roxy1987 Jan 3, 2013 12:35 PM (in response to swiderski.maciej)Thanks Maciej. You should start coming here more regularly. People wont have trouble getting jBPM5
Thanks a lot man.
-
7. Re: Jbpm 5 listing processes
swiderski.maciej Jan 3, 2013 12:50 PM (in response to roxy1987)trying to be as often as possible