Need an idea how can we reference Business service Table with the Asset Table
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
09-25-2024 07:15 AM
Hello Team ,
Greetings !
I have been struck with a requirement from past few days and tried few things but it didn't work. Need an idea or help from community going forward.
Requirement :-
When an Asset is created / updated (alm_asset) , I want to create a new record in custom table called as Profile Assignment (profile_assignment). The model category of the asset should be copied to the new created table.
Questions :-
I am able to copy the model category from alm_asset table to risk profile table because both fields of same table model_category.
Now i am facing an issue like I have a field on asset table that when profile type is product/asset level then the same model category has to be copied to Service field on newly created table (cmdb_ci_service_business). How can we do that because there is no relationship between asset and service table.
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
10-02-2024 01:19 PM
To which table is that Service field in the Profile Assignment (profile_assignment) table referenced to? Is it the Business Service Table?
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
10-03-2024 12:17 AM
Hello @Ravi Peddineni ,
Yes the Service is reference to cmdb_ci_service_business and the relationship is that
From the attached Ci relationship ,
- Risk Profile gets created that is the type business service
- A business service gets added to a risk profile
- Go run a job or flow to query all CI’s related to that business service and update their risk profile to match the business service.
so from the business service i need to get the server data like parent to child relationship and can someone suggest hoe can we achieve it please ?
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
10-03-2024 03:33 AM
All CI relationships are stored in cmdb_rel_ci table. You should query that table to get the server.
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
10-03-2024 04:44 AM
@Ravi Peddineni Can you help me like how can we query and get the all CI's records associated with the business services. can you help me if we have any product document for self learning to understand he relationships , going forward other things as well.