Did you try Kris's suggested LHS?
You can test whether the global is null using eval( objectList ==
null )
in the LHS of the rule.
This should provide the condition you request and prevent the rule from
firing after the global has been initialised.
-----Original Message-----
From: rules-users-bounces(a)lists.jboss.org
[mailto:rules-users-bounces@lists.jboss.org] On Behalf Of java_user_
Sent: 30 October 2007 16:06
To: rules-users(a)lists.jboss.org
Subject: Re: [rules-users] Initialize Global
Hi Kris,
I am using a JSR94 stateful session. My design is to initialize the global
list once and reuse it within the same session.
The init-global rule is being executed each execution because there is no
conditional statement. Can I disable the rule for future executions?
Thanks
Kris Verlaenen wrote:
> That initialized my global but the rule still runs every execution. Can
> I
> disable the rule after the first execution?
What do you mean by "every execution". A rule should only be executed
once,
unless it gets reactivated (which should not be the case in this
situation).
> I would like to use (if (objectList==null)). My list is not immutable.
> Can
> I make a similar rule for the LHS?
You can test whether the global is null using eval( objectList == null )
in
the LHS of the rule.
Kris
_______________________________________________
rules-users mailing list
rules-users(a)lists.jboss.org
https://lists.jboss.org/mailman/listinfo/rules-users
--
View this message in context:
http://www.nabble.com/Initialize-Global-tf4685186.html#a13491481
Sent from the drools - user mailing list archive at
Nabble.com.
_______________________________________________
rules-users mailing list
rules-users(a)lists.jboss.org
https://lists.jboss.org/mailman/listinfo/rules-users