Let's say I have a CRUD script that does some actions for OnCreate/OnUpdate/OnDelete.
If that script fails for any of the action, I would like to rollback the changes to the DOMInstance.
In this cases I'm considering the creation of the instance and the execution of the script as a single transaction
Could I work with a DomBehaviorDefinition where each state represents a part of the transaction?
Hi Tim,
I guess you can use OnDomInstanceCrudWithFullMeta for this where you have the previous DOM Instance before the changes. Or even the current DOM Instance before you do some changes in your CRUD. You can use a try-catch and apply the current or previous version in case of a CRUD script crash.
This could be an easy approach to get the expected behavior. Do keep in mind that this could create a loop if the original version that you will roll back to would also cause the script to fail.