Support Article
Save, Delete or Commit failed because lock Case ID is not held
SA-55902
Summary
When using pxForceCaseClose to process work items in bulk from the the Bulk actions landing page, only the first item is processed. Lock exception occurs when processing the remaining work items.
Error Messages
Save, Delete or Commit has failed because lock "Case ID" is not held
Steps to Reproduce
1. Open the case type and add a case wide local action, such as 'Remove Case.
2. Configure a flow action with pxForceCaseClose post-processing activity in the RemoveCase flow action.
3. In the 'Process' action of the Bulk actions landing page, select 'Remove Case' for the selected items.
Verify if the selected cases are resolved according to the activity configured in the flow action.
Root Cause
pyAssignmentsList is the page list formed for the selected items in the Bulk actions landing page. pxForceCaseClose must loop over the results and process all the work items. However, only the first item is processed. The subsequent selected items fail with the Lock error. This occurs because the WorkObjectID on the parameter page is not populated with the correct data and continued to point to the previous work item. That is, WorkObjectID on parameter page and pzInsKey on the primary page are not in sync.
Resolution
When 'pxForceCaseClose' is used in the 'RemoveCase' flow action, ensure to pass the correct parameters to the activity.
Provide '.pzInsKey' as the parameter to the activity.
In this case, the 'WorkObjectID' is null. Therefore, the value is not updated when the selected work items are looped and the activity executed.
Published August 24, 2018 - Updated October 8, 2020
Have a question? Get answers now.
Visit the Collaboration Center to ask questions, engage in discussions, share ideas, and help others.