Add Bot Task
Bot Tasks contain work to be done by WorkFusion's bots automating human labor. Bot Tasks can exist only as a Business Process step, and you can create them using code tools or in a no-code manner.
Bot Tasks contain work to be done by WorkFusion's bots automating human labor. Bot Tasks can exist only as a Business Process step, and you can create them using code tools or in a no-code manner.
The no-code Data Store steps allow you to easily retrieve or modify data from Data Store tables using an SQL query. The steps send a query to a database, which then processes it and returns the result.
The no-code Rate Limiter bot step enables you to control the number of records passing through the step within a specific time frame. This is particularly beneficial for implementing rate-limiting at a granular level, such as per AI Agent, reducing the impact on resources when two AI Agents are running in a single environment.
The Data Store module is a web interface for managing database (DB) tables in the Work.AI platform. A field scheme defines the Data Store table structure and column data format.
The Application action group provides possibilities to manage and switch active windows which Bot is interacting with (clicking, typing, scrolling, and so on).
Each of our clients uses Work.AI Developer for different goals, but the common thing that unites all of them is writing scripts with the help of Recorder. There are several recommendations that can help you to make your script not only functional but also clear for understanding and flexible to support.
With the introduction of the BEP execution platform:
A Worker is a single instance of a Worker application process started by BEP to process BEP Worker tasks.
By default, you can use bot plugins included in the original WebHarvest framework. To learn more, refer to Standard WebHarvest processors. To create WebHarvest XML configs, you can also use the plugins implemented additionally in the Java language by the WorkFusion team.
For more details, refer to the JavaDoc documentation.
Selectors (or Locators) are used to find and match the elements of a web page or desktop app that a robot needs to interact with. Using the right selector ensures the bots are faster, more reliable or has lower maintenance over releases. If you’re fortunate enough to be working with unique IDs and Classes, then you’re usually all set. It can be a real challenge to verify that you have the right selectors to accomplish what you want.
Inversion of Control and Dependency Injection
Object selectors are used for automating desktop applications only.
In Bot Configs, you have access to both WebHarvest and WorkFusion context variables. The Manual Task context is described in the Manage templates topic.
The image is used to change focus to the sign-in popup window.
Type|Method|Description
Apply selection methods
The example below shows how to run commands on a remote RPA Agent machine. Pay attention to how you can execute Groovy code remotely.
Some web applications have functionality allowing to drag web elements from one location and drop them on a defined area or even another web element.
Most of sites are dynamic and change the page content by JS scripts while a user interacts with a page.
A table is a kind of HTML data displayed with the help of the ` tag in conjunction with the and ` tags. Although there are other tags for creating tables, these are the basics for creating a table in HTML:
The most popular desktop application to be automated with the help of Recorder is Microsoft Excel. There is a specific actions group in Actions Library to work with Excel files. Here you can find some recommendations on how to work with them in your own scripts.
Launch applet and insert and extract data
A typical application looks like the one on the screenshot below:
To click an item of the drop-down menu, use the hover() method:
Automate file download
As Outlook is one of the most popular email clients used by many companies nowadays, you will find here some recommendations on how to automate it with Recorder.
Overview
Automate Calculator
The Automation Engineer certification in Automation Academy helps trainees obtain a key professional developer role that ensures the successful delivery of a complex automation project.
AutoML plugins provide the capability to interact with AutoML services from Bot Tasks.
The guide illustrates the implementation of a schemaless Business Process (BP) for website rating from a Bot Task using the Work.AI Developer and Control Tower capabilities.
The article explains different solution approaches to building code and focuses on simplified RPA API.
Overview
We have put together some examples of custom scripts that you can use in your recordings.
Goal
Deploy project to Control Tower
If-Else
In the diagram below, you can see Bot Sources within the BEP execution framework.
The custom bot step configuration user interface is used to simplify the specification of configuration parameters for bot steps. The feature enables the creation of complex forms using frameworks like FormIO or React and is supported for Java Native Workers (JNWs), Triggers, Bot Config Bundles (BCBs), and WebHarvest tasks.
Custom attributes are user-defined data fields that extend or customize task and process data. These attributes rely on Field Schemes to determine how data is stored and interpreted.
The article describes the legacy bot step configuration flow. For the recommended approach, refer to Configure bot steps in UI.
A Decision rules step allows you to configure decision rules and routing outcomes in a no-code manner.
Using the no-code Connector step, you can apply multiple configuration options to handle different connection scenarios and create custom connectors for the integration of external services into your automations.
The Transformation step is a no-code bot step that allows you to implement complex scenarios with rule conditions.
There are some global parameters for Recorder to define component settings, their general behavior, and so on. The most widely used setup refers to the Recorder settings. Go to Window > Preferences > WorkFusion Recorder.
The ODF 2 provides the built-in ORM layer and comes with OrmLite as the default ORM framework used primarily to access Data Store data.
Connectors in the Work.AI platform enable Business Processes (BPs) and AI Agents to communicate with external systems. They provide standardized integration points for retrieving and enriching data, sending information to third-party services, triggering workflows based on external events, and orchestrating end-to-end automation across enterprise environments.
Example overview
The article describes the legacy bot step configuration flow. For the recommended approach, refer to Configure bot steps in UI.
The Craigslist Bot searches and returns the top results to a spreadsheet.
Problem statement
Before getting into details, let's take a quick look at a simple Bot Task within the ODF 2 framework:
Explore adoption scenarios
Data Store plugins can be of two types:
ODF 2 doesn't add anything special to the existing ways of debugging Bot Tasks.
Remote Java debug for the WorkFusion platform v.10.2+ is available via communication between two instances of Developer of the same version:
After creating an ODF 2 project from the Simple Archetype, deploy it to a Control Tower instance.
General overview
The figure below illustrates the BEP Worker task distribution flow within BEP:
Eclipse IDE is the development environment used to design Bot Configurations.
The WorkFusion infrastructure requires periodic validation. There are various factors that can make certain WorkFusion components or target applications non-functional or non-automatable.
The Excel action group is intended for automating Excel spreadsheet manipulations, such as getting or setting cell values, switching between sheets, saving, and so on. These actions are NOT automatically recorded when you work in Excel during a recording process.
The Exception Handling action is intended to ensure a safe execution of your automated workflow by providing the try-catch functionality. This action is a complex one and consists of two blocks:
Exclusive access concept
The feature allows executing GroovyScript on a Bot machine (Windows RPA Server), not in Control Tower. For more details, see the JavaDoc link.
JavaScript is the preferred language inside the browser to interact with an HTML document object model (DOM). It means that a Browser has a JavaScript implementation in it and understands the JavaScript commands. You can disable it using browser options in your browser. The web driver still uses JavaScript to perform some actions.
The Worker scaling strategy is a mechanism for calculating an optimal Worker quantity to satisfy, to the maximum possible extent, the multiple task execution requirements on a cluster with fixed limited resources (non-elastic cluster). The strategy is supposed to adapt when cluster resources are added or removed.
In the article, the standardized Data Store schema is understood as equivalent to the ODF 2 example project's Data Store schema. With few exceptions, it utilizes concepts from Transaction and Multi-process layers of the ODF 2 architecture. If you do not use the Multi-process layer, you can ignore some entities, and this won't impact the framework integrity. In extreme scenarios, when even the Transaction layer is not used, the Data Store schema should be designed from scratch.
The Work.AI platform brings together concepts, guides, and techniques to begin your development journey.
Data flow
The article dwells on the structure of a project created from the ODF 2 Simple Archetype. For more details on creating a new project, see Start Maven project.
What is Assembly?
Recorder is one of the main Work.AI Developer components that provides the ability for a Power User to automate web, desktop, and mainframe applications in a natural macro-like way without any coding or scripting.
The Files and Folders action group is intended for general manipulations with files and folders, for example, creating a folder under the path specified or a file with a specific content in a defined location, or copy/move a folder or a file to the location specified.
Eclipse IDE is a component of Work.AI Developer used to build automation solutions of any complexity.
IntelliJ IDEA IDE allows to execute WorkFusion Bot Task unit tests. Execution of unit tests does exactly the same as Bot Task execution. Additionally, the unit test approach allows accumulating unit tests for continuous integration practice.
As you probably know, if a Bot Task throws an exception, the platform stops the execution of the entire Business Process (BP). In most real-life scenarios, such behavior is unacceptable. Instead, you would usually react to the exception by retrying the attempt, asking a human operator to intervene, trying to proceed with other records, or using any combination of these strategies.
Handle IFrames with Robotics WebDriver
An alert is a pop-up window that comes up on the screen. There are many user actions that can result in alerts. For example, a user clicks a button that displays a message, and a web page asks for some extra information.
The topic is a brief introduction to XPath to present a quick overview of the main techniques you can use in your recordings to handle elements on a web page, for example, to click a link or an object, get or set value from/to fields or menus. The tutorial explains the basics of XPath with suitable examples.
ORMLite is a framework that provides lightweight Object Relational Mapping between Java classes and SQL databases. There are certainly more mature ORMs that provide this functionality, including **Hibernate** and **iBatis**. However, ORMLite is a simple yet powerful wrapper around the JDBC functions.
Sample PageObject implementation walkthrough
With the Asset Bundle import feature, everything required for a Business Process (BP) delivery is now conveniently wrapped in a self-sufficient package, which can be ported to a target environment in few simple steps. The import mechanism supports large files and is less error-prone than traditional methods. Successful import is asynchronous—meaning fast—and verified by a checksum. This accelerates BP delivery, decreases the total cost of development, and eventually contributes to continuous integration.
Inspector(21) or Inspector, depending on the Java version you use (Java 21 or Java 8, respectively), is a tool for exploring the properties and values of objects in native Windows applications, various frameworks, Java, and SAP applications. It supports automation through recordings by providing functionality for quick element selector search.
Example overview
The Keyboard action group is intended for entering text and typing key combinations using the keyboard. The Enter Keystrokes action is automatically recorded when you type something during the recording process.
Design concepts
There are two types of Java examples:
Web applications do not always confine themselves to working entirely on the web. Sometimes they need to interact with the desktop to do things like downloads and uploads. Automating these sorts of workflow is tricky in using WebDriver. WebDriver is confined to automating browsers, so desktop windows are out of scope.
Loops are used:
With the Low-Code Developer certification, trainees learn how to use the Work.AI platform to automate day-to-day operations.
The Answer Types tab allows you to create and manage Answer Types. The Answer Types are used when creating Field Schemes or adding Answers Types to tasks or Bot Configurations.
Records and transactions
With ODF 2, we encourage you to use Data Stores as a universal and effective way to have different steps of Business Processes within your AI Agent exchange data. The section provides a reference on how to organize your Data Model through AI Agent automation.
Work.AI offers the approach allowing smooth and flexible incorporation of user-defined Java libraries into BEP Workers. The approach enables the isolation of BCB classes from the application ones. If BCB classes use a library packaged together with the BCB, the BCB class loader loads the library classes from the BCB even if the Worker app contains the library as well.
Templates allow you to reuse objects. Almost every object in the Work.AI platform, including Manual Tasks and Business Processes, is based on templates.
You can create a package with a Business Process (BP) and import it from one WorkFusion environment to another, for example, from DEV to UAT or PROD.
ODF 1 is not supported in Work.AI v10.3, and you are encouraged to fully transition to ODF 2. For the ODF documentation, refer to the v10.2.9 user guide.
Model training
The Mouse action group is intended to interact with user interface using mouse.
Cache concept
Overview
The article dwells on the obsolete approach of OCR usage in the scope of the ODF 2 framework.
The ocr plugin works in the synchronous mode, and therefore, becomes a performance bottleneck if used within a BP where the OCR page volume is high, or documents contain more than 20 pages.
ODF 1 is not supported in Work.AI v10.3, and you are encouraged to fully transition to ODF 2. For the ODF documentation, refer to the v10.2.9 user guide.
The Orchestration section guides you through the steps to deliver and orchestrate automations, including the involvement of a human worker in the loop. The figure below illustrates the actions available for the purpose in the Control Tower (CT) and Workspace (WS) user interfaces.
Code review benefits
Stateless execution definition
Plugin execution logging helps to record the execution time of specific plugins, thus enabling you to gather Bot Task processing analytics. Currently, the following plugin data is recorded:
There are some useful prepackaged task types not associated with any APIs. You can use them in the standard cross-process flow.
In ORMLite, the lazy loading of mapped collections is implemented in a non-standard way. Instead of loading the content once during the first access, it loads it every time the collection is accessed.
Example overview
Example overview
To use the ODF 2 framework more conveniently, you can apply the following techniques when working with transactional tasks and retrying failed Transactions.
General information
The ODF 2 example project is created to demonstrate key features of the framework. It contains four simple Business Processes that operate on a mock data model. While functional, these processes do not perform anything practically useful.
Robotics plugins make it possible to click through desktop or web applications using commands in WebHarvest scripts. The location for executing the script is configured on the RPA Windows server side.
- Estimation
RPA development (using both code and code-less approaches) assumes mimicking with bot task of SME's interaction with multiple organization systems. During it bot typically drags sort of "transaction" from initial phase down to final phase in terms of use-case scope. Problem is that development requires valid data in initial phase each time developer tries to test his bot task. Now, imagine that 20 developers in team every day launch tests up to 100 times. Obviously, certain amount of valid test data must be re-generated and available every day during design, development, and UAT phases. These requires to establish solid Test Data Management even before any development begins.
The tutorial below helps to learn how to debug RPA (actually any Bot Task in your Maven project) in IDEA with the help of Work.AI Developer:
Spoke is a tool for end-to-end Business Process testing. It provides fluent APIs for a developer to achieve typical testing goals. The framework is built on the JUnit 5 + AssertJ ecosystem, but the core module does not depend on it and can be used as a pure Java library.
The article describes what WebElement is and which actions you can perform on various WebElements.
Download the Scheduler Business Process package.
The Script action allows to create any custom action using the following APIs:
ODF 2 provides SecretsVaultService to isolate operations with Secrets Vault.
Sequences are intended for combining several actions into one logical part of the whole automation workflow, such as Login to application, Creating Invoice, Working with Excel file, and so on, and provide the following benefits:
Occasionally, a Bot Task might get stuck due to a problem in logic, leading to Business Process execution issues. To enable detection of such situations, the following mechanisms were implemented:
To design RPA in Bot Tasks or test a Business Process on your local workstation, we require you to run Windows OS and install the Work.AI Developer environment as it provides RPA local execution, local Control Tower and all required components. However, IDEA works under Mac and Linux. In this case, you can skip installing Developer. But note that you won't have local Control Tower and Workspace and won't test RPA Bot Tasks on the local workstation.
To design RPA in Bot Tasks or test a Business Process on your local workstation, we require you to run Windows OS and install the Work.AI Developer environment as it provides RPA local execution, local Control Tower and all required components. However, Eclipse IDE works under Mac and Linux. In this case, you can skip installing Work.AI Developer. But note that you won't have local Control Tower and Workspace and won't test RPA Bot Tasks on the local workstation.
Selenium keys enum
Recorder variables are used to store initial or runtime values that a bot can:
ODF 2 allows splitting a Transaction into multiple sub-transactions and joining them back. This is usually done to process some data from the original Transaction in parallel.
Below, there is the description of standard WebHarvest processors together with their attributes, syntax, and code samples you can use to design Bot Tasks.
If you have several Business Processes (BP) where one BP produces data for another, you can apply the event-based communication mechanism and configure the data transfer between them. You can set a sub-process to start from another BP based on a specific event or set transaction processing to be launched from another transaction in a different BP using no-code sub-process steps.
To start a Business Process (BP) based on external events or scheduled polling of a source system, you can apply the no-code Trigger element.
Why it is important
Window selectors
Example overview
Screenshot of browser: getScreenshotAs()
The Taxonomy Answer Type can be used for classification of products, businesses, and articles. In WorkFusion, you can use this answer type along with Data Stores.
The Text actions are intended to refine the texts acquired during other actions, for example, from web-elements, remove unnecessary blank spaces, check, if the text matches the defined content, and combine several texts together.
Example overview
The instruction contains the best practices of the Apache HttpClient usage in the ODF 2 framework scope.
API
To facilitate the interaction with a Control Tower instance, a set of Maven plugins support the ODF 2 framework. The page describes working with these plugins.
The article is an example of the OCR Bridge step usage in the scope of the ODF 2 framework. The Bot Tasks used in the example are a part of Processing Business Process from the example project.
How to handle Ajax call using WebDriver
XPath in JavaScript: introduction
Using Variables from Actions Library, you can assign the following values to recorder variables:
Problem context
Welcome to Examples Library
BEP Worker framework
The document outlines the key code changes introduced with the migration from Java 8 to Java 21 in the bot execution and WebHarvest Control Tower (CT) Worker projects, starting with Work.AI v10.3.
Work.AI Developer (previously Intelligent Automation Cloud Developer or IA Cloud Developer) is a part of the Work.AI platform and provides a unique automation environment to evaluate, learn, design, create, and support automation projects.
Wait actions are intended for pausing bot execution for a defined period of time and for searching images on user screen. These actions are not recorded automatically. You need to drag them from Actions Library to Actions Flow while editing a recording.
A commonly encountered task in ODF 2 is waiting for the completion of all transactions in a given Business Process. There is no out-of-the-box solution that fits all use cases. For example, a Monitor Task often serves as the source of transactions, making it impossible to know when new ones appear. However, once all requirements are known, such a feature is quite easy to implement.
The Web action group is intended for automating browser actions, such as open website in browser, get value, and set value of a web element (text input, dropdown, and so on). These actions are NOT automatically recorded when you work in a browser during the recording process.
Example overview
JNW Toolkit contains three Maven modules that providу functionality for working with Data Stores.
The fleet mechanism is designed to send tasks for processing by a dedicated Worker pool, or fleet. If used with non-RPA bot steps, the main purpose of creating fleets is to maintain a dedicated Worker pool that is separate from the generic one and not directly affected by other bot step tasks within the same Business Process (BP). For more details, see Prioritize Business Process processing.
To illustrate how user Transactions are created and processed, let's simulate a simple scenario for a Business Process (BP) consisting of two Bot Tasks:
ODF 2 provides WorkspaceClientService to retrieve a page with assignment information, such as the link and status.
Bot Task JUnit is a JUnit 5 API for running and testing Bot Tasks. You can use it for running Tasks locally from an IDE of choice during development and/or for executing tests in a CI/CD pipeline.