Close popover
Paul Aquino (Paul7342)
Pega Software Engineer
Paul7342 Member since 2018 15 posts
Posted: August 2, 2018
Last activity: August 3, 2018

Table Lock

I have an activity that is executed on a nightly basis. The activity loads data from one table in the PegaRULES database, does some processing, and then executes obj-save to 4 other application tables in the PegaRULES database.

When we execute 2 instances of the activity concurrently. It is creating duplicate records, meaning the tables have a column with a value, and there should only be one row for that particular value.

I looked at the locking features that can be configured at the class level.

But it seems to be locking at the record level and this would hamper the performance of the application. Is it possible to lock a table in the database.

Ideally, what we would like to do is to have 1 activity execute, and as it opens a record on a particular table, we would want to activate a lock on the table. So that when the 2nd concurrent activity is executed, it cannot write to the same table, but can only read from it, thus preventing creating duplicate records.

Low-Code App Development Case Management Data Integration
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.