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(a)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(a)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