- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
‎06-09-2016 12:20 PM
Hi -
Our MID server went down and there was only one notification that was sent to someone no longer responsible.
I want to automate this so that it follows our standard alerting process; this will require a notification be sent but have a script or something that sends out a notification 'alert' until the status is 'Up'
I'm not sure I want to add a scheduled job which would run every 15 minutes or so, or if I can only have the notification sent once the status changes.
Any recommendations on how?
Thanks
Solved! Go to Solution.

- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
‎06-09-2016 01:01 PM
Hi Josh,
I generally attach my workflows to a record whenever possible and avoid scripting to start/stop/reset. I have friends who have told me that it is possible to attach workflows to non-task records, but I've never done it. The dictionary attribute workflow=true may be required. Again, all untested, but clues that may help.
If you want to do it from script, this should help.
Workflow Script - ServiceNow Wiki
Be bold - be brave.

- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
‎06-09-2016 12:24 PM
Hi Josh,
I'd create a notification on the ecc_agent (MID server) table that watches for changes on the status field. If it changes, send a notification. This should require zero scripting.
Email Notifications - ServiceNow Wiki
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
‎06-09-2016 12:28 PM
Hello Chuck
Well, the issue is that this notification will be sent to our monitoring tool...and we would like to mirror the alerting for the MID server after all other alerts. That is to say, we want an alert every 10 minutes...so it the notification on that table needs to do a status check every 10 minutes.
Thanks!

- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
‎06-09-2016 12:35 PM
Hi Josh,
Thanks for the clarification. Here's an idea.
Have a business rule watch for a change on the status field (e.g. current.status.changesTo('Down') // or whatever
The script of that BR triggers a workflow that has a 10 minute timer in it that triggers a notification.
When the status changes back to Up, another business rule cancels the workflow, notifications stop.
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
‎06-09-2016 12:57 PM
Chuck,
This sounds like the best approach so that we don't have the overhead of a scheduled job.
Do you have any good examples of calling workflow from a business rule?
I know I've seen something similar before.
Thanks