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
--
Edson Tirelli
JBoss Drools Core Development
JBoss by Red Hat @
www.jboss.com