Support Article
Unable to create child case and lock is lost for the parent
SA-107221
Summary
Error occurs while creating a child case using 'Create Case'.
Error Messages
[ttp-apr-8080-exec-14] [TABTHREAD5] [ ] [ MKP:01.02.01] (internal.access.DatabaseImpl) ERROR
A commit cannot be performed because a deferred save of instance ALTI-MP-MKP-WORK ISL-352 failed
[ttp-apr-8080-exec-14] [TABTHREAD5] [ ] [ MKP:01.02.01] (internal.access.DatabaseImpl) ERROR
The deferred save failed with the following exception com.pega.pegarules.pub.database.LockGoneException: Save, Delete or Commit has failed because lock "ALTI-MP-MKP-WORK ISL-352" is not held

Steps to Reproduce
- Launch the Case Manager portal.
- Create a new Case SLA Initiation.
- Upload the SLA CSV file to the case.
- Click Submit.
Root Cause
This error occurred if the lock of the work object was held by a different user. The user had opened the work object and attempted to close the browser window, or the user had not used the Obj-Save or Commit method after the work object was updated.
Resolution
Perform the following local-change:
- Restructure the activities to eliminate using Save Immediate (to avoid data integrity issues).
- In flows, leave such transaction handling to the underlying flow code.
- Do not make Transaction boundaries in the user's activities which the flows invoke. The Process Commander validates Utility activities which the flow invokes. Validation fails if Save Immediate is used. Do not use Save Immediate to address the issue about the Correspondence containing stale work object data. Correspondence will not contain stale data if the flow processing completes the Transaction boundary.
For more information, refer to: https://community.pega.com/knowledgebase/articles/process/troubleshooting-save-failed-commit-cannot-be-performed
Published July 7, 2020 - Updated December 2, 2021
Have a question? Get answers now.
Visit the Collaboration Center to ask questions, engage in discussions, share ideas, and help others.