Posted: 13 Nov 2017 5:20 EST Last activity: 13 Nov 2017 9:56 EST
Save, Delete or Commit has failed because lock is not held
I am getting the following Error when i try to delete a Record from Report defination using OOTB Activicty DeleetRecord (Lock is held under open by Handle method)
This is the exception i am getting under server logs
The deferred delete failed with the following exception
com.pega.pegarules.pub.database.LockGoneException: Save, Delete or Commit has failed because lock "MYOR-DATA-DATATYPE1 4" is not held
at com.pegarules.generated.activity.ra_action_delete_426b3807cce477d72413775192bb9956.perform at java.lang.Thread.run(Unknown Source)
I have also configured the following SLA under Assigment Level
When i was trying to delete the record from the Grid which is sourced with Page List(sourced with RD) was facing the same error, so i tried to fix it with the approach as specified in my use case. May be you can have a look into it, so that it might help you for your customization.
@Ravi, you can have the Delete button on grid header and on click of the button you can iterate over the Page List data in your activity then check for the pySelected property status, if it is true then you can perform the deletion of object from the page list. Also you can look into this discussion for some more information which might help you.
You can follow the same process for multiple records deletion also, the only difference is you need to iterate the Page list then delete the specific row which is being selected using DeleteRecord activity then reload the Page list to refresh the latest data into clipboard.