[rules-users] Checking variable values in rule conditions

erik at clairiot.com erik at clairiot.com
Wed Jul 8 07:50:22 EDT 2009


As far as I know, it's not a good idea to use global variable that have a
modifiable state for asserting rule conditions (strange behaviors can
happen).

I would insert in the working memory the variable object as a fact.


On Wed, 8 Jul 2009 02:56:44 -0700 (PDT), skasab2s
<skasab2s at smail.inf.fh-brs.de> wrote:
> Hi guys,
> 
> as far as I understood, in the rule conditions I can check what objects
are
> in the working memory and so on..
> But can I check for example a global variable value which I have declared
> in
> the same .DRL-File?
> for example:
> 
> global Boolean testWeanable
> ....
> 
> when 
>    testWeanable==true
> then
>  do this and that
> end
> 
> or should I insert the variable  testWeanable into the Working Memory to
do
> this?
> 
> Thanks a lot and many greets!



More information about the rules-users mailing list