Script

Script

 

Introduction

Script task helps to perform a custom task in the automation. You can add the script as per the requirements and integrate it into the automation.

 

Steps to configure

  1. Drag and drop the script task in the automation and click on it. The below form will appear on the left side of the screen.

  2. Add a name and an appropriate description.

  3. In the script type input field, select JavaScript. A script type specifies the type of the script.

  4. Then, select the script function name as per the script, click on add script button and a box will appear on the screen.
    Add the custom script as per the requirement and click on validate.

     

  5. The response type input field deals with the type of response that the system will return as per the script. It could be an integer, object, array, or string. A response type is an enumerated string value specifying the type of data contained in the response.

  6. Add the arguments according to the provided script. Arguments passed to a script are processed in the same order in which they're sent.

  7. Now, in the value input field, data could be fed as per the argument in the script. Value field is used as a common format to exchange tabular data between spreadsheets and relational database. You can add the desired data slot by dragging it from the data slot and dropping it into the value input field. For every argument, the user needs to add value.

  8. Then, click on output meta to upload and provide the sample output data. Output meta is the type resolution for the result of a component. Each component can provide either static or dynamic metadata for the payload and attributes, isolated from each other.

  9. Click on save to successfully save the configuration.

 

Related articles