[rules-users] Drools 5.5 Percentage rules

gboro54 gboro54 at gmail.com
Wed Aug 14 14:55:02 EDT 2013


I am not even sure(I had an issue with integer division vs float thus my
original issue so not sure why I typed for bigger numbers). Additionally it
helps if I that my boundaries are correct(i.e I had a rule that looked for
less then 1.5 and a rule that looked for a value greater then 1.6 so where
does 1.5 fall...stupid me)

As per usual this was user error 


laune wrote
> What do you mean by "for bigger numbers"?
> -W
> 
> On 14 August 2013 18:56, gboro54 <

> gboro54@

> > wrote:
>> 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.
>> _______________________________________________
>> rules-users mailing list
>> 

> rules-users at .jboss

>> https://lists.jboss.org/mailman/listinfo/rules-users
> _______________________________________________
> rules-users mailing list

> rules-users at .jboss

> https://lists.jboss.org/mailman/listinfo/rules-users





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


More information about the rules-users mailing list