Support Article

pyCommitError on trying to open the work object

SA-37703

Summary



User has configured the use case and when trying to use the work object that was just created, it gives below error.

Error Messages

The deferred save failed with the following exception
com.pega.pegarules.pub.database.LockGoneException: Save, Delete or Commit has failed because lock "PEGACRM-ENTITY-CONTACT CON-20683" is not held


Steps to Reproduce



1. Create a work object.
2. Try using the same work object in other flow.


Root Cause



User has configured consecutive activities with deferred Saves and then trying to perform an Obj-Save with commit in one of the steps in the later invoked activities.

Soon after this step, they have another activity with does Obj-Save on the same context.

Because of which the deferred Saves are failing.

Use of Write-Now option interferes with PRPC commit transactional model and cause stale records of database.

And since that there are already other deferred saves that are available in queue, having Write-Now would not allow to commit those changes to db since the one with Write-Now has already committed to the DB with stale records.

Resolution



User is suggested to uncheck "Write-Now" from Obj-Save step as a best practice which resolves the issue.

Published May 9, 2017 - Updated May 22, 2017

Have a question? Get answers now.

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