[rules-users] Elegant way to specify rules for range checks

droolster quant.coder at gmail.com
Thu Jun 27 06:25:52 EDT 2013


Hello,

I would like to code some business rules with the following pattern:

if x < 100 then 1
else if x > 100 and x < 200 then 2
else if x > 200 and x < 500 then 3.

My initial approach would be to specify a rule for each 'if-then' logic
above so ending up with 3 rules which only differ on the constraint
arguments.

Is there are better approach where this type of logic can be collapsed into
one rule only?

Regards,



--
View this message in context: http://drools.46999.n3.nabble.com/Elegant-way-to-specify-rules-for-range-checks-tp4024588.html
Sent from the Drools: User forum mailing list archive at Nabble.com.


More information about the rules-users mailing list