Question

1
Replies
1407
Views
Paul7342 Member since 2018 15 posts
Paccar
Posted: August 2, 2018
Last activity: August 3, 2018
Closed

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.

https://community.pega.com/sites/default/files/help_v74/express/procomhelpmain.htm#concepts/concepts2/conceptslocking.htm

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
Share this page LinkedIn