Hi, one of our developers is having a problem with a specific rule.  Within the condition he needs to call a function passing a value from a variable reference defined earlier in the condition.  If he hard codes the value (for example passing a 1 instead of the variable) the rule works fine.  If we use $driverSequence (which should be some integer) the rule will not fire.

This is the rule that is giving us problems.  At the end of the "when" if we replace $driverSequence with a 1 then it works.  Any ideas???

rule "DriverChangeAutoLoss"
dialect "mvel"
when
               policy : Policy()
               $Driver : Driver( $driverSequence : driverSequence, (eval(driverSequence == findPrimaryDriverSequence(policy))) )
               (UWRDelta (driversAdded != null, driversAdded contains $driverSequence ) or UWRDelta(driverChanges != null, eval(isDriverChange(this, $driverSequence  ))))
then
               uwReportCriteria.addUWReport($Driver,"AutoLoss","CACHE_ONLY",null);
end

This e-mail is confidential.  If you are not the intended recipient, you must not disclose or use the information contained in it.  If you have received this e-mail in error, please tell us immediately by return e-mail to Email.Control@sentry.com and delete the document.

E-mails containing unprofessional, discourteous or offensive remarks violate Sentry policy. You may report employee violations by forwarding the message to Email.Control@sentry.com.

No recipient may use the information in this e-mail in violation of any civil or criminal statute. Sentry disclaims all liability for any unauthorized uses of this e-mail or its contents.

This e-mail constitutes neither an offer nor an acceptance of any offer. No contract may be entered into by a Sentry employee without express approval from an authorized Sentry manager.

Warning: Computer viruses can be transmitted via e-mail. Sentry accepts no liability or responsibility for any damage caused by any virus transmitted with this e-mail.