Locking Issue in explicit commit
Hi,
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
Hi,
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
- 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.
- 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.
- What are the scenarios when lock on work object get released?
- 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.