Jan Hustak created DROOLS-165:
---------------------------------
Summary: Fail-fast mode when a global is not defined at session start
Key: DROOLS-165
URL:
https://issues.jboss.org/browse/DROOLS-165
Project: Drools
Issue Type: Feature Request
Security Level: Public (Everyone can see)
Affects Versions: 6.0.0.Beta3
Reporter: Jan Hustak
Assignee: Mark Proctor
Priority: Minor
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.
--
This message is automatically generated by JIRA.
If you think it was sent incorrectly, please contact your JIRA administrators
For more information on JIRA, see:
http://www.atlassian.com/software/jira