Re: [rules-users] Bug in "not" ???
glad i could help. _ miguel 2010/5/6 > Actually, in the light of day, I see why it behaved as it did. It doesn’t > seem to be caused by the AccountHolder as such, but more the Employment > object – if there are two of them, one with an accountholder and > BusinessName that met the criteria, and one without, then the rule will fire > whether the not is used or not, just on different instances of Employment. > > > > Thanks for triggering the thought process, Miguel. > > > > *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.* > > > > *From:* rules-users-boun...@lists.jboss.org [mailto: > rules-users-boun...@lists.jboss.org] *On Behalf Of *miguel machado > *Sent:* Thursday, May 06, 2010 4:19 AM > *To:* Rules Users List > *Subject:* Re: [rules-users] Bug in "not" ??? > > > > This is not entirely true: you may have different objects in memory in such > a way that both fires rule. In this case, if you had two (or more!) > AccountHolders for the same Employment, each of those having different > BusinessName's associated, both rules (with and without the 'not') would > fire. > > > > Does that make sense? > > _ miguel > > > > > > > > 2010/5/5 > > 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. > > > > > -- > "To understand what is recursion you must first understand recursion" > > ___ > rules-users mailing list > rules-users@lists.jboss.org > https://lists.jboss.org/mailman/listinfo/rules-users > > -- "To understand what is recursion you must first understand recursion" ___ rules-users mailing list rules-users@lists.jboss.org https://lists.jboss.org/mailman/listinfo/rules-users
Re: [rules-users] Bug in "not" ???
Actually, in the light of day, I see why it behaved as it did. It doesn't seem to be caused by the AccountHolder as such, but more the Employment object - if there are two of them, one with an accountholder and BusinessName that met the criteria, and one without, then the rule will fire whether the not is used or not, just on different instances of Employment. Thanks for triggering the thought process, Miguel. 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. From: rules-users-boun...@lists.jboss.org [mailto:rules-users-boun...@lists.jboss.org] On Behalf Of miguel machado Sent: Thursday, May 06, 2010 4:19 AM To: Rules Users List Subject: Re: [rules-users] Bug in "not" ??? This is not entirely true: you may have different objects in memory in such a way that both fires rule. In this case, if you had two (or more!) AccountHolders for the same Employment, each of those having different BusinessName's associated, both rules (with and without the 'not') would fire. Does that make sense? _ miguel 2010/5/5 mailto:tom.e.mur...@wellsfargo.com>> 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. -- "To understand what is recursion you must first understand recursion" ___ rules-users mailing list rules-users@lists.jboss.org https://lists.jboss.org/mailman/listinfo/rules-users
Re: [rules-users] Bug in "not" ???
This is not entirely true: you may have different objects in memory in such a way that both fires rule. In this case, if you had two (or more!) AccountHolders for the same Employment, each of those having different BusinessName's associated, both rules (with and without the 'not') would fire. Does that make sense? _ miguel 2010/5/5 > 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. -- "To understand what is recursion you must first understand recursion" ___ rules-users mailing list rules-users@lists.jboss.org https://lists.jboss.org/mailman/listinfo/rules-users
[rules-users] Bug in "not" ???
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. ___ rules-users mailing list rules-users@lists.jboss.org https://lists.jboss.org/mailman/listinfo/rules-users