Derived Relationship Families

A Derived Relationship (DR) Family describes the derived relationships between Aras Innovator items. Each Derived Relationship in a DR Family has its own destination ItemType and name. An individual DR is referred to as a DR Family Element. All DR Family elements share the same departure ItemType as determined by the Query Definition.

Creating a Derived Relationship Family

Use the following procedure:

  1. In the Navigation Panel, click Administration>Configuration>Derived Relationship Families. The following menu appears:

    Figure 17.

  2. Click Create New Derived Relationship Family. A screen like the following appears:

    Figure 18.

  3. Enter a name for the derived relationship in the Name field.
  4. Click the ellipses in the Query Definition field and select the Query Definition from the dropdown list. Once you click save you may not change the assigned Query Definition.
  5. Save the Derived Relationship Family. Its state is now Preliminary. The Query Definition is claimed and the Departure ItemType is updated based on the Query Definition.
  6. Click the New Derived Relationship icon in the Derived Relationships section to create a Derived Relationship.

    Figure 19.

    The Root Item Type name (in this case Project) appears automatically. It is not editable.

  7. Enter the Derived Relationship name in the Name field of the Derived Relationship tab.
  8. Click the Destination Item Type field. The ItemType search dialog box appears.

    Figure 20.

    The dialog displays the ItemTypes associated with the Query Definition.

  9. Select the Destination ItemType. In this example we select Part.
  10. Repeat this process and add all necessary Derived Relationships.

    Figure 21.

  11. Click the Query Definition icon in the sidebar to view the query definition.

Figure 22.

12. Click on a Derived Relationship cell to map the Query Item to the Derived Relationship that you created on the previous screen.

  1. Select the corresponding DR from the dropdown list.

Figure 23.

Note
You can only specify Derived Relationships which have been created on the previous screen.

  1. Once all Derived Relationships are mapped click save and then unclaim the DR Family.
  2. When ready, click the Promote icon and promote the DR Family to Persisting. The status of the Derived Relationship changes to Persisting and the initial persistence of the DR Family begins. Conversion Tasks are created which will persist the DRs for each QD root item in the database. By default, 10 Departure Items (Can be configured by modifying the dr_DepartureItemsPerConvTask system variable) are processed per Conversion Task.
Note
During this process you should not change data in any way that may affect the outcome of the DR persistence operation. The initial DR persistence process may take some time depending on the size of the database.

Information relevant to the Persistence process can be viewed in the Persistence section of the Derived Relationship Family Form. Departure Items Persisted, % displays the percent of Departure Items that have been persisted. Departure Items Total Count provides the total number of Departure Items in the system. If there are errors during the persistence process, the Errors box is populated with information pertaining to the errors.

Figure 24.

If all the Conversion Tasks succeed, the DR Family is automatically promoted to Active. You cannot edit the Derived Relationship Family once it is Active.

Active Derived Relationship Families

Data changes in the database may create a need to recalculate the DR data to keep it up to date. This is done through observers that react to each change made to the items associated with ItemTypes participating in the DR Family. When an observer catches a change, it updates (re-calculates) the persisted DR as needed. An update impacting one DR of a DR Family may necessitate an update of other DRs within the Family.

Deactivating a Derived Relationship Family

You can only deactivate a DR Family if it is not in active use. To deactivate a DR Family, click on the promote button, and select the Preliminary state. Upon deactivation of a DR Family all the persisted Family DRs are deleted. The observers that have been activated for DR Family “participating ItemTypes” are deactivated. Deactivated DR Family can be deactivated and then activated again.

Figure 25.

Derived Relationship Family Remediation

DRF remediation is a process of resolving denormalized data when the denormalized data gets out of sync with the primary data. This process can be run either manually from the DRF action menu in Aras Innovator, or automatically at certain times of the day. Both manual and automatic DRF remediation assumes that the primary DRF data is not modified by end users during the duration of the DRF remediation process. (If this assumption is incorrect, DRF remediation process cannot be run.) Both manual and automatic remediation record the result of the undertaken remedial action in the Aras Innovator log files, and in the Conversion Tasks that are used to drive the DRF remediation process.

How to do manual DRF Remediation?

Admin can do the Remediation for a specific DRF via and Remediate action any time when it’s needed:

Figure 26.

How to set up automatic DRF Remediation

This functionality enables an Admin to configure the system to automatically recalculate and resolve issues with the Derived Relationship Families on a scheduled basis.

Administrators should create a daemon process that will periodically check correctness of the system DRFs and perform required repairs when needed:

The Agent Service should be set up as a prerequisite to this process (details are provided in Prerequisites).

  1. Activate target DRF, that you need to Remediate on a regular (automatic) basis.
  2. Install scheduler: run InstallService.bat from Scheduler folder on CD Image. For more details you can also refer to Aras Innovator 29 - Scheduler Service.pdf of the latest released build.
  3. Create the method with the following code where target DRF ID and departure_id is replaced with the correct values.

    var schedServ = this.newItem(“dr_RelationshipFamily”, “dr_RemediateDRs”);

    schedServ.setID(“target DRF id”);

    schedServ.setProperty(“departure_ids”, "*");

    schedServ.setProperty(“is_auto_remediation”, “1");

    return schedServ.apply();

  4. Admin can change Innovator/Server/appsettings.json config file to see logs with the following information “MinimumLevel": “Fatal”, -> “MinimumLevel": “Information”.
  5. Information on the results of DRF remediation can be found in two places:

Innovator log files

Innovator\Server\logs\InnovatorServer_YYYYMMDD.log (Aras.DerivedRelationships.Loggers.RemediationProcessLogger), e.g.

Figure 27.

Conversion Tasks used for remediation processing

  • Open Conversion task that was created for this Remediation process and see the statistics for it in User data property, e.g.

Figure 28.

  • <is_auto_remediation> - flag equals to ‘1’ that indicates the automatic run of remediation process, otherwise it does not exist
  • <added_count> - quantity of records that was added during Conversion Task(s) execution
  • <removed_count> - quantity of records that was deleted during Conversion Task(s) execution