[rules-users] Nesting rules in Drools 5.x

Greg Barton greg_barton at yahoo.com
Sun Jan 3 02:28:32 EST 2010


I think this is fixed in trunk.

GreG

On Jan 3, 2010, at 0:56, orchid <maya.pollack at gmail.com> wrote:


Hi All,

I'm trying to nest the LHS of rules in the following way:

rule "Rule_stilton"
  when
      $c : Cheese (type == "stilton")
  then
    $c.addRuleToList( "Rule_stilton" );
    System.out.println("Rule_stilton was fired");
end

rule "Rule_price" extends "Rule_stilton"
 when
      Cheese(price <= 6.00) from $c
  then
      $c.addRuleToList( "Rule_price" );
     System.out.println("Rule_price was fired");
End

The class Cheese contains a list field of matching rules of that instance
and a public function 'addRuleToList', which adds the rule name into that
list.

I get build error: "Unable to find declaration in list while generating the
consequence invoker". Is there some other way to reach that?

Thanks in advance.
Any help will be appreciated.
-- 
View this message in context: http://n3.nabble.com/Nesting-rules-in-Drools-5-x-tp106902p106902.html
Sent from the Drools - User mailing list archive at Nabble.com.
_______________________________________________
rules-users mailing list
rules-users at lists.jboss.org
https://lists.jboss.org/mailman/listinfo/rules-users



      



More information about the rules-users mailing list