[rules-users] Identify Rule on Attributes

Knapp, Barry barry.knapp at railinc.com
Mon Mar 16 08:50:40 EDT 2009


You should create a new class that implements AgendaEventListener and
then add it to your execution session.  The snippet below shows how to
add the listener to the session if you create a new class called
ExecutionAgendaEventListener.  This is 4.7, probably pretty similar
concept in 5.


    		StatelessSession session =
ruleBase.newStatelessSession();
    		
    		//add agenda event listener to capture the fired rules
    		session.addEventListener(new
ExecutionAgendaEventListener());






-----Original Message-----
From: rules-users-bounces at lists.jboss.org
[mailto:rules-users-bounces at lists.jboss.org] On Behalf Of Nikhil_dev
Sent: Monday, March 16, 2009 1:25 AM
To: rules-users at lists.jboss.org
Subject: RE: [rules-users] Identify Rule on Attributes


As you guys have suggested to combine all the rule base into one then
for
example(one which i have already mentioned)
i will combine Rule1 , rule 2 and rule3 into 1 rule base then, when i
pass
the variables to the rulebase who will i come to know which rules were
executed.
things i would like to know if i am going to execute this idea, the
number
of rules that i will using say around 100000, is it advisable to include
all
of them in to 1 rulebase!!! 
will there be any performance issues.



Anstis, Michael (M.) wrote:
> 
> Furthermore a rulebase can contain rules from many resources (e.g.
> DRL's).
> 
> So I guess the cause of your pain is why do you need multiple
> rulebases!??! 
> 
> -----Original Message-----
> From: rules-users-bounces at lists.jboss.org
> [mailto:rules-users-bounces at lists.jboss.org] On Behalf Of Scott Reed
> Sent: 13 March 2009 14:41
> To: Rules Users List
> Subject: Re: [rules-users] Identify Rule on Attributes
> 
> A RuleBase can contain many rules, not just one. Generally we take all

> the rules we need for an application and we assemble them into one 
> rulebase, so we don't have to figure out which rulebase to use. Does 
> that help?
> 
> Nikhil_dev [3/13/2009 8:16 AM] wrote:
>> Perfect this is the situation but the only difference is the last
> part,
>>
>> Rulebase for all the 3 Rules are stored in memory.
>>
>> Now i have is attributes(implemented as bean class), but the issue is
> i dont
>> know which Rulebase to use out of the three which is present in the
> memory,
>> fetching them one by one and executing it individually is possible
but
> a
>> long procedure which i want to avoid.(executing 3 Rule is ok what if
i
> have
>> 100000 rules it will be very slow process)
>>   
> _______________________________________________
> rules-users mailing list
> rules-users at lists.jboss.org
> https://lists.jboss.org/mailman/listinfo/rules-users
> 
> _______________________________________________
> rules-users mailing list
> rules-users at lists.jboss.org
> https://lists.jboss.org/mailman/listinfo/rules-users
> 
> 


-----
Regards,
:working:Nikhil
-- 
View this message in context:
http://www.nabble.com/Identify-Rule-on-Attributes-tp22471473p22532090.ht
ml
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
This email and any files transmitted with it are confidential and intended solely for the use of the individual or entity to whom they are addressed. If you have received this email in error please notify the system manager. This message contains confidential information and is intended only for the individual named. If you are not the named addressee you should not disseminate, distribute or copy this e-mail.




More information about the rules-users mailing list