Support Article
Using Obj-Refresh-And-Lock twice causes Lock Missing error
SA-69548
Summary
A case’s stage is configured to have the 'Assignment1 – Utility – Assignment2' processes and the Obj-Refresh-And-Lock is used twice with a commit in between in the utility. Error occurs while submitting Assignment2.
Error Messages
You have lost the ability to make this change because a change elsewhere has taken precedence over the change you made here.
Steps to Reproduce
- Create case definition and select Optimistic Locking:
- Stage1
- Process1
- Assignment1
- Assignment1
- Process1
- Stage2
- Process1
- Assignment1
- Process2
- Utility1
- Process3
- Assignment2
- Assignment2
- Process1
- Stage1
- Use the following configuration for Utility1:
- Obj-Refresh-And-Lock [ReleaseOnCommit: true, stepPage: Primary]
- Property-Set [stepPage: Primary]
- Obj-Save [stepPage: Primary]
- Call commitWithErrorHandling [stepPage: Primary]
- Obj-Refresh-And-Lock [ReleaseOnCommit: true, stepPage: Primary]
Root Cause
The 'pyCaseUpdateInfo embedded page is being removed from the pyWorkPage' is a lock that is not present for Assignemnt2 since there is no commit after Step 7.
According to the Tracer, the pyCaseUpdateInfo embedded page is removed from the pyWorkPage after the second Obj-Refresh-And-Lock. This caused the issue in the FinishAssignment activity (Optimistic Locking is not recognized).
Resolution
Perform the following local-change:
Deselect the 'ReleaseOnCommit' parameter if there is no explicit commit.
Published December 2, 2021
Have a question? Get answers now.
Visit the Collaboration Center to ask questions, engage in discussions, share ideas, and help others.