Thanks to both of you for the quick response!
Howard
2009/3/20 Edson Tirelli <tirelli(a)post.com>
Wolfgang is right in its suggestion.
Just to explain what the problem is, in previous versions of drools,
forall() could not be used with an embedded from. It is fixed in trunk.
[]s
Edson
2009/3/20 Wolfgang Laun <wolfgang.laun(a)gmail.com>
You don't need forall to solve your problem. The following rule prints all
> patient names which don't have problem 4711; omitting the 'not' prints
> those suffering from Colognitis.
>
> rule lookJoe
> when
> $patient: Patient()
> not ( Problem( code == "4711" ) from $patient.problemList )
> then
> System.out.println( $patient.getName() );
> end
>
> 'not' implies quantification (or exhaustive search over the domain).
> Without 'not' also searches all Problem entries of the current Patient
> so it would fire again if the patient has a problem stored more than
> once.
>
> -W
>
>
>
--
Edson Tirelli
JBoss Drools Core Development
JBoss, a division of Red Hat @
www.jboss.com
_______________________________________________
rules-users mailing list
rules-users(a)lists.jboss.org
https://lists.jboss.org/mailman/listinfo/rules-users