<!DOCTYPE html PUBLIC "-//W3C//DTD HTML 4.01 Transitional//EN">
<html>
<head>
  <meta content="text/html;charset=ISO-8859-1" http-equiv="Content-Type">
</head>
<body bgcolor="#ffffff" text="#000000">
make a drl and dump to xml, that will give you the xml
element/attribution for this. The api, from java, for giving an agenda
focus is in the manual. The working memory can be made available in a
consequence via drools.getWorkingMemory().<br>
<br>
Mark<br>
<a class="moz-txt-link-abbreviated" href="mailto:marimuthu.balasubramanian@wipro.com">marimuthu.balasubramanian@wipro.com</a> wrote:
<blockquote
 cite="mid:A800F8578764634C957957BED9B8895E620516@BLR-SJP-MBX01.wipro.com"
 type="cite">
  <meta http-equiv="Content-Type" content="text/html; ">
  <meta content="MSHTML 6.00.2900.3157" name="GENERATOR">
  <div dir="ltr" align="left"><font color="#0000ff" face="Arial"
 size="2"><span class="335204512-01102007">i will take care moving from
.drl to .xml just tell me what is the API i have to use to run specific
rule.</span></font></div>
  <br>
  <div class="OutlookMessageHeader" dir="ltr" align="left" lang="en-us">
  <hr tabindex="-1"><font face="Tahoma" size="2"><b>From:</b> Marimuthu
Balasubramanian (WT01 - INNOVATION GROUP) <br>
  <b>Sent:</b> Monday, October 01, 2007 6:01 PM<br>
  <b>To:</b> 'Rules Users List'<br>
  <b>Cc:</b> <a class="moz-txt-link-abbreviated" href="mailto:sankar.laks@gmail.com">sankar.laks@gmail.com</a>; 'Mark Proctor'<br>
  <b>Subject:</b> RE: [rules-users] executing specific rules using
agenda group<br>
  <b>Importance:</b> High<br>
  </font><br>
  </div>
  <div dir="ltr" align="left"><span class="018352312-01102007"><font
 color="#0000ff" face="Arial" size="2">Hi Mark/Sundar,</font></span></div>
  <div dir="ltr" align="left"><span class="018352312-01102007"></span>&nbsp;</div>
  <div dir="ltr" align="left"><span class="018352312-01102007"><font
 color="#0000ff" face="Arial" size="2">Sorry for the&nbsp;mistake.&nbsp;I am not
asking the entire&nbsp;</font></span><span class="018352312-01102007"><font
 color="#0000ff" face="Arial" size="2">source code.&nbsp; I didn't find
syntax how to mention agenda group in xml file.</font></span></div>
  <div dir="ltr" align="left"><span class="018352312-01102007"><font
 color="#0000ff" face="Arial" size="2">I know what are steps to
following to fire all rules. just i am asking what are apis i have to
look in to fire specific rule.</font></span></div>
  <div dir="ltr" align="left"><span class="018352312-01102007"><font
 color="#0000ff" face="Arial" size="2">it might be few lines of code
needs to be added.&nbsp;&nbsp;</font></span></div>
  <div dir="ltr" align="left"><span class="018352312-01102007"></span>&nbsp;</div>
  <div dir="ltr" align="left"><span class="018352312-01102007"><font
 color="#0000ff" face="Arial" size="2">Marimuthu</font>&nbsp;</span></div>
  <br>
  <div class="OutlookMessageHeader" dir="ltr" align="left" lang="en-us">
  <hr tabindex="-1"><font face="Tahoma" size="2"><b>From:</b>
<a class="moz-txt-link-abbreviated" href="mailto:rules-users-bounces@lists.jboss.org">rules-users-bounces@lists.jboss.org</a>
[<a class="moz-txt-link-freetext" href="mailto:rules-users-bounces@lists.jboss.org">mailto:rules-users-bounces@lists.jboss.org</a>] <b>On Behalf Of </b>Mark
Proctor<br>
  <b>Sent:</b> Monday, October 01, 2007 4:35 PM<br>
  <b>To:</b> Rules Users List<br>
  <b>Cc:</b> <a class="moz-txt-link-abbreviated" href="mailto:sankar.laks@gmail.com">sankar.laks@gmail.com</a><br>
  <b>Subject:</b> Re: [rules-users] executing specific rules using
agenda group<br>
  </font><br>
  </div>
  <a moz-do-not-send="true" class="moz-txt-link-abbreviated"
 href="mailto:marimuthu.balasubramanian@wipro.com">marimuthu.balasubramanian@wipro.com</a>
wrote:
  <blockquote
 cite="mid:A800F8578764634C957957BED9B8895E6202F3@BLR-SJP-MBX01.wipro.com"
 type="cite">
    <meta content="MSHTML 6.00.2900.3157" name="GENERATOR">
    <div dir="ltr" align="left"><span class="981025408-01102007"><font
 color="#0000ff" face="Arial" size="2">Hi Sankar,</font></span></div>
    <div dir="ltr" align="left"><span class="981025408-01102007"></span>&nbsp;</div>
    <div dir="ltr" align="left"><span class="981025408-01102007"><font
 color="#0000ff" face="Arial" size="2">&nbsp;I am also in prateek team. send
me the java code to execute this rule. if you have any example for xml
based rule file please send it to us.</font></span></div>
    <div dir="ltr" align="left"><span class="981025408-01102007"></span>&nbsp;</div>
    <div dir="ltr" align="left"><span class="981025408-01102007"><font
 color="#0000ff" face="Arial" size="2">Regards</font></span></div>
    <div dir="ltr" align="left"><span class="981025408-01102007"><font
 color="#0000ff" face="Arial" size="2">Marimuthu</font></span></div>
  </blockquote>
Sankar, I would request that you don't send them the java code, if it's
obvious they haven't even read the basics from the manual. You have no
object model and thus no data to assert, so this should be trivial for
people to figure out how to execute, as it's literally cutting and
pasting.<br>
  <br>
Also anyone can get an xml example by dumping out a drl to xml, using
the XMLDumper - so there is no need to ask people for XML versions of
an example.<br>
  <blockquote
 cite="mid:A800F8578764634C957957BED9B8895E6202F3@BLR-SJP-MBX01.wipro.com"
 type="cite"><br>
    <div class="OutlookMessageHeader" dir="ltr" align="left"
 lang="en-us">
    <hr tabindex="-1"> <font face="Tahoma" size="2"><b>From:</b> <a
 moz-do-not-send="true" class="moz-txt-link-abbreviated"
 href="mailto:rules-users-bounces@lists.jboss.org">rules-users-bounces@lists.jboss.org</a>
[<a moz-do-not-send="true" class="moz-txt-link-freetext"
 href="mailto:rules-users-bounces@lists.jboss.org">mailto:rules-users-bounces@lists.jboss.org</a>]
    <b>On Behalf Of </b>Sankar S<br>
    <b>Sent:</b> Monday, October 01, 2007 12:56 PM<br>
    <b>To:</b> <a moz-do-not-send="true"
 class="moz-txt-link-abbreviated"
 href="mailto:rules-users@lists.jboss.org">rules-users@lists.jboss.org</a><br>
    <b>Subject:</b> Re: [rules-users] executing specific rules using
agenda group<br>
    </font><br>
    </div>
    <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>
&nbsp;&nbsp; I am using Drools 4.0. I have the sample rule for agenda-group with
output.Hope it helps&nbsp;&nbsp; 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"&nbsp; auto-focus true <br>
&nbsp; when<br>
&nbsp;&nbsp;&nbsp;&nbsp; eval(true)<br>
&nbsp;&nbsp; then<br>
&nbsp;&nbsp;&nbsp;&nbsp;&nbsp; System.out.println("rule1");<br>
&nbsp;&nbsp; end<br>
    <br>
    <br>
rule "rule2" agenda-group "rulegroup2"<br>
&nbsp;salience&nbsp; 12<br>
&nbsp; when<br>
&nbsp;&nbsp;&nbsp;&nbsp; eval(true)<br>
&nbsp;&nbsp; then <br>
&nbsp;&nbsp;&nbsp;&nbsp;&nbsp; System.out.println("rule2");<br>
&nbsp;&nbsp; end<br>
    <br>
    <br>
rule "rule2.1" agenda-group "rulegroup2" <br>
&nbsp;salience&nbsp; 10<br>
&nbsp; when<br>
&nbsp;&nbsp;&nbsp;&nbsp; eval(true)<br>
&nbsp;&nbsp; then<br>
&nbsp;&nbsp;&nbsp;&nbsp;&nbsp; System.out.println(" rule2.1");<br>
&nbsp;&nbsp; end<br>
&nbsp;&nbsp; <br>
rule "rule3" agenda-group "rulegroup3"<br>
&nbsp; when<br>
&nbsp;&nbsp;&nbsp;&nbsp; eval(true)<br>
&nbsp;&nbsp; then<br>
&nbsp;&nbsp;&nbsp;&nbsp;&nbsp; System.out.println("rule3");<br>
&nbsp;&nbsp;&nbsp;&nbsp;&nbsp; drools.setFocus("rulegroup2"); <br>
&nbsp;&nbsp; end<br>
&nbsp;&nbsp; <br>
&nbsp;&nbsp; rule "rule4" agenda-group "MAIN"<br>
&nbsp; when<br>
&nbsp;&nbsp;&nbsp;&nbsp; eval(true)<br>
&nbsp;&nbsp; then<br>
&nbsp;&nbsp;&nbsp;&nbsp;&nbsp; System.out.println("rule4");<br>
&nbsp;&nbsp;&nbsp;&nbsp;&nbsp; drools.setFocus("rulegroup3");<br>
&nbsp;&nbsp; end <br>
&nbsp; <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: &lt;<a href="mailto:prateek.katiyar@wipro.com"
 moz-do-not-send="true"> prateek.katiyar@wipro.com</a>&gt;<br>
Subject: [rules-users] executing specific rules using agenda group<br>
To: &lt;<a href="mailto:rules-users@lists.jboss.org"
 moz-do-not-send="true">rules-users@lists.jboss.org</a>&gt;<br>
Message-ID:<br>
&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&lt; <a
 href="mailto:A94AD757879CE142B7CEBC3E6FF5D3EC02C6A9BE@BLR-EC-MBX02.wipro.com"
 moz-do-not-send="true">A94AD757879CE142B7CEBC3E6FF5D3EC02C6A9BE@BLR-EC-MBX02.wipro.com</a>&gt;<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>
&lt;rule-attribute name="agenda-group" value="Check-rfq"/&gt;<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>
    <table>
      <tbody>
        <tr>
          <td bgcolor="#ffffff"><font color="#000000"><br>
The information contained in this electronic message and any
attachments to this message are intended for the exclusive use of the
addressee(s) and may contain proprietary, confidential or privileged
information. If you are not the intended recipient, you should not
disseminate, distribute or copy this e-mail. Please notify the sender
immediately and destroy all copies of this message and any attachments.
          <br>
          <br>
WARNING: Computer viruses can be transmitted via email. The recipient
should check this email and any attachments for the presence of
viruses. The company accepts no liability for any damage caused by any
virus transmitted by this email.<br>
          <br>
          <a moz-do-not-send="true" class="moz-txt-link-abbreviated"
 href="http://www.wipro.com">www.wipro.com</a><br>
          </font></td>
        </tr>
      </tbody>
    </table>
    <pre wrap=""><hr size="4" width="90%">
_______________________________________________
rules-users mailing list
<a moz-do-not-send="true" class="moz-txt-link-abbreviated"
 href="mailto:rules-users@lists.jboss.org">rules-users@lists.jboss.org</a>
<a moz-do-not-send="true" 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>
  <table>
    <tbody>
      <tr>
        <td bgcolor="#ffffff"><font color="#000000"><br>
The information contained in this electronic message and any
attachments to this message are intended for the exclusive use of the
addressee(s) and may contain proprietary, confidential or privileged
information. If you are not the intended recipient, you should not
disseminate, distribute or copy this e-mail. Please notify the sender
immediately and destroy all copies of this message and any attachments.
        <br>
        <br>
WARNING: Computer viruses can be transmitted via email. The recipient
should check this email and any attachments for the presence of
viruses. The company accepts no liability for any damage caused by any
virus transmitted by this email.<br>
        <br>
<a class="moz-txt-link-abbreviated" href="http://www.wipro.com">www.wipro.com</a><br>
        </font></td>
      </tr>
    </tbody>
  </table>
</blockquote>
<br>
</body>
</html>