Question
Last activity: 16 Mar 2018 19:46 EDT
What is difference between default locking and optimistic locking?
Kindly explain exact difference, which scenario,when we go for optimistc and when we go for defalut lcoking
This post has been archived for educational purposes. Contents and links will no longer be updated. If you have the same/similar question, please write a new post.


Wipro Technologies
IN
Default locking stops two users working on the same case or two child cases of a Parent parallel by two users or a Parent and child case by two users parallel at the same time.
Optimistic locking will allow two users to work on the same case or two child cases of a Parent parallel by two users in perform mode. But the recent updates commited to the case by the first user notifies the second user while he is submitting or commiting his changes to the case and ask him to refresh the case.
But in this two options we have the option to choose whether to lock the parent or not lock the parent while performing on the child case.


Incessant Technologies
IN
Default locking: When a case/work object opened by an operator, next operator want to open same, then the second operator has to wait untill first operator completes his work.
Opthmistic lock: When a case/work object opened by an operator, next operator want to open same, then the second operator no need to wait for first operator he can open the work object and work as well, when first operator completes his work on the work object then second operator will get a dialogue to refresh his work.


Incessant Technologies
AU
Hi Rama
Default Locking: Supports only one operator.
Optimistic Locking : Greater than one operator.
In default locking case when you run an activity on that particular workobject it fails even though the code is correct.


Optum - (UHG)
US
What about in the case of Optimistic Locking, where two users simultaneously submit on the same workobject/case - what will happen in that scenario?
Thanks.


Areteans Technology Solutions Pvt. Ltd.
IN
Hi,
Optimistic locking works on the concept that when two users are working simultaneously, the first user to submit the case has his changes saved and the second user has to refresh the case in order to see the changes made by the first user.
Since you mentioned that both the users may simultaneously click on submit, I believe the first user that has his submit saved (counted down to milli-seconds) will apply.
Ramasekhar,
Please find the answer in the article https://pdn.pega.com/about-pega-7-case-locking
Indira.