[rules-users] Bizarre bug or user error:

Tom.E.Murphy at wellsfargo.com Tom.E.Murphy at wellsfargo.com
Mon Apr 6 21:17:22 EDT 2009


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
		)
	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.


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


More information about the rules-users mailing list