Quantcast

Return List of Fired Rule Name from Decision table

classic Classic list List threaded Threaded
4 messages Options
Reply | Threaded
Open this post in threaded view
|  
Report Content as Inappropriate
star

Return List of Fired Rule Name from Decision table

srinivasasanda
CONTENTS DELETED
The author has deleted this message.
Reply | Threaded
Open this post in threaded view
|  
Report Content as Inappropriate
star

Re: [rules-users] Return List of Fired Rule Name from Decision table

manstis
Are your decision tables in XLS or Guvnor.

If XLS then you can use any Java in the ACTION.

If Guvnor, we support this in 5.4.CR1 (adding "free-format" DRL ACTION columns).

On 5 April 2012 13:56, srinivasasanda <[hidden email]> wrote:
Hi,

when a rule fires i am storing the rule name in Result field of type list as
result.add(drools.getRule().getName())  -- in 'part' of a normal rule.

Now i am using decision table,how can i get the rule names fired.
I am not able to give java statement in action or in row contain field.Where
to write that Java statement in Decison Table?Can you suggest me please.

Thanks
Srinivasa Sanda

--
View this message in context: http://drools.46999.n3.nabble.com/Return-List-of-Fired-Rule-Name-from-Decision-table-tp3887158p3887158.html
Sent from the Drools: User forum mailing list archive at Nabble.com.
_______________________________________________
rules-users mailing list
[hidden email]
https://lists.jboss.org/mailman/listinfo/rules-users


_______________________________________________
rules-users mailing list
[hidden email]
https://lists.jboss.org/mailman/listinfo/rules-users
Reply | Threaded
Open this post in threaded view
|  
Report Content as Inappropriate
star

Re: [rules-users] Return List of Fired Rule Name from Decision table

sanjuk72
In reply to this post by srinivasasanda
I have resolved this problem using the following approach

Create a Class with a method (say)
    PrintRuleName(KContext kcontext) { System.out.println(kcontext.getRuleName());}

In the decision table in the action Create an Instance of this class and call this method by passing kcontext. Action would look like
( Action for each row in decision table will have this)
PrintClass ThePrintClass = new PrintClass();
ThePrintClass.setPrintRuleName(kcontext);

SA


From: srinivasasanda <[hidden email]>
To: [hidden email]
Sent: Thursday, April 5, 2012 8:56 AM
Subject: [rules-users] Return List of Fired Rule Name from Decision table

Hi,

when a rule fires i am storing the rule name in Result field of type list as
result.add(drools.getRule().getName())  -- in 'part' of a normal rule.

Now i am using decision table,how can i get the rule names fired.
I am not able to give java statement in action or in row contain field.Where
to write that Java statement in Decison Table?Can you suggest me please.

Thanks
Srinivasa Sanda

--
View this message in context: http://drools.46999.n3.nabble.com/Return-List-of-Fired-Rule-Name-from-Decision-table-tp3887158p3887158.html
Sent from the Drools: User forum mailing list archive at Nabble.com.
_______________________________________________
rules-users mailing list
[hidden email]
https://lists.jboss.org/mailman/listinfo/rules-users



_______________________________________________
rules-users mailing list
[hidden email]
https://lists.jboss.org/mailman/listinfo/rules-users
Reply | Threaded
Open this post in threaded view
|  
Report Content as Inappropriate
star

Re: [rules-users] Return List of Fired Rule Name from Decision table

Vincent Legendre
You should use an AgendaListener instead of polluting your rules with such things.
see there : http://docs.jboss.org/drools/release/5.4.0.Beta2/drools-expert-docs/html_single/index.html#d0e2003


Le 09/04/2012 03:21, s a a écrit :
I have resolved this problem using the following approach

Create a Class with a method (say)
    PrintRuleName(KContext kcontext) { System.out.println(kcontext.getRuleName());}

In the decision table in the action Create an Instance of this class and call this method by passing kcontext. Action would look like
( Action for each row in decision table will have this)
PrintClass ThePrintClass = new PrintClass();
ThePrintClass.setPrintRuleName(kcontext);

SA


From: srinivasasanda [hidden email]
To: [hidden email]
Sent: Thursday, April 5, 2012 8:56 AM
Subject: [rules-users] Return List of Fired Rule Name from Decision table

Hi,

when a rule fires i am storing the rule name in Result field of type list as
result.add(drools.getRule().getName())  -- in 'part' of a normal rule.

Now i am using decision table,how can i get the rule names fired.
I am not able to give java statement in action or in row contain field.Where
to write that Java statement in Decison Table?Can you suggest me please.

Thanks
Srinivasa Sanda

--
View this message in context: http://drools.46999.n3.nabble.com/Return-List-of-Fired-Rule-Name-from-Decision-table-tp3887158p3887158.html
Sent from the Drools: User forum mailing list archive at Nabble.com.
_______________________________________________
rules-users mailing list
[hidden email]
https://lists.jboss.org/mailman/listinfo/rules-users




_______________________________________________
rules-users mailing list
[hidden email]
https://lists.jboss.org/mailman/listinfo/rules-users


--
CARTE DE VISITE Vincent LEGENDRE
Consultant Sénior

EURODECISION
9A rue de la Porte de Buc 78000 VERSAILLES
Tél. : +33 (0)1 39 07 12 40
Direct : +33 (0)1 39 07 26 16
www.eurodecision.com

EURODECISION

_______________________________________________
rules-users mailing list
[hidden email]
https://lists.jboss.org/mailman/listinfo/rules-users
Loading...