Recording Process Portal tasks with IBM RPA with Automation Anywhere

Because bots use the same user interfaces that end-users use, additional considerations apply when you create a bot for automating a Process Portal task.

Human services provide the logic and user interface for Process Portal through which users view and interact with their tasks. Human services are self-contained, independently deployable units of the user interface that use coaches to build the web pages that users see. Coaches comprise user interface widgets called coach views. You use coach views to build a coach or page or multiple pages, then you place the coaches inside a client-side human service to build the user interface that you need. For more information about coaches and coach views, see User interface concepts in the Business Automation Workflow documentation.

Choosing a recorder for Process Portal tasks

A bot for automating an IBM® Business Automation Workflow human activity is based on a recorded Process Portal task. In IBM Robotic Process Automation with Automation Anywhere, bots are implemented as tasks and commands represent the steps in the task. IBM RPA with Automation Anywhere Bot Creator provides several task recorders: Smart Recorder, Web Recorder, and Screen Recorder. So, how do you choose which one to use?
Smart Recorder
Use this recorder as your preferred recorder for all tasks, including Process Portal tasks. Because the Smart Recorder interacts directly with an object, it isn't affected by the screen resolution or the size and position of a window. This bot has the following characteristics:
  • It captures the user interface operations as a set of Object Cloning commands.
  • It uses the DOM structure to locate web elements, such as the input field in a coach view.
  • It adapts to display variations and window sizes.
  • It tolerates minor layout changes in coaches, such as changing the field labels, adding new coach views, and moving existing ones around.
Web Recorder
Use this recorder to automate pattern-based tasks for web applications, such as automatically extracting web data across multiple pages and filling out forms. This bot has the following characteristics:
  • It uses the DOM structure to locate web elements, such as the input field in a coach view.
  • It enters text in an input field as the entire string instead of emulating the user's keystrokes. As a result, browser events that are needed to process the text in a coach view are not triggered. For example, the events that are needed by the On change event of a Text coach view are not triggered and the bound variable is not updated.
Because of the issues that can arise when recording text in input fields, the Web Recorder is not recommended for recording Process Portal tasks.
Screen Recorder
Use this recorder to automate simple tasks for processes that you plan to run on the computer where you record them. This recorder is the least reliable because it uses pixel (X, Y) coordinates to locate coach views and not the coach ID. It is therefore sensitive to display size variations.

Adjusting the recorded task for coach interactions

In the Smart Recorder, an Object Cloning command represents a user interface interaction, such as entering a text string. To optimize coach interactions with the bot at run time, adjust the following properties for each of these commands:
Wait for the object to exist
This property represents the time the bot waits for the element, such as an input field, to appear in the coach view. The default value for this property is 15 seconds. To ensure that UI initialization doesn't cause the bot to break, use a higher value for this property for the first interaction in a coach. You can use a lower value for subsequent interactions because you can assume that the coach is already visible.

For example, if you have a human service with two coaches that have input fields and a button for submitting data, use a value, such as 30 seconds for the interaction with the first input field on each coach, and 1 second for all other UI interactions.

Delay
When you record text entered in an input field of a coach view, a Set Text action is added to the Object Cloning command for that UI interaction. To better simulate how a user enters text in a field, the Set Text action has a Delay property to define the time interval between key strokes. By default, this value is either 0 ms if you entered only characters and numbers, or 40 ms if you also used special keyboard keys, such as the Shift or Ctrl key.

If the bot runs with a value of 0 ms, it behaves similarly to a bot with Web Recorder tasks; the bot enters text in an entire string instead of emulating the user's keystrokes. Events that are needed for coach views to work correctly do not happen, for example, the On change event of a Text coach view is not triggered and the bound variable is not updated. To ensure that events are triggered, always use a value of 20 ms or higher for the Delay property of a Set Text action.

Considerations for specific coach views

Tip: For best results, ensure that the Business Automation Workflow you are using is on V8.6.0 cumulative fix 2017.12, or a later version, or IBM Business Automation Workflow. You might see issues with coaches from earlier versions, for example, nested coaches and layout changes are not supported.
Depending on the coach and the coach views it contains, you might need to make other minor adjustments to the recorded task to optimize how the bot plays it back. Unless otherwise stated, the following examples apply to coach views in both the BPM UI toolkit and the Responsive Coaches toolkit (deprecated):
Date Time Picker coach view
In the coach view, you can specify a date by using either a text field or the inline date picker. Because a text field is easier to automate, use the text field instead of the date picker when both options are available.
Image coach view
When you interact with an image, the Smart Recorder includes the HTML Href property in the search criteria of the Object Cloning command. The value of the property is the URL from where the image is loaded. If your bot works with dynamic images, clear the Href property.
Multi Select coach view (BPM UI toolkit)
If you record the selection of only one item in a Multi Select coach view, the corresponding Object Cloning command might include a Click action. Change the Click action to either a Select Item By Text or Select Item By Index action.
If your task includes selecting multiple items from a list, complete the following steps to set up your bot:
  1. During the recording, select only one item. When your recording is complete, edit the task.
  2. In the Object Cloning command for the selection step, change the Click action to either the Select Item By Text or the Select Item By Index action.
  3. Add two Insert Keystrokes commands after the Object Cloning command:
    • From the Select Window list, select Currently Active Window.
    • For the keystrokes, select [CTRL DOWN] for the first command and [CTRL UP] for the second command.
  4. For each additional selected item you want to include in the bot, copy the Object Cloning command from step 2, paste it between the keystroke commands, and update the action accordingly.
Collapsible Panel (BPM UI toolkit), Section, and Tab and coach views
The content of a section or tab renders when you expand a section or switch to a tab. If the recorded task includes expanding a section or switching tabs, you might need to add a Delay property to the corresponding Object Cloning command to ensure that the coach view is visible before the bot tries to interact with the content.

Collapsible Panel coach view: If you have an existing task that was recorded on a system running an earlier version of Business Automation Workflow, remove the "HTML Tag=BUTTON" and "HTML Type = button" properties from the Object Cloning command.

Text coach view (Responsive Coaches toolkit (deprecated))
If you use Internet Explorer to record entering text in the input field of the Text coach view, the search criteria for the corresponding Object Cloning command contains the HTML type property with a value of {{textInputType}}. Depending on how the Text input type of the coach view is configured, change the value of the type property to one of the following values: Text for a Text input type, url for a URL input type, email for an E-mail input type, tel for a Telephone input type, password for a Password input type.