Join the #BuildWithBuildAgent Challenge! Get recognized, earn exclusive swag, and inspire the ServiceNow Community with what you can build using Build Agent.  Join the Challenge.

How to stop certain models creating CI's?

tomlumbard
Kilo Expert

Hi,

Please see the below example of some of our model category's. I would like to stop some of these models creating assets when made a CI and visa versa. I am unable to remove the CI class or Asset class due to security restrictions (yes I am have role admin). How am I supposed to break this relationship?

find_real_file.png

Thanks, Tom

10 REPLIES 10

Community Alums
Not applicable

Eric,



I would look at the Enforce CI verification on the Model Category to help you achieve this goal.



Ben


Hi Eric,



From just a CMDB/Assets standpoint, I would say you need to have the following BR's on [cmdb_ci] disabled:


  • Create Asset on Insert
  • Create Asset on Model Change
  • [Optional] Update Asset fields on change
    (we did not want data changes on CIs flowing to the asset side at all, only the other direction)


If you have already changed these BRs to inactive, then you will need to look for another culprit.   I would look into your Altiris integration, how is it being done?   Is there a data import and transform being done?   Look into the transform map and its scripts, if so.   Or look for other non-OOB business rules that may be running on the CI side at insert/update.




Good luck,


-Brian


ajit_mallick
Mega Expert

The CIs are created / linked to an asset based on the Model Category to CI Class mapping, something similar to -



Asset --> Model --> Model Category --> CI Class --> CI



To prevent certain assets from creating CIs, you need to break the linkage somewhere along this chain.



Depending on the situation, you may either take the Model Category out of the Model, or take the CI Class out of the Model Category or take Model out of the Asset .



Refer 's post here.  



If you have the CIs that are creating the assets automatically, you could use Enforce CI verification.


Community Alums
Not applicable

I highly discourage disabling the Business Rules here. There are two ways I recommend handling this:


  • As Ajit states, turn on Enforce CI verification on the Model Category
  • If you only want to prevent Asset creation for specific Models of device, you can set the Asset tracking strategy on the Model record to Don't create asset

The relationships between Assets, CIs, Models, and Model categories isn't quite so linear as Ajit states. The Model category is what drives the creation of an Asset from a CI and a CI from an Asset. Both Assets and CIs point to Model records to identify the type of device.


Hi All,



Which scripts causes the auto creation of models when Ci is inserted? any idea around this would help.