Support Article
Mid-flow dependency error
SA-37609
Summary
User'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 Messages
The below error message appears:
Save, Delete or Commit has failed because lock "ABC-XYZ-Work C-123" is not held.
Steps to Reproduce
1. 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 Cause
The lock is being released internally when there is an update status in the flow.
Resolution
Perform the following local-change: -
Check "releaseLockManually" parameter in the acquireWorkObject activity.
Published May 18, 2017 - 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.