<!DOCTYPE HTML PUBLIC "-//W3C//DTD HTML 3.2//EN">
<HTML>
<HEAD>
<META HTTP-EQUIV="Content-Type" CONTENT="text/html; charset=us-ascii">
<META NAME="Generator" CONTENT="MS Exchange Server version 6.5.7651.59">
<TITLE>Shadow fact problem?</TITLE>
</HEAD>
<BODY>
<!-- Converted from text/rtf format -->

<P><FONT SIZE=2 FACE="Arial">Hi,</FONT>
</P>

<P><FONT SIZE=2 FACE="Arial">I am running 3.1-M1 and have (by way of example) two simple rules; A and B as follows:-</FONT>
</P>
<UL>
<P><B><FONT COLOR="#960000" SIZE=2 FACE="Courier New">rule</FONT></B><FONT COLOR="#000000" SIZE=2 FACE="Courier New"></FONT> <FONT COLOR="#008000" SIZE=2 FACE="Courier New">&quot;</FONT><FONT COLOR="#008000" SIZE=2 FACE="Courier New">A</FONT><FONT COLOR="#008000" SIZE=2 FACE="Courier New">&quot;</FONT>

<BR><B><FONT COLOR="#960000" SIZE=2 FACE="Courier New">when</FONT></B>

<BR>&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp; <FONT COLOR="#000000" SIZE=2 FACE="Courier New">$a1 : Attribute ( name == Constants.ATTRIBUTES_</FONT><FONT COLOR="#000000" SIZE=2 FACE="Courier New">A</FONT><FONT COLOR="#000000" SIZE=2 FACE="Courier New">, $pa : number )</FONT>

<BR>&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp; <FONT COLOR="#000000" SIZE=2 FACE="Courier New">$a2 : Attribute ( name == Constants.ATTRIBUTES_</FONT><FONT COLOR="#000000" SIZE=2 FACE="Courier New">B</FONT><FONT COLOR="#000000" SIZE=2 FACE="Courier New">, $nc : number )</FONT>

<BR>&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp; <FONT COLOR="#000000" SIZE=2 FACE="Courier New">$p : Process ( attributesList</FONT><B> <FONT COLOR="#960000" SIZE=2 FACE="Courier New">contains</FONT></B><FONT COLOR="#000000" SIZE=2 FACE="Courier New"> $a1, attributesList</FONT><B> <FONT COLOR="#960000" SIZE=2 FACE="Courier New">contains</FONT></B><FONT COLOR="#000000" SIZE=2 FACE="Courier New"> $a2 )</FONT>

<BR><B><FONT COLOR="#960000" SIZE=2 FACE="Courier New">then</FONT></B>

<BR>&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;<B> <FONT COLOR="#960000" SIZE=2 FACE="Courier New">double</FONT></B><FONT COLOR="#000000" SIZE=2 FACE="Courier New"> txy =</FONT> <FONT COLOR="#000000" SIZE=2 FACE="Courier New">doSomeMaths($pa, $nc, $p)</FONT><FONT COLOR="#000000" SIZE=2 FACE="Courier New">;</FONT>

<BR>&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp; <FONT COLOR="#000000" SIZE=2 FACE="Courier New">Attribute a =</FONT><B> <FONT COLOR="#960000" SIZE=2 FACE="Courier New">new</FONT></B><FONT COLOR="#000000" SIZE=2 FACE="Courier New"> Attribute(Constants.ATTRIBUTES_</FONT><FONT COLOR="#000000" SIZE=2 FACE="Courier New">C</FONT><FONT COLOR="#000000" SIZE=2 FACE="Courier New">, txy);</FONT>

<BR>&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp; <FONT COLOR="#000000" SIZE=2 FACE="Courier New">$p.addAttribute(a);</FONT>

<BR>&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;<B> <FONT COLOR="#960000" SIZE=2 FACE="Courier New">assertLogical</FONT></B><FONT COLOR="#000000" SIZE=2 FACE="Courier New">(a);</FONT>

<BR>&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;<B> <FONT COLOR="#960000" SIZE=2 FACE="Courier New">modify</FONT></B><FONT COLOR="#000000" SIZE=2 FACE="Courier New">($p);</FONT>

<BR>&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp; <FONT COLOR="#000000" SIZE=2 FACE="Courier New">System.out.println(</FONT><FONT COLOR="#008000" SIZE=2 FACE="Courier New">&quot;</FONT><FONT COLOR="#008000" SIZE=2 FACE="Courier New">Rule 'A' fired</FONT><FONT COLOR="#008000" SIZE=2 FACE="Courier New">&quot;</FONT><FONT COLOR="#000000" SIZE=2 FACE="Courier New">);</FONT>

<BR><B><FONT COLOR="#960000" SIZE=2 FACE="Courier New">end</FONT></B>

<BR>&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp; &nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp; &nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp; 

<BR><B><FONT COLOR="#960000" SIZE=2 FACE="Courier New">rule</FONT></B><FONT COLOR="#000000" SIZE=2 FACE="Courier New"></FONT> <FONT COLOR="#008000" SIZE=2 FACE="Courier New">&quot;</FONT><FONT COLOR="#008000" SIZE=2 FACE="Courier New">B</FONT><FONT COLOR="#008000" SIZE=2 FACE="Courier New">&quot;</FONT>

<BR><B><FONT COLOR="#960000" SIZE=2 FACE="Courier New">when</FONT></B>

<BR>&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp; <FONT COLOR="#000000" SIZE=2 FACE="Courier New">$a1 : Attribute ( name == Constants.ATTRIBUTES_</FONT><FONT COLOR="#000000" SIZE=2 FACE="Courier New">C</FONT><FONT COLOR="#000000" SIZE=2 FACE="Courier New">, $txy : number)</FONT>

<BR>&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp; <FONT COLOR="#000000" SIZE=2 FACE="Courier New">$p : Process( attributesList</FONT><B> <FONT COLOR="#960000" SIZE=2 FACE="Courier New">contains</FONT></B><FONT COLOR="#000000" SIZE=2 FACE="Courier New"> $a1 )</FONT><FONT COLOR="#000000" SIZE=2 FACE="Courier New"> &nbsp;&nbsp;&nbsp; &nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp; &nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp; &nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;</FONT> <FONT COLOR="#008000" SIZE=2 FACE="Courier New">// &lt;-- Line causing rule not to activate</FONT></P>

<P><B><FONT COLOR="#960000" SIZE=2 FACE="Courier New">then</FONT></B>

<BR>&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;<B> <FONT COLOR="#960000" SIZE=2 FACE="Courier New">double</FONT></B><FONT COLOR="#000000" SIZE=2 FACE="Courier New"> m =</FONT> <FONT COLOR="#000000" SIZE=2 FACE="Courier New">doSomeMoreMaths($txy, $p)</FONT><FONT COLOR="#000000" SIZE=2 FACE="Courier New">;</FONT>

<BR>&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp; <FONT COLOR="#000000" SIZE=2 FACE="Courier New">System.out.println(</FONT><FONT COLOR="#008000" SIZE=2 FACE="Courier New">&quot;</FONT><FONT COLOR="#008000" SIZE=2 FACE="Courier New">Rule 'B' fired</FONT><FONT COLOR="#008000" SIZE=2 FACE="Courier New">&quot;</FONT><FONT COLOR="#000000" SIZE=2 FACE="Courier New">);</FONT>

<BR><B><FONT COLOR="#960000" SIZE=2 FACE="Courier New">end</FONT></B>
</P>
</UL>
<P><FONT SIZE=2 FACE="Arial">Process exposes an ArrayList of Attribute objects (each having a name\value pair). </FONT>
</P>

<P><FONT SIZE=2 FACE="Arial">When the content of the ArrayList held by Process is added to (Rule 'A') the next rule (Rule 'B') is not being activated.</FONT></P>

<P><FONT SIZE=2 FACE="Arial">Can anybody provide any insight into how best a workaround can be engineered?</FONT>
</P>

<P><FONT COLOR="#000000" SIZE=2 FACE="Arial">With kind regards,</FONT>
</P>

<P><FONT COLOR="#000000" SIZE=2 FACE="Arial">Mike</FONT>
</P>

</BODY>
</HTML>