RPA Script

The RPA Script page helps you add executable task scripts that are related to each vendor in your process. You can add a Pre-execution script and a Post-execution script in addition to task scripts. These scripts are respectively run at the start and at the end of the bot execution. You can also use the pre-execution scripts and the post-execution scripts for initialization and clean-up purposes.

Learn more about the RPA script:

Understanding the elements

RPA Script

Table 1. Elements of the RPA Script page

Element Number Element Name Description
1 Task breadcrumb This breadcrumb indicates the current page and the navigation path. You can use the links in the breadcrumb to go back to any of the previous pages.
2 Pre-execution script Section to add, modify, or delete scripts that precede the task scripts for each vendor
3 Post-execution script Section to add, modify, or delete scripts that succeed the task scripts for each vendor
4 Task scripts Section to view, add, modify, or delete scripts for each task
5 Page navigation Section to select the page of the task script table to view
6 Items per page Section to select the number of items that must be shown in the task script table in a page

Task scripts

In IBM Task Mining, captured events are converted into tasks, and RPA code snippets are associated with these tasks to generate RPA bots from the captured process model.

Table 2. Columns in the Task scripts table

Columns Description
Application Name of the application captured by the TM agent
Page Page of the application captured by the TM Agent
Task Name of the tasks completed on a page that is configured in the Task classification tab
Selector Selected names of each task
Script Number of scripts that are assigned to a task and the edit script option

Adding a code snippet to a task

In IBM Task Mining, you can choose to link an existing code snippet to a task or create a new code snippet for the task. The code snippets that are created in the Add script snippet dialog box are added to the snippet library and are available for sharing across task mining projects.

Do the following steps to add a code snippet to a task:

  1. In the All task mining projects section of IBM Task Mining, select a project.

  2. On the RPA Script page of the selected project, click the Add your script icon corresponding to the task for which you want to link the code snippet. Link snippet

  3. In the Vendor box of the Add script snippet dialog box, select a vendor.

  4. To assign an existing code snippet to a task, click Link to an existing snippet and choose a snippet name.

    Link existing snippet

  5. To assign a new code snippet to the task, do the following steps:

    a. Click Create a new snippet.
    b. In the Name box, type a name for the snippet. For more information on naming a code snippet, see Create a new code snippet in the library.
    c. Optional: In the Description box, type a description for the code snippet.
    d. In the Script box, type or paste the code snippets.

    Link to new snippet

You can assign only one code snippet per vendor to a task. If multiple vendors are supported in IBM Task Mining, then you can assign one snippet per vendor for each task. To do so, in the Vendor box of the Add script snippet dialog box, select the required vendor, and then repeat the procedures that are mentioned in Adding a code snipped to a task section.

Editing a code snippet assigned to a task

Use the following steps to edit a code snippet that is linked to a task:

  1. In the Task scripts section, expand the task for which you want to edit the code snippet.

  2. Click the Edit Script icon. Edit script icon

You can edit a code snippet only if you are the owner of the script or if your user credentials have the edit permission. For all other instances, the Edit feature is disabled.

  1. In the Edit script snippet dialog box, update required details, and then save your changes.

Unassigning a code snippet from a task

To unassign a code snippet that is linked to a task, do the following steps:

  1. In the Task scripts section, expand the task for which you want to unassign the code snippet.

  2. Click the Unassign Script icon and confirm.