Configuration Files - The Power of AppData.cfg
The location of databases is configurable within the Statelake architecture, and Statelake can be re-configured if databases are moved. Statelake makes a distinction between its own configuration databases, and the databases of any business applications that it connects to.
The default location of the Statelake system executables is C:\Program Files\Flow Software\Statelake\.
When Statelake starts, the system executables identify the location for the system configuration and license files. These files are essential for the smooth running of Statelake - and are particularly important where any services or actions are being run behind-the-scenes or after-hours by the service scheduler. The default location for these system configuration and license files is within the data directory - at C:\ProgramData\FlowSoftware\Statelake\Config\. The Config sub-directory holds the system configuration file called Config.json.
This file must not be edited manually.
Config.json holds the details of all of the Statelake configuration databases that have been set-up through Statelake Manager, and includes everything that you would see when you look at the configuration initial set-up in Manager, but in a machine-readable format.
For instance, a Config Database has been created through Manager as below.

The details you see here through Manager, appear in the Config.json file as follows. This snippet is just a small section from the Config.json file.

And under normal circumstances, Statelake would look to Config.json in the data directory C:\ProgramData\FlowSoftware\Statelake\Config\. But before locating, reading, and using this Config,json configuration file, the Statelake executables also are on the lookout for the presence of a file called AppData.cfg.
AppData.cfg stores the path that holds the Config.json that is to be read and used, and the location of any alternative configuration file is to be accessed. The information contained within this AppData.cfg file over-rides the information contained within the Config.json that is stored in the default location.
If it exists, AppData.cfg is stored in the same sub-directory as the Statelake executables - i.e. C:\Program Files\Flow Software\Statelake\. And Statelake will look in the sub-directory listed within the AppData.cfg file to find the location of the Config.json file that it needs - and completely ignores the default Config.json file.
But if there is no AppData.cfg, then Statelake defaults to looking in C:\ProgramData\FlowSoftware\Statelake\Config\Config.json for the configuration list.
AppData.cfg
This re-direction configuration file will hold a sub-directory path name only.
The file would be created and used for instance, where there were multiple different Statelake software versions running on the same machine, and therefore the configuration databases for each version were to be kept completely separate.
AppData.cfg can be created through the use of a simple text editor.
So the AppData.cfg could hold . . .

As a result of the path contained in the AppData.cfg, Statelake will look in the configuration file C:\MyAccount\Testing\June2023\Config.json.
Or AppData.cfg may hold . . .

So then Statelake will look in the configuration file C:\COMPANY2\Projects\Statelake\Veronica\Config.json.
The file name is not case sensitive.
But to be active, the file must exist in the same directory as the Statelake executables such as Designer.exe and Manager.exe.