[rules-users] Bug in "not" ???

Tom.E.Murphy at wellsfargo.com Tom.E.Murphy at wellsfargo.com
Wed May 5 16:30:20 EDT 2010


Using Drools Expert 5.0.1

The following rule fires both when the "not" is there, and also if the "not" is commented out. Clearly, both cannot be true, so there is something wrong somewhere.

I've narrowed it down to the testing of the $parentEmploymentId declaration - the AccountHolder CE, which is inside the context of the "not", is referencing $parentEmploymentId, which is declared outside the "not".
If the indicated line is commented out, then the expression behaves sensibly (i.e. fires either when the "not" is used, or when it isn't, but not both). However, an important business semantic element is then missing from the rule.

Is this a bug in Drools, or am I misusing something?

rule "RS7713.9.2_"
when
        Employment ( $parentEmploymentId : myId )

        not # if the not is commented out, the rule still fires!!!!
        (
                AccountHolder
                (
                        $parentEmployerInfoId : myId
                        , parentId == $parentEmploymentId # if this line is commented, it behaves sensibly (per the 'not'), but misses an important business semantic
                )
                and
                BusinessName
                (
                        parentId == $parentEmployerInfoId
                        , lines contains "DISTRESS"
                )
        )
then
        ;
end


Tom Murphy
Business Process Consultant
Wells Fargo HCFG - CORE Deal Decisioning Platform
800 S. Jordan Creek Parkway | West Des Moines, IA 50266
MAC: X2301-01B
Office: 515 324 4853 | Mobile: 515 423 4334
This message may contain confidential and/or privileged information.  If you are not the addressee or authorized to receive this for the addressee, you must not use, copy, disclose, or take any action based on this message or any information herein.  If you have received this message in error, please advise the sender immediately by reply e-mail and delete this message.  Thank you for your cooperation.



-------------- next part --------------
An HTML attachment was scrubbed...
URL: http://lists.jboss.org/pipermail/rules-users/attachments/20100505/6a3a71d1/attachment.html 


More information about the rules-users mailing list