For the sake of our readers, I repeat the rule:
rule "enabled paramId: 1, id: 0"
salience 50
when
(def0: EmParamDefinition(paramName == "p2", listIndex == -1) and
EmParamValue(paramDefinitionId == def0, requiredValue == 1))
$param : EmParamValue(id == 1, enabled == false)
not ParentDisabled(id == 1)
then
$param.setEnabled(true);
update($param);
end
and the exception:
[Error: unexpected end of statement]
[Near : {... def ....}]
^
[Line: 1, Column: 4]
at org.mvel2.compiler.AbstractParser._captureBlock(AbstractParser.java:1470)
...
This looks like an MVEL bug. Try this simpler form:
def0: EmParamDefinition(paramName == "p2", listIndex == -1)
EmParamValue(paramDefinitionId == def0, requiredValue == 1)
You should also file a JIRA.
Snags like this are due to a completer rework of the DRL parser after 5.1.1.
-W
On 5 October 2011 11:34, wyborowiec <wyborowiec(a)gmail.com> wrote:
Hello
I've got following rule:
It compiles fine under Drools 5.1.1, but after switching to 5.3.0.CR1 I get
following exception:
It is
line that causes the problem - the exeption disappears after removing it.
What's interesting, when I add '$' sign to binding variable name, and the
line looks like:
instead of the exception I get DRL error:
For completness, this is how I add DRL resources:
I would be grateful if someone has an idea, why after switching Drools
version such problem exists.
--
View this message in context:
http://drools.46999.n3.nabble.com/Compilation-errors-with-5-3-0-CR1-tp339...
Sent from the Drools: User forum mailing list archive at
Nabble.com.
_______________________________________________
rules-users mailing list
rules-users(a)lists.jboss.org
https://lists.jboss.org/mailman/listinfo/rules-users