Announcing the Saviynt Knowledge Exchange unifying the Saviynt forums, documentation, training,
and more in a single search tool across platforms. Read the announcement here.

Extracting entitlement customproperty in workflow if-else block

Soumyaprateek
New Contributor III
New Contributor III

Hi, 

We have a requirement to check if the requestor equals to the username from customproperty15 value of entitlement in access request workflow. We are using an if else block for this check but unable to get through. 

customproperty15-->CN=xyz,OU=abc

SUBSTRING_INDEX(SUBSTRING_INDEX(customproperty15, ',', 1), '=', -1) with this query we are able to extract the user name i.e. xyz but not sure how to compare it with requestor username.

the query I tried but didn't work --->

com.saviynt.ecm.identitywarehouse.domain.Users.get(Long.valueOf(dynamicAttributesReqAccess.get(requestaccesskey).get('SUBSTRING_INDEX(SUBSTRING_INDEX(entitlement.customproperty15, ',', 1), '=', -1)')))== (requestedby.username)

I tried with below queries based on forum suggestions but seems i miss something.

com.saviynt.ecm.workflow.entitlement_values.get(entitlement_valuekey)?.(SUBSTRING_INDEX(SUBSTRING_INDEX(customproperty15, ',', 1), '=', -1)) == (requestedby.username)

com.saviynt.ecm.identitywarehouse.domain.Users.get(entitlement_values.get(entitlement_valuekey).get (SUBSTRING_INDEX(SUBSTRING_INDEX(customproperty15, ',', 1), '=', -1)).get('userkey')) == (requestedby.username)

Appreciate any suggestions in this regard.

Thanks,

Soumya

[This post has been edited by a Moderator to merge two posts.]

2 REPLIES 2

sk
All-Star
All-Star

@Soumyaprateek  Try below logic in if-else block with groovy as expression language

 

entitlement.customproperty15.split(',')[0].split('=')[1] == requestedby.username


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

rushikeshvartak
All-Star
All-Star

Any error in logs ?


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