In our app we have an ASU_ microflow that enumerates all constants in the app and "fixes" constant values matching a certain rule. This is a security measure to inject passwords into locally running apps and prevent their leak to mendix.com SVN.
This ASU_ microflow uses the official method:
Also we have an admin page with a grid containing all constants in the app, both private and public (exposed to client). The data source for this grid is a microflow with a custom java action.
The public runtime API does not have a method to enumerate private constants. It only has a method to enumerate the public constants:
which is strange because much more dangerous method is exposed: Configuration.updateConfiguration()
Currently, as a workaround we use java reflect to enumerate the constants, but we'd like to to have a documented way to do that. Please add the following method to com.mendix.core.conf.Configuration
/** Returns the names of all defined constants, both public and private */ Set<String> getConstantKeys();
Hi Ilya, great idea. We had the same idea but in constrast to you we did not succeed in reading the private constants. Can you show us the java-action you created that also retrieves the private constants? Thanks a lot!