First solution is the one I use almost all times, and moving facts from a session to
another is far less costly than propagating facts for rules that will never be fired...
The second solution could be great too, but I am not sure that it will cut all
propagations. If you have this :
rule "unused"
when
exists ControlFact("some_group_id")
MyFact(att == value1)
then
...
end
I am prety sure that MyFact(att == value1) will generate a node which will be updated at
each MyFact insert/update/retract, regardless of the first condition is true or not ...
but may be I am wrong ...
Globally, my advice is : if you can partition your rules in independant groups, do it
really and create independant sessions (especially if performances become critical).
----- Mail original -----
De: "Mauricio Salatino" <salaboy(a)gmail.com>
À: "Rules Users List" <rules-users(a)lists.jboss.org>
Envoyé: Mercredi 21 Décembre 2011 18:28:52
Objet: Re: [rules-users] Action
It depends on your problem, but yes.. it could be more efficient,
except for the fact that you need to move all the objects from one
session to the other.
Another alternative is to use some kind of control fact that only
activate the second group of rules when the first group has been
evaluated.
Cheers
On Wed, Dec 21, 2011 at 2:25 PM, lhorton <LHorton(a)abclegal.com> wrote:
So if we have, for example, a set of rules that we know only need to
be
evaluated under certain conditions or for discrete types of Facts, would it
be more efficient to put them in a separate knowledge sessions?
Meaning, instead of one session where we insert all objects and then fire
agenda-group-1 and then agenda-group-2, we have knowledgeSession1 and
knowledgeSession2, insert only the facts relevant to each session, and fire
all rules on each session.
--
View this message in context:
http://drools.46999.n3.nabble.com/rules-users-Action-tp3604296p3604632.html
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
--
- CTO @
http://www.plugtree.com
- MyJourney @
http://salaboy.wordpress.com
- Co-Founder @
http://www.jugargentina.org
- Co-Founder @
http://www.jbug.com.ar
- Salatino "Salaboy" Mauricio -
_______________________________________________
rules-users mailing list
rules-users(a)lists.jboss.org
https://lists.jboss.org/mailman/listinfo/rules-users