ルール・アクションのルール変数への依存
ルールの変数をオブジェクトによってインスタンス化できない場合、ルールのアクションを実行することはできません。
ルール変数は、ルールの definitions 部分で定義します。 ルールの変数をオブジェクトによってインスタンス化できない場合、ルールはアクションを実行できません。
ルールに変数と条件が含まれる場合、ルールが else 部分を実行できるのは、変数をオブジェクトによってインスタンス化できて、条件が true でない場合に限られます。
すべての顧客が 5 パーセント以上の割引を受けるので、次のルールが常に割引に適用されます。
if all of the following conditions are true: the value of the customer's shopping cart is more than $100 the category of the customer is Gold then apply a 15% discount else apply a 5% discount
ただし、definitions 部分を使用して「ゴールド」カテゴリーの顧客にのみ割引を行うことによって、このルールを変更できます。
definitions set applicant to a customer where the category of this customer is Gold if the value of the applicant's shopping cart is more than $100 then apply a 15% discount else apply a 5% discount