[rules-users] setting globals in rule file

Wolfgang Laun wolfgang.laun at gmail.com
Wed Oct 14 13:49:48 EDT 2009


No, globals can only be set by calling the WorkingMemory method
   wm.setGlobal(String name, Object value)

You could call this in a consequence (RHS), but it's usually not a good idea
to do so.

What do you want to achieve?

-W

2009/10/14 Chris Richmond <crichmond at referentia.com>

>  Shouldn’t it be possible to set a global variable value within the rule
> file itself at the top.  Something like?
>
>
>
>
>
> global String deviceName = “myDevice”;
>
>
>
>
>
>
>
> I thought you could do that, but  consistently get an error saying  illegal
> character ‘=’ expected “(“
>
>
>
> Or something along those lines.
>
>
>
> This is possible and that syntax should work, shouldn’t it?
>
>
>
> Thanks,
>
> Chris
>
> _______________________________________________
> rules-users mailing list
> rules-users at lists.jboss.org
> https://lists.jboss.org/mailman/listinfo/rules-users
>
>
-------------- next part --------------
An HTML attachment was scrubbed...
URL: http://lists.jboss.org/pipermail/rules-users/attachments/20091014/b18c6bbe/attachment.html 


More information about the rules-users mailing list