Modifying Configuration Settings
- Last UpdatedJul 05, 2024
- 2 minute read
These configuration settings are saved in the JSON file format, and are installed to %DNAInstallRoot%\<Application>\Config\Settings, where <Application> is the name of an application (for example, RealTime). Do not modify configuration settings in the %DNAInstallRoot% directory. Instead, you must define override settings in the %DNADataRoot% directory, as detailed below. For information on modifying JSON files associated with Business Logic Tier (BLT) applications, refer to Modifying Configuration of Business Logic Tier (BLT) Components.
The system loads and merges together configuration settings from four locations in the following order:
-
%DNAInstallRoot%\Shared\Config\Settings
-
%DNADataRoot%\Shared\Config\Settings
-
%DNAInstallRoot%\<Application>\Config\Settings
-
%DNADataRoot%\<Application>\Config\Settings
If the same setting exists in multiple locations, the setting value loaded last takes precedence. For example, if a setting defined under %DNADataRoot%\Shared\Config\Settings is also defined in the RealTime product (%DNADataRoot%\RealTime\Config\Settings), the value in the RealTime product JSON file takes precedence.
To modify configuration settings
Note: In the procedure that follows, the JSON file you place and customize in the %DNADataRoot% directory is an override file: any keys defined will override those in the %DNAInstallRoot% directory. As a result, include only the settings you want to override.
-
Locate the JSON file containing the settings you want to modify in %DNAInstallRoot%\<Application>\config\Settings (the install root).
-
Check if the JSON file already exists in %DNADataRoot%\<Application>\Config\Settings (the data root) and do one of the following:
-
If the JSON file already exists, proceed to step 3.
-
If the JSON file doesn't already exist, proceed to step 4.
-
-
Proceed as follows:
-
Do not overwrite the existing JSON file in the data root.
-
Check if the key-value pair you want to modify already exists in the JSON file located at the data root.
-
If the key-value pair you want to modify already exists in the JSON file located at the data root, do nothing.
-
If the key-value pair you want to modify does not already exist in the JSON file located at the data root, copy the item from the install root file and paste it into the file at the data root.
-
Do not proceed to step 4.
-
-
Proceed as follows:
-
Copy and paste the JSON file whose settings you want to modify from the install root to the data root.
-
In the JSON file located at the data root, remove all key-value pairs whose values you don't want to modify.
You can remove whole JSON objects within the file if none of the key-value pair values you want to modify are contained therein.
-
Example 1: JSON file doesn't already exist at the data root
Currently on install root:
{
"OnCall":
{
"fromEmail": "TestRegistry@TestRegistry.com",
"emailHost": "localhost",
"SMTPport": 25,
"retries": 5,
"SMTPtimeout": 500
}
}
Currently on data root:
Nothing.
You want to modify the emailHost key's value, so the JSON file on the data root will be:
{
"OnCall":
{
"emailHost": "10.70.80.2"
}
}
Example 2: JSON file already exists at the data root
Currently on install root:
{
"OnCall":
{
"fromEmail": "TestRegistry@TestRegistry.com",
"emailHost": "localhost",
"SMTPport": 25,
"retries": 5,
"SMTPtimeout": 500
}
}
Currently on data root:
{
"OnCall":
{
"SMTPport": 35
}
}
You want to modify the emailHost key's value, so the JSON file on the data root will be:
{
"OnCall":
{
"emailHost": "remotehost",
"SMTPport": 25
}
}