Mid-flow dependency error
SummaryUser's business case type consists of a parent case with a mid flow dependency to a child case.
Parent case awaits for all the child case subcases to complete before advancing.
Child case is being performed by an activity invoked by a SOAP service.
If two instances of Parent Case and their associated child cases are created by users with different access groups the exception is thrown while trying to update one of the childcases by an activity.
The activity invoked by the SOAP service uses the Pega Out-of-the-box (OOTB) activity acquireWorkObject to obtain lock on the child object.
The failure occurs in subsequent stages when the the lock on the work object is lost during work status update.
Error MessagesThe below error message appears:
Save, Delete or Commit has failed because lock "ABC-XYZ-Work C-123" is not held.
Steps to Reproduce1. Create a simple Case type.
2. Create a child case type to the above case type.
3. On installation of the parent case type initiate the child case as well.
4. In the parent case flow configure a wait shape.
5. Create an activity that will be roughly like below that will advance the child flow:
6. Create two parent cases with two different operators having different access groups.
7. With one of the operator run the activity to advance the child created by it earlier.
Root CauseThe lock is being released internally when there is an update status in the flow.
ResolutionPerform the following local-change: -
Check "releaseLockManually" parameter in the acquireWorkObject activity.
Published May 8, 2017 - Updated May 18, 2017