<div><blockquote class="gmail_quote" style="border-left: 1px solid rgb(204, 204, 204); margin: 0pt 0pt 0pt 0.8ex; padding-left: 1ex;">Hello Prateek,</blockquote><div><br> I am using Drools 4.0. I have the sample rule for agenda-group with
output.Hope it helps you.<br><br>Regards<br>Sankar S<br><br>OUTPUT <br>rule1<br>rule4<br>rule3<br>rule2<br>rule2.1<br><br>RULE<br>package com.sample.agenda<br><br>rule "rule1" agenda-group "rulegroup1" auto-focus true
<br> when<br> eval(true)<br> then<br> System.out.println("rule1");<br> end<br><br><br>rule "rule2" agenda-group "rulegroup2"<br> salience 12<br> when<br> eval(true)<br> then
<br> System.out.println("rule2");<br> end<br><br><br>rule "rule2.1" agenda-group "rulegroup2" <br> salience 10<br> when<br> eval(true)<br> then<br> System.out.println("
rule2.1");<br> end<br> <br>rule "rule3" agenda-group "rulegroup3"<br> when<br> eval(true)<br> then<br> System.out.println("rule3");<br> drools.setFocus("rulegroup2");
<br> end<br> <br> rule "rule4" agenda-group "MAIN"<br> when<br> eval(true)<br> then<br> System.out.println("rule4");<br> drools.setFocus("rulegroup3");<br> end
<br> <br></div><br><blockquote class="gmail_quote" style="border-left: 1px solid rgb(204, 204, 204); margin: 0pt 0pt 0pt 0.8ex; padding-left: 1ex;">Date: Mon, 1 Oct 2007 10:43:28 +0530<br>From: <<a href="mailto:prateek.katiyar@wipro.com">
prateek.katiyar@wipro.com</a>><br>Subject: [rules-users] executing specific rules using agenda group<br>To: <<a href="mailto:rules-users@lists.jboss.org">rules-users@lists.jboss.org</a>><br>Message-ID:<br> <
<a href="mailto:A94AD757879CE142B7CEBC3E6FF5D3EC02C6A9BE@BLR-EC-MBX02.wipro.com">A94AD757879CE142B7CEBC3E6FF5D3EC02C6A9BE@BLR-EC-MBX02.wipro.com</a>><br>Content-Type: text/plain; charset="iso-8859-1"<br><br><br>
Hi<br><br>I am using Drools 4.0.<br>First time I want to fire some specific rules from my rule file(in .xml format) and then other rules for the second time.<br>I have defined agenda-group attribute for the rules as follows:
<br><br><rule-attribute name="agenda-group" value="Check-rfq"/><br><br>how can I execute specific rules using agenda group or is there any other options are available.<br>When I had gone through Drools documentation ,they mentioned Listener api can be used to execute specific rules but I did not find enough information on Listener.
<br>Please let me know how can I implement Listener api to execute specific rules.<br><br>Thanks<br><br>With Regards<br>Prateek<br><br></blockquote></div><br>