[rules-users] Inserting Different Objects Of Same Class !

Greg Barton greg_barton at yahoo.com
Tue Nov 27 11:28:47 EST 2012


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 at infosys.com>
To: rules-users at 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-Class-tp4020971p4020981.html
Sent from the Drools: User forum 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 --------------
An HTML attachment was scrubbed...
URL: http://lists.jboss.org/pipermail/rules-users/attachments/20121127/3681c056/attachment.html 


More information about the rules-users mailing list