[rules-users] Non short circuit ANDing

Grant Rettke grettke at acm.org
Tue Jan 29 22:53:15 EST 2013


I am curious about this, too, and the conclusion that I came too was
that in this situation I should structure the rules in two phases and
generate new facts that tell me how to proceed:

Phase 1: Validate the presence or lack of presence of things that I
value. Eg: did the user provide a name and age that is old enough.
Assert either facts that show validity, or notices explaining the
failure.

Phase 2: If enough validation facts are present then proceed with the
work in the rules. At the end, show all notices that were asserted

This is one idea.

On Tue, Jan 29, 2013 at 11:42 AM, mp
<meitreyi.panchmia at morganstanley.com> wrote:
> I need to record the results of each of the conditions as a side effect in a
> list. But in case condition1 is false, condition2 would not be evaluated.
> This would prevent me from knowing whether or not condition2 was true/false.
>
> 5.8.3.3.12. Operator precedence at
> http://docs.jboss.org/drools/release/5.2.0.Final/drools-expert-docs/html/ch05.html#d0e3962
> lists & as an operator. But it somehow doesn't work.
>
>
>
> --
> View this message in context: http://drools.46999.n3.nabble.com/Non-short-circuit-ANDing-tp4021928p4021931.html
> Sent from the Drools: User forum mailing list archive at Nabble.com.
> _______________________________________________
> rules-users mailing list
> rules-users at lists.jboss.org
> https://lists.jboss.org/mailman/listinfo/rules-users



-- 
Grant Rettke | ACM, AMA, COG, IEEE
grettke at acm.org | http://www.wisdomandwonder.com/
Wisdom begins in wonder.
((λ (x) (x x)) (λ (x) (x x)))



More information about the rules-users mailing list