Manage Custom Script

Users can create custom scripts in Python that can be executed from iAutomate through the API.
Note:
To execute Python scripts, it is required that Python is installed on the web server and its Environment Variable is set with name ‘PYTHON_HOME’ and its value will be the path where python.exe is present.
Figure 1. Environment Variables
  1. To create/manage custom scripts, click on Advance ConfigurationScript Menu and then click on Manage Custom Script. The following page will appear:
    Figure 2. Manage Custom Script
  2. The user can view and create scripts here.
  3. On the View Script tab, below the grid appears.
    Figure 3. Manage Custom Script (cont.)

    The table shows the Script Id of that script saved in the database, Name of the script, Description given for the script, the Tags defined while script creation, the Status of the script whether active or inactive and some Action buttons.

    To edit any script, click on icon:

    Figure 4. Manage Custom Script (Cont.)

    Create Script tab will be active with all the details of the script filled in the fields of this page:

    Figure 5. Manage Custom Script (Cont.)
  4. Edit the script as per the requirement and click Update. A confirmation box will appear as below:
    Figure 6. Manage Custom Script (Cont.)
  5. To change the status of any script, click on icon:
    Figure 7. Manage Custom Script (Cont.)
  6. A dialog box will appear to confirm whether user wants to change the status of the script:
    Figure 8. Manage Custom Script (Cont.)
  7. If yes, then the confirmation dialog box appears as below:
    Figure 9. Manage Custom Script (Cont.)
  8. To create a script, click on tab and the below page appears:
    Figure 10. Manage Custom Script (Cont.)
  9. The Input Mode dropdown has two following options:
    1. Manual: user can fill all the details on this page manually
    2. Json : User can import a valid json file to fill all the details through that file only.
      Figure 11. Manage Custom Script (Cont.)
    Note:
    Click on Download Template button to get the template for a valid Json file.
  10. The Script Language dropdown has the following options:
    1. Python: To create a script in Python language
      Figure 12. Manage Custom Script (Cont.)
  11. Enter the script name in the Script Name text box.
  12. Enter the suitable script description corresponding to Script Description text box.
  13. Enter the tags for better filtering of scripts.
  14. Enter the script text as per the language chosen in Script Language dropdown.
  15. Once all entries are filled, click Save. A confirmation dialog box will appear.
    Figure 13. Manage Custom Script (Cont.)
    Note:
    This feature can be used to support complex third-party system integration where the script can be simply created for the complex logic and this script can be used via API wherever needed.