Okay. In the meantime a simple workaround (for those that may find it useful) is to put the newly added WorkingMemory into a separate hashtable of WorkingMemories (sp?). WHen Facts come in, I just retrieve the appropriate workingMemory per the incoming identifier, assert the Fact and fire all rules. Have to hold two Hashtables, but as a short term fix it seems to work ok.
Thanks, Alan J ________________________________ From: Edson Tirelli [mailto:[EMAIL PROTECTED] Sent: Thursday, May 24, 2007 1:56 PM To: Rules Users List Subject: Re: [rules-users] Cannot retrieve an existing WorkingMemory fromRuleBase Seems like a hashcode() problem... can you get a self contained test case and open a JIRA for it? []s Edson 2007/5/24, Jones, Alan R < [EMAIL PROTECTED] <mailto:[EMAIL PROTECTED]> >: Hi, I have a method in my code that creates a RuleBase, then adds a new WorkingMemory. I then put that that RuleBase into a Hashtable for later use. Another method receives a Fact along with a reference for an associated rulebase. One these are received, I get the rulebase from the hashtable, then use Set iterator to retrieve the working memory i originally created. At this point I would assert the fact into the retrieved WorkingMemory. However, i get a null pointer, that is, there is no WorkingMemory inside (returned by the Iterator) the RuleBase any longer. Any ideas what is going on? What is even more strange, when I step through the code in debug mode (MyEclipse), it works fine. Just doesn't work at normal runtime. Thanks, Alan J _______________________________________________ rules-users mailing list [email protected] https://lists.jboss.org/mailman/listinfo/rules-users -- Edson Tirelli Software Engineer - JBoss Rules Core Developer Office: +55 11 3529-6000 Mobile: +55 11 9287-5646 JBoss, a division of Red Hat @ www.jboss.com
_______________________________________________ rules-users mailing list [email protected] https://lists.jboss.org/mailman/listinfo/rules-users
