Question

62
Views
Close popover
Anton Shlyapugin (AntonS39)
Lanit Laboratoriya Novykh Informatsionnykh Tekhnologii

Lanit Laboratoriya Novykh Informatsionnykh Tekhnologii
RU
AntonS39 Member since 2019 19 posts
Lanit Laboratoriya Novykh Informatsionnykh Tekhnologii
Posted: July 27, 2020
Last activity: July 27, 2020

Declare triggers

Hi!

I met the following problem:

We have Data class Company-Data-MainProduct (I`ll call instance of that class as MainData next)

This class non abstract and has property Collateral of type PageList and has class Company-Data-Collateral (with parent class Company-Data-MainProduct)

Class Company-Data-Collateral abstract (we have only 1 table on our Data Model)

We also have (also abstract) class Company-Data-Pledge.

I want to use declare trigger, when MainData saved AND property MainData.Collateral(1).someProperty will change

Problem:

MainData.Collateral(1) of class Company-Data-Pledge

Class Company-Data-Collateral doesn`t have property .someProperty, but class Company-Data-Pledge has this property.

Pega doesn`t allow add ".Collateral()" on pages and classes. It shows error

error due saving 2

Btw, due to our policy with Data- model I can`t add .someProperty in class Company-Data-Collateral

I also can`t create declare index in class Company-Data-Pledge, because Company-Data-Pledge is an abstract class (I also can`t create it concrete due to our policy) and since it is abstract, I can`t save instance of this class (and hence declare trigger won`t work)

I can create declare onChange instance in class Company-Data-Pledge on property .someProperty, but it will work every time property will change, but sometimes we rollback our transaction, so it may allow defect of following type:

1. Property has change

2. declare onChange activity worked correctly

3. we didn`t save instance of Company-Data-MainProduct (and hence we didn`t save changes on 1st step)

4. but activity on step 2 worked properly, so it update some another important data

Is there a way to solve my problem? (again, my problem: I want to call specific activity when some property inside MainData changed AND MainData saved)

Pega Platform Decision Management System Architect