[rules-dev] [Bug] due to MVEL, once more

Wolfgang Laun wolfgang.laun at gmail.com
Sun Jan 13 13:27:43 EST 2013


5.5.0. This simple DRL does not compile unless dialect "mvel" is
removed. "insert" is not recognized within a for loop body.

rule demo
dialect "mvel"
when
then
   for( int i = 1; i <= 3; i++ ){
       insert( "foo"+i );
   }
end

Unable to Analyse Expression for( int i = 1; i <= 3; i++ ){
       drools.insert( "foo"+i );
   };:
[Error: unable to resolve method using strict-mode:
org.drools.spi.KnowledgeHelper.drools()]
[Near : {... drools.insert( "foo"+i ); ....}]
                                                   ^
[Line: 1, Column: 0] : [Rule name='demo']


More information about the rules-dev mailing list