Yes, newest mvel version works fine, but that problem only happened when using mvel dialect. For java, just do as Chris mentioned:
when
Test( y == (x+1) )
then
And it will work. The () is needed to tell the engine that what is inside is a semantic code block, i.e., an expression that will return a value to be compared to y.
[]s
Edson
Hi,
even
Test (y == (x + 1))
works.
Richard : I think you should take a look at this before planning doing complicated calculations with drools http://lists.jboss.org/pipermail/rules-users/2008-April/005247.html but it might be fixed now.
Chris2008/5/2 Raffi Khatchadourian <khatchad@cse.ohio-state.edu>:
On Fri 2.May'08 at 10:05:20 +0100, Anstis, Michael (M.) wrote:Could you combine these conditions? As in:
The "when" section matches fact (object) patterns, so your requirement
could be written as:-
when there is a Test Fact 'A' and another Test Fact 'B' where "the 'x'
property of 'A'" equals "the 'y' property of fact 'B' plus 1" then.....
This would become:-
rule "Rule 1"
when
Test( $y : y )
Test( x == ($y + 1) )
when
Test($y : y, x == $y + 1)
//...
_______________________________________________
rules-users mailing list
_______________________________________________
rules-users mailing list
rules-users@lists.jboss.org
https://lists.jboss.org/mailman/listinfo/rules-users