[rules-users] No globals in functions?
Bagwell, Allen F
afbagwe at sandia.gov
Thu Oct 9 18:35:47 EDT 2008
There's probably an easy explanation for this. I was wondering about why functions inside of rule files can't access globals?
For example, I have a log4j logger that I pass into my rule files via a global. The logger should never be a part of working memory. It's just there to capture valuable feedback.
But I can't do this:
global Logger log;
function void foo(String cond)
{
if (cond == "error")
log.error("I saw an error");
}
Because the compiler says that in the function it can't resolve 'log'.
-A
Allen F. Bagwell
e-mail: afbagwe at sandia.gov
phone: 505/284-4517
fax: 505/ 844-7886
There is no monument dedicated to the memory of a committee. -- Lester J. Pourciau
-------------- next part --------------
An HTML attachment was scrubbed...
URL: http://lists.jboss.org/pipermail/rules-users/attachments/20081009/c967c9bf/attachment.html
More information about the rules-users
mailing list