I had a very interesting experience today with Drools Decision Tables and MVEL.
My Decision Table has a consequence that refers to $person.name – using MVEL.
It compiled, it ran and it worked.
But, I had a setup.drl File in the same rule package as the Decision Table, and in that setup.drl I set the dialect to MVEL.
Now, move that setup.drl into a different rule package, and despite the kbase referring to both packages in the kmodule.xml, the Decision Table now fails with the error message:
> Message ( ERROR ): Rule Compilation error The field Person.name is not visible
So, a little experiment and I created a new dialect.drl file in the same rule package as the Decision Table – that sets the dialect to “MVEL” and suddenly everything works again…
package com.skills421.examples.drools.people dialect "mvel"
Quirk? Feature? Consequence?
Either way – it’s useful to know when working with Decision Tables.
Drools version 6.3.0.Final