Hi Leo,

another option could be to add some extra fact classes or declared types and do 
logical inserts. E.g. you could do:

rule "Age and gender women"
    when
        $p : Person(p1 >= 12 && p2 = 1)
    then
        insertLogical( new CouldHaveBeenPregnant($p) );
end 

rule "Pregnant"
    when
        $p : Person(p3 > 1)
        CouldHaveBeenPregnant( person == $p )
    then
        insertLogical( new HasBeenPregnant($p) );
end

rule "Pregnant2"
    no-loop
    when
        $p : Person(p4 <= P3)
        HasBeenPregnant( person == $p )
    then
        $p.setStatus("OK");
        update($p);
end 

Regards,
Mattias

----- Original Message -----
From: "salt" <[email protected]>
To: [email protected]
Sent: Friday, 2 November, 2012 7:09:14 PM
Subject: Re: [rules-users] How can I nested rules

Leo,

This can be achieved by using agendagroup. By drools.setFocus you can jump
from one rule to another.
Pls try that.





--
View this message in context: 
http://drools.46999.n3.nabble.com/How-can-I-nested-rules-tp4020488p4020681.html
Sent from the Drools: User forum mailing list archive at Nabble.com.
_______________________________________________
rules-users mailing list
[email protected]
https://lists.jboss.org/mailman/listinfo/rules-users
_______________________________________________
rules-users mailing list
[email protected]
https://lists.jboss.org/mailman/listinfo/rules-users

Reply via email to