Dependency of rule actions on rule variables
You cannot execute the actions of a rule if the variables of the rule cannot be
instantiated by objects.
You define rule variables in the definitions part of
a rule. If the variables of a rule cannot be instantiated by objects, the rule cannot execute and
perform an action.
If a rule has variables and conditions, the rule can execute its else part only if the variables can be instantiated by objects
and the conditions are not true.
The following rule always applies a discount because every customer receives a discount of at least 5 percent:
if all of the following conditions are true: - the value of the shopping cart of customer is more than 100 - the category of customer is Gold then set discount to 15 else set discount to 5
However, you can change the rule by using the definitions part to give a discount to only customers in the Gold category:
definitions set applicant to a customer in customers where the category of this customer is Gold; if the value of the shopping cart of applicant is more than 100 then set discount to 15 else set discount to 5