Configuration properties are related to backend code. They allow you to customize the Appway Platform, but they can also be used by developers to adapt Appway Solutions to their necessities.
Consider the following information on configuration properties:
- You can edit Content, Server, and Memory Configuration properties by clicking on the menu icon at the top left and clicking on the according button (at System Configuration > Configuration Properties). The file displayed is a java properties file.
- Content and Server properties are saved in a configuration file in the filesystem. However, Memory properties are not saved.
In the Appway Platform, Environment Variables can override configuration properties which were defined at System Configuration > Configuration Properties. This is especially useful for Appway instances that run in containers, for example, if you want to set some properties that contain sensitive information (e.g. nm.pathencryption.password).
However, consider that you can only override either default configuration properties or those properties which were previously defined as Content, Java or Server properties.
The property hierarchy in the Platform is the following:
Note that, starting from Appway 2022.1, Environment properties now have higher priority than Memory properties. This may be a breaking change, see the
System Upgrade 11 to 2022.1 article article for more information.
- License
- Environment
- Memory
- Server
- Java
- Content
- Default
The environment variables that can be used to override configuration properties must follow these rules:
- Have the
NM_ or APPWAY_ prefix - Be all upper case
- Use underscore characters as delimiters
The APPWAY_ prefix is removed when the property name is computed, while the NM_ prefix is preserved.
Examples:
| Configuration property name | Environment variable name |
|---|
nm.uid.prefix | NM_UID_PREFIX or APPWAY_NM_UID_PREFIX |
com.company.feature.enabled | APPWAY_COM_COMPANY_FEATURE_ENABLED |
The behavior of Appway extensions can also be customized by changing the default properties defined in each extension. The default properties can be changed by editing the extensions configuration file (.cfg) in the data home folder (e.g. ExtensionA.jar.cfg) or by accessing System Configuration > Extensions > [Extension] > [right-click] > Edit Configuration in Studio.
Environment Variables can also override configuration properties in Appway extensions. This is useful when you want to set some sensitive property (e.g. com.nm.cluster.relationaldb.admin.password).
Consider that the following default properties cannot be changed: adapter-class, description, name, vendor, version.
The property hierarchy in Extensions is the following:
- Environment properties
- Content properties
- Default
The environment variables that can be used to override configuration properties must follow these rules:
- Start with APPWAY_ prefix, followed by the extension name
- Be all upper case
- Use underscore characters as delimiters
The APPWAY_ prefix is removed when the property name is computed.
Examples:
| Extension | Extension configuration property name | Environment variable name |
|---|
| ClusterTools | events.limit | APPWAY_CLUSTERTOOLS_EVENTS_LIMIT |
| ComponentExtension | dateformat | APPWAY_COMPONENTEXTENSION_DATEFORMAT |
| ComponentExtension | block-indent | APPWAY_COMPONENTEXTENSION_BLOCK_INDENT |
| LdapSyncAdapter | jobSchedule | APPWAY_LDAPSYNCADAPTER_JOBSCHEDULE |