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

Adding a Script Diagram Element

Functions

Script allows you to use other activated scripts within a flow. For complex services, you can break down a flow into sub-flows. By defining and activating scripts, you can integrate these scripts into the main flow for enhanced functionality.

Using the Script Diagram Element

  1. On the flow designer, choose Basic and drag the Script diagram element to the canvas.
  2. Click the script diagram element in the canvas, click , and configure basic information.

    Table 1 Parameter description

    Parameter

    Description

    Label

    Label of the diagram element, which is displayed on the flow design page. The system automatically assigns a value in a specific Scriptsequence number format, with the sequence number starting at 0 for each type of diagram element.

    Name

    Diagram element name, which must be unique in the current flow. The naming requirements are as follows:

    • Value: 1–80 characters.
    • Start with a letter and can contain letters, digits, and underscores (_). It cannot end with an underscore (_).

    Description

    Description of the diagram element.

    Value: 1–255 characters.

  3. Click , select a script, and set input and output parameters.

    Figure 1 Configuring a script diagram element
    Table 2 Parameters for configuring a script diagram element

    Parameter

    Description

    Script

    Name of the script to be called. Only activated scripts can be called by a flow.

    Input Parameters/Target

    Input parameter name of the script. Click Add Row and select a value for Target.

    Input Parameters/Source

    Variable in a flow, which is used to assign a value to the target. You can either type in the value directly or drag a variable from the context to pass its value to an input parameter in a script.

    Output Parameters/Source

    Output parameter name of the script. Click Add Row and select a value for Source.

    Output Parameters/Target

    Variable in a flow, which assigns the output parameters from a script to a variable within the main flow. You can do this by setting the output of the script to a variable in the context.