Do you use "global" in your rules? This would be the "declaration" of an entry point.<br><br>Also, KnowledgeSessionConfiguration should be passed to the method call creating a session, which I don't see in your code.<br>
<br>-W<br><br><div class="gmail_quote">On Wed, Feb 17, 2010 at 2:16 AM, Malinda Kaushalye <span dir="ltr"><<a href="mailto:kaushalye@yahoo.com">kaushalye@yahoo.com</a>></span> wrote:<br><blockquote class="gmail_quote" style="border-left: 1px solid rgb(204, 204, 204); margin: 0pt 0pt 0pt 0.8ex; padding-left: 1ex;">
Dear All,<br>
It appears to be that the getWorkingMemoryEntryPoint() method returns NULL in my code given below.<br>
Note that EventProcessingOption = STREAM and ClockType = "realtime" if that is of any importance.<br>
Cheers,<br>
Malinda<br>
<br>
public class EventKnowledgeBase { private KnowledgeBase kbase = null; private StatefulKnowledgeSession ksession = null; private WorkingMemoryEntryPoint globalStream = null;<br>
public EventKnowledgeBase() throws Exception {<br>
super();<br>
kbase = readKnowledgeBase();<br>
ksession = kbase.newStatefulKnowledgeSession();<br>
KnowledgeBaseConfiguration config = KnowledgeBaseFactory.newKnowledgeBaseConfiguration();<br>
config.setOption( EventProcessingOption.STREAM );<br>
KnowledgeSessionConfiguration kbSessionConfig = KnowledgeBaseFactory.newKnowledgeSessionConfiguration();<br>
kbSessionConfig.setOption( ClockTypeOption.get("realtime") );<br>
globalStream = ksession.getWorkingMemoryEntryPoint( "global" );<br>
if(null == globalStream){<br>
System.out.println("WorkingMemoryEntryPoint is Null"); //YEAH..! IT RETURNS NULL<br>
}<br>
}<br>
<br>
<br>
}<br>
<br>
<br>
<br>
<br>
<br>
_______________________________________________<br>
rules-users mailing list<br>
<a href="mailto:rules-users@lists.jboss.org">rules-users@lists.jboss.org</a><br>
<a href="https://lists.jboss.org/mailman/listinfo/rules-users" target="_blank">https://lists.jboss.org/mailman/listinfo/rules-users</a><br>
</blockquote></div><br>