See the supported connectors for Application Integration.
Variables
A variable is an integration element that holds and transports data between the tasks, triggers, and edges of an integration.
- Variables can be statically defined at design time or dynamically passed to the integration at runtime.
- Variables can reference other variables in an integration.
- Variables can be globally accessible to all tasks, or locally accessible to a specific task.
Types of variables
Application Integration supports four types of variables:
- Integration variables: Keep track of data throughout the course of an entire integration execution.
- Task variables: Keep track of data for the duration of a single task.
- Config variables: Store the configuration data of the integration.
- System variables: Store the configuration data of the integration.
Integration variables
Integration variables are similar to variables used in a programming language. Data in the variables can be read and written throughout the execution of the integration.
Integration variables can be used in the following ways:
- Taken in as inputs to the integration (input variables).
- Returned as outputs of the integration (output variables).
- Used to hold temporary state during the execution of an integration.
The value of a variables does not have to be statically defined in the integration. Variable values can be passed into an integration through the use of a trigger. However, if a variable is statically defined in the integration, and the same variable is supplied dynamically with trigger, the dynamic value assignment will overwrite the static assignment.
Supported data types
The following data types are supported for integration variables:
- String and String array
- Integer and Integer array
- Double and Double array
- Boolean and Boolean array
- JSON
Task variables
Task variables are pre-defined auto-generated variables of a task. If a task has an output, all such
ouputs are available in a task variable. You cannot delete or edit a task variable.
For example, for the Call REST Endpoint task, the response body is stored in the
responseBody
variable.
Config variables
Config variables enable you to externalize configuration for integration. With config variables, you can configure aspects of your integration such as connector details, authentication details, or URL endpoints that are based on the development environment (QA, staging, or production). You don't need to update your integration manually before uploading the integration to a new environment. Application Integration lets you enter values for the config variables when you publish the integration.
To learn how to create config variables and use them, see the tutorial Build CICD for your integration.
System variables
System variables are automatically generated when you create an integration. You can use these variables in your integration tasks and for error handling. The integration contains the following system generated variables:
ErrorInfo
: When your execution fails, you can access the error details with theErrorInfo
variable:{ "ErrorInfo": { "message": String, "code": Number } }
Currently, you can access the error messages by creating an integration variable named
ErrorMessage
. However, we recommend you to use the system-generatedErrorInfo.message
variable to access error messages.ExecutionMode
: The mode of execution based on the trigger. Valid values are SYNC and ASYNC.ExecutionId
: The execution ID of the integration.IntegrationName
: The name of the integration.Region
: The region of the integration.ProjectId
: The project ID that contains the integration.
View variables
You can use the Variables pane to create, edit, view, duplicate, and delete variables in your integration. The Variables pane also displays a count of the total variable references within the integration.
To view the Variables pane, click
(Toggle panel) in the designer navigation bar.The following image shows a sample layout of the Variables pane:
Create a variable
To create a variable, perform the following steps:
- In the integration editor navigation bar, click (Toggle panel) to bring up the Variables pane.
- Click +Create.
- Do the following in the Create Variable pane:
- Name: Enter the name of the variable.
- Variable Type: Choose the type of the variable.
- Data Type: Choose the data type of the variable. You can identity the data type of a variable using the icon next to the variable name.
Data type Example String Alex
Integer 30
Double 30.5
Boolean true
JSON { "employee":{"name":"Alex", "age":30, "city":"Mountain View"} }
String array Alex, Kai, Raha
Integer array 30, 25, 22
Double array 30.5, 25.34, 22.134
Boolean array true, false, false
For information about the supported data types, see Supported data types.
- Default Value: Enter the default value for the variable. This is an optional field.
- Schema: Select the JSON schema for the variable.
- Infer from a sample JSON payload: Generates a JSON schema from a sample JSON payload. The sample payload is discarded after the schema is generated. Only the generated schema will be saved.
- Enter a JSON schema: Manually enter an entire JSON schema.
- Infer from the default value: Generates a JSON schema using the provided default value.
- None: No JSON schema.
- Mask the variable in logs (preview): Select this option to enable masking for the variable in the integration execution logs. To enable masking for the variable, you must enable masking variables for your integration and region. For information about how to enable masking for the integration and the region, see Edit an integration and Edit regions.
For information about masking, see Mask sensitive data in logs.
Data type Description None A local variable in an integration. Config variable for Integration A config variable in an integration. Input to Integration During execution the variable will be provided as an input to the executed trigger. Output from Integration Variable's final value at the end of execution should be output to the integration's caller. Input and Output of Integration At execution the variable will be provided as an input to the executed trigger and its final value will be output to the integration's caller. - Click Create.
Use variables in integrations
During the execution of an integration, run-time data is passed in as variables that are declared for the integration or task. Once execution begins, input data is converted into an in-memory object called an Event.
After the Event object is created, an in-memory graph of tasks is built using the integration definition. Incoming variable values are passed to tasks based on your configuration. As the integration executes, the tasks read and write data back into the Event object,to be used by subsequent tasks or to form the output data of the integration.
Variable references
The tasks, triggers, and edges in an integration read and write to variables using variable references.
A variable reference takes the form $paramKey$
where paramKey is the name
of the variable. For example, an edge conditional could look like this:
NOT ($isNameUnique$ = false OR $numAccounts$ > 1)
In this example, isNameUnique
is a variable of data type boolean and
numAccounts
is a parameter of data type integer.
Quotas and limits
For information about quotas and limits, see Quotas and limits.
What's next
- Learn how to build CI/CD for your integration.
- Learn how to mask sensitive data in logs.
- Add and configure a Data Mapping task