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 comparison in workflow

NM
Honored Contributor III
Honored Contributor III

Hi,

We have a use case where we have to send entitlement for approval based on difference between the end and start date.

if enddate-startdate is greater then 2 months send to user group for approval otherwise to manager for approval.

I tried with request_access.startdate - request_access.enddate but that doesn't seem to work (No request is getting submitted)

Can someone please provide a sample to use enddate and startdate in workflow?

Thanks


If this helped you move forward, click 'Kudos'. If it solved your query, select 'Accept As Solution'
7 REPLIES 7

rushikeshvartak
All-Star
All-Star
com.saviynt.ecm.workflow.Request_Access.get(new Long(requestaccesskey)).startdate.format("HH").toInteger()>17

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

NM
Honored Contributor III
Honored Contributor III

Hi Rushikesh,

Tried with the one provided by you in if else block it doesn't seem to work, Received below error message.

"Script evaluation error"

NM_0-1704654424776.png

Expression language selected is "Groovy"

Condition

NM_1-1704654547538.png

 


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

Above one was sample please change as per your requirements 


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

NM
Honored Contributor III
Honored Contributor III

I will make the changed as per the requirement but the above provided one also doesn't work. Do I need to add something else to make it work?

Thanks


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

com.saviynt.ecm.workflow.Request_Access.get(new Long(requestaccesskey)).startdate.format('HH').toInteger()>17

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

NM
Honored Contributor III
Honored Contributor III

I have tried this but gives an error and mentioned the same in my previous comment..


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

com.saviynt.ecm.workflow.Request_Access.get(new Long(requestaccesskey)).startdate.format('HH').toInteger().equals('17')

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