Configuring Settings.xml to Environment Variable
- 30 May 2024
- 1 Minute to read
- Print
- DarkLight
Configuring Settings.xml to Environment Variable
- Updated on 30 May 2024
- 1 Minute to read
- Print
- DarkLight
Article summary
Did you find this summary helpful?
Thank you for your feedback
Overview
This article illustrates how we can configure the properties specified in Settings.xml to the Environment Variable List of the containers. All tags from Settings.xml can be configured to Environment Variable.
Reference Articles:
To learn more about Settings.xml, refer article Settings.xml Overview
To learn more about Decision Environment Variables, refer article Creating Environment List Files (env.list)
To learn more about Decision Environment Variables, refer article Creating Environment List Files (env.list)
Name Convention
In Settings.xml, we change the values between the tags to customize the server settings but to configure that same setting in containers; we need to follow a name convention.
DECISIONS_<SettingName>=<Value of the setting>
- DECISIONS_: This is a constant prepend text
- <SettingName>: This is the name of the setting from Settings.xml. Setting Name should be in Upper Case
- <Value of the setting>: Value to be configured
Example for Root Level settings
Settings from Settings.xml | Configuration in Environment Variable |
---|---|
<EnableHttps>true</EnableHttps> | DECISIONS_ENABLEHTTPS=true |
<DataBaseType>MSSQL</DataBaseType> | DECISIONS_DATABASETYPE=MSSQL |
<ServerName>Decisions Server</ServerName> | DECISIONS_SERVERNAME=Decisions Server |
SMTP settings
SMTP Setting in Settings.xml | Configuration in Environment Variable |
---|---|
<Mail> <ByPassSmtpServer>true</ByPassSmtpServer> <SmtpServer> <ServerAddress /> <Port>25</Port> <RequiresAuthentication>false</RequiresAuthentication> <Username /> <Password /> <UseSSL>false</UseSSL> <UseImplicitSSL/> <SkipCertificateRevocationCheck>false</SkipCertificateRevocationCheck> </SmtpServer> </Mail> | DECISIONS_MAIL_BYPASSSMTPSERVER=true DECISIONS_MAIL_SMTPSERVER_SERVERADDRESS= DECISIONS_MAIL_SMTPSERVER_PORT=25 DECISIONS_MAIL_SMTPSERVER_REQUIRESAUTHENTICATION=false DECISIONS_MAIL_SMTPSERVER_USERNAME= DECISIONS_MAIL_SMTPSERVER_PASSWORD= DECISIONS_MAIL_SMTPSERVER_USESSL=false DECISIONS_MAIL_SMTPSERVER_USEIMPLICITSSL= DECISIONS_MAIL_SMTPSERVER_SKIPCERTIFICATEREVOCATIONCHECK=false |
Custom Headers
For Custom Headers, users need to set the value of the DECISIONS_CUSTOMHEADERS in a JSON String format. This JSON String gets automatically deserialized and converted in XML format in Settings.xml.
Following is the example for an iFrame Custom Headers.
Custom Headers in Settings.xml | Configuration in Environment Variable |
---|---|
<CustomHeaders> <CustomHeader> <Name>Strict-Transport-Security</Name> <Value>max-age=31536000;includeSubDomains</Value> </CustomHeader> <CustomHeader> <Name>Content-Security-Policy</Name> <Value>frame-ancestors 'self' http://localhost </Value> </CustomHeader> </CustomHeaders> | DECISIONS_CUSTOMHEADERS=[{"Name": "Strict-Transport-Security","Value": "max-age=31536000;includeSubDomains"},{"Name": "Content-Security-Policy","Value":"frame-ancestors 'self' http://localhost"}] |
Was this article helpful?