-
Feature Request
-
Resolution: Done
-
Minor
-
6.0.0.Beta3
-
None
-
None
The following DRL causes an infinite loop when run without setting the "missing" global:
global java.util.Collection missing
dialect "mvel"
rule "toInfinityAndBeyond"
when
then
x = missing[3]
end
because it triggers https://jira.codehaus.org/browse/MVEL-290
Even though the core issue is in MVEL I would really like an option to fail fast when a global is undefined at the very start of a session. I don't know about others but I never define globals from within the rules and I've had all sorts of trouble with missing globals - the infinite loop was just the last straw.
Of course, a global may legitimately be defined as null (which would also trigger the MVEL bug). So perhaps the fail-fast mode could be enabled on a case-by-case basis:
global required java.util.Collection basicHelpers
Sorry if this has been suggested before, I couldn't find any pertinent discussions.