Wait condition in scripts

Pradeep67
Tera Contributor

Hi,

Is there a way i can write wait condition apart from workflow/designer for my business rule to run.

I want to create an incident when mid server goes down but it needs to have a delay for 1 hour before creating the incident unless the mid server status changes

 

thank you in advance..

5 REPLIES 5

Ankur Bawiskar
Tera Patron
Tera Patron

Hi Pradeep,

you can have flow designer approach

1) Flow trigger condition: mid server table with status as down

2) then use Wait for duration action - give 1 hr

3) then use Create Action to create incident

Regards
Ankur

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

Ankur Bawiskar
Tera Patron
Tera Patron

Hi Pradeep,

flow designer approach screenshots

Remember to Save -> Activate the flow

find_real_file.png

Wait for duration of time - give 1 hr and the 24*7 schedule

find_real_file.png

Then use Create Record action

Set whatever field with values you want

find_real_file.png

Regards
Ankur

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

it should not create the incident if the status changes in between the hour.

suppose if the mid server goes down now, flow should be triggered, after 2 mins if mid server goes up then this flow should end and incident should not be created. if for 1 hr mid server is Down then incident should be created 

Hi Pradeep,

So just before the timer of 1hr ends you can have a check if the mid server is again up

If yes then don't create

If not then go ahead and create incident

You can use If else Action in flow designer

Regards
Ankur

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