Customization File

 

Harmony Core Customization File

 

Various aspects of a Harmony Core environment can be customized by crating a customization file, which is a JSON file named HarmonyCoreCustomization.json. You must place this file in the same location as the CodeGen templates that you are using.

 

The customization file must contain at minimum an empty JSON object:

 

          {

          }

 

You can then customize various aspects of your Harmony Core environment by adding specific named properties to the object. Examples of doing so can be found below.

 

Customizing Relation Names

To customize the relation names produced by the <HARMONYCORE_RELATION_NAME> and <HARMONYCORE_FROM_RELATION_NAME> expansion tokens you must add a property named CustomRelationNames to the JSON object. The property must define an array of objects, each of which provides a custom name for a specific relationship. For example:

 

          {

            "CustomRelations": [

              {

                "FromStructure": "CUSTOMERS",

                "FromKey": "CUSTOMER_NUMBER",

                "ToStructure": "ORDERS",

                "ToKey": "CUSTOMER_NUMBER",

                "RelationName": "REL_CustomerOrders",

           "RelationType": "A",

           "BackRelation": "ORDERS-CUSTOMER_NUMBER-CUSTOMERS-CUSTOMER_NUMBER",
           "RequiresMatch": false

              },

              {

                "FromStructure": "CUSTOMERS",

                "FromKey": "FAVORITE_ITEM",

                "ToStructure": "ITEMS",

                "ToKey": "ITEM_NUMBER",

                "RelationName": "REL_CustomerFavoriteItem",

           "RelationType": "A",

           "BackRelation": "ITEMS-ITEM_NUMBER-CUSTOMERS-FAVORITE_ITEM",

           "RequiresMatch": true
              }

            ]

          }

 

You may add any number of objects to the array to customize any number of relations. Structure and key names must be specified exactly as defined in the repository and must be in upper case.

 

 


Copyright © 2018  Synergex International, Inc.