Erm, Rule Flow springs immediately to mind.
 
Or you can use semaphore Facts yourself - but you're re-inventing the (Rule Flow) wheel.
 
rule "rule 1"
    when
        condition is true
    then
        insert(new SemaphoreFact());
    end
 
rule "rule 2"
    when
        SemaphoreFact()
        Some other conditions are true;
    then
        action
    end
 
rule "rule 3"
    when
        Even more conditions
    then
        action
    end
 


From: rules-users-bounces@lists.jboss.org [mailto:rules-users-bounces@lists.jboss.org] On Behalf Of Vishal Deshmukh
Sent: 22 May 2008 10:31
To: rules-users@lists.jboss.org
Subject: [rules-users] Nested Rules

Hi
 
I  am using Drools 4.0.4 with Eclipse 3.2. I m much happy with the results. But now my application needs nested loops..
Can i write nested rules like
 
rule "rule 1 "         // if condition of rule 1 is true then only execute rule 2 other wise skip it
when
    condition is true
then
    execute rule2
 
rule "rule 2 "
when
    condition is true
then
    action
 
rule "rule 3"
when
      condition is true
then
     action
 
Thanks and Rgards
 
Vishal