On 01/26/08 03:32, someone claiming to be Edson Tirelli wrote:
This should work:
$rli_list : RecordSet( this != $npi.relatedRLIs )
And it does, thanks very much. I could swear I tried that, but I guess not.
2008/1/25, Dirk Bergstrom <dirk(a)juniper.net
I collect objects of type RLI that are related to instances of type
"attach" them to their NPIs, and (in a later agenda group) collect
RLIs based on attributes of RLIs, NPIs, and other objects. In the
group, I need to update() the NPI object after the new list of RLIs
but I only want to do this when a *new* list is attached.
The only way I can find to do this requires an eval. Is there a
Here's the rule that I have now. This works:
rule "RLIs for NPI"
$npi : NPIRecord( )
$rli_list : RecordSet( eval( !
$rli_list.equals($npi.getRelatedRLIs())) ) from
collect( RLIRecord( npi_program == $npi.synopsis ) )
I'd like to write something like this:
$rli_list : RecordSet( $rli_list != $npi.relatedRLIs ) from
But that doesn't compile.
Dirk Bergstrom dirk(a)juniper.net
Juniper Networks Inc., Computer Geek
Tel: 408.745.3182 Fax: 408.745.8905