About Tenant and Project Variables
Potential use cases of tenant and project level variablesBest practicesAdding project variables?Using project variables in a flowUsing project variables in a connector accountThis feature allows you to create, update, delete, download, or upload tenant-level variables or project-level variables that can be used across Flow services in a mapset.
Pipeline substitution variables in Flow service pipelines are only available within the current pipeline and cannot be reused across Flow services or accounts. On the other hand, tenant and project level variables provide the flexibility to configure variables at either project level or tenant level for use across projects. This means that if a variable’s value is changed at one point, it will be available for use in all projects where the variable is used.
Flow services can now use either of the following variable types:
- Tenant-level variables
- Project-level variables
- Pipeline substitution variables
However, the execution of a Flow service involves a search for variables in a specific order.
First, IBM webMethods Integration looks for variables in Pipeline substitution variables.
If these are not found, it then checks Project-level variables.
Finally, if neither pipeline nor project variables contain the variable, the system searches for it in Tenant-level variables.
It is important to note that this order of search applies during Flow service execution.
Potential use cases of tenant and project level variables
You can use this feature for account configuration. In such use cases, values like passwords or host names are configured once in these variables and reused across accounts and Flow services.
Best practices
To achieve optimal results with tenant and project level variables, it is recommended to follow these best practices:
To use project or tenant variables when publishing, deploying, exporting, or importing into another tenant, they must be configurable variables. Add dependency on these variables in the target Flow service or account to make them configurable.
Cloning a Flow service across projects, does not copy the project variables to the target project. Configure these project variables in the target project, in such circumstances.
Project variables can only be utilized with the Salesforce connector.
Adding project variables?
Navigate to the project in which you want to add a variable, click Configurations, General, and then select Variables.
A list of existing variables appears. To add a new variable, click New Variables.
In the pop-up window that appears, enter the following details:
Name: Provide a suitable name for the variable.
Value: Provide a value for the variable.
You can optionally mark the specified variable as a password field, thereby hiding the value of the variable.
Using project variables in a flow
Open any Flow service.
Edit an existing pipeline.
Right-click on your variable, and click Set value.
Enable Perform variable substitution.
Click on the Substitution variables icon.
Select the project variable you added in the previous step.
Using project variables in a connector account
Open Connectors tab.
Click New account on an existing predefined connector.
Select Credentials in the Authorization Type drop-down.
Select the checkbox Substitute project variables on applicable fields.
Type your variable name in between two % symbols. For example,
%Var1%
. The value of this variable is substituted during run-time.
If a variable does not exist, it is evaluated as a string. For example, ifVar1
is not defined as a variable, then the usage of%Var1%
substitution will result in%Var1%
appearing in the output.