12/29/2022 11:55 AM
I have a technical rule to grant an AD Group based on below conditions, but when the rule runs I am seeing below error in the error log. I followed documentation and used the DATE_ADD function with INTERVAL 1 DAY but looks like Saviynt doesnt like 1 in the DATE_ADD function. Can anyone provide if there are any workarounds to use INTERVAL 1 DAY in a Technical rule?
(a.customproperty19 = DATE_ADD(curdate(),INTERVAL 1 DAY)) AND (a.statuskey=1) AND (a.employeeid is not null)
2022-12-29 19:50:34,214 [quartzScheduler_Worker-19] ERROR hql.PARSER - line 1:3128: unexpected token: ON
2022-12-29 19:50:34,292 [quartzScheduler_Worker-19] ERROR hql.PARSER - line 1:136: unexpected token: 1
01/03/2023 04:54 AM
did it worked using data analyazer/ preview mode in rule
01/03/2023 04:57 AM
Yes. It works in both data analyzer and Preview mode of the Technical rule.
01/03/2023 06:51 AM
Screenshot
01/03/2023 06:59 AM
01/03/2023 07:20 AM - edited 01/03/2023 07:27 AM
Try this
(a.customproperty19 = (curdate() + 1) AND (a.statuskey=1) AND (a.employeeid is not null)
Since query used in rule will be HQL and I don't think it does support all native database date functions. So try use above format to see if that works
01/03/2023 07:24 AM
Thanks. I ended up using curdate()+1, but is there a bug in Saviynt that it is not accepting INTERVAL X DAY? If so, documentation has to be updated to reflect the dame.
01/03/2023 07:28 AM - edited 01/03/2023 07:28 AM
I have updated my comment with reason why date function is not working.