Skip to main content

Case locking

When two or more Actions attempt to update a Case, the last-performed Action may overwrite data written by a previous Action. Overwrites can lead to the corruption or loss of data, delaying Case processing, and potentially leading to the Case's incorrect resolution. If an application supports concurrent users, an appropriate Case locking strategy is essential to ensuring data integrity.

To avoid data corruption or loss due to overwrites, configure an appropriate locking strategy for each Case Type. Pega Platform™ supports two strategies to balance user access with the need for data protection: Allow one user locking and Allow multiple users locking.

Allow one user locking

With an Allow one user locking strategy, an application applies an exclusive lock when opening an item, such as a Case. A user or the system that opens the object gains exclusive access to the object until the application releases the lock. While the item remains locked, other users cannot edit the item.

For example, an insurance adjuster opens a life insurance claim and reviews it against the policy to determine the benefit for which a claimant is eligible. A complex claim may require extensive calculations and referrals to external parties as the adjuster collects data and updates the Case. Any other changes may override claim amounts and calculate an incorrect payout to the claimant. Apply an Allow one user locking strategy to prevent other users from overwriting data and changing the payout amount when the adjuster updates the claim.

In the following image, click the + icons to see an example of an Allow one user locking strategy:

Check your knowledge with the following interaction:

Allow multiple users locking

With an Allow multiple users locking strategy, an application does not apply an exclusive lock when opening an item. Instead, any user — or the system itself — can open and edit the Case at any time. When the user attempts to save, the application checks whether the Case has changed before committing any changes.

For example, a supervisor must review the most recent information for a service request Case. The supervisor may need to update information on the Case, and a caseworker may need to update the Case at the same time. In this situation, apply an Allow multiple users locking strategy so that the supervisor avoids locking the Case, preventing a caseworker from completing the Case. If the supervisor did update the Case, the system would prompt the caseworker to either reload the Case or close the Case without saving.

In the following image, click the + icons to see an example of an Allow multiple users locking strategy:

Check your knowledge with the following interaction:

Case locking default

By default, Pega Platform selects the Allow one user option when creating a Case Type, which ensures data integrity during Case Actions.

Note: Changing the default locking strategy for a Case Type requires a thorough knowledge of the Process and the Personas involved. Consult with project stakeholders to identify any business needs that affect the choice of locking strategy. 
Caution: When you update a Case with an automated Action, such as an activity, check for a lock as part of the operation, and include steps to address a locked Case. You can use the When Rule StepStatusLocked to check if a Case is locked. In addition, lock a Case when using the Obj-Open or Obj-Open-By-Handle methods, and remember to release the lock upon completing the Action.

In the following image, click the + icons to learn more about the Allow one user and Allow multiple users locking options:

Note: To access the locking strategy settings, open the navigation pane within App Studio or Dev Studio, click Case Types, and then click the Case Type you want to open. On the Settings tab, click Locking

Case locking and child Cases

A complex business process that involves multiple parties or multiple types of work may use one or more child Cases to model part of the business process. For instance, an auto insurance claim Case Type may use child Cases to process claims of damages to vehicles, property, and personal injury. Specialized caseworkers can process each child Case in parallel to reduce processing time for the parent claim. 

If a Case includes one or more child Cases, the child Cases inherit the locking strategy from the parent Case. Pega Platform identifies the locking strategy in effect for the child Case on the Settings tab.

By default, if Allow one user is selected for the parent Case, Pega Platform locks the parent Case whenever a user opens a child Case. To override this behavior and allow a second user to update the parent Case while the child Case is open, select the Allow other users to access parent Case when the child Case is opened check box.

Case locking options for a child case
Caution: If you configure a child Case to override the locking strategy of the parent Case, configure the time-out value of the child Case to be less than the time-out value of the parent.

If Allow multiple users is selected for the parent Case, Pega Platform prohibits Case locking configuration on any child Case.

Check your knowledge with the following interaction:

This Topic is available in the following Module:

If you are having problems with your training, please review the Pega Academy Support FAQs.

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 Academy 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