Modifying the Model Using Session Transactions

In order to make modifications to a model, session transactions must be used. Prior to making a modification, either BeginTransaction() or BeginNamedTransaction() must be called. Once all the modifications are completed, CommitTransaction() must be called.

Note: In r7.3, the nested transactions and rollbacks are supported with certain limitations. The limitation is illustrated in the following state diagram:

After the beginning of an outer transaction, the API is in State I of the diagram. A new nested transaction can be opened or the outer transaction can be closed. Any operation other than the open or close of a transaction, such as creating, modifying objects, properties, and so on, will transfer the API to State II. In that state further modifications can continue, but no new nested transactions are allowed. The API continues to be in that state until the current transaction is committed or rolled back.

Use of nested transactions allows better control over modification flow. The following examples describe the uses:


Copyright © 2009 CA. All rights reserved. Email CA about this topic