Thanks for the post Pete,
Essentially, my rules are fairly simple -
IF Object1 IS NEW THEN
Create Object2 WITH Attributes from Object1
IF Object1 WAS CHANGED THEN
FIND Object2 WHERE Object2.Object1Reference=Object1
DELETE Object2
IF Object1 WAS CHANGED THEN
Create Object2 WITH Attributes from Object1
The Objects are a bit more complex than above and there are multiple fields which can be changed, as well as multiple Object2 instances created by a new or changed Object1. To code the updates caused by the changes would be very long-winded (not to mention difficult to get right), so I've decided that the cleanest is just to dump the earlier-created Object2s and replace them with new ones. I agree, this may not sound like the best thing to do, but trust me, it's easier than updating a pile of related Object2s 🙂
The question really is how to get the three rules above to fire in the above order. The rule processing engine appears to carry out the two create rules first and then the delete rule - leaving me with no instances of Object2 at all !
I have a workaround sorted which involves assigning a number flag to the instances of Object2 to indicate which are the latest creations and then not delete those instances, but I'm still very curious about the rule evaluation.
Peter