So the date the original booking was taken controls which price rules need
be applied?
Why not add "date range in which these rules apply" patterns to the rules,
and have each product hold a reference to their original purchase\order
date:-
In DRL form:-
rule "1-Jan-2011 to 31-Mar-2011"
when
DateRanges( $df : startDate, $de : endDate, rule=="version1" )
Product( purchaseDate >= $df && < $de )
..
then
..
end
DateRanges contains date ranges for versions of the rules.
You keep all versions of rules in session.
My 2 cents.
On 18 April 2011 10:04, Riyaz Saiyed <Riyaz.saiyed(a)emirates.com> wrote:
Ok, here is the scenario.
If the selected product is “Product A”,
If the adult count is between 1 and 5
Then price should be 50 USD per person.
If adult count is between 6 and 10 the price
Then the price should be 600 USD per group
Now when the first time the product is booked for 5 adults, get the price
50
* 5 = 250 USD.
In between price rule has been modified ad following.
If the selected product is “Product A”,
If the adult count is between 1 and 5
Then price should be 40 USD per person.
If adult count is between 6 and 10 the price
Then the price should be 700 USD per group
When the next time the order is modified change the adult count and
If the adult count is increased from 5 to 8, it should re-calculate
the price to 600 USD as per previous rule.
Or
If the adult count is decreased from 5 to 3, it should re-calculate
the price to 3 * 50 = 150 USD
Thanks,
Riyaz
--
View this message in context:
http://drools.46999.n3.nabble.com/Drools-Decision-Table-tp2830218p2833582...
Sent from the Drools: User forum mailing list archive at
Nabble.com.
_______________________________________________
rules-users mailing list
rules-users(a)lists.jboss.org
https://lists.jboss.org/mailman/listinfo/rules-users