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

LockGoneException: Save, has failed because lock is not held

SA-69579

Summary



Line  items are not added to the child task despite completing the main task. Error displays when opening the child task.


Error Messages



Error: Unable to open an instance

Encountered problem when performing a Commit
com.pega.pegarules.pub.database.LockGoneException: Save, Delete or Commit has failed because lock "WORK-CLASS EGL-360196" is not held
From: (H89A36EE26CB6063CE4458B13E88F1558) 
    SQL: select pxOwnerId as "pxOwnerId", pxUpdateOperator as "pxUpdateOperator", pxUpdateOpName as "pxUpdateOpName", pxExpireDateTime as "pxExpireDateTime", pxUpdateDateTime as "pxUpdateDateTime", pxLockHandle as "pxLockHandle", pxCreateDateTime as "pxCreateDateTime", pxUserHost as "pxUserHost" from schema.pr_sys_locks where pzInsKey = ?
    SQL Inserts: <WORK-CLASS EGL-360196>    

    at com.pega.pegarules.data.internal.access.DBLockProviderImpl.releaseLock(DBLockProviderImpl.java:834)
    at com.pega.pegarules.data.internal.access.LockManagerImpl.releaseKey(LockManagerImpl.java:1443)
    at com.pega.pegarules.data.internal.access.DatabaseImpl.releaseReleaseOnCommitLocks(DatabaseImpl.java:3034)
    at com.pega.pegarules.data.internal.access.DatabaseImpl.attemptToProcessUpdates(DatabaseImpl.java:2668)
    at com.pega.pegarules.data.internal.access.DatabaseImpl.processUpdates(DatabaseImpl.java:2308)
    at com.pega.pegarules.data.internal.access.DatabaseImpl.commit(DatabaseImpl.java:2047)
    at com.pegarules.generated.activity.ra_action_spawnsplittedsoapprovaltask_3986eed3b4bd9ba19b080835af7e49b1.step13_circum0(ra_action_spawnsplittedsoapprovaltask_3986eed3b4bd9ba19b080835af7e49b1.java:2170)
    
'DebugPage' Page--- SR-XXXXX - A roll back has taken place for - Work Object:- EGL-360196 And Page message



Steps to Reproduce

  1. Configure a process to create a child task and copy line items from the main case.
  2. Complete the main task to create child tasks.


Root Cause



An issue in the custom application code or rules.
A LockGoneException and rollback occurred while creating child tasks.



Resolution



Perform the following local-change:
  1. Remove the commit step from the custom activity.
  2. Allow the out-of-the-box flow processing code manage the commit and rollback.
  3. Use a deferred Obj-Save step if a save is required. Add a step, if required, before creating the work object to check if the lock is held.

Published January 8, 2019 - 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