# Global Variables Panel

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.

<figure><img src="https://3477030876-files.gitbook.io/~/files/v0/b/gitbook-x-prod.appspot.com/o/spaces%2FYK40zKr4ZyVfqCRAUI9t%2Fuploads%2FeHtk94r7hvnBC5kJzsm2%2FDecisionTable1BuilderGeneral.png?alt=media&#x26;token=671ed135-c470-47f7-bd9d-9f32fe054056" alt=""><figcaption></figcaption></figure>

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.

## How to add Global Variables? <a href="#how-to-add-global-variables" id="how-to-add-global-variables"></a>

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** <img src="https://processmix.com/wp-content/uploads/2023/07/Add.png" alt="" data-size="line"> **button** in the Name field.

{% hint style="info" %}
When creating a variable, it’s recommended to assign a name that corresponds to its intended purpose for future use.
{% endhint %}

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:

* Boolean — “true” or “false” value.
* String — text, for example, “John Doe”.
* Integer — number, for example, “38”.
* Float — floating-point or decimal number, for example, “0.1234”.

<figure><img src="https://processmix.com/wp-content/uploads/2023/09/Frame-50431-1-1-1024x643.png" alt=""><figcaption></figcaption></figure>

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:

* String — text, for example, “John Doe”.

<figure><img src="https://3477030876-files.gitbook.io/~/files/v0/b/gitbook-x-prod.appspot.com/o/spaces%2FYK40zKr4ZyVfqCRAUI9t%2Fuploads%2FzPx2AZaQlNyR1sRyf7dY%2FFrame%2051021%20(2).png?alt=media&#x26;token=926822bd-501b-4b03-a42d-3b343597a10f" alt=""><figcaption></figcaption></figure>

Click **the CONFIRM button**. New Global Variables are saved in the system and are ready for use.

## How to work with Global Variables? <a href="#how-to-work-with-global-variables" id="how-to-work-with-global-variables"></a>

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:

1. Accessible in flows is checked.\
   You can use a variable in expressions when creating flows. Variables are available for selection in a list of variables within the Expression Editor (on the left panel).
2. Accessible in flows is unchecked.\
   You cannot use a variable for creating flows. Variables are available for selection in connector settings.

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.

{% hint style="warning" %}
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.
{% endhint %}

### **Operations with Global Variables**

* **Add** — allows you to add a new global variable.
* **Clone** — allows you to create a clone of a global variable. The cloned variable has a name as a Name of the global variable + Clone(n).
* **Delete** — allows you to delete a global variable.
* **Editing or simply clicking on the name and the value** — allows you to change the name and the value of a global variable by clicking on the Name and Value field.
* **Selection of a data type** — allows you to change the type of a global variable.

## Overriding Global Variables

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 platform's 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>

{% hint style="info" %}
The platform uses the Spring mechanism of defining properties.
{% endhint %}
