The Global Variables component allows you to define constants available in different parts of the system. These variables are set outside of any function. The scope of a variable is determined by you and indicates if it can be accessed within the system or not.
With Global Variables, you can save and transfer data between different components of the system, providing centralized access to this data.
There are two types of Global variables in the system — Variables and Passwords.
Variables — can store different types of data with the ability to configure the availability of their use in flows.
Passwords — used to store passwords, secret keys or other confidential information.
To add a new Global Variable, click on the Global Variables icon located in the left vertical panel of the IDE. The system displays the Global Variables pop-up window with an active Variables tab. Within the pop-up, select your desired tab (Variables or Passwords) and click on the Add button in the Name field.
When creating a variable, it’s recommended to assign a name that corresponds to its intended purpose for future use.
For Variables:
Enter a name for a variable, select a data type, and provide a value. You can also check the “Accessible in flows” checkbox if needed (this checkbox is disabled by default). The new variable will then appear in the list.
Supported data types for Variables:
For Passwords:
In a pop-up window, enter a name and a value for a variable. Click on the Add button. A variable will appear in a table.
Supported data types for Passwords:
Click the CONFIRM button. New Global Variables are saved in the system and are ready for use.
You can use Global Variables when creating flows, deployments, configuring connectors, and other system components. For example, they can be used to store the URL for the database connector.
IDE:
The availability of variables in the IDE depends on whether the “Accessible in all flows” checkbox was enabled when the variable was created:
The Passwords variables are not available for creating flows in the IDE. Passwords are available for selection in connector settings.
HOME:
Global Variables are used in HOME during the deployment creation process to determine a set of variables that will be available during the deployment process.
The administrator can change a variable’s value during the deployment process in Step 3 “Global Variables”. To change value, click on the New value field and enter the desired value. If the value of the variable is not changed, the default value set in the IDE will be used.
You should remember that changing the value of a variable can affect the functioning of other parts of the system that already use this variable.
You can override the values of Global Variables for projects uploaded using export artifacts (for example, JAR, WAR) when working with it.
Global Variables can be overridden at several levels with different priorities.
Priority (variables naming)
1 Predefined variables that can be used in some ProcessMIX connectors:
DB Connector
project.connector.<connector name>.connection.jdbcUrl
project.connector.<connector name>.connection.username
project.connector.<connector name>.connection.password
REST Connector
project.connector.<connector name>.connection.baseurl
2 For other variables and EVM Blockchain connector.
prmix.project.var.<project id>.<variable name>
The ProcessMIX uses the Spring mechanism of defining properties.