Saviynt unveils its cutting-edge Intelligence Suite products to revolutionize Identity Security!
Click HERE to see how Saviynt Intelligence is transforming the industry.
Saviynt Copilot Icon

Date customization in Dynamic Attribute

gur_Kaur
New Contributor
New Contributor

Hi Team,

Requirement- To calculate value of "End Date" attribute based on selection of parent attribute. End date needs to be populated based on value:

(value coming from parent attribute)+ current date.

We are trying with below syntax - ${new Date().plus(Parent Attribute).format('MMM dd,yyyy')}

Here is snippet of parent attribute:

gur_Kaur_1-1720093553117.png

sql- select "90" as id, "3 months" union select "180" as id, "6 month" union select "270" as id, "9 month" union select "365" as id, "1 year"

Here is snippet of child attribute:

gur_Kaur_0-1720093505236.png

sql- ${new Date().plus(Parent Attribute).format('MMM dd,yyyy')}

Please let us know how we can achieve this.

14 REPLIES 14

rushikeshvartak
All-Star
All-Star

What is error you are getting


Regards,
Rushikesh Vartak
If this helped you move forward, click 'Kudos'. If it solved your query, select 'Accept As Solution'.

Request Form is not getting loaded it. Below is the error snippet.

gur_Kaur_0-1720104947593.png

Best Regards,

Gurjeet Kaur

[This message has been edited by moderator to mask sensitive information]

Does hardcoded parent attribute working ?

 

Refer https://forums.saviynt.com/t5/identity-governance/dynamic-attribute-type-date-in-create-user/m-p/866...


Regards,
Rushikesh Vartak
If this helped you move forward, click 'Kudos'. If it solved your query, select 'Accept As Solution'.

No, It is also not working.

Does logs have same error as per above link its working


Regards,
Rushikesh Vartak
If this helped you move forward, click 'Kudos'. If it solved your query, select 'Accept As Solution'.

gur_Kaur
New Contributor
New Contributor

Hey,

"Does hardcoded parent attribute working ?" - Yes, It is working. Misunderstood it before.

${new Date().plus(365).format('MMM dd,yyyy')} - this sample is working fine.

sql- select "90" as id from dual 

union select "180" as id from dual

union select "270" as id from dual 

union select "365" as id from dual

 Try this


Regards,
Rushikesh Vartak
If this helped you move forward, click 'Kudos'. If it solved your query, select 'Accept As Solution'.

Have tried suggestion given but getting same error as before...

gur_Kaur_0-1720159756758.png

Please find log file attached.

Best Regards,
Gurjeet Kaur

${new Date().plus(Integer.parseInt(${parent})).format('MMM dd,yyyy')}


Regards,
Rushikesh Vartak
If this helped you move forward, click 'Kudos'. If it solved your query, select 'Accept As Solution'.

Hi Rush,

It is still throwing same way as before. Please find logs as well.

gur_Kaur_0-1720419332511.png

"ecm-worker","2024-07-08T06:10:52.995+00:00","2024-07-08T06:10:52.935273387Z stdout F 2024-07-08 06:10:52,935 [quartzScheduler_Worker-2] DEBUG changeaction.UserChangeActionService - Adding to ruleEntMap com.saviynt.hana.HanaRule : 329-[164161]"
"ecm-worker","2024-07-08T06:10:52.995+00:00","2024-07-08T06:10:52.935277787Z stdout F 2024-07-08 06:10:52,935 [quartzScheduler_Worker-2] DEBUG changeaction.UserChangeActionService - processing user 87009"
"ecm-worker","2024-07-08T06:10:52.995+00:00","2024-07-08T06:10:52.935307088Z stdout F 2024-07-08 06:10:52,935 [quartzScheduler_Worker-2] DEBUG changeaction.UserChangeActionService - str = CN=SSO-Workhuman-Users,OU=Azure AD Applications,OU=Application Management,OU=Groups,OU=!Administration!,OU=!TESTGUWW!,DC=DEVGUWW,DC=NET"
"ecm-worker","2024-07-08T06:10:52.995+00:00","2024-07-08T06:10:52.935339488Z stdout F 2024-07-08 06:10:52,935 [quartzScheduler_Worker-2] DEBUG changeaction.UserChangeActionService - entVal = CN=SSO-Workhuman-Users,OU=Azure AD Applications,OU=Application Management,OU=Groups,OU=!Administration!,OU=!TESTGUWW!,DC=DEVGUWW,DC=NET"
"ecm-worker","2024-07-08T06:10:52.995+00:00","2024-07-08T06:10:52.935350188Z stdout F 2024-07-08 06:10:52,935 [quartzScheduler_Worker-2] DEBUG changeaction.UserChangeActionService - ent data found for key 3642@#_#@21@#_#@CN=SSO-Workhuman-Users,OU=Azure AD Applications,OU=Application Management,OU=Groups,OU=!Administration!,OU=!TESTGUWW!,DC=DEVGUWW,DC=NET@#_#@"
"ecm-worker","2024-07-08T06:10:52.995+00:00","2024-07-08T06:10:52.935355988Z stdout F 2024-07-08 06:10:52,935 [quartzScheduler_Worker-2] DEBUG changeaction.UserChangeActionService - entValueSet before = [164161]"
"ecm","2024-07-08T06:10:52.728+00:00","2024-07-08T06:10:51.990623243Z stdout F 2024-07-08 06:10:51,990 [http-nio-8080-exec-7] DEBUG workflow.WorkflowmanagementController - Session.showEditButton = false"
"ecm","2024-07-08T06:10:52.728+00:00","2024-07-08T06:10:51.995295267Z stdout F 2024-07-08 06:10:51,995 [http-nio-8080-exec-7] DEBUG workflow.WorkflowmanagementController - value of showPasswordAttAsMandatory = true"
"ecm","2024-07-08T06:10:52.728+00:00","2024-07-08T06:10:52.078777112Z stdout F 2024-07-08 06:10:52,078 [http-nio-8080-exec-7] ERROR errors.GrailsExceptionResolver - MissingMethodException occurred when processing request: [GET] /ECM/workflowmanagement/hierachyentitlementbyendpoint"
"ecm","2024-07-08T06:10:52.728+00:00","2024-07-08T06:10:52.078807012Z stdout F No signature of method: java.lang.String.call() is applicable for argument types: (SimpleTemplateScript133$_run_closure1) values: [SimpleTemplateScript133$_run_closure1@664452b1]"
"ecm","2024-07-08T06:10:52.728+00:00","2024-07-08T06:10:52.078814812Z stdout F Possible solutions: wait(), any(), wait(long), take(int), any(groovy.lang.Closure), each(groovy.lang.Closure). Stacktrace follows:"
"ecm","2024-07-08T06:10:52.728+00:00","2024-07-08T06:10:52.078820112Z stdout F org.codehaus.groovy.grails.web.pages.exceptions.GroovyPagesException: Error processing GroovyPageView: Error executing tag <g:render>: No signature of method: java.lang.String.call() is applicable for argument types: (SimpleTemplateScript133$_run_closure1) values: [SimpleTemplateScript133$_run_closure1@664452b1]"
"ecm","2024-07-08T06:10:52.728+00:00","2024-07-08T06:10:52.078826512Z stdout F Possible solutions: wait(), any(), wait(long), take(int), any(groovy.lang.Closure), each(groovy.lang.Closure)"
"ecm","2024-07-08T06:10:52.728+00:00","2024-07-08T06:10:52.078831012Z stdout F at grails.plugin.springsecurity.web.filter.GrailsAnonymousAuthenticationFilter.doFilter(GrailsAnonymousAuthenticationFilter.java:53)"
"ecm","2024-07-08T06:10:52.728+00:00","2024-07-08T06:10:52.078834912Z stdout F at com.saviynt.webservice.SaviyntRestAuthenticationFilter.doFilter(SaviyntRestAuthenticationFilter.groovy:135)"
"ecm","2024-07-08T06:10:52.728+00:00","2024-07-08T06:10:52.078839212Z stdout F at grails.plugin.springsecurity.web.authentication.logout.MutableLogoutFilter.doFilter(MutableLogoutFilter.java:62)"
"ecm","2024-07-08T06:10:52.728+00:00","2024-07-08T06:10:52.078843412Z stdout F at grails.plugin.springsecurity.web.SecurityRequestHolderFilter.doFilter(SecurityRequestHolderFilter.java:59)"
"ecm","2024-07-08T06:10:52.728+00:00","2024-07-08T06:10:52.078848112Z stdout F at com.mrhaki.grails.plugin.xframeoptions.web.XFrameOptionsFilter.doFilterInternal(XFrameOptionsFilter.java:69)"
"ecm","2024-07-08T06:10:52.728+00:00","2024-07-08T06:10:52.078852212Z stdout F at com.brandseye.cors.CorsFilter.doFilter(CorsFilter.java:82)"
"ecm","2024-07-08T06:10:52.728+00:00","2024-07-08T06:10:52.078855912Z stdout F at java.lang.Thread.run(Thread.java:750)"
"ecm","2024-07-08T06:10:52.728+00:00","2024-07-08T06:10:52.078859912Z stdout F Caused by: org.codehaus.groovy.grails.web.taglib.exceptions.GrailsTagException: Error executing tag <g:render>: No signature of method: java.lang.String.call() is applicable for argument types: (SimpleTemplateScript133$_run_closure1) values: [SimpleTemplateScript133$_run_closure1@664452b1]"
"ecm","2024-07-08T06:10:52.728+00:00","2024-07-08T06:10:52.078864113Z stdout F Possible solutions: wait(), any(), wait(long), take(int), any(groovy.lang.Closure), each(groovy.lang.Closure)"
"ecm","2024-07-08T06:10:52.728+00:00","2024-07-08T06:10:52.078867813Z stdout F at gsp_ECM_workflowmanagementhierachyentitlementbyendpoint_gsp.run(gsp_ECM_workflowmanagementhierachyentitlementbyendpoint_gsp.groovy:216)"
"ecm","2024-07-08T06:10:52.728+00:00","2024-07-08T06:10:52.078871213Z stdout F ... 7 more"
"ecm","2024-07-08T06:10:52.728+00:00","2024-07-08T06:10:52.078875313Z stdout F Caused by: groovy.lang.MissingMethodException: No signature of method: java.lang.String.call() is applicable for argument types: (SimpleTemplateScript133$_run_closure1) values: [SimpleTemplateScript133$_run_closure1@664452b1]"
"ecm","2024-07-08T06:10:52.728+00:00","2024-07-08T06:10:52.078880413Z stdout F Possible solutions: wait(), any(), wait(long), take(int), any(groovy.lang.Closure), each(groovy.lang.Closure)"
"ecm","2024-07-08T06:10:52.728+00:00","2024-07-08T06:10:52.078884813Z stdout F at SimpleTemplateScript133.run(SimpleTemplateScript133.groovy:1)"
"ecm","2024-07-08T06:10:52.728+00:00","2024-07-08T06:10:52.078888013Z stdout F at com.saviynt.utility.TemplateUtilityService.getSimpleTemplateString(TemplateUtilityService.groovy:61)"
"ecm","2024-07-08T06:10:52.728+00:00","2024-07-08T06:10:52.078891413Z stdout F at com.saviynt.utility.TemplateUtilityService.getTemplateString(TemplateUtilityService.groovy:34)"
"ecm","2024-07-08T06:10:52.728+00:00","2024-07-08T06:10:52.078894713Z stdout F at gsp_ECM_workflowmanagement_hierachyentitlementbyendpoint2_gsp.run(gsp_ECM_workflowmanagement_hierachyentitlementbyendpoint2_gsp.groovy:346)"
"ecm","2024-07-08T06:10:52.728+00:00","2024-07-08T06:10:52.078898313Z stdout F ... 8 more"
"ecm","2024-07-08T06:10:52.728+00:00","2024-07-08T06:10:52.154537616Z stdout F 2024-07-08 06:10:52,153 [http-nio-8080-exec-7] ERROR error.ErrorController - Exception"
"ecm","2024-07-08T06:10:52.728+00:00","2024-07-08T06:10:52.154565116Z stdout F org.codehaus.groovy.grails.web.errors.GrailsWrappedRuntimeException: No signature of method: java.lang.String.call() is applicable for argument types: (SimpleTemplateScript133$_run_closure1) values: [SimpleTemplateScript133$_run_closure1@664452b1]"
"ecm","2024-07-08T06:10:52.728+00:00","2024-07-08T06:10:52.154572816Z stdout F Possible solutions: wait(), any(), wait(long), take(int), any(groovy.lang.Closure), each(groovy.lang.Closure)"
"ecm","2024-07-08T06:10:52.728+00:00","2024-07-08T06:10:52.154578716Z stdout F at grails.plugin.springsecurity.web.filter.GrailsAnonymousAuthenticationFilter.doFilter(GrailsAnonymousAuthenticationFilter.java:53)"
"ecm","2024-07-08T06:10:52.728+00:00","2024-07-08T06:10:52.154583016Z stdout F at com.saviynt.webservice.SaviyntRestAuthenticationFilter.doFilter(SaviyntRestAuthenticationFilter.groovy:135)"
"ecm","2024-07-08T06:10:52.728+00:00","2024-07-08T06:10:52.154586416Z stdout F at grails.plugin.springsecurity.web.authentication.logout.MutableLogoutFilter.doFilter(MutableLogoutFilter.java:62)"
"ecm","2024-07-08T06:10:52.728+00:00","2024-07-08T06:10:52.154590416Z stdout F at grails.plugin.springsecurity.web.SecurityRequestHolderFilter.doFilter(SecurityRequestHolderFilter.java:59)"
"ecm","2024-07-08T06:10:52.728+00:00","2024-07-08T06:10:52.154593316Z stdout F at com.mrhaki.grails.plugin.xframeoptions.web.XFrameOptionsFilter.doFilterInternal(XFrameOptionsFilter.java:69)"
"ecm","2024-07-08T06:10:52.728+00:00","2024-07-08T06:10:52.154596816Z stdout F at com.brandseye.cors.CorsFilter.doFilter(CorsFilter.java:82)"
"ecm","2024-07-08T06:10:52.728+00:00","2024-07-08T06:10:52.154600616Z stdout F at java.lang.Thread.run(Thread.java:750)"
"ecm","2024-07-08T06:10:52.728+00:00","2024-07-08T06:10:52.154603816Z stdout F Caused by: org.codehaus.groovy.grails.web.pages.exceptions.GroovyPagesException: Error processing GroovyPageView: Error executing tag <g:render>: No signature of method: java.lang.String.call() is applicable for argument types: (SimpleTemplateScript133$_run_closure1) values: [SimpleTemplateScript133$_run_closure1@664452b1]"
"ecm","2024-07-08T06:10:52.728+00:00","2024-07-08T06:10:52.154608616Z stdout F Possible solutions: wait(), any(), wait(long), take(int), any(groovy.lang.Closure), each(groovy.lang.Closure)"
"ecm","2024-07-08T06:10:52.728+00:00","2024-07-08T06:10:52.154611816Z stdout F ... 7 more"
"ecm","2024-07-08T06:10:52.728+00:00","2024-07-08T06:10:52.154614716Z stdout F Caused by: org.codehaus.groovy.grails.web.taglib.exceptions.GrailsTagException: Error executing tag <g:render>: No signature of method: java.lang.String.call() is applicable for argument types: (SimpleTemplateScript133$_run_closure1) values: [SimpleTemplateScript133$_run_closure1@664452b1]"
"ecm","2024-07-08T06:10:52.728+00:00","2024-07-08T06:10:52.154619216Z stdout F Possible solutions: wait(), any(), wait(long), take(int), any(groovy.lang.Closure), each(groovy.lang.Closure)"
"ecm","2024-07-08T06:10:52.728+00:00","2024-07-08T06:10:52.154622316Z stdout F at gsp_ECM_workflowmanagementhierachyentitlementbyendpoint_gsp.run(gsp_ECM_workflowmanagementhierachyentitlementbyendpoint_gsp.groovy:216)"
"ecm","2024-07-08T06:10:52.728+00:00","2024-07-08T06:10:52.154627116Z stdout F ... 7 more"
"ecm","2024-07-08T06:10:52.728+00:00","2024-07-08T06:10:52.154631116Z stdout F Caused by: groovy.lang.MissingMethodException: No signature of method: java.lang.String.call() is applicable for argument types: (SimpleTemplateScript133$_run_closure1) values: [SimpleTemplateScript133$_run_closure1@664452b1]"
"ecm","2024-07-08T06:10:52.728+00:00","2024-07-08T06:10:52.154634116Z stdout F Possible solutions: wait(), any(), wait(long), take(int), any(groovy.lang.Closure), each(groovy.lang.Closure)"
"ecm","2024-07-08T06:10:52.728+00:00","2024-07-08T06:10:52.154637816Z stdout F at SimpleTemplateScript133.run(SimpleTemplateScript133.groovy:1)"
"ecm","2024-07-08T06:10:52.728+00:00","2024-07-08T06:10:52.154641416Z stdout F at com.saviynt.utility.TemplateUtilityService.getSimpleTemplateString(TemplateUtilityService.groovy:61)"
"ecm","2024-07-08T06:10:52.728+00:00","2024-07-08T06:10:52.154644516Z stdout F at com.saviynt.utility.TemplateUtilityService.getTemplateString(TemplateUtilityService.groovy:34)"
"ecm","2024-07-08T06:10:52.728+00:00","2024-07-08T06:10:52.154647916Z stdout F at gsp_ECM_workflowmanagement_hierachyentitlementbyendpoint2_gsp.run(gsp_ECM_workflowmanagement_hierachyentitlementbyendpoint2_gsp.groovy:346)"

Share dynamic attribute screenshot


Regards,
Rushikesh Vartak
If this helped you move forward, click 'Kudos'. If it solved your query, select 'Accept As Solution'.

Please find snippet of the dynamic attributes.

gur_Kaur_0-1721119992036.pnggur_Kaur_1-1721120070712.pnggur_Kaur_2-1721120107833.png

Attribute NameQuery
endDateAttributeselect "90" as id from dual   union select "180" as id from dual  union select "270" as id from dual   union select "365" as id from dual
EndDate${new Date().plus(Integer.parseInt(${endDateAttribute})).format('MMM dd,yyyy')}

Please find logs file attached. We are still getting the same error as shared before.

Best Regards,

Gurjeet Kaur

Action can be either Mapping /Refresh 


Regards,
Rushikesh Vartak
If this helped you move forward, click 'Kudos'. If it solved your query, select 'Accept As Solution'.

Even changing it to either Mapping or Refresh we are still getting same error no help so far.

Could you please suggest any any to achieve this requirement?

Best Regards,

Gurjeet Kaur