If you have questions or if you want to share your opinion about Aware IM post your message on this forum
#52883 by ddumas
Fri Jan 24, 2020 2:12 pm
I have not found anything in the doc that explains Deletion Rules. I realize that from a syntax perspective, these work like Update rules.

My questions are:

Is the BO instance row being deleted still in context when the delete rule is triggered on that BO? I.E. Can you still reference all of the attributes of the object being deleted in the Delete Rule code?

If an explicit DELETE (or CLEAN) BO is called in a Process, does the process first "pause" and execute any delete rules defined in the BO, and then return back to the process? I am thinking that's best, but maybe not, depending n the scenario.

Thanks,
Dave
Last edited by ddumas on Fri Jan 24, 2020 3:17 pm, edited 1 time in total.
#52885 by ddumas
Fri Jan 24, 2020 3:17 pm
Just tested. Delete Rules maintain context of the instance being deleted. Also, when used in a Process, the process does indeed "Pause" (good), and then executes the Delete Rules, and then returns to the Process with the next command after the DELETE BO

I then do a COMMIT TRANSACTION to force any outstanding saves, (thanks Rennur!). I do this because the COMMIT forces to the database to be in a "stable" state, in case you then want to EXEC any stored procs after the delete, to do any "post processing". I am a SQL Server and T-SQL wizard, so free to hit me up with SQL Server coding questions. As we all know, SQL Server is the best database known to mankind :)

Dave

Who is online

Users browsing this forum: Google [Bot] and 23 guests