[rules-users] Disabling strict mode in 5.4
Joe White
Joe.White at recondotech.com
Fri May 25 13:57:37 EDT 2012
How do you disable strict mode in 5.4? We are using the code below and
getting strict mode exceptions. It worked in prior versions. Do you have
to use the new APIs to disable strict mode?
PackageBuilderConfiguration pkgBuilderCfg = new
PackageBuilderConfiguration();
MVELDialectConfiguration mvelConf = (MVELDialectConfiguration)
pkgBuilderCfg.getDialectConfiguration( "mvel" );
mvelConf.setStrict(false);
mvelConf.setLangLevel(5);
PackageBuilder builder = new PackageBuilder(pkgBuilderCfg);
builder.addPackageFromDrl(new StringReader(drlString));
An example exception:
1.
19:17:51,137|ERROR|drools.DroolsMgr|DroolsMgr.java|159|deployRulesFromMo
delForScope|org.apache.camel.spring.Main.main()|smf-rcp-SNAPSHOT|Failed
to deploy rules from model
2. com.recondotech.hre.rules.management.HRERulesManagmentException:
org.drools.rule.InvalidRulePackage: Unable to Analyse Expression
$existingValue.toLowerCase():
3. [Error: unable to resolve method using strict-mode:
java.lang.Object.toLowerCase()]
4. [Near : {... $existingValue.toLowerCase() ....}]
5. ^ : [Rule
name='PEL_CHANGELIST_RES.AUTH.Actual First Name']
Thanks
Joe
-------------- next part --------------
An HTML attachment was scrubbed...
URL: http://lists.jboss.org/pipermail/rules-users/attachments/20120525/39077a23/attachment.html
More information about the rules-users
mailing list