In workflow approval will auto reject in 4 business days

Servicenow de11
Tera Contributor

Hello,

 

We have a requirement that is in the catalog item workflow the approval will auto reject with in 4 business days.

can anyone suggest the script in the workflow.

 

Thanks in advance.

3 REPLIES 3

Shruti Khaire
Kilo Sage

Hello @Servicenow de11,

 

For the scenario mentioned you can leverage Flow designer for this without scripting

1) Trigger - Record created on sysapproval_approver

2) then use Wait for a duration of time - give Wait for 96 hours; schedule as 24x7

3) the use If flow action and check if record is not approved

a) if yes then reject it

4) use update record action and set state as Rejected

 

Or you can even create a scheduled job that checks all open Approvals from x days ago and set them to rejected.

Hope that helps, Thank you!

Hello Shruti,

 

We are not using flow designer. we are only using workflows. Need workflow user approval activity script

Ankur Bawiskar
Tera Patron
Tera Patron

@Servicenow de11 

workflow cannot do this thing.

you need a flow which runs daily or a scheduled job which runs daily and checks if 4 business days have elapsed for that approval record (based on created on date)

if yes and if it's requested state then reject it via script or flow action

what did you start with and where are you stuck?

Regards,
Ankur
Certified Technical Architect  ||  9x ServiceNow MVP  ||  ServiceNow Community Leader