
- Post History
- Subscribe to RSS Feed
- Mark as New
- Mark as Read
- Bookmark
- Subscribe
- Printer Friendly Page
- Report Inappropriate Content
10-03-2021 09:46 PM - edited 08-04-2024 02:47 AM
Articles, Blogs, Videos, Podcasts, Share projects - Experiences from the field
Hi there,
"Execute a reactive scan to set up a scan that runs automatically on an execution tracker failure." Or in short: Reactive Scanning with Instance Scan, which has been introduced with the Rome release. Sounds interesting, for example automatically performing certain scans on Release Upgrade failures, Preview/Commit Update Set failures, etcetera.
Let's dig into this!
Need to know
Following the Docs page on the Execute a reactive scan, I can imagine you will still have questions. Actually not much is described on the Docs page, and while literally following the procedure mentioned… it won't do anything. The blog on the Developer Site does provide more correct information. The Docs page does mention the Scan Trigger table [scan_trigger], though does not mention that you also need to use the Triggers field on the Scan Suite record. Out-of-the-box (Rome Patch 0), the Triggers field is not on the Form Lay-out.
Procedure
Lots of scenarios would be thinkable for Reactive Scanning. Two I already mentioned: Release Upgrade failures, Preview/Commit Retrieved Update Set failures. Let's take the Retrieved Update Set Preview failures as an example.
1. The table for Retrieved Update Sets is sys_remote_update_set. This we would need to add to a new Scan Trigger record.
2. When a failure occurs on a Retrieved Update Sets, certain Scan Suites should be triggered. Which Scan Suite(s) is up to you, you could use your existing Scan Suites or you might create a new Scan Suite specifically set up for the failure you are after.
The Scan Suite record [scan_check_suite] contains a Trigger field. Simply select one or more Triggers. In this case, the Scan Trigger created from the previous step.
And that's it! In theory, when Retrieving an Update Set, and the Preview or Commit fails, your Scan Suite which has a reference to the matching Trigger Record should start.
Technically an "execution_tracker.failure" event will be generated, which will start the Scan Suite.
Retrieved Update Set > Preview Failure > Reactive Scan
For this article, on purpose I added errors to the Update Set being loaded. As expected, the update preview fails.
At the same time, the event is generated and shortly after Instance Scan is triggered.
Wrap up
You could now do some brainstorming, and thinking of possible Scan Checks which you would like to be executed while an Update Set preview fails. Similar to use cases like when an Upgrade fails, what kind of Scan Checks would you like to be executed when that occurs?
---
And that's it! If you have possible Scan checks in mind or other use cases, let me know. I'm interested in what others are coming up with.
C |
If this content helped you, I would appreciate it if you hit bookmark or mark it as helpful.
Interested in more Articles, Blogs, Videos, Podcasts, Share projects I shared/participated in? |
Kind regards,
Mark Roethof
ServiceNow Technical Platform Architect @ Quint Technology
2x ServiceNow Developer MVP
2x ServiceNow Community MVP
---
- 1,619 Views