Need an idea how can we reference Business service Table with the Asset Table

Ediga Sai Chand
Tera Contributor

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.

 

EdigaSaiChand_0-1727273678523.png

9 REPLIES 9

Ravi Peddineni
Kilo Sage

@Ediga Sai Chand 

 

To which table is that Service field in the Profile Assignment (profile_assignment) table referenced to? Is it the Business Service Table?

Ediga Sai Chand
Tera Contributor

Hello @Ravi Peddineni , 

 

Yes the Service is reference to cmdb_ci_service_business  and the relationship is that 

EdigaSaiChand_0-1727939625183.png

 

From the attached Ci relationship , 

  1. Risk Profile gets created that is the type business service 
    1. A business service gets added to a risk profile
    2. 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 ?

 

 

@Ediga Sai Chand 

All CI relationships are stored in cmdb_rel_ci table. You should query that table to get the server. 

@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.

 

EdigaSaiChand_0-1727955833602.png