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" <writemesaltworth(a)gmail.com>
To: rules-users(a)lists.jboss.org
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-tp4020488p402068...
Sent from the Drools: User forum mailing list archive at
Nabble.com.
_______________________________________________
rules-users mailing list
rules-users(a)lists.jboss.org
https://lists.jboss.org/mailman/listinfo/rules-users