[jboss-user] [jBPM] - jBPM5.2 KnowledgeBase Behaviour

pushpak1981 do-not-reply at jboss.com
Thu Mar 15 10:52:26 EDT 2012


pushpak1981 [https://community.jboss.org/people/pushpak1981] created the discussion

"jBPM5.2 KnowledgeBase Behaviour"

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

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

We have configured jBPM5.2 with Spring3. In our project we are trying to start multiple processes using a single session. We are using spring threadingpool to execute multiple process into the same session.

Our requirement is that we want the current active processes into the session. We can get it from session.getProcessInstanceMethod(). \

This call is working fine when we directly lookup for ksession for springs cotainer.

StatefulKnowledgeSession b = (StatefulKnowledgeSession) ctx.getBean("ksession"); 
System.out.println(b.getProcessInstances().size() + "---" + b.getId());  /// Print 2 as 2 processes are running in spring thread pool


But when we try to get the same process list using the KnowledgeBase we get list size as 0.

KnowledgeBase b = (KnowledgeBase) ctx.getBean("kbase");
System.out.println(b.getStatefulKnowledgeSessions().size());   /// Retruns 1 as we have one session configured in Spring application context xml
 
for (StatefulKnowledgeSession s : b.getStatefulKnowledgeSessions()) {
        System.out.println(s.getProcessInstances().size() + "---" + s.getId());   //Returns Size as 0. even if 2 processes are running and are into wait state.
    }
 


Are we doing anything wrong in case of KnowledgeBase API ? How we can get the Active process list from the KnowlegdeBase API ? 

Thanks.
--------------------------------------------------------------

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

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

-------------- next part --------------
An HTML attachment was scrubbed...
URL: http://lists.jboss.org/pipermail/jboss-user/attachments/20120315/25e3cb22/attachment.html 


More information about the jboss-user mailing list