Discovery Pattern Step-Create Relationship not happening
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
10-16-2020 10:26 AM
Hello Experts,
I was looking to create relationship between a cmdb_ci_computer and cmdb_ci_service Using relation Depends On:: UsedBy
cmdb_ci_computer table contains a field u_service which is same as cmdb_ci_service table. Eg:
On Table cmdb_ci_computer
--------------------------------
Name u_service(String field) getting this via Discovery
COMPUTER1 Acrobat
On Table cmdb_ci_service
-------------------------------
Name
Acrobat
Then on Table 'cmdb_rel_ci' want to create a relation
Parent Type Child
Acrobat Depends On::UsedBy COMPUTER1
It does not give me error but does not create result when i do TEST . Any step I am missing please guide. Thanks
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
10-17-2020 09:50 AM
Also I quite not sure what I did is I created another STEP before Create Relationship to insert the Service Value (Adobe) into the cmdb_ci_service.name
HOping that here pattern will consider the cmdb_ci_service table . When I test in debug get the relationship but when i run discovery it does not create relationship actually.
So not sure if that should work because still i am discovering (Adobe) via discovery but as string in cmdb_ci_computer and not in cmdb_ci_service as said in my POST .
Any thoughts please highly appreciated if this should work?
Thanks

- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
10-17-2020 12:59 PM
Hi,
I am not sure what you are trying to achieve. You should have a reference or variable present in this pattern to allow creation of relationship as per suggested relationship and also as per containment and hosting rules.
Thanks,
Ashutosh
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
10-18-2020 10:08 AM
Hi,
I am trying to create relation between cmdb_ci_service and cmdb_ci_computer although the discovery is not populating the 'Service' in cmdb_ci_service instead we are updating in cmdb_ci_computer.u_service field via registry key. THis service value is also available in cmdb_ci_service as a record. As example in my question (Acrobat)
Here what I did step by step and I am getting TEST results which shows RELATIONSHIP but it does not insert in cmdb_rel_ci. Please find the snap shots step by step and need community expertise guidance what went wrong it is not creating relationship in cmdb_rel_ci even though it shows in test result. Thanks
1) I am fetching 'Service' from registry key
2) Then I am updating it in cmdb_ci_computer .u_service field
3) I am updating the service in cmdb_ci_service also to make it available in pattern
4) Now building relationship between cmdb_ci_service and cmdb_ci_computer
5) I can see this below
6)Pattern Log as below:

- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
10-18-2020 12:49 PM
HI,
So what i see in this mapping is you are trying to make computer parent and service child which is not suggested relationship in this case.
So you should try other way round and make service parent and computer child in step 4 above which you have shown.
Thanks,
Ashutosh
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
10-19-2020 12:42 PM
Hi Ashutosh,
Yes I already tried reversing the parent-child but its same showing me in TEST but actually not happening.Thanks