We are delighted to share our new EIC Delivery Methodology for efficiently managing Saviynt Implementations and delivering quick time to value. CLICK HERE.

Role Modification Workflow: Role Owner Condition Check

Sanjeevini
New Contributor III
New Contributor III

Hi,

Need an object of Role Owner to use it in workflow to fetch user properties of the owner.

Use Case: Once the create role request is submitted by selecting role owner and entitlements for the role, need to check the condition that if selected owners one of the user properties is matching.

Ex: if selected role owner has CustomProperty10 value as null in his user profile then request should be rejected.

 

Thanks,

Sanjeevini

8 REPLIES 8

rushikeshvartak
All-Star
All-Star

role.getOwnerRank1().getCustomProperty10()


Regards,
Rushikesh Vartak
If you find the response useful, kindly consider selecting Accept As Solution and clicking on the kudos button.

sk
All-Star
All-Star

You can try using com.saviynt.ecm.identitywarehouse.domain.Users service to get owner object with groovy as expression language

Example:

com.saviynt.ecm.identitywarehouse.domain.Users.get(Long.valueOf(dynamicAttributesReqAccess.get(requestaccesskey).get('USEROWNERKEY'))).username == (requestedby.username)

 

So you can try something like below

com.saviynt.ecm.identitywarehouse.domain.Users.get(Long.valueOf(role.getOwnerRank1())).customproperty10


Regards,
Saathvik
If this reply answered your question, please Accept As Solution and give Kudos to help others facing similar issue.

pruthvi_t
Saviynt Employee
Saviynt Employee

Hi,

For a new role creation request , it might not work as the role was not created and owner was not assigned yet. 


Regards,
Pruthvi

Sanjeevini
New Contributor III
New Contributor III

Tried with below conditions but no luck.

1)role.getOwnerRank1().getEmployeeType() == 'Employee'

2)com.saviynt.ecm.identitywarehouse.domain.Users.get(Long.valueOf(role.getOwnerRank1())).employeeType == 'Employee'

3)com.saviynt.ecm.identitywarehouse.domain.Users.get(Long.valueOf(dynamicAttributesReqAccess.get(requestaccesskey).get(role.getOwnerRank1()))).username == (users.userName) and employeeType='Employee'

Please let me know if I'm missing something.

Language should be groovy . What is error in logs


Regards,
Rushikesh Vartak
If you find the response useful, kindly consider selecting Accept As Solution and clicking on the kudos button.

Yes. Laguage is selected as groovy.

Ishan
Saviynt Employee
Saviynt Employee

@Sanjeevini 

Instead of role.getOwnerRank1() , use role.ownerRank1() and check.

Ishan Kamat
Technical Architect, Professional Services
SaviyntLogo.png

Sanjeevini
New Contributor III
New Contributor III

role.ownerRank1() this is also not working.