How to Undo or Abort ChangeProcessor

By Xiaodong Liang

If you want to abort ChangeProcessor, you can use the TransactionManager.UndoTransaction to undo a ChangeProcessor that committed. You can check the ChangeProcessor.Transact to know if it is transacting one, and compare the ChangeDefinition.CommandName with Transaction.DisplayName in TransactionManager.CommittedTransactions to make sure you undo the right transaction.

And if you are in the current ChangeProcessor_OnExecute procedure, you can also set the Succeeded = False to abort the current ChangeProcessor.


Comments

Leave a Reply

Discover more from Autodesk Developer Blog

Subscribe now to keep reading and get access to the full archive.

Continue reading