[rules-users] Counting rules matches within a rule + optimizing evals

Arjun Dhar dhar_ar at yahoo.com
Sat Apr 11 14:06:26 EDT 2009


Hi,
 I have many rules. These rules may or may not belong to the same set. However,
based on their name they can be grouped. Say all rules starting with
"Traffic_Rule", "Criminal_Rule" etc.

Q1. I want to check after assertion of a fact (A.) how many and (B.) which all
rules executed for "Traffic_Rule" and the result will fire another rule.
(So I want all this in the rules files only) - So in a way I want to collect the
consequences and based on the result of that consequence set fire more rules.

Q2. evals() are expensive. I dont think we can assign the output of an eval in
the condition to a variable; so how do I re-use an eval in a condition and then
in the consequence? (To avoid calling the function multiple times)

P.S: Can someone please do something about that spammer (Vacation Reply)

regards,
Arjun





More information about the rules-users mailing list