I have a Rule that triggers on “Entity Unlinked”.
If I DELETE a linked entity, the Rule gets triggered, BUT it seems only after the entity is already gone - so the rule cannot work correctly, because it needs to get values from the unlinked/deleted entity.
It would make more sense if unlinking (and any triggered Rules) was processed completely, before the entity was Deleted. As it is, there are two different kinds of “unlinked” entities (deleted vs. not-deleted), and they get processed differently by a Rule that triggers on “unlinked”.
The various elements of an automation that occur after triggering (i.e. filter checking and then actions) are ‘asynchronous’, so for any automation, there is always the possibility that the data in Fibery has changed since the event that triggered the automation has occurred.
Even if the ‘unlinked’ event was guaranteed to occur before the ‘deletion’ event, there won’t be any guarantee that the subsequent filter checks/actions will take place before the entity has been deleted.
I suppose the best solution is to first unlink entities that need to be deleted, then wait for some indeterminate amount of time to allow any “unlink” triggers to be processed, then actually delete the entities some time later…
That is frustratingly complicated and non-deterministic
I think the underlying reason for the issue is that automations behave a bit like a user doing stuff in Fibery. Because Fibery is a collaborative tool, it would be undesirable that any ‘user’ is able to block actions by other users.
In your case, the action of deleting an entity could be effected in such a way as to follow a certain order (unlink everywhere and then delete) but it doesn’t make sense for automations (or formula updates, or other human users) to be prevented from taking action until the whole sequence has been completed, since this would amount to the deletion activity ‘blocking’ other activities.
I see it as similar to the distinction between a real-time operating system and a multi-tasking general-purpose OS. The benefits of multi-tasking (collaborative workspace, etc.) are gained at the expense of other capabilities (determinism).