CanInstructionsBeCommitted Method - Integration - Update 44 - Customization & Programming - Hexagon

SmartPlant Integration Customization

Language
English
Product
Integration
Search by Category
Customization & Programming
SmartPlant Foundation / SDx Version
10

For transactional containers, the CanInstructionsBeCommitted method is called before the transaction is committed. This method gives the application metadata container the option of rolling back the transaction should an instruction exist within the set of passed-in instructions that cannot be supported by the application metadata adapter software.

UpdateUIDInstructions contains the set of UpdateUID instructions for the transaction. Each UpdateUID instruction identifies an object whose UID was changed during the transaction. Since changing UIDs violates the rules for UIDs, this collection should normally be empty.

OtherInstructions contains all of the other instructions (InsertInstruction, UpdateInstruction, DeleteInstruction, etc.) for the transaction.

Only instructions that apply to objects in the application metadata container (versus other containers) should be checked by this method.

If a problem is found by this method that requires rolling back the transaction, then this method should return False. Otherwise the method should return true. Under no circumstances should this method raise an error.

Any errors that are found during this method should be added as ErrorMessage objects to the message container for the container composition. Doing so will result in those messages being displayed to the user.