Hello All,<br /><br />I have a list of Items that I am inserting into working memory. Here is the rule that is failing:<br /><br /><span style="font-family: Courier New,Courier,mono;">rule "Cannot select X if both Y and Z are not selected"</span><br style="font-family: Courier New,Courier,mono;" /><span style="font-family: Courier New,Courier,mono;">when</span><br style="font-family: Courier New,Courier,mono;" /><span style="font-family: Courier New,Courier,mono;">&nbsp;&nbsp;&nbsp; Item(code == "X")</span><br style="font-family: Courier New,Courier,mono;" /><span style="font-family: Courier New,Courier,mono;">&nbsp;&nbsp;&nbsp; (or (not Item(code == "Y"))</span><br style="font-family: Courier New,Courier,mono;" /><span style="font-family: Courier New,Courier,mono;">&nbsp;&nbsp;&nbsp; &nbsp;&nbsp;&nbsp; (not Item(code == "Z")))</span><br style="font-family: Courier New,Courier,mono;" /><span style="font-family: Courier New,Courier,mono;">then</span><br style="font-family: Courier New,Courier,mono;" /><span style="font-family: Courier New,Courier,mono;">&nbsp;&nbsp;&nbsp; System.out.println("Error: You cannot select X unless both Y and Z are selected");</span><br style="font-family: Courier New,Courier,mono;" /><span style="font-family: Courier New,Courier,mono;">end</span><br /><br />This rule works correctly when X and Y are there, and when X and Z are there. However, when both Y and Z are missing, the error prints twice. Can anyone tell me what I am doing wrong.<br /><br />Thanks a lot<br />Vithal<br />
<br><Table border=0 Width=644 Height=57 cellspacing=0 cellpadding=0 style='font-family:Verdana;font-size:11px;line-height:15px;'><TR><td><a href='http://adworks.rediff.com/cgi-bin/AdWorks/click.cgi/www.rediff.com/signature-default.htm/1050715198@Middle5/2206641_2199021/2201651/1?PARTNER=3&OAS_QUERY=null' target=new ><img src ='http://imadworks.rediff.com/cgi-bin/AdWorks/adimage.cgi/2206641_2199021/creative_2201651.gif'  alt='Rediff Shopping'  border=0></a></td></TR></Table>