1

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 ?

Tito
  • 8,894
  • 12
  • 52
  • 86

1 Answers1

1

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

Akram GARGOURI
  • 205
  • 1
  • 10
sdfx
  • 21,653
  • 4
  • 26
  • 34
  • just for my clarification , Suppose if I didn't override the rules in the above case , for the same customer whose country is Germany, two rules will be applied , ie: 4% discount ( rule A ) and 5% discount ( rule B ) .is that right ? – Tito Mar 10 '12 at 09:37
  • Exactly. There are other ways to get to the desired result, but overriding is a nifty way to do it if you have multiple departments, users with different privileges etc. – sdfx Mar 10 '12 at 14:22