What happens if you use the mvel dialect? Does it work then?(Put dialect
mvelon the line after 'rule UnexpectedOne')
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?