Wait condition in scripts
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
11-06-2020 11:38 PM
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..
- Labels:
-
MID Server

- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
11-07-2020 01:14 AM
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.