-
1. Re: Very strange behavior with rules file
swd847 Apr 1, 2009 5:56 AM (in response to vk101)What happens if you use the mvel dialect? Does it work then?(Put dialect
mvel
on the line after 'rule UnexpectedOne') -
2. Re: Very strange behavior with rules file
vk101 Apr 1, 2009 9:39 AM (in response to vk101)Unfortunately, explicitly declaring mvel as the dialect doesn't change anything. However, the following does work:
rule AnotherCorrect when identity : Identity() eval(identity.loggedIn) then System.out.println("This means loggedIn is true"); end;
The above rule is fired and the message is printed to the console, as expected. Why in the world does the first (below) not work but the second (below) work? According to the documentation and examples, both should work. The only thing in my security.drl that you don't see is a package declaration and the necessary imports - nothing more.
identity : Identity(loggedIn == true)
identity : Identity() eval(identity.loggedIn)
Am I doing something wrong here, or is this as unexpected for you to see as it is for me? The file compiles fine, so I'm sure there's no problem with the syntax - what could be going on?