When exactly an object deletion rules are triggered?

If you have questions or if you want to share your opinion about Aware IM post your message on this forum
Post Reply
greg
Posts: 124
Joined: Sat Apr 23, 2005 12:46 am

When exactly an object deletion rules are triggered?

Post by greg »

Are object deletion rules triggered just before or just after removal of an object instance? For example, BOA is related to BOB and a calculated attribute in BOB counts how many BOA instances are linked to a BOB. I need to re-set this attribute when BOA is deleted. I added these two rules to the object deletion node of BOA:

rule 1: FIND BOB WHERE BOA IN BOB.RelatedAttribute
rule 2: UPDATE BOB

Will it work? I guess could find out the answer empirically but I want to learn more about the way deletion rules operate.
aware_support
Posts: 7525
Joined: Sun Apr 24, 2005 12:36 am
Contact:

Post by aware_support »

Deletion rules are triggered before the object is deleted so your rules will not work. I would put the following rule on BOB to perform the calculation that you want:

If BOB.RelatedAttr WAS CHANGED Then
BOB.COUNT_ATTRIBUTE = COUNT BOA WHERE BOA IN BOB.RelatedAttr
Aware IM Support Team
Post Reply