<html>
<head>
<meta content="text/html; charset=ISO-8859-1"
http-equiv="Content-Type">
</head>
<body bgcolor="#FFFFFF" text="#000000">
You should use an AgendaListener instead of polluting your rules
with such things.<br>
see there :
<a class="moz-txt-link-freetext" href="http://docs.jboss.org/drools/release/5.4.0.Beta2/drools-expert-docs/html_single/index.html#d0e2003">http://docs.jboss.org/drools/release/5.4.0.Beta2/drools-expert-docs/html_single/index.html#d0e2003</a><br>
<br>
<br>
Le 09/04/2012 03:21, s a a écrit :
<blockquote
cite="mid:1333934482.49254.YahooMailNeo@web33901.mail.mud.yahoo.com"
type="cite">
<div style="color:#000; background-color:#fff; font-family:times
new roman, new york, times, serif;font-size:12pt">
<div><span>I have resolved this problem using the following
approach</span></div>
<div><br>
<span></span></div>
<div><span>Create a Class with a method (say) <br>
</span></div>
<div><span class="tab"> </span><span>PrintRuleName(KContext
kcontext) { System.out.println(kcontext.getRuleName());}<br>
</span></div>
<div><br>
</div>
<div>In the decision table in the action Create an Instance of
this class and call this method by passing kcontext. Action
would look like</div>
<div>( Action for each row in decision table will have this)<br>
</div>
<div>PrintClass ThePrintClass = new PrintClass();</div>
<div>ThePrintClass.setPrintRuleName(kcontext);</div>
<div><br>
</div>
<div>SA<br>
</div>
<div><br>
</div>
<div style="font-family: times new roman, new york, times,
serif; font-size: 12pt;">
<div style="font-family: times new roman, new york, times,
serif; font-size: 12pt;">
<div dir="ltr"> <font face="Arial" size="2">
<hr size="1"> <b><span style="font-weight:bold;">From:</span></b>
srinivasasanda <a class="moz-txt-link-rfc2396E" href="mailto:srinivasasanda@gmail.com"><srinivasasanda@gmail.com></a><br>
<b><span style="font-weight: bold;">To:</span></b>
<a class="moz-txt-link-abbreviated" href="mailto:rules-users@lists.jboss.org">rules-users@lists.jboss.org</a> <br>
<b><span style="font-weight: bold;">Sent:</span></b>
Thursday, April 5, 2012 8:56 AM<br>
<b><span style="font-weight: bold;">Subject:</span></b>
[rules-users] Return List of Fired Rule Name from
Decision table<br>
</font> </div>
<br>
Hi,<br>
<br>
when a rule fires i am storing the rule name in Result field
of type list as <br>
result.add(drools.getRule().getName()) -- in 'part' of a
normal rule.<br>
<br>
Now i am using decision table,how can i get the rule names
fired. <br>
I am not able to give java statement in action or in row
contain field.Where<br>
to write that Java statement in Decison Table?Can you
suggest me please.<br>
<br>
Thanks<br>
Srinivasa Sanda<br>
<br>
--<br>
View this message in context:
<a class="moz-txt-link-freetext" href="http://drools.46999.n3.nabble.com/Return-List-of-Fired-Rule-Name-from-Decision-table-tp3887158p3887158.html">http://drools.46999.n3.nabble.com/Return-List-of-Fired-Rule-Name-from-Decision-table-tp3887158p3887158.html</a><br>
Sent from the Drools: User forum mailing list archive at <a
moz-do-not-send="true" target="_blank"
href="http://Nabble.com">Nabble.com</a>.<br>
_______________________________________________<br>
rules-users mailing list<br>
<a moz-do-not-send="true"
ymailto="mailto:rules-users@lists.jboss.org"
href="mailto:rules-users@lists.jboss.org">rules-users@lists.jboss.org</a><br>
<a moz-do-not-send="true"
href="https://lists.jboss.org/mailman/listinfo/rules-users"
target="_blank">https://lists.jboss.org/mailman/listinfo/rules-users</a><br>
<br>
<br>
</div>
</div>
</div>
<br>
<fieldset class="mimeAttachmentHeader"></fieldset>
<br>
<pre wrap="">_______________________________________________
rules-users mailing list
<a class="moz-txt-link-abbreviated" href="mailto:rules-users@lists.jboss.org">rules-users@lists.jboss.org</a>
<a class="moz-txt-link-freetext" href="https://lists.jboss.org/mailman/listinfo/rules-users">https://lists.jboss.org/mailman/listinfo/rules-users</a>
</pre>
</blockquote>
<br>
<br>
<div class="moz-signature">-- <br>
<!-- @author Hadrien HUGOT -->
<!-- Modèle signature thunderbird et autres -->
<meta http-equiv="Content-Type" content="text/html;
charset=ISO-8859-1">
<title>CARTE DE VISITE</title>
<span
style="font-size:13.5pt;font-family:"Arial","sans-serif";color:#15185A">Vincent
LEGENDRE</span><br>
<i><span style="font-size:8.5pt;
font-family:"Arial","sans-serif";color:#15185A">Consultant
Sénior</span></i><br>
<span style="font-size:4.5pt"> <br>
</span>
<span
style="font-size:9.0pt;font-family:"Arial","sans-serif";color:#15185A">EURODECISION<o:p></o:p></span><br>
<span
style="font-size:9.0pt;font-family:"Arial","sans-serif";color:#15185A">9A
rue de la Porte de Buc 78000 VERSAILLES<br>
Tél. : +33 (0)1 39 07 12 40<br>
Direct : +33 (0)1 39 07 26 16<br>
<a href="www.eurodecision.com">www.eurodecision.com</a></span><br>
<a href="http://www.eurodecision.com/"><span style="font-size:
12pt; font-family: "Times New
Roman","serif"; color: windowtext;
text-decoration: none;"> <img
src="cid:part5.01070109.04010605@eurodecision.com"
alt="EURODECISION" border="no"></span></a><a
href="http://www.eurodecision.com/"><span
style="font-size:12.0pt;font-family:"Times New
Roman","serif";color:windowtext;
text-decoration:none;text-underline:none"> </span></a>
</div>
</body>
</html>