Do you use "global" in your rules? This would be the "declaration" of an entry point.
Also, KnowledgeSessionConfiguration should be passed to the method call creating a session, which I don't see in your code.
-W
Dear All,
It appears to be that the getWorkingMemoryEntryPoint() method returns NULL in my code given below.
Note that EventProcessingOption = STREAM and ClockType = "realtime" if that is of any importance.
Cheers,
Malinda
public class EventKnowledgeBase { private KnowledgeBase kbase = null; private StatefulKnowledgeSession ksession = null; private WorkingMemoryEntryPoint globalStream = null;
public EventKnowledgeBase() throws Exception {
super();
kbase = readKnowledgeBase();
ksession = kbase.newStatefulKnowledgeSession();
KnowledgeBaseConfiguration config = KnowledgeBaseFactory.newKnowledgeBaseConfiguration();
config.setOption( EventProcessingOption.STREAM );
KnowledgeSessionConfiguration kbSessionConfig = KnowledgeBaseFactory.newKnowledgeSessionConfiguration();
kbSessionConfig.setOption( ClockTypeOption.get("realtime") );
globalStream = ksession.getWorkingMemoryEntryPoint( "global" );
if(null == globalStream){
System.out.println("WorkingMemoryEntryPoint is Null"); //YEAH..! IT RETURNS NULL
}
}
}
_______________________________________________
rules-users mailing list
rules-users@lists.jboss.org
https://lists.jboss.org/mailman/listinfo/rules-users