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

How to assign SAV_Role_Manager using Technical rule

Harish7
New Contributor II
New Contributor II

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.

Screenshot 2022-07-08 at 15.25.56.png

 

When i Preview the rule it shows the correct users(who are managers) but it is not able to assign the SAV role.

Screenshot 2022-07-08 at 15.25.28.png

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.]

2 REPLIES 2

rushikeshvartak
All-Star
All-Star

try below

  • a.username in (select m.owner from Users m)
  • a.username in (select m.owner from com.saviynt.ecm.identitywarehouse.domain.Users m )

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

avinashchhetri
Saviynt Employee
Saviynt Employee

Harish,

The table name is case sensitive so instead of users use Users

e.g : a.username in (Select distinct owner from Users)

 

 

Regards,
Avinash Chhetri