Can you create Asset without CI and later create CI?
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
‎02-13-2019 06:27 PM
We want to first create the server asset record. We don't want to create the CI record (yet). After the server is configured, then we want to create the CI in the appropriate CI class (Linux Server, Windows Server, AIX Server, etc). Is there a way to get the asset record created first without creating the CI and a week or two later creating the CI in the appropriate class?
- Labels:
-
Enterprise Asset Management
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
‎02-13-2019 06:40 PM
Hi, I suspect you would need to update the BR responsible for CI creation - I think it is 'Create CI on insert'
so that it is triggered later in the Asset life cycle;
Alternately disable the BR and configure a UI trigger that utilizes the same underpinning code.
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
‎02-13-2019 07:34 PM
Hi Munwong
Check the table model categories where the mapping between the ci class and the asset class is defined. This is the table that servicenow script engine refer while creating/updating the corresponding ci/asset.
In this table look for the ci class as server and remove this mapping. Now When you will create the asset record then the corresponding ci will not be created.
-Harsh
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
‎02-24-2019 10:43 AM
Thanks Harsh. The model category table make sense but what if I want to create the Ci a week later? How can I trigger the CI creation? I see that the Model and Model Category is grey-ed out (read only) after the asset is created. It appears we can't change it after initial asset creation.
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
‎02-24-2019 05:31 PM
Hi Munwong
After writing all the notes below I re read your query that you want to map the asset to correct server.
I will suggest no to deactivate or remove any model categories existing setup, Instead create different model categories for all your servers with corresponding CI tables and asset table. So when you will create a asset record, corresponding ci record will be created in respective server class which you want to do as a final result.
Below few points will help you to accomplish your requirement based on my last update .
1. Do not delete the model category record from model category table instead update it. In the required model category record keep the CI class as empty and save that.
Now the problem is Out of box, CI class and Asset class fields on the model category tables are read-only. There are two ACLs setup for that. You can set the admin override as true. Also in the CI class field related ACL the role is setup as nobody, Remove that and save the ACLs.
You may also require to deactivate the business rule - "Protect cmdb_ci_class" for a moment before updating the the Ci class field. This business rule is OOB.
- Now you will be able to update the Asset class and CI class field.
3. Yes, the model category and model is read-only on the asset record. When you are creating an asset record then you can select the model category. As you have not deleted that in the previous step, You will be able to select the model category that you require.
Once you select the model category then you will also be able to select the corresponding models(there should be existing models for corresponding category). IF models are not created then create the models first in the model table.
Don't left them empty.
4.Now you want to create CI later, It is very important to understand how you are loading the CI record.
-If you are doing bulk upload of the CI records via excel load or via web service then you may have to write transform scripts to set the model category and models in the ci records based on the corresponding asset record. In your excel file/web-service there should be a primary field for your asset record.
- Now you want the business as usual. After doing all the pre-load of the CIs and assets, it is good time to re-update the model category with correct asset and ci table. Once you update that then SerivceNow asset ci synchronization engine will take care of asset-ci correct synchronization(create/update).
I am not a big fan of updating out of box scripts to resolve any query. My first preference is to find out if any configuration changes can be done for the requirement.
-Harsh