Updated on 2022-02-22 GMT+08:00

Environment Variables

This topic describes how to configure and use environment variables.

Procedure

  1. Log in to the DLF console.
  2. In the navigation tree of the DLF console, choose Configure Specifications.
  3. On the Environment Variable page, set the parameters described in Table 1 and click Save.

    Figure 1 Configuring environment variables
    Table 1 Configuring environment variables

    Parameter

    Mandatory

    Description

    Parameter

    Yes

    The parameter name must be unique, consist of 1 to 64 characters, and contain only letters, digits, underscores (_), and hyphens (-).

    Value

    Yes

    Parameter values support constants and EL expressions but do not support system functions. For example, 123 and abc are supported.

    For details about how to use EL expressions, see Expression Overview.

    After configuring an environment variable, you can add, edit, or delete it.

    • Add: Click Add to add an environment variable.
    • Edit: If the parameter value is a constant, change the parameter value in the text box. If the parameter value is an EL expression, click next to the text box to edit the EL expression. Click Save.
    • Delete: Click next to the parameter value text box to delete the environment variable.

How-Tos

The configured environment variables can be used in either of the following ways:

  1. ${Environment variable}
  2. #{Evn.get("environment variable")}

Example

Context:

  • A job named test has been created on DLF.
  • An environment variable has been added. The parameter name is job and the parameter value is 123.
  1. Open test and drag a Create OBS node from the node library.
  2. On the Node Properties tab page, configure the node properties.

    Figure 2 Create OBS

  3. Click Save and then Monitor to monitor the running status of the job.