Queries on rule dependencies
may
select
The predicate may select <a rule> returns
the ruleflows and rule tasks that might select a given rule.
When you define a ruleflow, you can specify the rules that make up a rule task either explicitly or by using a filtering function. The rule overriding mechanism is also likely to determine how rules are selected for execution at run time (for more information, see Rule overriding).
Example
The following query returns the ruleflows and rule tasks that might select "Rule 1".
Find all ruleflows such that each ruleflow may select "Rule 1"
may enable rule
The
predicate may enable rule <a
rule> returns rules that might make a given rule applicable.
Example
Rule 1:
if the age of the customer is 25 then set the category of the customer to Bronze ;
Rule 2:
if the category of the customer is Bronze then give Champagne to the shopping cart of the customer with message: "Congratulations" ;
Query:
Find all business rules such that each business rule may enable "Rule 2"
This query returns Rule 1 because this rule sets the category of the customer to Bronze and therefore makes the condition of Rule 2 valid.
may
disable
The predicate may disable <a rule> returns
rules that might make a given rule inapplicable.
Example
Rule 1:
if the age of the customer is 18 then set the category of the customer to Copper ;
Rule 2:
if the category of the customer is Bronze then give Champagne to the shopping cart of the customer with message: "Congratulations" ;
Rule 3:
if the age of the customer equals 25 and the category of the customer is Gold then set the category of the customer to Diamond ;
Query:
Find all business rules such that each business rule may disable "Rule 2"
This query returns Rule 1 because if the category of the customer is set to Copper, it cannot be Bronze. The query does not return Rule 3 because the action is to set the category of the customer to Diamond and this rule can be run only from a state where the category is already not Bronze. Therefore Rule 3 does not disable Rule 1.
may be enabled by
The
predicate may be enabled by <a
rule> returns rules that might be made applicable by a given
rule.
Example
Rule 1:
if the age of the customer is 25 then set the category of the customer to Bronze ;
Rule 2:
if the category of the customer is not Copper then set the discount of the shopping cart of the customer to 5;
Rule 3:
if the age of the customer equals 25 and the category of the customer is Bronze then set the category of the customer to Diamond ;
Query:
Find all business rules such that each business rule may be enabled by "Rule 1"
This query returns Rule 2 and Rule 3. It returns Rule 2 because if the category of the customer is not Copper, it could be Bronze. It returns Rule 3 because the condition specifies that the category of the customer should be Bronze.
may be disabled by
The
predicate may be disabled by <a
rule> returns rules that might be made inapplicable by a
given rule.
Example
Rule 1:
if the age of the customer is 25 then set the category of the customer to Bronze ;
Rule 2:
if the age of the customer equals 25 and the category of the customer is Copper then set the category of the customer to Gold
Query:
Find all business rules such that each business rule may be disabled by "Rule 1"
This query returns Rule 2 because this rule is made inapplicable by Rule 1. In Rule 1, the category of a customer whose age is 25 is set to Bronze, therefore it cannot be Copper.
You can run these queries by right-clicking a rule in the Rule Explorer and clicking: