logo

NJP

Instance Scan - Orphaned Catalog Configurations Examples

Import · Jun 28, 2022 · article

Are you new to Instance Scan? Are you looking to build out your Instance Scan Checks library? Do you do a lot of Service Catalog development?

You’ve come to the right article. Here are a few Instance Scan checks, that you can easily build for yourself, to help you when working with Service Catalog development.

Delete Orphaned Variables

Sometimes when developing new Catalog Items, I find left over variables that are not used anywhere - not associated with a catalog item and also not associated with a variable set. These are unnecessary configuration that just create bloat in your system and it is likely best to not move these configurations to production.

Here’s an Instance Scan of Table Check that you can create to help you catch those orphaned variables:

image

Delete Orphaned Catalog UI Policies

Similar to the above, if you forget to delete a Catalog UI Policy if you delete the Catalog Item that it belongs to, you may end up with orphaned policies - ones that do not apply to any Catalog Items or Variable Sets. These should be unnecessary and not moved to production.

Here’s an Instance Scan of Table Check that you can create to help you catch those orphaned Catalog UI Policies:

image

Delete Orphaned Catalog Client Scripts

Just like the above but for Catalog Client Scripts. I think you get the idea. Try to create this one on your own without an example. Comment below if you run into trouble.

For other community information on Instance Scan, I recommend checking out @Mark Roethof's excellent posts on Instance Scan.

If this article helped you, I would appreciate it if you marked it as image helpful below.

Labels:

image

View original source

https://www.servicenow.com/community/developer-articles/instance-scan-orphaned-catalog-configurations-examples/ta-p/2302050