[rules-users] How to chose witch rules are going to be evaluated?

Edson Tirelli tirelli at post.com
Fri Jul 16 16:42:46 EDT 2010


    The only way to prevent parts of a rule of being evaluated is to use
control facts:

when
    SomeControlFact( someCondition == true )
    eval( ..someHeavyEvaluation... )
then

    In the above case, the eval will only be evaluated when the control fact
matches.

    Another way of doing it is moving your expensive "calculation" to the
consequence of a rule and inserting the result as a fact. This way you have
control of when it is executed.

    []s
    Edson

2010/7/16 mmarmol <marcelo.marmol at gmail.com>

>
> I understand that, what i would like to do is to avoid evaluation of some
> rules at some point, for example just make the engine evaluate rules from
> one group, and treat the others as they don't even exists. So it wont be an
> Agenda Group or RuleFlow group for what i have seen.
> --
> View this message in context:
> http://drools-java-rules-engine.46999.n3.nabble.com/How-to-chose-witch-rules-are-going-to-be-evaluated-tp973388p973464.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
>



-- 
  Edson Tirelli
  JBoss Drools Core Development
  JBoss by Red Hat @ www.jboss.com
-------------- next part --------------
An HTML attachment was scrubbed...
URL: http://lists.jboss.org/pipermail/rules-users/attachments/20100716/b1e93fb8/attachment.html 


More information about the rules-users mailing list