Runtime Template Variables

Introduced in EFT v8.0.4, runtime template variables are used to replace reference values at runtime.

A JSON file named RuntimeTemplateVariables.json (default: C:\ProgramData\Globalscape\EFT Server Enterprise\RuntimeTemplateVariables.json) is used to store the variable and its assigned value and is read by EFT when the server service is started. In a clustered environment, the JSON can be stored on the shared drive.

The RuntimeTemplateVariables.json file is in the format of a normal JSON file, with "name": "value". Just like the AdvancedProperties,json file, the file is empty. Only the non-default settings that you add will appear in the file. For HA installations, the file is saved in the HA shared configuration location.

In v8.0.5.8 and later, all non-password fields that accept non-validated, user-input string values accept template variables in addition to context variables and normal strings. For all secret/password fields that are masked (for example, SAS token, S3 secret key, copy/move password), if the value entered starts with a left bracket < and ends with a right bracket >, then it will be interpreted as a template variable.

Runtime variables can be used to store not only path for site config or login for download action, it can also be used for message templates for things like email notifications.

Symbols (such as the Euro symbol) are not allowed in the JSON file. EFT will read everything up to the symbol and then stop readying the JSON; the site will not start due to unallowed characters.

Using Runtime Template Variables

To use runtime template Variables

Add variables to the RuntimeTemplateVariables.json file:

{
"site_path":"C:\\InetPub\\EFTRoot\\MySite\\",
"my.login":"user1",
"type":"local",
"host":"host",
"port":"21"
}

File download action setup wizard then uses the variables in the applicable fields:

Download Wizard configuration page

Action fields above would be evaluated as indicated in the RuntimeTemplateVariables.json file:

  • Host address: "localhost"

  • Username: "user1"

  • Port: 21