rule overriding in ilog jrules rule studio
Pregunta
I have been trying out ilog jrules for sometime now.I especially interested in rule overriding feature, though there is pure IRL way to create heirachies and override the rules programatically. I want to use rule studio for rule overriding rather than writing it in IRL.
In rule property window of rule studio,there is an option to specify a rule which is to be overriden, but I do not find any places to give the conditions which is used to make the overriding decision for the rules.
Can anyone throw some light on this ? Where do I add the conditions which are used to override the rules ? Or do I have to do it in the IRL programmatic way itself ?
Solución
A rule can override one or more other rules if these rules are selected in the same rule task at run time.
Let's say you have the two rules A & B. A is a rule granting you a general discount if you have reached gold status in the loyalty program:
Rule A:
if
the status of 'the customer' is gold
then
add a 4% discount, reason: "Gold membership"
Rule B should override this rule for the German market with a discount of 5%:
Rule B:
if
the status of 'the customer' is gold
and the home country of 'the customer' is Germany
then
add a 5% discount, reason: "German loyalty program: gold status"
The property of Rule B has to specify that Rule A should be overridden (In the properties: overridden rules: [Rule A]). In case both rules can be executed, only Rule B is selected because of the "overridden rules" property. Rule A will be overridden, which means that both rules are selected in the same rule task at run time.
For more information take a look at the documentation