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

Customizing an Existing Script

Scenario

You can create a script based on an existing script in the following scenarios:

  • Scenario 1: Creating a version based on an existing script

    If you need to change the script functions, modify the original script and save it as a new version. In this scenario, the original script automatically becomes invalid.

  • Scenario 2: Creating a script based on an existing script

    If the new script to be developed is similar to an existing script, modify the original script and save it as a new script. In this scenario, the original script is still valid. The new and old scripts are independent of each other.

Scenario 1: Creating a Version Based on an Existing Script

If you need to change the script functions, modify the original script and save it as a new version. In this scenario, the original script automatically becomes invalid.

  1. Log in to the application designer by referring to Logging In to the Application Designer.
  2. In the navigation pane, choose Logic.
  3. In the script list, click the target script to access the script editor.
  4. Click in the upper part of the editor, select New Version, and click Save.

    Figure 1 Saving the new version

  5. Edit the content of the new script version and click to save the script.

    In the script editor, you can see that the current script version is 1.0.2. That is, 1 is automatically added to the original script version.
    Figure 2 Saving and activating a modified version

  6. Debug a script.

    1. Click in the upper part of the editor to run the script.
    2. On the input parameters tab page, enter the request packet and click in the upper right corner of the test window.
    3. Check whether the results on the output parameters tab page meet the expectation.
    4. After the script is executed, check the output logs on the Logs tab.

  7. If the debugging result meets the expectation, click to activate the script.

    An activated script can be used by other scripts and flows. Inactive scripts cannot be queried by other widgets.

Scenario 2: Creating a Script Based on an Existing Script

If the new script to be developed is similar to an existing script, modify the original script and save it as a new script. In this scenario, the original script is still valid. The new and old scripts are independent of each other.

In addition to creating a script in the script editor, you can also select Use an Existing Script on the Add Script page to create a script. For details, see Creating a Script Using an Existing Script.

  1. Log in to the application designer by referring to Logging In to the Application Designer.
  2. In the navigation pane, choose Logic.
  3. In the script list, click the target script to access the script editor.
  4. Click in the upper part of the editor, select New Script, set the new script name to BulkInsertOther, and click Save.

    Figure 3 Creating a script

  5. Edit the content of the new script and click in the upper part of the page to save the script.

    In the script editor, you can view the new script whose version is 1.0.1.

    Figure 4 New script

  6. Debug a script.

    1. Click in the upper part of the editor to run the script.
    2. On the input parameters tab page, enter the request packet and click in the upper right corner of the test window.
    3. Check whether the results on the output parameters tab page meet the expectation.
    4. After the script is executed, check the output logs on the Logs tab.

  7. If the debugging result meets the expectation, click to activate the script.

    An activated script can be used by other scripts and flows. Inactive scripts cannot be queried by other widgets.