Ernest Friedman-Hill
Mon, 12 Oct 2009 19:24:23 -0700
If you want to not fire any rules in module B until all rules in module A have had a chance to fire, then rather than putting the focus statements into a rule, you probably want to put them into the same code that calls "run" -- i.e.,
(focus A) (run) (focus B) (run) On Oct 12, 2009, at 3:44 PM, Felix Chan wrote:
Hi, I have a general question how to control execution using modules.I have business rules that apply at the country (US) level, and rules that apply at state level. What I would like to do is to apply country-level rules first and then state-level rules second. The state-level rules will overwrite some of the facts that were modified or asserted as a result of the country-level rules.I do NOT want to have any state-level rules applied before country- level rules have a chance to fire.I can group all the country-level rules in module COUNTRY and state- level rules in module STATE. I understand that I can put (focus STATE) on the RHS to move from one module to another to control execution flow.Question: What should I do to ensure that I will switch to the STATE module only after ALL APPLICABLE country-level rules have been applied (fired)?I can use salience, but the book says that it's bad form. So I am wondering if I should module.Thanks. Felix
--------------------------------------------------------- Ernest Friedman-Hill Informatics & Decision Sciences, Sandia National Laboratories PO Box 969, MS 9012, Livermore, CA 94550 http://www.jessrules.com -------------------------------------------------------------------- To unsubscribe, send the words 'unsubscribe jess-users y...@address.com' in the BODY of a message to majord...@sandia.gov, NOT to the list (use your own address!) List problems? Notify owner-jess-us...@sandia.gov. --------------------------------------------------------------------