I'm building a rules project using Guvnor. In one of my DSL, I've the follow "consequence" statement for wrong operations:
[when]Error "{message}"=throw new Exception( "{message}" );
If I use the DSL rule, writing all the rule with DSL sentences, it works perfectly. However, using the Guided Editor, this doesn't work and the validation says anything like that:
[Error: unable to resolve method using strict-mode: org.drools.spi.KnowledgeHelper.throw()] [Near : {... throw new Exception( "
...
Someone knows what I need to do for this works? It's important because my project will be used by non-IT people.
Thanks.
The source code generated by the Guided Editor is very simple:
rule "exception test"
dialect "mvel"
when
eval( true );
then
throw new Exception( "error message" );
end