<br> Basha<br><br> If the problem is that it is retracting all your objects, then the engine is working fine. What changed from the 3.0.x branch to the milestone is that in 3.0.x branch, the same object would not match more than one pattern, while in the milestone, the default is now to allow the same object to match more than one pattern.
<br><br> So, for the rule to work as you want, you need to either set an option for the engine to work as it worked in 3.0.x or add a constraint to the rule.<br><br>a) If you prefer to set the option, you may set the system property "
drools.removeIdentities = true", or call the following method in the RuleBaseConfiguration:<br><br>RuleBaseConfiguration.setRemoveIdentities(boolean removeIdentities);<br><br>b) If you prefer to change your rule, you can do this:
<br><br><font size="2">
<p align="left">$provAddress:ProviderAddress( $addType : addressTypeCode, $pPI :
primaryPracticeIndicator )</p>
<p align="left">$provAdd:ProviderAddress( this != $provAddress, addressTypeCode == $addType,
$pp:primaryPracticeIndicator == $pPI ) </p>
</font><br> Regards,<br> Edson<br><br><br><br><div><span class="gmail_quote">2007/3/29, Sikkandar Nawabjan <<a href="mailto:Sikkandar.Nawabjan@ustri.com">Sikkandar.Nawabjan@ustri.com</a>>:</span><blockquote class="gmail_quote" style="border-left: 1px solid rgb(204, 204, 204); margin: 0pt 0pt 0pt 0.8ex; padding-left: 1ex;">
<div><div><font color="#000000" face="Arial" size="2">
<div><font color="#000000" face="Arial" size="2"><b><font color="#960000" size="2">
<p align="left">Hi,</p>
<p align="left">The below rule for dublicate checking is working fine with 3.0.5
but not with milestone version? Is that a problem with milesone?</p>
<p align="left">rule</p></font></b></font><font size="2"> </font><font color="#008000" size="2">"rule01"</font><font size="2">
<p align="left"></p></font><b><font color="#960000" size="2">when</font></b></div></font><font size="2">
<p align="left">$provAddress:ProviderAddress( $addType : addressTypeCode, $pPI :
primaryPracticeIndicator )</p>
<p align="left">$provAdd:ProviderAddress( addressTypeCode == $addType,
$pp:primaryPracticeIndicator == $pPI ) </p>
<p align="left"></p></font><b><font color="#960000" size="2">then</font></b><font size="2">
<p align="left">System.out.println(</p></font><font color="#008000" size="2">"Hi"</font><font size="2">+$addType+</font><font color="#008000" size="2">"
"</font><font size="2">+$pPI+</font><font color="#008000" size="2">"::"</font><font size="2">+$pp);
<p align="left"></p></font><b><font color="#960000" size="2">retract</font></b><font size="2">($provAddress);</font><b><font color="#960000" size="2">
<p>end</p>
<p> </p>
<p>Basha</p></font></b></div></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 3124-6000<br> Mobile: +55 11 9218-4151<br> JBoss, a division of Red Hat @ <a href="http://www.jboss.com">
www.jboss.com</a>