Close popover
Satish Kumar Mogilicherla (Satish Mogilicherla)
Aaseya IT Services Pvt.Ltd
Aaseya IT Services Pvt.Ltd
Satish Mogilicherla Member since 2018 3 posts
Aaseya IT Services Pvt.Ltd
Posted: February 1, 2020
Last activity: February 10, 2020

Creating Bulk Operators through a Repeat Grid On a Button Click


I would like to share a support article for creating Bulk or list of Operators in PRPC system along with Pre Populated AccessGroup, WorkGroup, Organization, Division, Unit, User Name and Password.

As we know, OperatorID is an instance of Data-Admin-Operator-ID Class, when we create operator record, it creates instance in the above class.

Steps to develop:

1. Create a Table(Repeat Grid) sourced with a Pagelist property sourced by Data-Admin-Operator-ID class.

2. Now map the following properties AccessGroup, WorkGroup, Organization, Division, Unit, User Name and Password in the repeat grid.

3. In the Post Processing, write an activity and perform the following steps:

a) Loop on the PageList which we have given as source to Repeat Grid.

b) Inside the Loop, create a New Page Ex: NewOperator with class Data-Admin-Operator-ID

c) Now Set the values of each record of the pagelist to pyAccessGroup, pyOrganization, pyOrgDivision, pyOrgUnit, pyUserIdentifier and pypwdCurrent to the properties on NewOperator Page.

d) Save each record within the loop with Obj-Save method with stepPage defined as NewOperator.(This will create each operator record available in the pagelist)

Now go to Records Explorer>>>Organization>>>OperatorID

You can see the Created Operator Instances. Now to try to login with the created Operator Credentials and test it.

Exception Handling:

1. We are creating operator instances that is fine, but we need to check the exceptional scenarios as well that may break the logic. Ex: If Operator record that user creates is already existed in the system, then we need to handle this scenario.

To handle this, Within the loop, We need to check every record if already existed in the Data-Admin-Operator-ID class or not.

a) Within thOperae Loop, Define a DataPage Ex: D_OperatorsList[OperatorID:Param.OperatorID]

Pass the pyUserIdentifier value of every record to Param.OperatorID and check it by capturing the ResultCount of the DataPage like D_OperatorsList[OperatorID:Param.OperatorID].pxResultCount.

If pxResultCount>1 then skip the Operator Creation and Set the Error Message using Property-Set-Messages as "Operator Already Exists", in the transition Step Exit Iteration.

For reference, I have attached the Word Document with Screenshots, Please find the attachment


Satish Mogilicherla.

Pega Platform Low-Code App Development Enterprise Application Development Dev/Designer Studio Data Integration Java and Activities Developer Knowledge Share