Creating record associations


In BMC Helix Innovation Studio, you can create an association between two record definitions to define a relationship between them and to use data from both records. For example, you associate the Company record with the Location record. This association enables you to define the different locations for the same company.

While creating a record association, you specify the following parameters for the association:

  • Cardinality—Type of relation between the records within the association, such as one-to-one, one-to-many, and many-to-many.
  • Constraint—Limitation for an association, such as automatic deletion of the associated records. If record1 is associated with record2, and you delete record2, then record1 is also deleted automatically.

Important

  • Application business analysts can customize the objects developed in their applications that are marked customizable by the administrator but cannot customize the objects developed in com.bmc.arsys in Best Practice Customization mode. For example, objects in core BMC applications like Foundation, Approval, and Assignment cannot be customized in Best Practice Customization mode. For more information, see Customization-layer.
  • Record associations are not supported for external record definitions.

Types of associations

The following table describes the different types of associations:

Type of association

Description

Direct association

Defines a direct relationship between the two records in the association, such as one-to-one and one-to-many relationships. Multiple fields of one record and multiple fields of other records can be a part of the association.

Entries in two forms contain direct references to each other. For example, see the following image:

233_Direct associations.png

Indirect association

Defines an indirect relationship between two records in the association; the records can be related to each other by using a third record, such as a many-to-many relationship.

Entries in two related forms do not have references to each other. For example, see the following image:

233_Indirect associations.png

Self association

Defines a relationship in which a record definition is associated with itself through a direct relationship.

For example, an employee-manager association. A manager belongs to the manager role, and a manager also belongs to an employee role.

The following image illustrates a self-association:

22_1_Creating_self_record_associations.jpg

To create a record association

The following video shows how to create a record association. The video shows an older version of BMC Helix Innovation Studio. The previous product name was BMC Helix Platform. Although there might be minor changes in the UI, the overall functionality remains the same:


icon_play.png https://youtu.be/9bOObkK2Kx8

  1. Log in to BMC Helix Innovation Studio and navigate to the Workspace tab.
  2. Select the application or the library for which you want to create an association.
  3. Select Associations > New.
    The Create association window is displayed as shown in the following image:create association.png
  4. Complete the fields as described in the following table:

    Field

    Action

    Association name

    Enter a unique name that identifies the association.
    The association name must start with an alphanumeric character. Only alphanumeric characters, hyphens, underscore, and spaces are allowed in the association name.

    (Optional) Description

    Provide a short description of the association.

    First record

    Select the source entity or the starting point of your association.

    Important: The Application/Library scoped definitions are marked with an asterisk ( * ). Make sure you follow the guidelines listed in Object-definition-scope before you select these definitions.

    (Optional) Role of first record

    Provide a description for the first record, which explains the record in the context of the association.

    To associate two records from a process, if you use the Associate Records element and select the Use Default Roles toggle key, the value you specify in Role of First Record is used. For more information about associating records from a process, see Creating-associations-using-the-Association-Service-Task.

    Cardinality

    Select any one of the following relationships for the record definitions:

    • If you want to create a direct record association, select the cardinality as Has One or Has Many.
    • If you want to create an indirect record association, select the cardinality as Many To Many.

    Important: You can create an association between existing record definitions by using the key fields only if you select Has One or Has Many from Cardinality. For more information, see first record key field.

    Second record

    Select the target entity or the ending point of your association. 
    Important: The Application/Library scoped definitions are marked with an asterisk ( * ). Ensure that you follow the guidelines listed in Object-definition-scope before you select these definitions.

    First record's key field

    Select a field from the first record definition to create a direct association between the first and second record definitions.

    By default, in the First record's key field, ID is selected.

    (Optional) Second record's foreign key field

    Select a field from Second record to create a direct association between the record definitions selected from First record.

    If you don’t select any value from Second record's foreign key field, a unique key field is automatically added to the second record definition. This field refers to the ID field from the first record definition.
    For example, If you select Organization from First record and Person from Second record and no value from Second record's foreign key field, the ORGANIZATION_ID field is added to the Person record definition.

    (Optional) Role of second record

    Provide a description for the second record, which explains the record in the context of the association.
    To associate two records from a process, if you use the Associate Records element and select the Use Default Roles toggle key, the value you specify in Role of First Record is used. For more information about associating records from a process, see Creating-associations-using-the-Association-Service-Task.

    Add constraints

    To create a direct association, select any of the following constraints:

    • If record is deleted, delete all associated records—Deletes all the associated records if the first record is deleted. This constraint adds a Cascade delete flag to the record association.
      233_Cascade delete flag.png

    • Require a record to be associated in order to create a new recordCreates the second record only when the first record is created. This constraint is available only when you specify to delete all the associated records if the first record is deleted.

    Important: A direct association is automatically created when you select any of the constraints.

    Scope/Customization options

    Option to define the scope for association definition. This option further contains the following options:

    • Application/Library (default)—To limit the use of the definition within the same Digital Service application or library. 
    • Public—To enable the definition to be used by all the applications or library and allow customizations for this definition.

    Enable association

    Select this item to validate and implement the association in the two records.

  5. Click Save.

Where to go from here

Action

Reference

Create a new record definition or modify an existing record definition by using Record designer.

Create a record instance.

Enable row-level security by using security labels.

 

Tip: For faster searching, add an asterisk to the end of your partial query. Example: cert*