Configure the Node relationship configurations
Create a Node relationship configuration record to establish relationships between nodes. Update the node relationships including source table, both Configuration Items (CI) and non-CI relationships. The Node relationship configurations define the connections between the source table and other tables (target tables), specifying how they are related.
Before you begin
Role required: sn_oper_res.admin
Procedure
- Navigate to All > Data Relationships Framework > Main node configuration.
-
Open the desired Main node configuration from the list.
The following example shows the Main node configurations available in the instance.
-
To add a Node relationship configuration, select New in the Node relationship configurations related list.
The Node relationship configuration form is displayed.
For description of the fields in the Node relationship configuration form, see Node relationship configuration form.
You can set up these relationship registries by creating a Relationship Registry record in the Relationship Registries module. The Relationship Registry new record form is shown in the example.
For the description of the fields in the Relationship registry form, see Relationship registry record form.
-
Select the table of your choice in the Source table field in the Source tab.
By default, the system auto-selects the table listed in the Main configuration record, the Service [cmdb_ci_service] table in this example. You can choose the auto-suggested table or a different table as per your requirements.
-
Select the relationship registry record in the Relationship registry field in the Relationship tab.
The relationship registry record defines how the Source table links to another table.
-
Select the Search icon and select the Relationship registry record from the available list.
Selecting the search icon shows the out-of-the-box Relationship registries that have Service as the source table. You can select a Relationship registry from the list.
-
To select a new registry record instead of choosing a record from the out-of-the-box list, select New.
You can create a new registry record if the out-of-the-box options do not meet your needs.
-
Add a meaningful name for the new Relationship registry record.
You can add a proper name to avoid confusion because there might be other registries with the same name.
-
Select the relationship table in the Table field.
The table should be the same as the Source table from the previous screen. This table name may be different from the table that you have defined in the Main node configuration record.
-
Select the relationship type for the table in the Relationship type field.
Once the table is selected, the following options are displayed in the drop-down.
- One-to-one
- One-to-many
- Many-to-many
- Scripted relationship
-
Select the relationship table in the Relationship table field.
For One-to-one relationship type, the Relationship field shows the list of tables that are used as reference fields in the Source table.
The table name is populated in the Relationship field.
-
Select Submit.
You have configured the Source table and Relationship registry.
To select the target table, configure the Target section in the Node relationship configuration record in the next step.
-
Select the Search icon and select the Relationship registry record from the available list.
-
Configure the Target tab.
All the relationship options are explained in this step.
Step Description One-to-one For non-m2m tables, in the Target tab, select Sys ID as the Target reference field and choose the Relationship table as the Target table.
This is valid for One-to-one and One-to-many types.
One-to-many If the Relationship table is an m2m table, select Sys ID in the Target reference field and then in Target table, select the same table as the Relationship table.
For One-to-many, the relationship shows the list of tables that has source table as a reference field.
Many-to-many For Many-to-many, the Relationship field shows the list of m2m tables in which the source table is referred. Notice that for Many-to-many, you have to select the field from the drop-down that you want as output. For example, [cmdb_rel_ci] table has Parent (cmdb_ci) and Child (cmdb_ci) fields. If you want to find the child service, you can select Child.
Scripted For the Scripted relationship, you can select the record from sys_relationship. You can define the relationship via script.
As you can see, the Applies to table has to be as same as the Table field from the previous screen. Here the value in Table field is [cmdb_ci_service_business] but in the Relationship field, it is [cmdb_ci_service]. This configuration works because the [cmdb_ci_service_business] table extends to the [cmdb_ci_service] table.
-
Select Submit.
The Node relationship configuration for the Main configuration record is now updated. The example shows the Node relationship configuration for the Service to Dependencies Main configuration record.