Trigger the catalog tasks in flow designer after 10 business days exclude weekends

KallaSpandana
Tera Contributor

Hi,

 

I'm trying to configure a flow in Flow Designer where the second and third catalog tasks should be triggered 10 business days after the first catalog task is closed.

To achieve this, I added a Timer activity after the first catalog task, setting the duration to 10 days and the schedule to 8 AM – 5 PM on business days. However, the flow is not behaving as expected. @Ankur Bawiskar 

KallaSpandana_0-1750064073654.png

 

 

Thanks,

Spandana.

1 ACCEPTED SOLUTION

@KallaSpandana 

then follow this

1) when 1st task was closed, use Run Script after 1st task closure and store the closure date/time in workflow scratchpad variable

2) then add 10 business days to it, check this link and use that in workflow wait script 

Add Business Days  

// get task closure date/time

// add 10 business days to it

answer = gs.dateDiff(gs.nowDateTime(), finalDate, true);

If my response helped please mark it correct and close the thread so that it benefits future readers.

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

View solution in original post

4 REPLIES 4

Ankur Bawiskar
Tera Patron
Tera Patron

@KallaSpandana 

you are using flow but you are sharing screenshots of Workflow.

You can use Schedule as per what customer wants and then use Wait for Duration flow logic and mention the days

Something like this and give your schedule

1) it will wait for 80 hours (considering 1 business day = 8 hours as per your schedule), so I used 8*10 = 80

AnkurBawiskar_0-1750064556920.png

 

If my response helped please mark it correct and close the thread so that it benefits future readers.

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

@Ankur Bawiskar sorry it my mistake, we should match this requirement in workflow only. Can you please help on this how to achieve it in workflow 

 

@Ankur Bawiskar can you please help 

@KallaSpandana 

then follow this

1) when 1st task was closed, use Run Script after 1st task closure and store the closure date/time in workflow scratchpad variable

2) then add 10 business days to it, check this link and use that in workflow wait script 

Add Business Days  

// get task closure date/time

// add 10 business days to it

answer = gs.dateDiff(gs.nowDateTime(), finalDate, true);

If my response helped please mark it correct and close the thread so that it benefits future readers.

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