Skip to main content

This content has been archived and is no longer being updated. Links may not function; however, this content may be relevant to outdated versions of the product.

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

  1. Create case definition and select Optimistic Locking:
     
    1. Stage1
       
      1. Process1
        1. Assignment1
           
    2. Stage2
       
      1. Process1
        1. Assignment1
      2. Process2
        1. Utility1
      3. Process3
        1. Assignment2
           
  2. Use the following configuration for Utility1:
     
    1. Obj-Refresh-And-Lock [ReleaseOnCommit: true, stepPage: Primary]
    2. Property-Set [stepPage: Primary]
    3. Obj-Save [stepPage: Primary]
    4. Call commitWithErrorHandling [stepPage: Primary]
    5. 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

Was this useful?

0% found this useful

Have a question? Get answers now.

Visit the Collaboration Center to ask questions, engage in discussions, share ideas, and help others.

Did you find this content helpful?

Want to help us improve this content?

We'd prefer it if you saw us at our best.

Pega Community has detected you are using a browser which may prevent you from experiencing the site as intended. To improve your experience, please update your browser.

Close Deprecation Notice
Contact us