Saviynt unveils its cutting-edge Intelligence Suite products to revolutionize Identity Security!
Click HERE to see how Saviynt Intelligence is transforming the industry.
Saviynt Copilot Icon

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 this helped you move forward, click 'Kudos'. If it solved your query, select 'Accept As Solution'.

Saathvik
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 this helped you move forward, click 'Kudos'. If it solved your query, select 'Accept As Solution'.

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.