[rules-users] check dups

Tim.Nguyen at expeditors.com Tim.Nguyen at expeditors.com
Fri Aug 31 11:34:04 EDT 2007



Hi List,

I'd like to check if any duplicate exists in my collection as below:

rule "check Duplicate"
      when
            ref1: Reference ($type1: referenceType, $value1:
referenceValue)
            ref2: Reference (this != ref1, referenceType == $referenceType,
referenceValue == $value1)

      then
             errorHandler.record("Duplicate Reference is not allowed.");
end


Both my referenceType and referenceValue are String. I didn't get any error
but it didn't work. Any idea?
I am using 4.01 GA


Thanks,
Tim




More information about the rules-users mailing list