Are the values in the list ever tested? (With rules conditionally firing if the contents
of a list changes.) In the rules you've provided so far they are not. If this is the
case then there's no need to match them in the conditions and the use of globals is
just fine. The only reason to match a list in the rule conditions is if changing the list
could result in that rule firing.
________________________________
From: abhinay_agarwal <abhinay_agarwal(a)infosys.com>
To: rules-users(a)lists.jboss.org
Sent: Tuesday, November 27, 2012 4:36 AM
Subject: Re: [rules-users] Inserting Different Objects Of Same Class !
I was initially using two lists making them global, and it was working for
me, but then i read
"Globals are not designed to share data between rules and they should never
be used for that purpose. Rules always reason and react to the working
memory state, so if you want to pass data from rule to rule, assert the data
as facts into the working memory."
So, thought might be somewhere, an issue can arise and changed the global
facts.
Thanks,
AA
--
View this message in context:
http://drools.46999.n3.nabble.com/Inserting-Different-Objects-Of-Same-Cla...
Sent from the Drools: User forum mailing list archive at
Nabble.com.
_______________________________________________
rules-users mailing list
rules-users(a)lists.jboss.org
https://lists.jboss.org/mailman/listinfo/rules-users