Skip to main content

This content has been archived and is no longer being updated. Links may not function; however, this content may be relevant to outdated versions of the product.

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

Was this useful?

0% found this useful

Have a question? Get answers now.

Visit the Collaboration Center to ask questions, engage in discussions, share ideas, and help others.

Did you find this content helpful?

Want to help us improve this content?

We'd prefer it if you saw us at our best.

Pega Community has detected you are using a browser which may prevent you from experiencing the site as intended. To improve your experience, please update your browser.

Close Deprecation Notice
Contact us