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

Hitoshi Ozawa
Giga Sage
Giga Sage

Any reason to not using Workflow nor Flow Designer?

Anyways, business rule can be written on "sysevent" table with conditions on "param1" is the mid server name and "name" is "mid_server.down".

On this condition, write a script to create an event in "em_event" table.

Then, it's just a matter of creating Event Rules to create Alert and then incident from alerts using OOTB ServiceNow event management features. 

With Flow Designer, it's just a matter of inserting get step to recheck the status after an hour is up.

find_real_file.png