Posted: 3 Nov 2017 6:05 EDT Last activity: 27 Nov 2017 23:31 EST
Closing the subcase releases lock of parent case in CPM
We are using CPM framework in our application. We have a requirement where we need to open a sub case from parent case by clicking a link in the parent case assignment, we are able to open the sub case and work on it after closing the sub case the parent case assignment from where the subcase is launched is displayed but the lock of parent case is released. Because of this, any further action in parent case causes an error. Can anyone suggest a way to reclaim the lock of parent case after the sub case is closed.
***Updated by moderator: Lochan to update Categories***
Well first of all, reclaiming the lock may not be sufficient. If you've started to make changes to the parent object on the screen, and you reclaim the lock, your changes may then throw away someone else's changes that came in after you lost the lock and before you reclaimed it.
Instead, you may want to make sure you don't lose the lock in the first place. [ note: if you were only reviewing the parent object, you should not have had a lock on it in the first place. I'm assuming you are actually updating the parent object ]
For not losing the lock in the first place, make sure the release-on-commit attribute of the child case is not set, since that would directly cause the behavior you are seeing.
But the lock is released by out of the box 'DoClose' activity, getting called on click of confirm button in the CPMConfirmButton section. Is there any way to close the sub case and show the parent case w/o using the Out of the box button in CPMConfirmButton section?