Basha

   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.

   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.

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:

RuleBaseConfiguration.setRemoveIdentities(boolean removeIdentities);

b) If you prefer to change your rule, you can do this:

$provAddress:ProviderAddress( $addType : addressTypeCode, $pPI : primaryPracticeIndicator )

$provAdd:ProviderAddress( this != $provAddress, addressTypeCode == $addType, $pp:primaryPracticeIndicator == $pPI )


   Regards,
      Edson



2007/3/29, Sikkandar Nawabjan <Sikkandar.Nawabjan@ustri.com>:

Hi,

The below rule for dublicate checking is working fine with 3.0.5 but not with milestone version? Is that a problem with milesone?

rule

"rule01"

when

$provAddress:ProviderAddress( $addType : addressTypeCode, $pPI : primaryPracticeIndicator )

$provAdd:ProviderAddress( addressTypeCode == $addType, $pp:primaryPracticeIndicator == $pPI )

then

System.out.println(

"Hi"+$addType+" "+$pPI+"::"+$pp);

retract($provAddress);

end

 

Basha


_______________________________________________
rules-users mailing list
rules-users@lists.jboss.org
https://lists.jboss.org/mailman/listinfo/rules-users




--
  Edson Tirelli
  Software Engineer - JBoss Rules Core Developer
  Office: +55 11 3124-6000
  Mobile: +55 11 9218-4151
  JBoss, a division of Red Hat @ www.jboss.com