SM928K Member since 2019 6 posts
Posted: June 26, 2020
Last activity: September 11, 2020

Java code transformed in a function throwing error when getting invoked from data transform

Followed below PDN article to achieve the dynamic role addition:

It asks to write a java code. We moved that java code in a function.

This function when gets called from activity gives no issue but when called from a data transform, getting below error in log:

Caused by: Activity class must be Code-Security when invoking setRoles()

Can someone help me here, why this is happening?

Also the article explicitly says, the code will update "pxThread.pxSecuritySnapshot..pxUserRoles" property.

Then why can't we directly append the values to this property in Data transform? Why we need java code?

***Edited by Moderator: Pallavi to update platform capability tags***  

Pega Platform 8.3 Data Integration Java and Activities
Share this page LinkedIn