Hi, On 4/7/09, tom.e.mur...@wellsfargo.com <tom.e.mur...@wellsfargo.com> wrote: > I have the following rule, which is executing in the midst of a complex > data set and a couple hundred other rules: > > rule "RS6492.1.2" > when > TransactionSummary > ( > $LTVRatioPrcnt : LTVRatioPrcnt > ) > PolicySet > ( > $maxLTVRatioPrcnt : maxLTVRatioPrcnt, > maxLTVRatioPrcnt < $LTVRatioPrcnt > )
This is better written as a single field restriction with binding, all in one: PolicySet( $maxLTVRatioPrcnt : maxLTVRatioPrcnt < $LTVRatioPrcnt ) Nevertheless, you are right: This should either succeed (firing only once) even when written separately or be flagged as an error. I'll file a JIRA. -W > then > System.out.println("RS6492.1.2 fired. $maxLTVRatioPrcnt > = " + $maxLTVRatioPrcnt + ", $LTVRatioPrcnt = " + $LTVRatioPrcnt); > // actual actions removed ... > end > > In the dataset, there are two PolicySets with maxLTVRatioPrcnt values of > 95.0 and 80.0 respectively. The LTVRatioPrcnt in the TransactionSummary > is 85.0. > When my rules run, The above rule should fire only once, for the > PolicySet with 80.0 as its maxLTVRatioPrcnt. However, it fires twice - > once for each PolicySet - with the following outputs: > > RS6492.1.2 fired. $maxLTVRatioPrcnt = 95.0, $LTVRatioPrcnt = 85.0 > RS6492.1.2 fired. $maxLTVRatioPrcnt = 80.0, $LTVRatioPrcnt = 85.0 > > How is this possible? Why is the comparison of maxLTVRatioPercnt < > $LTVRatioPrcnt succeeding in both cases, causing the rule to fire on > both PolicySets? > I'm running Drools 5.0.0 with jars dated 15 Jan 09. > Thanks in advance... > > Tom Murphy > Wells Fargo HCFG - CORE Deal Decisioning Platform > 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