Actually what you want is that only the rules from the DRLs that you want are activated
and their consequences run (a subtle but important distinction). Put another way it
doesn't matter how many rules are in the knowledge base and evaluated as long as only
the rules you want are matched.
There are two main approaches you could do to control this. The first is to use agenda
groups with rules in different DRLs being in different agenda groups, this then lets you
control which groups consequences are run and in what order to.
Another approach is to introduce some additional facts into the working memory -
"EnabledRuleGroup(String groupName)". The first condition in each rule would
then be the statement "exists EnabledRuleGroup(name =="myDlrFilenameXYZ")
Then only rules matching the statement would be evaluated.
There are probably other variations around this too - things like agenda filters to filter
out the activations you don't want.
Thomas
-----Original Message-----
From: rules-users-bounces(a)lists.jboss.org [mailto:rules-users-
bounces(a)lists.jboss.org] On Behalf Of marunam
Sent: 17 March 2011 13:31
To: rules-users(a)lists.jboss.org
Subject: Re: [rules-users] drools design question
Thanks everyone for your inputs
Yes, so the confusion that I have is, with loading multiple drls. If I
load
all the drls in memory(may be 100s), does it mean that when I say
fireallRules, it is going to run the rules from all the drls?? That is
what
I don't want.
For a particular session at runtime, I may need to run drls from just
some
specific drls and not all the drls. How can I tackle this If I load all
the
drls?
Thank you
--
View this message in context:
http://drools-java-rules-
engine.46999.n3.nabble.com/drools-design-question-
tp2691182p2693429.html
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
**************************************************************************************
This message is confidential and intended only for the addressee. If you have received
this message in error, please immediately notify the postmaster(a)nds.com and delete it from
your system as well as any copies. The content of e-mails as well as traffic data may be
monitored by NDS for employment and security purposes. To protect the environment please
do not print this e-mail unless necessary.
NDS Limited. Registered Office: One London Road, Staines, Middlesex, TW18 4EX, United
Kingdom. A company registered in England and Wales. Registered no. 3080780. VAT no. GB 603
8808 40-00
**************************************************************************************