[rules-users] modify and update is not working in the rule file

Wolfgang Laun wolfgang.laun at gmail.com
Fri Aug 17 01:47:41 EDT 2012


Do you mean this:

global ProgramRuleValidationLog progRuleValidationLog;

function boolean logging(String actualValue, String ruleValue) {
      progRuleValidationLog.setActualValue(actualValue);
   //...
}

with the message "progRuleValidationLog cannot be resolved"?

This is due to a restriction: globals are not "global" for, and
therefore not visible in, functions defined in DRL.

You might pass it in as an additional function parameter:
function boolean logging(String actualValue, String ruleValue,
ProgramRuleValidationLog progRuleValidationLog ) {
   //...
}

-W


On 16/08/2012, Rana <ven12344 at yahoo.com> wrote:
> ok but why is it not able to find my function written and why is it not
> able
> to find my global variable with it's name given.
>
> Please help me fix this global variable thing. Rest I will look into it
> later.
>
> Thanks.
>
>
>
> --
> View this message in context:
> http://drools.46999.n3.nabble.com/modify-and-update-is-not-working-in-the-rule-file-tp4019158p4019212.html
> Sent from the Drools: User forum mailing list archive at Nabble.com.
> _______________________________________________
> rules-users mailing list
> rules-users at lists.jboss.org
> https://lists.jboss.org/mailman/listinfo/rules-users
>


More information about the rules-users mailing list