Discussion:
[jboss-user] [jBPM] - Jbpm 5 listing processes
roxy1987
2013-01-02 15:17:00 UTC
Permalink
roxy1987 [https://community.jboss.org/people/roxy1987] created the discussion

"Jbpm 5 listing processes"

To view the discussion, visit: https://community.jboss.org/message/787075#787075

--------------------------------------------------------------
Hi,

I am working on a web application and ve been able to achieve task related stuff, thanks to the community. I am looking for some process related APIs. to list processes and stuff.
I use a TaskClient to connect and a BlockingTaskOperationResponseHandler to get the response. Is there a similar client for processes?
Any help would be highly appreciated. Thanks.

Regards.
--------------------------------------------------------------

Reply to this message by going to Community
[https://community.jboss.org/message/787075#787075]

Start a new discussion in jBPM at Community
[https://community.jboss.org/choose-container!input.jspa?contentType=1&containerType=14&container=2034]
Maciej Swiderski
2013-01-03 10:26:19 UTC
Permalink
Maciej Swiderski [https://community.jboss.org/people/swiderski.maciej] created the discussion

"Re: Jbpm 5 listing processes"

To view the discussion, visit: https://community.jboss.org/message/787290#787290

--------------------------------------------------------------
Take a look at http://docs.jboss.org/jbpm/v5.4/javadocs/ api docs and most important for you will be StatefulKnowledgeSession.getKnowledgeBase().getProcesses()

HTH
--------------------------------------------------------------

Reply to this message by going to Community
[https://community.jboss.org/message/787290#787290]

Start a new discussion in jBPM at Community
[https://community.jboss.org/choose-container!input.jspa?contentType=1&containerType=14&container=2034]
roxy1987
2013-01-03 15:10:59 UTC
Permalink
roxy1987 [https://community.jboss.org/people/roxy1987] created the discussion

"Re: Jbpm 5 listing processes"

To view the discussion, visit: https://community.jboss.org/message/787355#787355

--------------------------------------------------------------
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.





StatefulKnowledgeSession ksession = kbase.newStatefulKnowledgeSession();
HornetQHTWorkItemHandler humanTaskHandler =
**new** HornetQHTWorkItemHandler(ksession);humanTaskHandler.setIpAddress(
"127.0.0.1");humanTaskHandler.setPort(5153);
ksession.getWorkItemManager().registerWorkItemHandler(
"Human Task", humanTaskHandler);
**return** ksession;
I am guessing that the workItemHandler might be a problem. This version is just a lot different from jbpm 4 so most of my RND includes hit and trial.

Thanks.



--------------------------------------------------------------

Reply to this message by going to Community
[https://community.jboss.org/message/787355#787355]

Start a new discussion in jBPM at Community
[https://community.jboss.org/choose-container!input.jspa?contentType=1&containerType=14&container=2034]
Maciej Swiderski
2013-01-03 15:54:47 UTC
Permalink
Maciej Swiderski [https://community.jboss.org/people/swiderski.maciej] created the discussion

"Re: Jbpm 5 listing processes"

To view the discussion, visit: https://community.jboss.org/message/787370#787370

--------------------------------------------------------------
so 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
--------------------------------------------------------------

Reply to this message by going to Community
[https://community.jboss.org/message/787370#787370]

Start a new discussion in jBPM at Community
[https://community.jboss.org/choose-container!input.jspa?contentType=1&containerType=14&container=2034]
roxy1987
2013-01-03 16:23:58 UTC
Permalink
roxy1987 [https://community.jboss.org/people/roxy1987] created the discussion

"Re: Jbpm 5 listing processes"

To view the discussion, visit: https://community.jboss.org/message/787381#787381

--------------------------------------------------------------
No. I am looking for process instances, whether running, completed or terminated. Could you please tell me how the history logging is enabled? Thanks.
--------------------------------------------------------------

Reply to this message by going to Community
[https://community.jboss.org/message/787381#787381]

Start a new discussion in jBPM at Community
[https://community.jboss.org/choose-container!input.jspa?contentType=1&containerType=14&container=2034]
Maciej Swiderski
2013-01-03 16:55:35 UTC
Permalink
Maciej Swiderski [https://community.jboss.org/people/swiderski.maciej] created the discussion

"Re: Jbpm 5 listing processes"

To view the discussion, visit: https://community.jboss.org/message/787385#787385

--------------------------------------------------------------
http://docs.jboss.org/jbpm/v5.4/userguide/ch.core-persistence.html#d0e3856 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
--------------------------------------------------------------

Reply to this message by going to Community
[https://community.jboss.org/message/787385#787385]

Start a new discussion in jBPM at Community
[https://community.jboss.org/choose-container!input.jspa?contentType=1&containerType=14&container=2034]
roxy1987
2013-01-03 17:35:11 UTC
Permalink
roxy1987 [https://community.jboss.org/people/roxy1987] created the discussion

"Re: Jbpm 5 listing processes"

To view the discussion, visit: https://community.jboss.org/message/787391#787391

--------------------------------------------------------------
Thanks Maciej. You should start coming here more regularly. People wont have trouble getting jBPM5 :)
Thanks a lot man.
--------------------------------------------------------------

Reply to this message by going to Community
[https://community.jboss.org/message/787391#787391]

Start a new discussion in jBPM at Community
[https://community.jboss.org/choose-container!input.jspa?contentType=1&containerType=14&container=2034]
Maciej Swiderski
2013-01-03 17:50:51 UTC
Permalink
Maciej Swiderski [https://community.jboss.org/people/swiderski.maciej] created the discussion

"Re: Jbpm 5 listing processes"

To view the discussion, visit: https://community.jboss.org/message/787394#787394

--------------------------------------------------------------
trying to be as often as possible :)
--------------------------------------------------------------

Reply to this message by going to Community
[https://community.jboss.org/message/787394#787394]

Start a new discussion in jBPM at Community
[https://community.jboss.org/choose-container!input.jspa?contentType=1&containerType=14&container=2034]
Loading...