Limitations on using transactions within extension points
IBM® Product Master starts user code for certain extension points inside an active transaction, and expects that the transaction is not disrupted by the user code for extension point. Product Master throws an exception when an attempt is made to commit or roll back the active transaction within any of these extension points.
- Value rule
- Default value rule
- String enumerated value rule
- Validation rule script
- Post save script
- Pre and post-processing scripts
Additionally, if you are using import script or catalog to catalog export script, commit or rollback is prevented if batch processing is being used (enabled by default). However, transactional operations are not prevented if the script disables the batch processing through the disableBatchProcessingForItems() script operation.
Invocation of script operations useTransaction(), startTransaction(), and Java™ API methods such as Context.commit() and Context.rollback() can cause disruption to the current transaction. It is recommended that they are not used within these extension points. Neither Context.setSavepoint() nor Context.rollbackToSavepoint() can disrupt a transaction, so these methods can be used freely within an extension point.
If you are migrating from previous versions of the product, review your extension point implementation for use of these operations.