[rules-users] Initialize Global
Anstis, Michael (M.)
manstis1 at ford.com
Tue Oct 30 12:28:48 EDT 2007
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 at lists.jboss.org
[mailto:rules-users-bounces at lists.jboss.org] On Behalf Of java_user_
Sent: 30 October 2007 16:06
To: rules-users at 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 at 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 at lists.jboss.org
https://lists.jboss.org/mailman/listinfo/rules-users
-------------- next part --------------
A non-text attachment was scrubbed...
Name: smime.p7s
Type: application/x-pkcs7-signature
Size: 4159 bytes
Desc: not available
Url : http://lists.jboss.org/pipermail/rules-users/attachments/20071030/d4b08bef/attachment.bin
More information about the rules-users
mailing list