3rd try<br /><br />I have a list of Items that I am inserting into working memory.<br />Here is the rule that is failing:<br /><br />rule "Cannot select X if both Y and Z are not selected"<br />when<br />&nbsp;&nbsp;&nbsp;&nbsp; Item(code == "X")<br />&nbsp;&nbsp;&nbsp;&nbsp; (or (not Item(code == "Y"))<br />&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp; (not Item(code == "Z")))<br />then<br />&nbsp;&nbsp;&nbsp;&nbsp; System.out.println("Error: You cannot select X unless both Y and Z are selected");<br />end<br /><br />This rule works correctly when X and Y are there, and when X and Z are there.<br />However, when both Y and Z are missing, the error prints twice.<br />Can anyone tell me what I am doing wrong.<br /><br />Thanks a lot<br />Vithal&nbsp;      
<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>