[rules-users] kcontext.getKnowledgeRuntime() returns StatefulKnowledgeSessionImpl even when session is started as a CommandBasedStatefulKnowledgeSession

Darin Wilcox zoikks at gmail.com
Wed Sep 5 12:38:45 EDT 2012


Hi,

In my project, I have created a StatefulKnowledgeSession that is
persistent.  The StateulfKnowledgeSession implementation is the
CommandBasedStatefulKnowledgeSession.  From this
CommandBasedStatefulKnowledgeSession, I started a workflow that contains a
SignalEvent waiting for something to signal into that process.

I then started a second process that contains only an action node with the
following code:

kcontext.getKnowledgeRuntime().signalEvent("TestSignal2", "from
SignalHello");     // Should broadcast to all other processes currently
running in this session.

The signal is never received by the first process because the
kcontext.getKnowledgeRuntime() that is trying to signal the event uses an
instance of StatefulKnowledgeSessionImpl not
CommandBasedStatefulKnowledgeSession.  Can anyone explain why the
kcontext.getKnowledgeRuntime() returns a different instance of the
StatefulKnowledgeSession than the one it was started with?  Is this a bug?

Thanks,

- Darin
-------------- next part --------------
An HTML attachment was scrubbed...
URL: http://lists.jboss.org/pipermail/rules-users/attachments/20120905/32d639c6/attachment.html 


More information about the rules-users mailing list