-
Bug
-
Resolution: Done
-
Major
-
5.5.0.Final
-
None
-
None
-
-
Workaround Exists
-
GIVEN RULE:
rule "Nested nested model rule - doesn't compile"
dialect "mvel"
when
$model : Model( $nestedModel : nestedModel,
$nestedNestedModel : nestedModel!.nestedNestedModel,
"NestedNestedModelName".equalsIgnoreCase(nestedModel!.nestedNestedModel!.nestedNestedModelName) )
then
System.out.println( "I'm a nested nested model! My name is [" + $nestedNestedModel.nestedNestedModelName +"] " );
end
The following error occurs:
Caused by: java.lang.RuntimeException: Unable to Analyse Expression "NestedNestedModelName".equalsIgnoreCase(nestedModel != null && "NestedNestedModelName".equalsIgnoreCase(nestedModel.nestedNestedModel != null && "NestedNestedModelName".equalsIgnoreCase(nestedModel.nestedNestedModel.nestedNestedModelName):
[Error: unbalanced braces ( ... )]
[Near :
]
^
[Line: 6, Column: 4] : [Rule name='Nested nested model rule - doesn't compile']
at org.drools.container.spring.beans.KnowledgeBaseBeanFactory.afterPropertiesSet(KnowledgeBaseBeanFactory.java:121)
at org.springframework.beans.factory.support.AbstractAutowireCapableBeanFactory.invokeInitMethods(AbstractAutowireCapableBeanFactory.java:1477)
at org.springframework.beans.factory.support.AbstractAutowireCapableBeanFactory.initializeBean(AbstractAutowireCapableBeanFactory.java:1417)
... 17 more
The project needed to replicate the issue is attached to the issue