[rules-users] Drools 5.5 Percentage rules

gboro54 gboro54 at gmail.com
Wed Aug 14 12:56:49 EDT 2013


I am trying to craft rules which deal with percentage of 2 numbers(some
percentages are like .1%).  A rule like the following I can't get to fire
for bigger numbers. Any thoughts on this would be great!

rule 'Added through MPID < 0.1% TCV'
when
     billableItem:BillableItem(code in ("A","7","8"),
isPriceUnderDollar==false)
   
$a:AccountVolumeAccumulation(accountId==$billableItem.accountNumber,accumulationType=="Add-All",
((volume * 100.0f)/$consolidatedVolume.volume) <.1)
then
    $billableItem.setPrice(t);
end

please note that $consolidatedVolume is a global variable(this is static
data)



--
View this message in context: http://drools.46999.n3.nabble.com/Drools-5-5-Percentage-rules-tp4025545.html
Sent from the Drools: User forum mailing list archive at Nabble.com.


More information about the rules-users mailing list