Mykhaylo Adamovych
Mykhaylo Adamovych

Reputation: 20966

disable strict mode in drools

I'm getting error like Error: unable to resolve method using strict-mode: ...
I've added system property drools.dialect.mvel.strict=false
I can see system property was applied to my app in jvisualvm
But I'm getting the same error with 'using strict-mode'.

How could I disable strict mode in drools?

Upvotes: 1

Views: 4531

Answers (1)

laune
laune

Reputation: 31290

This is how it can be done from Java:

  KnowledgeBuilderConfiguration kbConfig =
        KnowledgeBuilderFactory.newKnowledgeBuilderConfiguration();

    kbConfig.setProperty("drools.dialect.mvel.strict", "false");

    KnowledgeBuilder kBuilder =
        KnowledgeBuilderFactory.newKnowledgeBuilder( kbConfig );

Although, setting the property should be OK. -- Maybe a look at the error might help to find a workaround?

Upvotes: 2

Related Questions