Deleting operator with specific Access group

Hi all,

We have requirement were we need to delete the operators ID with specific Access Group.

We have around 300 user under the XYZ Access Group and all the operator under XYZ should be removed

Can some one provide one time utility in 7.3 - to fulfil this request - Please advise.

Hi @Sam27: Can you please help to understand if this request is for PROD / test environment? If this is for PROD, it is not ideal to delete the profiles because there are chances that users have cases assigned to them and there can be inflight cases which are supposed to be routed to the user (based on your business logic). So please perform a IA before deleting the users.

If this is for test environment, you can write a simple activity to delete the operator records (or) delete the records from DB (if you are deleting from DB, consider the other index tables too). Also consider AdditionalAccessGroup of the users. There can be chances that one user can have multiple access groups.

Please see: Pegasystems Documentation

To delete a user using activity, open the instance, use WBDelete / Delete / Obj method to delete the record.

Thanks.

@ArulDevan I- I need to delete 300 users (not active)in one go as none of the users have that AG so need activity detail steps for the same.

Hi Sam, What Arul said is absolutely right follow it before you are deleting the operators and ensure the rules are not checked out. Find the steps of the activity below.

  1. Create a report definition rule in Data-Admin-Operator-ID class and get pyUserName, pyAccessGroup, pzInsKey in the filter column, and pass the access group as a parameter.

  2. Call the report definition in the activity using the call pxRetrieveReportData and pass the parameters for the report in the previous steps.

  3. Loop the report results and get the pzInskey then pass it into Obj-Delete-By-Handle then do Obj-Save with the write now option enabled.

Note: Pass the access group as a parameter in the activity so that at the runtime you can provide the access group for which you have to delete the operators.

You can use the Obj-Browse step instead of the report definition also. Hope this helps

Thanks
Lakshmanan

@LakshmananAR Thanks for the response - Can you please share the content written in step 4 and obj-delete-byhandle?

are we setting .pyAccessGroup = param.access group

@Sam27 As Stated by @LakshmanAR you can follow the steps by passing the parameter access group value having those 300 users using step 4 Obj-Delete-By-Handle like key value “Data-Admin-Operator-ID”+" "+Param.UserID

@RameshR1500 Can you help me what is written in step4 Property-set. I might sound silly but not sure what is missing

Please find attached image -My activity is not passing inside loop though having one operator jumping from step 3 to 5 it’s not passing through 4 operations

@Sam27

Hi,

Deleting an operator with an AccessGroup mapping (Only one mapped) or Deleting an Operator with Specific AccessGroup when multiple accessgroups are mapped with that operator ID are 2 different requirements. The below solution which our forum mates should solve your issue unless you did not specify your requirement precisely.

Make changes in the utility prepared already to perform the operation of your actual need is identified.

@KishoreSanagapalli Thanks for the reply - my requirement is clear I want to delete all the operators which are under one specific access group.

Access group - xyz

Operators -50

coming to utility as suggested that’s not working and I am not able to understand/fix the missing part

Can you help me to correct the utility and serve the requirement? Please

@Sam27
IN step 4,pzinskey needs to be set (which is fetched through report definition),

Please refer to the attached screenshot for further details.

@HariPriyaY Thanks for your response - I already tried this to and it does not worked. I am really not understanding why its not going inside the loop. Not sure what is the issue here PFA

@Sam27
The page which you are looping on is reportPage but the page which you are getting the results is ReportPage.

Pls change the page on which you are looping to ReportPage.pxResults

@Sam27

Looks like some page context is not given properly.

pyPageName in step 3 should be ReportPage

And steppage of step 4 should be ReportPage.pxResults

In Pages and classes below pages should be given

ReportPage->Code-Pega-List

ReportPage.pxResults->Data-Admin-Operator-ID

Please try out with above configurations.

@Sam27

Thanks for your confirmation. You can try creating a report defitnion to perform the operation and use the Access group and additional access group fields in the definitons will serve your requirement. We can connect offline too, if you need any further help from me.

@KishoreSanagapalli RD PART IS GOOD

I need the working utility mate.

Much appreciated for the response

@Sam27

Would you like to see your requirement gets fulilled only through Utility ? Any issues with Report Definition or running with Simple SQL Query?

@Sam27

Tried my Best. DId not find any Direct Utility to serve your need. Through RD and creating Custom function, Not able to achieve your requirement. You’ll need to contact your Pega Admin / Database Admin to write an SQL Query (Simple Way) to perform the action.

Eventually, If you find any utility to serve your need, Please update here too.

@HariPriyaY Thanks for the keen observation - it’s been set but still the delete operation is not working

@HariPriyaY - Not sure what I am missing in the utility. Your advice will be appreciated.

@KishoreSanagapalli We don’t have DB access to perform.

How can we delete with RD?

The rd can be used to fetch the operators. After extract, this needs to be deleted in one go.

As per my understanding utility is the only best way.