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

Wolfgang Laun wolfgang.laun at gmail.com
Thu Jun 27 08:48:29 EDT 2013


See
  https://engage.redhat.com/forms/rule-design-patterns
IIRC, the section on "Fact Classification" is the one.
-W

On 27/06/2013, droolster <quant.coder at gmail.com> wrote:
> 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.
> _______________________________________________
> rules-users mailing list
> rules-users at lists.jboss.org
> https://lists.jboss.org/mailman/listinfo/rules-users
>


More information about the rules-users mailing list