Support Article
Middle of the flow has got commit error
SA-18341
Summary
A custom activity, which fetches records from the DB, based on the record count specified, is executed. If the record count is specified as more than one, then only the first record is fetched and an error message displays on screen.
Error Messages
Save, Delete or Commit has failed because lock "XYZ" is not held
Steps to Reproduce
1. Create an activity.
2. Using Obj-Open or Obj-Open-By-Handle fetch the records from DB.
3. Run the activity.
Root Cause
An issue in the custom application code or rules. Work- WorkUnlock activity was called from the customized activity. WorkUnlock activity is deleting the lock held on the work object from DB.
Resolution
Perform the following local-change:
Instead of calling OOTB WorkUnlock activity explicitly, enable ReleaseOnCommit checkbox present in Obj-Open or Obj-Open-By-Handle methods of an activity. After commit, the lock will be released automatically.
Published January 31, 2016 - Updated October 8, 2020
Have a question? Get answers now.
Visit the Collaboration Center to ask questions, engage in discussions, share ideas, and help others.