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