Hi!
I'm newbie with java and drools and I have to build a java RESTful Web Services / rules engine. We already have Genesys Rule Authoring (GRAT) and Genesys Rule Engine (GRE) (version 8.1.2) who run drools version 5.2. We have the need to take the source of GRAT packages and use them in a "lite rule engine" for our development environments. For my POC, I have install drools 5.2 and create a project who can digest my package and fire rules just like I want. But for some package I have this kind of error :
BuildError: Unable to Analyse Expression $routingparams.priority = obtenirValeurParametre($routingparams.priority,"100");
$routingparams.target1 = obtenirValeurParametre($routingparams.target1, "AVGRP_GPAP_AEP_TA_MDP_E");:
[Error: unable to resolve method using strict-mode: com.desjardins.gtd.dpsccc.routage.gpap.routingparams.ObtenirValeurParametre.obtenirValeurParametre(java.lang.Integer, java.lang.String)]
[Near : {... ngparams.priority = obtenirValeurParametre($routin ....}]
If you look at .drl attach file, you'll see that the function obtenirValeurParametre(String, String). You'll also see this function call with (Integer, String) and the error is on this line. In drools package I can't have the same function with different params. I have try to use "drools.dialect.mvel.strict" = false, but it doesn't change anything.
KnowledgeBuilderConfiguration kbConfig =KnowledgeBuilderFactory.newKnowledgeBuilderConfiguration();
kbConfig.setProperty("drools.dialect.mvel.strict", "false");
System.setProperty("drools.dialect.mvel.strict", "false");
KnowledgeBuilder kbuilder = KnowledgeBuilderFactory.newKnowledgeBuilder( kbConfig );
As GRE run drools 5.2 like me and it work for GRE, I think that it must exist a solution other then add .toString() or something like this. Considering that we have a lot of package and some of them have thousand of rules, I don't want to make adjustments on each rule.
Someone have an idea to solve that issues? He/She will be my hero!
Thanks
Alain