[great-users] Will this work or crash?

Aditya Agrawal Aditya at isis.vanderbilt.edu
Wed Jun 16 01:43:07 CDT 2004


> If I have elements A and B:
> The first time A will match Requirement1 and B will match Requirement2
> and B will be flagged as deleted
> The second time B will match Requirement1 and A will match
Requirement2
> and A will be flagged as deleted
> 
> So will I end up having ZERO requirements?
> Or the second time B will not match anything because it was already
> flagged as deleted?
> 

[Adi] 
I think in this case both will be deleted. If you want to have the match
happen again after the first is deleted you should do the following. 

1. In the rule make the "For all" attribute to false. This will only
execute the rule once. 

2. From outside the rule send the outputs of the rule to the inputs.
This will cause the rule to fire once, match A, B. A will be deleted.
The rule will end, the output go back to input. Next time there aren't
two objects and the rule will fail.

I hope this helps.

Thanks,
Adi



More information about the great-users mailing list