[rules-users] Nested Rules

Anstis, Michael (M.) manstis1 at ford.com
Thu May 22 05:56:59 EDT 2008


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 at lists.jboss.org
[mailto:rules-users-bounces at lists.jboss.org] On Behalf Of Vishal Deshmukh
Sent: 22 May 2008 10:31
To: rules-users at 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



-------------- next part --------------
An HTML attachment was scrubbed...
URL: http://lists.jboss.org/pipermail/rules-users/attachments/20080522/8ec2bf46/attachment.html 
-------------- next part --------------
A non-text attachment was scrubbed...
Name: smime.p7s
Type: application/x-pkcs7-signature
Size: 7206 bytes
Desc: not available
Url : http://lists.jboss.org/pipermail/rules-users/attachments/20080522/8ec2bf46/attachment.bin 


More information about the rules-users mailing list