[rules-users] Rewriting rules

Wolfgang Laun wolfgang.laun at gmail.com
Thu Feb 10 02:20:18 EST 2011


On 9 February 2011 19:54, jwillans2 <james.willans at ceteva.com> wrote:

>
> > rule "example"
> >  when
> >    $op : ObjectProvider()
> >    Object(slot = "value") from op.eval()
>
> Because getting the value returned by op.eval() is extremely expensive and
> should only be done if this component of the rule is evaluated (assuming
> that the rule has a more complex pattern implicating other types).
>
>
Calling $op.eval() (don't call it eval!) being expensive is a good reason
for keeping the returned value in Working Memory :-)

You can have one rule that determines whether it is required to call
$op.eval() and do the inserts and another one that uses the inserted facts.
-W



> Thanks,
>
> James
>
> --
-------------- next part --------------
An HTML attachment was scrubbed...
URL: http://lists.jboss.org/pipermail/rules-users/attachments/20110210/08aa6036/attachment.html 


More information about the rules-users mailing list