On 27/11/2013, Peter Troelsen <peter.j.troelsen(a)gmail.com> wrote:
Hey..
I have encountered a problem using the 'maches' operator in drool.. I wanna
write something like this (just made a simple example)
rule "Hello World"
when
m: Message("5" matches "5")
then
System.out.println("Test");
end
But eclipse tells me " '"5" ~= "5"' must be an boolean
expression ",
Indeed, it does with the above expression, but not when the left
operand is a field name. - File a JIRA, maybe it'll be fixed in 6.1.
and i
get an runtime error if i try to run it.. However if I use 'not matches' it
works! Forcing me to do something like this:
when
not m: Message("5" not matches "5")
This is not the double negation of the above pattern but something
entirely different.
A better workaround would be
"5".matches( "5" )
-W
then
Any ideas how to fix this?
- Thanks!
--
Peter