<!DOCTYPE HTML PUBLIC "-//W3C//DTD HTML 4.0 Transitional//EN">
<HTML><HEAD>
<META http-equiv=Content-Type content="text/html; charset=us-ascii">
<META content="MSHTML 6.00.2900.3086" name=GENERATOR></HEAD>
<BODY>
<DIV dir=ltr align=left><SPAN class=412513020-24052007><FONT face=Arial
color=#0000ff size=2>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.</FONT></SPAN></DIV>
<DIV><FONT face=Arial color=#0000ff size=2></FONT> </DIV><!-- Converted from text/rtf format -->
<P><SPAN lang=en-us><FONT face=Arial size=2>Thanks,</FONT></SPAN> </P>
<P><SPAN lang=en-us><FONT face=Arial size=2>Alan J</FONT></SPAN> </P><BR>
<DIV class=OutlookMessageHeader lang=en-us dir=ltr align=left>
<HR tabIndex=-1>
<FONT face=Tahoma size=2><B>From:</B> Edson Tirelli [mailto:tirelli@post.com]
<BR><B>Sent:</B> Thursday, May 24, 2007 1:56 PM<BR><B>To:</B> Rules Users
List<BR><B>Subject:</B> Re: [rules-users] Cannot retrieve an existing
WorkingMemory fromRuleBase<BR></FONT><BR></DIV>
<DIV></DIV><BR> Seems like a hashcode() problem... can you get a
self contained test case and open a JIRA for it?<BR><BR>
[]s<BR> Edson<BR><BR>
<DIV><SPAN class=gmail_quote>2007/5/24, Jones, Alan R <<A
href="mailto:alan.r.jones@boeing.com"> alan.r.jones@boeing.com</A>>:</SPAN>
<BLOCKQUOTE class=gmail_quote
style="PADDING-LEFT: 1ex; MARGIN: 0pt 0pt 0pt 0.8ex; BORDER-LEFT: rgb(204,204,204) 1px solid">
<DIV>
<DIV dir=ltr align=left><FONT face=Arial color=#0000ff
size=2><SPAN>Hi,</SPAN></FONT></DIV>
<DIV dir=ltr align=left><FONT face=Arial color=#0000ff
size=2><SPAN></SPAN></FONT> </DIV>
<DIV dir=ltr align=left><FONT face=Arial color=#0000ff size=2><SPAN>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?</SPAN></FONT></DIV>
<DIV dir=ltr align=left><FONT face=Arial color=#0000ff
size=2><SPAN></SPAN></FONT> </DIV>
<DIV dir=ltr align=left><FONT face=Arial color=#0000ff size=2><SPAN>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.</SPAN></FONT></DIV>
<DIV> </DIV>
<P><SPAN lang=en-us><FONT face=Arial size=2>Thanks,</FONT></SPAN> </P>
<P><SPAN lang=en-us><FONT face=Arial size=2>Alan J</FONT></SPAN>
</P></DIV><BR>_______________________________________________<BR>rules-users
mailing list<BR><A onclick="return top.js.OpenExtLink(window,event,this)"
href="mailto:rules-users@lists.jboss.org">rules-users@lists.jboss.org</A><BR><A
onclick="return top.js.OpenExtLink(window,event,this)"
href="https://lists.jboss.org/mailman/listinfo/rules-users"
target=_blank>https://lists.jboss.org/mailman/listinfo/rules-users</A><BR><BR></BLOCKQUOTE></DIV><BR><BR
clear=all><BR>-- <BR> Edson Tirelli<BR> Software Engineer
- JBoss Rules Core Developer<BR> Office: +55 11
3529-6000<BR> Mobile: +55 11 9287-5646 <BR> JBoss, a
division of Red Hat @ <A href="http://www.jboss.com">www.jboss.com</A>
</BODY></HTML>