[rules-users] PredicateConstraints and MVEL issue?
Edson Tirelli
tirelli at post.com
Tue Sep 4 14:05:39 EDT 2007
Yuri,
The syntax with {} is not valid... are you really using that??? or is it
just pseudo-code?
[]s
Edson
2007/9/4, Yuri <ydewit at gmail.com>:
>
> Consider the following rules:
>
> rule (1)
> when
> a: Criteria(
> $criteriaA : criteriaA,
> $criteriaB : criteriaB )
>
> b: Criteria(){
> matchCriteriaA == true && criteriaA == $criteriaA
> || matchCriteriaB == true && criteriaB == $criteriaB
> }
> then
> ...
> end
>
> rule (2)
> when
> a: Criteria(
> $criteriaA : criteriaA,
> $criteriaB : criteriaB )
>
> b: Criteria(){
> eval(
> matchCriteriaA == true && criteriaA == $criteriaA
> || matchCriteriaB == true && criteriaB == $criteriaB
> )
> }
> then
> ...
> end
>
> I am seeing different behavior for the same test cases. I am basically
> inserting
> "a" and "b" with matching criteriaA and criteriaB and I am testing
> different
> combinations of matchCriteriaA and matchCriteriaB (i.e. F/F, F/T, T/F,
> T/T).
>
> Results for rule (1):
> F/F -> rule activated (incorrect)
> T/F -> rule activated (correct)
> F/T -> rule activated (correct)
>
> Results for rule (2):
> F/F -> rule activated (incorrect)
> T/F -> rule activated (correct)
> F/T -> rule activated (correct)
>
> Any ideas?
>
>
> _______________________________________________
> rules-users mailing list
> rules-users at lists.jboss.org
> https://lists.jboss.org/mailman/listinfo/rules-users
>
--
Edson Tirelli
Software Engineer - JBoss Rules Core Developer
Office: +55 11 3529-6000
Mobile: +55 11 9287-5646
JBoss, a division of Red Hat @ www.jboss.com
-------------- next part --------------
An HTML attachment was scrubbed...
URL: http://lists.jboss.org/pipermail/rules-users/attachments/20070904/e4834a02/attachment.html
More information about the rules-users
mailing list