Click HERE to see how Saviynt Intelligence is transforming the industry. |
07/21/2024 12:01 PM - edited 07/21/2024 01:06 PM
Hi Team,
As per the use case we have to approve the request if it is submitted by endpoint resource owner or submitted for endpoint resource owner
Tried these, didn't work, any other variable which can be used?
endpoints.resourceowner eq requestedby.username
endpoints.requestowner eq requestedby.id
endpoints.requestowner eq user.id
Thanks
Solved! Go to Solution.
07/21/2024 07:35 PM - edited 07/21/2024 07:37 PM
IF ELSE Component | Condition: (com.saviynt.ecm.identitywarehouse.domain.Usergroup_users.executeQuery("select ugu.id from Usergroup_users ugu where ugu.user_groupkey = '${endpoints?.requestowner}' AND ugu.userkey= '${requestedby?.id}'")?.size() != 0) Expression Language: groovy
|
Please try above when you are mapping resource owner.
07/21/2024 09:00 PM
Hi @Kaustubh , I tried this
(com.saviynt.ecm.identitywarehouse.domain.Endpoints.executeQuery("select e.requestowner from endpoints e where e.endpointname = '${endpoints.endpointname}' AND e.requestowner= '${requestedby?.id}'")?.size() != 0)
i am getting an error "Cannot get property endpointname on null object"
07/21/2024 09:02 PM
(com.saviynt.ecm.identitywarehouse.domain.Endpoints.executeQuery("select e.requestowner from endpoints e where e.endpointkey= '${endpoint}' AND e.requestowner= '${requestedby?.id}'")?.size() != 0)
07/21/2024 09:30 PM
@rushikeshvartak @Kaustubh , I hardcoded the endpoint key but received script evaluation error
script evaluation error: javax.script.ScriptException: org.springframework.orm.hibernate3.HibernateQueryException: unexpected token: ( near line 1, column 41 [select e.requestowner from endpoints.get(requestaccesskey) e where e.endpointkey= 5 AND e.requestowner= 336 ]
07/21/2024 09:37 PM
Please share WF screenshot and make sure to map resource owner under endpoint.
07/21/2024 10:13 PM
07/21/2024 10:38 PM - edited 07/21/2024 10:39 PM
Working for me.
selected Resource owner group at endpoint.
07/21/2024 11:01 PM - edited 07/21/2024 11:10 PM
07/22/2024 01:41 AM
Trying... Couldn't figure out for single user as of now. As it is urgent, create a user group and follow the steps for now.
If solution works, accept as solution.
07/22/2024 05:09 AM
Share query
07/22/2024 09:06 PM
I tried the query shared by you. I get result in data analyzer but cannot submit the access request.
(com.saviynt.ecm.identitywarehouse.domain.Endpoints.executeQuery("select e.requestowner from endpoints e where e.endpointkey= 1167 AND e.requestowner= '${requestedby?.id}'")?.size() != 0)
(com.saviynt.ecm.identitywarehouse.domain.Endpoints.executeQuery("select e.requestowner from endpoints e where e.endpointkey= '${endpoint}' AND e.requestowner= '${requestedby?.id}'")?.size() != 0)
07/23/2024 03:38 AM
Did you validated logs ?
07/23/2024 07:25 PM - edited 07/23/2024 07:26 PM
What should I look for in the logs?
Here's what I thought might be helpful:
07/23/2024 07:39 PM
This are unwanted error. Logs when request id raised or where you added block
07/23/2024 08:18 PM
Using query in if-else block: (com.saviynt.ecm.identitywarehouse.domain.Endpoints.executeQuery("select e.requestowner from endpoints e where e.endpointkey= '${endpoints}' AND e.requestowner= '${requestedby?.id}'")?.size() != 0)
It is fetching endpoint name and trying to match with endpoint key. 2024-07-24T03:11:50.552273732Z stdout F org.jbpm.api.JbpmException: script evaluation error: javax.script.ScriptException: org.springframework.orm.hibernate3.HibernateQueryException: unexpected token: ( near line 1, column 41 [select e.requestowner from endpoints.get(requestaccesskey) e where e.endpointkey= 'Matillion' AND e.requestowner= '977']; nested exception is org.hibernate.hql.ast.QuerySyntaxException: unexpected token: ( near line 1, column 41 [select e.requestowner from endpoints.get(requestaccesskey) e where e.endpointkey= 'Matillion' AND e.requestowner= '977'] |
07/23/2024 08:33 PM
Use below logic
(com.saviynt.ecm.identitywarehouse.domain.Endpoints.executeQuery("select e.requestowner from Endpoints e where e.endpointname= '${endpoints}' AND e.requestowner= '${requestedby?.id}'")?.size() != 0)
08/12/2024 05:12 AM
@NM Is this issue resolved ?
08/12/2024 07:57 AM
Hi @rushikeshvartak , I tried with endpoints in groovy language it wasn't working .. so went ahead with custom assignment
08/12/2024 08:00 AM
Please share query
08/14/2024 07:36 AM
Hello @NM - Sharing the actual solution here will help others who are experiencing a similar situation.
Thank you,
Dave
08/21/2024 09:22 AM
@NM Can you please share SQL query used to help other facing same issue in future
08/22/2024 05:36 AM
Hi @rushikeshvartak , after developing the solution half way.. our requirement was changed entirely .. I am working on the approval process ... I will share once it is completed.
07/21/2024 09:17 PM
Hi @rushikeshvartak , got the same error
i am getting an error "Cannot get property endpoint on null object"
07/23/2024 08:22 PM
Hi @NM use the below Query. This is working for me in 24.4 if the request is raised by the resource owner or if its requested for resource owner. Let me know the outcome!
(com.saviynt.ecm.identitywarehouse.domain.Endpoints.executeQuery("select e.requestowner from Endpoints e where e.endpointname = '${endpoints.endpointname}' AND (e.requestowner= '${requestedby?.id}' OR e.requestowner='${user.id}')")?.size() != 0)