07/08/2022
06:44 AM
- last edited on
07/08/2022
07:49 AM
by
Dave
Hi All,
I am trying to assign SAV role to all the managers using Technical rule. I have writter the below query in the AdvancedSQL.
When i Preview the rule it shows the correct users(who are managers) but it is not able to assign the SAV role.
The job fails with the below error(users is not mapped).
Logs:
2022-07-08 13:26:54,238 [quartzScheduler_Worker-2] DEBUG changeaction.UserChangeActionService - hql - select a from Users a where 1=1 AND (username in (select owner from users) ) AND 1=1
2022-07-08 13:26:54,276 [quartzScheduler_Worker-2] ERROR jobs.DetectiveProvisioningRulesJob - Exception in DetectiveProvisioningRulesJob ..
org.springframework.orm.hibernate3.HibernateQueryException: users is not mapped [select a from com.saviynt.ecm.identitywarehouse.domain.Users a where 1=1 AND (username in (select owner from users) ) AND 1=1 ]; nested exception is org.hibernate.hql.ast.QuerySyntaxException: users is not mapped [select a from com.saviynt.ecm.identitywarehouse.domain.Users a where 1=1 AND (username in (select owner from users) ) AND 1=1 ]
at com.saviynt.ecm.services.changeaction.UserChangeActionService.evaluateHanaRule(UserChangeActionService.groovy:2763)
at com.saviynt.ecm.services.changeaction.UserChangeActionService$_getDetectiveRuleAndUserList_closure34.doCall(UserChangeActionService.groovy:2613)
at com.saviynt.ecm.services.changeaction.UserChangeActionService.getDetectiveRuleAndUserList(UserChangeActionService.groovy:2610)
at DetectiveProvisioningRulesJob.execute(DetectiveProvisioningRulesJob.groovy:190)
at org.quartz.core.JobRunShell.run(JobRunShell.java:199)
at org.quartz.simpl.SimpleThreadPool$WorkerThread.run(SimpleThreadPool.java:546)
Caused by: org.hibernate.hql.ast.QuerySyntaxException: users is not mapped [select a from com.saviynt.ecm.identitywarehouse.domain.Users a where 1=1 AND (username in (select owner from users) ) AND 1=1 ]
... 6 more
Could you please assist me on this issue? or do we have any other alternative to accomplish this task?
Thanks in Advance!
Best Regards
Harish
[This post has been edited by a moderator to remove personally identifiable information (employee email addresses) to abide by the Saviynt Community Terms of Use and Participation Guidelines.]
07/08/2022 08:01 AM - edited 07/11/2022 12:23 PM
try below
07/08/2022 08:15 AM
Harish,
The table name is case sensitive so instead of users use Users
e.g : a.username in (Select distinct owner from Users)