[rules-users] executing specific rules using agenda group

Sankar S sankar.laks at gmail.com
Mon Oct 1 03:26:08 EDT 2007


>
> 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: <prateek.katiyar at wipro.com>
> Subject: [rules-users] executing specific rules using agenda group
> To: <rules-users at lists.jboss.org>
> Message-ID:
>         <A94AD757879CE142B7CEBC3E6FF5D3EC02C6A9BE at BLR-EC-MBX02.wipro.com>
> 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
>
>
-------------- next part --------------
An HTML attachment was scrubbed...
URL: http://lists.jboss.org/pipermail/rules-users/attachments/20071001/a60c8c1c/attachment.html 


More information about the rules-users mailing list