Close popover
Anirvan Das (AnirDas1)
Tata Consultancy Services

Tata Consultancy Services
AnirDas1 Member since 2016 6 posts
Tata Consultancy Services
Posted: September 4, 2017
Last activity: September 5, 2017

Locking Issue in explicit commit


We have a requirement where in a screen flow in each screen we are giving a Save button to save the values entered by the user in the screen. We do need to persist all the values in the DB in different data tables in order to persist the values since the user may save and exit or log-off and come back later point of time to continue with the screen. For that when user clicks the Save button we are calling activities to do obj-save (Write-Now unchecked) in different data tables and at the end of the activity in the last step doing Call CommitWithErrorHandling. My question is

  1. Does Call CommitWithErrorHandling at the end step releases the lock on the object? Here the step page is "CommitPage" which is an instance of Work- defined in the Pages & Classes tab.
  2. I understand there is an instance of System-Locks for which there is a row in pr_sys_locks for one locked object. However when you explicitly do Call CommitWithErrorHandling or use Commit method or do Write-Now in Obj-Save, does that releases the lock on the object or these three works differently? If using any of them explicitly release the lock on the work object, then in our case please enlighten how to handle the requirement since the last step would release the lock and after that user clicking on the next button won't have the lock of the object and further processing of the flow will stop.
  3. What are the scenarios when lock on work object get released?
  4. Is there any tutorial/write-up on locking in pega? any link on this would be highly appreciated.

Please share your thoughts at the earliest. Thanks in advance.

Data Integration Java and Activities
Moderation Team has archived post,
Close popover This thread is closed to future replies. Content and links will no longer be updated. If you have the same/similar Question, please write a new Question.