Hi Pardeep,
you cannot nest rules. You can solve the situation with 2 rules like:

rule "big amount discount"
  when
    Basket( total > 4000 )
    discount: Discount()
  then
    discount.percentage = discount.percentage + 20;
end

rule "preferred time discount"
  when
    Clock( 6 < time < 9 )
    discount: Discount()
  then
    discount.percentage = discount.percentage + 20;
end

Please note that I did not use correct Drools language notation, it is just
the example how to solve your problem.
-- 
View this message in context: 
http://www.nabble.com/How-to-create-nested-rules-in-Drool-Guvnor-tp24943230p24954552.html
Sent from the drools - user mailing list archive at Nabble.com.
_______________________________________________
rules-users mailing list
[email protected]
https://lists.jboss.org/mailman/listinfo/rules-users

Reply via email to