What Case locking in Pega?

 Case locking in Pega is a feature used to ensure data integrity and prevent conflicts between users when editing a particular case. It prevents users from editing a case at the same time by placing an exclusivelock on the case. A single user can obtain a lock on a case and when another user attempts to work on the same case, they are notified that the case is locked.

Default locking and Optimistic locking in Pega

Default Locking: When creating or modifying a data instance, Pega locks it so that the changes made by one user are not lost when another user updates the same instance. This prevents different users from overwriting each other's changes. The default locking mechanism applied in Pega is static locking, which means that the system puts a lock on the record when someone first accesses it, and the lock will remain until that user saves or cancels their changes. Optimistic Locking: Optimistic locking is another mechanism used to ensure data integrity in multi-user environments. It is different from static locking in that it does not lock the record until the user tries to save it. Rather, when the user accesses a record, the system checks to see if any data has changed since the last time it was read. If there have been changes, this indicates that another user has modified the record since it was last read. In this case, the system produces an error message and the submitting user must reconcile the differences before saving the record.

Default Locking: Default locking prevents multiple users from modifying the same clipboard page and data at the same time. Whenever a user tries to open a work object instance or clipboard page for updating, Pega platforms acquire a lock on that instance or page. Optimistic locking: Optimistic locking assumes there will be no conflicts in updates and multiple users are allowed to update the clipboard data at the same time. This type of locking provides better performance when compared to default locking because it does not acquire any locks on data. The conflicts of updates, though rare, is handled by Pega platforms. It notifies the user of the conflict when somebody submits changes to the same data.

No comments:

Post a Comment