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().

Mark
[EMAIL PROTECTED] wrote:
i will take care moving from .drl to .xml just tell me what is the API i have to use to run specific rule.

------------------------------------------------------------------------
*From:* Marimuthu Balasubramanian (WT01 - INNOVATION GROUP)
*Sent:* Monday, October 01, 2007 6:01 PM
*To:* 'Rules Users List'
*Cc:* [EMAIL PROTECTED]; 'Mark Proctor'
*Subject:* RE: [rules-users] executing specific rules using agenda group
*Importance:* High

Hi Mark/Sundar,
Sorry for the mistake. I am not asking the entire source code. I didn't find syntax how to mention agenda group in xml file. 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. it might be few lines of code needs to be added. Marimuthu
------------------------------------------------------------------------
*From:* [EMAIL PROTECTED] [mailto:[EMAIL PROTECTED] *On Behalf Of *Mark Proctor
*Sent:* Monday, October 01, 2007 4:35 PM
*To:* Rules Users List
*Cc:* [EMAIL PROTECTED]
*Subject:* Re: [rules-users] executing specific rules using agenda group

[EMAIL PROTECTED] wrote:
Hi Sankar,
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. Regards
Marimuthu
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.

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.

------------------------------------------------------------------------
*From:* [EMAIL PROTECTED] [mailto:[EMAIL PROTECTED] *On Behalf Of *Sankar S
*Sent:* Monday, October 01, 2007 12:56 PM
*To:* rules-users@lists.jboss.org
*Subject:* Re: [rules-users] executing specific rules using agenda group

    Hello Prateek,


I am using Drools 4.0. I have the sample rule for agenda-group with output.Hope it helps you.

Regards
Sankar S

OUTPUT
rule1
rule4
rule3
rule2
rule2.1

RULE
package com.sample.agenda

rule "rule1" agenda-group "rulegroup1"  auto-focus true
  when
     eval(true)
   then
      System.out.println("rule1");
   end


rule "rule2" agenda-group "rulegroup2"
 salience  12
  when
     eval(true)
   then
      System.out.println("rule2");
   end


rule "rule2.1" agenda-group "rulegroup2"
 salience  10
  when
     eval(true)
   then
      System.out.println(" rule2.1");
   end
rule "rule3" agenda-group "rulegroup3"
  when
     eval(true)
   then
      System.out.println("rule3");
      drools.setFocus("rulegroup2");
   end
rule "rule4" agenda-group "MAIN"
  when
     eval(true)
   then
      System.out.println("rule4");
      drools.setFocus("rulegroup3");
   end
    Date: Mon, 1 Oct 2007 10:43:28 +0530
    From: < [EMAIL PROTECTED] <mailto:[EMAIL PROTECTED]>>
    Subject: [rules-users] executing specific rules using agenda group
    To: <rules-users@lists.jboss.org
    <mailto:rules-users@lists.jboss.org>>
    Message-ID:
            <
    [EMAIL PROTECTED]
    <mailto:[EMAIL PROTECTED]>>
    Content-Type: text/plain; charset="iso-8859-1"


    Hi

    I am using Drools 4.0.
    First time I want to fire some specific rules from my rule
    file(in .xml format) and then other rules for the second time.
    I have defined agenda-group attribute for the rules as follows:

    <rule-attribute name="agenda-group" value="Check-rfq"/>

    how can I execute specific rules using agenda group or is there
    any other options are available.
    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.
    Please let me know how can I implement Listener api to execute
    specific rules.

    Thanks

    With Regards
    Prateek



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.

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.

www.wipro.com

------------------------------------------------------------------------

_______________________________________________
rules-users mailing list
rules-users@lists.jboss.org
https://lists.jboss.org/mailman/listinfo/rules-users


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.

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.

www.wipro.com


_______________________________________________
rules-users mailing list
rules-users@lists.jboss.org
https://lists.jboss.org/mailman/listinfo/rules-users

Reply via email to