Question
Quad Graphics
PL
Last activity: 20 Apr 2017 6:56 EDT
Error "Save, Delete or Commit has failed because lock is not held" (case resolving)
Hello
I've added pyResolveAndCloseCase FA in pyDefault rule for our parent case to have possibility to resolve manually the parent case and all its subcases.
Everything works fine except the error that is displayed saying "Save, Delete or Commit has failed because <pzInsKey of WorkObject> is not held".
I found a solution on PDN...: https://pdn.pega.com/support-articles/save-delete-or-commit-has-failed-because-lock-not-held-0
... but unfortunately I don't understand how to apply it (which SLA they are talking about). I reviewed all SLAs in my App and any of them set the goal time to zero.
Even if I've got the error all cases/subcases have been resolved properly.
Thank you for any help! :)
-
Like (0)
-
Share this page Facebook Twitter LinkedIn Email Copying... Copied!
BlueRose Technologies
AU
Hi,
May I know what is the value of goal time for the SLA.
Thanks,
Prudhvi
Quad Graphics
PL
Thanks for the response Prudhvi
The problem is I don't understand which SLA rule the article is mentioning and which SLA rule you are asking about.
We have many SLAs rules. Is there any "default" one that I should check first?
I think I reviewed all of SLAs and all of them have the goal time greater than zero (except these ones that have "Set the value of a property" selected)
Let me know if you need more information.
Thanks
Pegasystems Inc.
US
When you look at the history for your work objects, do you see that a service level has executed? If not, maybe there is a different root cause for your scenario.
Pegasystems
US
Regarding this error:
"Save, Delete or Commit has failed because <pzInsKey of WorkObject> is not held"
It means at the time you are doing either your commit or obj-save with write-now flag or obj-delete with immediate flag, you no longer have the lock on the object.
One thing you can do is a trace with the "locking" event type enabled to see if you can spot where you are unexpectedly releasing the lock too early or perhaps neglecting to acquire it in the first place.
If you are using obj-refresh-and-lock, things are more complicated, so be sure it is appropriate to use that method. /Eric
Quad Graphics
PL
Thanks!
You are right, I probably release the lock too early (probably the lock for parent case is lost because I have no lock for one of the subcases).
This is the error message from the tracer (CaseType event type) "(QUAD-Order2Cash-Work-Order)Database-LockFailure-LockLost QUAD-ORDER2CASH-WORK O-5552". O-5552 is our parent case.
Any idea how to keep the lock for a parent case when resolving parent case and all its subcases using OOTB pyResolveAndCloseCase flow action?
Capgemini
IN
Hello,
As you are calling the flow action pyResolveAndCloseCase from the parent case that means you must be having the lock for the parent case. But you may not have the lock for the child cases which is causing the error. I think if you dont have lock on one of the child case it should rollback all the update and should not close the parent case as well.
Can you check in the DB if the parent case is closed or not? If there is no assignment it might show the confirm harness containing case resolved but may not be resolved in DB. Please check for the workstatus for the parent and all the child cases.
-Saikat
Quad Graphics
PL
Thank You Saikat. You are close I think!
In the pyResolveAndCloseCase flow action we call pxForceCaseClose activity whom we we pass a parameter "CloseAllSubCases" (checkbox).
When I have it selected the error exists and in a tracer I have an error "QUAD-Order2Cash-Work-Order)Database-LockFailure-LockLost QUAD-ORDER2CASH-WORK O-5552". O-5552 is a parent case.
When I uncheck this checkbox so only parent case is resolved there is no error. The problem is that I need to close a parent case and all its subcases.
Any idea why the lock for parent case is lost when we also want to close all subcases? or How to lock all subcases so parent case will stay locked?
Unfortunately we are in cloud so I have no access to the DB.
Capgemini
IN
I think you are not able to get lock on the child as some other operator might have the lock and working on the case.