Deleting one of the additional access Group of an operator using an activity.

Hi,

I am using below steps to open my operator and delete one of the access groups of my operator.

Step 1 . Obj-Open-By-Handle , passing the pzInsKey of my operator

Step 2. Loop through “.pyAccessGroupsAdditional” value list ,

When condition → .pyAccessGroupsAdditional()==“Access group to remove”

Step 2.1 (Property-Set) Param.Subscript == Param.pyForEachCount

Step 2.2 Property-Remove

.pyAccessGroupsAdditional(Param.Subscript)

Step 4 -

Obj Save

Step 5 -

Commit.

But its not working correctly as I am able to see the access group again once I log off and log in. The access group is getting removed only temporarily until I log off and log back in.

Also tried obj-save with write now option checked, OR Call Save activity in . But same result.
Kindly suggest if any other/better way is there.

Regards,

Anan

@AnanyaA2 Are you using SSO for login? If yes, then verify whether this access group is being set again by the Authentication service rule. Also, if you are trying to remove an active access group, try removing and updating the pyAccessGroup property as well.

@duraisankarHi . Thanks for the reply. Yes you are right , it’s being set again , that’s why I was facing the issue. It’s fine now.

I have another doubt. When I am using the same above steps in a loop(pagelist) i.e. pyReportContentPage.pxResults. Then at the Obj-Open by handle step I am getting the below error : "

com.pega.pegarules.pub.PRRuntimeException: IOException caught during serialization of Java Object value of property pyReportContentPage.pxResults(1).pzRuleFormRuleSetEdit of class com.pega.pegarules.data.internal.clipboard.ClipboardPropertyImpl. Message: com.pega.pegarules.data.internal.clipboard.ClipboardPageImpl
Java Stack Trace
at com.pega.pegarules.data.internal.clipboard.XMLStream.writeXMLProperty(XMLStream.java:1113)

Could you please help on this. Is there an issue in using Obj-Open-By-Handle in a loop? If yes, what is the correct way?

@AnanyaA2 if possible, can you attach the screenshot of the rule here. Question is not clear for me.

@duraisankarits solved durai. I forgot to mention step page earlier.

Thanks.