[rules-users] [drools 4] firing a partial set of rules and consequences

Edson Tirelli tirelli at post.com
Sat Jun 16 12:13:41 EDT 2007


   Geoffrey,

   Look at agenda-groups and rule-flows.

    []s
    Edson


2007/6/15, Geoffrey De Smet <ge0ffrey.spam at gmail.com>:
>
> Can I fire a partial set of rules?
> Say I have 3 rules: fastRuleA, fastRuleB, slowRuleC.
> What's the best way to only fire the group of fastRule1 and fastRule2?
> AgendaFilter looks like a good way of doing this, but:
>
> If between 2 rule fires, I change a fact, but change it back to it's
> original state, will the rule be not refire, just like if I hadn't
> changed it temporary? for example fact1 is used in slowRuleC:
> fireAllRules(); // fires slowRuleC
> fact1.a++;
> fact1.a--;
> fireAllRules(); // does not fire slowRuleC?
>
> Does still apply if I fire other rules meanwhile?
> fireAllRules(); // fires slowRuleC
> fact1.a++;
> fireAllRules(notSlowRuleCAgendaFilter); // slowRuleC is ignored
> // if I did not filter it out it would have fired of course
> fact1.a--;
> fireAllRules(); // does not fire slowRuleC? or does it?
> // a hasn't is the same since the last time slowRuleC was fired
>
> --
> With kind regards,
> Geoffrey De Smet
>
> _______________________________________________
> rules-users mailing list
> rules-users at lists.jboss.org
> https://lists.jboss.org/mailman/listinfo/rules-users
>



-- 
  Edson Tirelli
  Software Engineer - JBoss Rules Core Developer
  Office: +55 11 3529-6000
  Mobile: +55 11 9287-5646
  JBoss, a division of Red Hat @ www.jboss.com
-------------- next part --------------
An HTML attachment was scrubbed...
URL: http://lists.jboss.org/pipermail/rules-users/attachments/20070616/f246e099/attachment.html 


More information about the rules-users mailing list