Referencing Variables
Orchestrating a composite application flow and configuring connectors and processors involve various inputs, outputs, and configurations, which can be referenced as variables when you edit and design a composite application to create efficiency.
Variables of composite applications are classified as system, node, and custom variables. Variables with the same name are prioritized as follows: system variable > node variable > custom variable.
System Variables
System variables indicate system parameters or specific outputs of some connectors. Table 1 lists the system variables for composite applications.
Variable |
Description |
Method |
---|---|---|
Instance ID |
ID of the current instance. |
${env|instance_id} |
APP ID |
ID of the current composite application. |
${env|composed_app_id} |
Workflow ID |
ID of the current workflow. |
${env|workflow_id} |
Execution ID |
ID of the workflow running record. |
${env|flow_execution_id} |
Execution start time |
UTC time when the workflow is executed, for example, 2023-03-01T10:26:33.410Z. |
${env|flow_execution_start_time} |
Node Variables
The output of a previous node can be stored as a variable and referenced by subsequent nodes—for example, as the request body for an OpenAPI or the result from connectors and processors like database queries, HTTP requests, scripts, or variable assignments.
Reference methods:
- Variable selection: Click the variable in the data input area of a node.
- ${payload}: Reference the payload output of the previous connector or processor node.
- ${node ID|payload.xxx}: Reference the xxx value in the payload output of the specified connector or processor node.
- ${Node ID|parameter name}: Reference the parameter name output of the specified connector or processor node.

- Not all input boxes support the variable selection mode. For details, see the description of each connector.
- If the execution result is an object, such as a JSON or XML object, use ${payload.id} or ${payload[0].id} to reference certain data in the execution result.
Example:
If the response body received by an HTTP request node is in JSON format as follows, use ${payload} to reference the JSON data, ${payload.id} to reference the value 00000000, and ${payload.data[0].value} to reference the value x.
{ "id":"00000000", "name":"sample01", "data":[ { "id":1, "value":"x" }, { "id":2, "value":"y" }, { "id":3, "value":"z" } ] }
Custom Variables
Custom variables include the variables configured by users.
Reference methods:
- Variable selection: Click available variables in the text box to choose one.
- Manual input: Use ${env|xxx} to reference the configured variable named xxx.
- Log in to the new ROMA Connect console.
- In the navigation pane on the left, choose Composite Applications. On the page displayed, click the target composite application.
- Click
on the composite application and choose Modify to enter the canvas page.
- Click Variable on the top of the page.
- In the pop-up box displayed, click Add.
Table 2 Configure variables Parameter
Description
Variable
Enter a variable name to be referenced.
Type
Data type of the variable: string, integer, long integer, decimal, boolean, and password.
Value
Enter the value of the variable.
Scope
Select the effective scope of the variable: global (all composite applications); current composite application.
Description
Enter a description of the variable.
- Click Save.
Feedback
Was this page helpful?
Provide feedbackThank you very much for your feedback. We will continue working to improve the documentation.See the reply and handling status in My Cloud VOC.
For any further questions, feel free to contact us through the chatbot.
Chatbot