On 9 February 2011 19:54, jwillans2 <james.willans(a)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
--