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

Workflow if-else condition check

npise
New Contributor III
New Contributor III

I have a requirement to auto approve an request when the following condition is met:
query entitlement.customproperty16 (which stores name of entitlement), whose user account is requested by then auto approve

example: user1 rquests access for usera for access1
access1.CP16 stores entitlement value (access2) if access2's user accounts = user1 then the request should auto approve

i tired using the below in the if esle condition and getting unexpected error.
com.saviynt.ecm.identitywarehouse.domain.account_entitlements1.executeQuery("select ua.userkey from account_entitlements1 ae1 left join entitlement_values ev on ae1.entitlement_valuekey = ev.entitlement_valuekey left join user_accounts ua on ua.accountkey = ae1.accountkey left join users u on ua.userkey = u.userkey left join accounts a on ua.accountkey = a.accountkey where u.employeetype != 'service' and a.endpointkey = 10 AND ev.displayname= 'entitlement?.customproperty16' AND u.username='requestedby?.username'")?.size() != 0)

Unexpected error occurred..a different object with the same identifier value was already associated with the session: [com.saviynt.ecm.workflow.ARS_Requests#XXXXXX]; nested exception is org.hibernate.NonUniqueObjectException: a different object with the same identifier value was already associated with the session: [com.saviynt.ecm.workflow.ARS_Requests#XXXXX]

 

@rushikeshvartak @sk 

10 REPLIES 10

rushikeshvartak
All-Star
All-Star

You can’t use custom query in if else block


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

Thanks for the response. how best can i achieve this? any suggestions.

Can you rephrase statement not able to understand requirements 


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

npise
New Contributor III
New Contributor III

If the requestedby user is one of the user_account of an entitlement that is mentioned in the customproperty16 of the acess request, then the grant access

Please confirm

requestby.username=entitlement.cp16 ?


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

We are not storing user name information in cp16. we are storing a different entitment_value

npise
New Contributor III
New Contributor III

to elaborate further : user-a (one of the rank owner) of entitlement (entitlement1), entitlement1's CP16 is entitlement2 and entitlement2 is assigned to user-a.

In the above scenario, if user-a is requesting access(entitlement1), then it should grant access

You need to use dyanmic attributes to meet your requirements 


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

Can you share some examples? What are dynamic attributes? I am new to Saviynt platform

https://docs.saviyntcloud.com/bundle/EIC-User-v2021x/page/Content/03-mang-accs/ars-req-acc.htm


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