Updated on 2025-08-15 GMT+08:00

Setting System Parameters

Scenario

You can configure parameters related to environments and services as system parameters. Huawei Cloud Astro Zero provides a unified page for system parameter maintenance and management. If you change the value of a system parameter, the value will be updated in all places where the system parameter is referenced.

For example, the built-in system parameter bingo.expiretask.execute.time preset by Huawei Cloud Astro Zero indicates the time when the system executes the data deletion task. When executing a data deletion task, the system automatically queries the value of this parameter. After the value is found, the system starts the data deletion task based on the configured time. You can also customize system parameters, which can be used in scripts, flows, BPMs, and data access. For details about how to use system parameters, see Using System Parameters.

This section details the configuration of system parameters in two settings: the environment configuration and the application development workbench (see Figure 1). Parameters set in the workbench are packaged and released with the application, meaning they are automatically included in the runtime environment without the need for reconfiguration. In contrast, parameters configured in the environment configuration are not included in application releases.

Figure 1 Setting system parameters on the application development workbench

Setting System Parameters

  1. Log in to the Huawei Cloud Astro Zero console and click Access Homepage. The application development page is displayed.
  2. In the upper left corner of the page, click and choose Environments > Environment Configuration.
  3. In the navigation pane, choose System Settings > System Parameters.
  4. (Optional. Perform this step when you need to modify parameters.) Search for the system parameter to be modified, click the parameter name, and change the parameter value on the parameter details page.

    • System Parameters: displays custom system parameters. You can add, delete, and modify these parameters.
    • Built-in System Parameters: displays preset system parameters. You can only change the values of preset system parameters but cannot delete preset system parameters.

  5. (Optional. Perform this step when you need to customize parameters.) Create a system parameter.

    1. On the System Parameters tab page, click New.
    2. Complete the configuration, and click New.
      Table 1 Parameters for creating a system parameter

      Parameter

      Description

      Use Namespace

      Whether to add the Namespace__ prefix to the parameter name.

      If this option is selected, the value must be globally unique across accounts.

      Unique Identifier

      ID of a new system parameter, which uniquely identifies a parameter in the system.

      • The value cannot exceed 64 characters, including the prefix namespace.

        To prevent duplicate data names among different tenants, each tenant must define a unique namespace when first creating an application. A tenant can create only one namespace. After being created, the namespace cannot be modified.

      • Start with a letter and can contain only letters, digits, and underscores (_). Do not end with an underscore (_).

      Label

      Label of the new system parameter.

      Value: 1–64 characters.

      Value Type

      Value type of a system parameter. Options: Time, String, Number, and Bool.

      Value

      Set this parameter based on the selected value type.

      For a string, you can configure whether to encrypt the value.

      Default Value

      Default value of the new system parameter.

      Description

      Description of the system parameter.

      IS Encrypted

      Whether the value is encrypted. This parameter is available only when Value Type is set to String.

      Profile

      Profiles that can read this system parameter.

Using System Parameters

During application development, you can import system parameters set in the environment configuration. Once imported, these parameters are available for use. This section uses application A to demonstrate the import process of system parameters.

  1. Access the application designer of application A by referring to Logging In to the Application Designer.
  2. In the navigation pane, choose Logic and choose More > System Parameter.
  3. Click Import and select the system parameters created in the environment configuration page.
  4. Use system parameters in scripts, flows, or BPMs.

    • Scripts: In a script, introduce the sys library and enter sys.getParameter('System parameter name').
      For example, edit the following code in a script, and execute the script without entering input parameters. Then view the printed logs on the log page.
      import * as sys from 'sys'; 
      let sysParam = sys.getParameter('Namespace__APPName_MaxValue');
      console.log("MaxValue:", sysParam);
      Figure 2 Importing system parameters to a script
    • Flows: On the flow configuration page, click the context icon, click the plus (+) sign next to Formula, and enter SYSPARAMETER('System parameter name').
      Figure 3 Importing system parameters to a flow
    • BPMs: On the BPM configuration page, click the context icon, and click the plus (+) sign next to Variable to add the same type of variable. Then enter SYSPARAMETER('System parameter name') for Value on the Assignment Details page.
      Figure 4 Importing system parameters to a BPM
    • Custom connectors: On the Action tab page of a custom connector, click New. In URL of the New Action page, use the {!System parameter name} format to import the system parameter.
      Figure 5 Importing system parameters to a custom connector