[rules-users] getWorkingMemoryEntryPoint returns NULL

Wolfgang Laun wolfgang.laun at gmail.com
Wed Feb 17 07:59:03 EST 2010


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

On Wed, Feb 17, 2010 at 2:16 AM, Malinda Kaushalye <kaushalye at yahoo.com>wrote:

> 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 at lists.jboss.org
> https://lists.jboss.org/mailman/listinfo/rules-users
>
-------------- next part --------------
An HTML attachment was scrubbed...
URL: http://lists.jboss.org/pipermail/rules-users/attachments/20100217/23fa4cdc/attachment.html 


More information about the rules-users mailing list