Unit 1 - Notes

INT347 7 min read

Unit 1: Blue Prism RPA Fundamentals

1. Introduction to RPA (Robotic Process Automation)

Robotic Process Automation (RPA) is the use of software "bots" to automate repetitive, rule-based, and high-volume digital tasks traditionally performed by humans.

  • Core Concept: RPA bots interact with software applications in the same way human users do (via the user interface) or via APIs, without requiring changes to underlying IT infrastructure.
  • Key Benefits:
    • Efficiency & Speed: Bots work 24/7 without fatigue, significantly reducing processing time.
    • Accuracy & Compliance: Eliminates human error in data entry and leaves a comprehensive audit trail.
    • Cost Reduction: Lowers operational costs by automating mundane tasks, freeing humans for high-value cognitive work.
  • Typical Use Cases: Invoice processing, data migration, employee onboarding, report generation, and account reconciliation.

2. Blue Prism Architecture

Blue Prism uses a highly scalable, secure, and robust client-server architecture designed for enterprise deployment. The architecture revolves around a centralized database and several key components.

2.1. Process Studio

  • Purpose: The workspace where developers design the core business logic and sequential flows of the automated process.
  • Functionality: Resembles a traditional flowchart interface. It orchestrates the overall flow, makes decisions, handles data routing, and calls upon Business Objects to interact with applications.
  • Key Characteristic: Processes should never interact directly with an application's user interface. They only sequence the logic and call Actions from Object Studio.

2.2. Object Studio

  • Purpose: The environment used to create Visual Business Objects (VBOs). This is where the actual interaction with target applications (web browsers, legacy apps, mainframes) occurs.
  • Functionality: Utilizes the Application Modeller to "spy" and map user interface elements (buttons, text fields, dropdowns).
  • Key Characteristic: Encapsulates the technical details of the application interface, allowing the Process Studio to remain agnostic of the underlying UI.

2.3. Control Room

  • Purpose: The centralized command center for administrators and operations teams.
  • Functionality:
    • Session Management: Start, stop, and monitor bot sessions.
    • Work Queues: Manage workload distribution. Work queues hold items to be processed, tracking their status (Pending, Completed, Exception).
    • Scheduling: Automate the execution of processes at specific times or intervals.
    • Monitoring & Logs: View real-time bot performance and investigate system logs for auditing and troubleshooting.

3. Object Development and Element Identification

To interact with an application, Blue Prism must be able to reliably identify its elements. This is done in Object Studio using the Application Modeller.

Element Identification (Spying)

"Spying" is the process of capturing the attributes of a UI element. Blue Prism offers multiple spying modes depending on the application type:

  • Win32 Mode: Used for standard Windows desktop applications.
  • Active Accessibility (AA) Mode: Used when Win32 fails; relies on Microsoft's accessibility framework. Excellent for legacy applications.
  • UI Automation (UIA) Mode: A newer Microsoft framework that often captures elements that AA misses.
  • HTML Mode: Specifically used for web-based applications (Chrome, Edge, Firefox).
  • Region Mode: Uses screen coordinates and image recognition. Best practice dictates using this only as a last resort due to its vulnerability to screen resolution and scaling changes.

Attribute Selection:
When an element is spied, Blue Prism captures dozens of attributes (e.g., Window Title, Class Name, ID, Visible, Screen Bounds).

  • Developers must refine these attributes by checking/unchecking them to create a unique and robust match.
  • Dynamic Attributes: Attributes that change every time the application opens (e.g., session IDs, dynamic URLs) must be unchecked or handled using wildcards (*).

4. Wait Strategies

In RPA, applications do not always load at the same speed due to network latency or server load. Hardcoding pauses (Static Waits) leads to inefficient bots. Blue Prism utilizes Dynamic Waits via the Wait Stage.

  • Wait Stage Functionality: Pauses the bot's execution until a specific condition is met on the screen (e.g., waiting for a button to become visible, or a window to exist).
  • Timeout: Every Wait Stage must have a Timeout (e.g., 10 seconds). If the element does not appear within the timeout, the bot flows down the Timeout path, allowing the developer to handle the delay gracefully (e.g., throw an exception).
  • Best Practice:
    • Always use a Wait Stage before interacting with a new screen or element.
    • Never use arbitrary "Sleep" commands unless absolutely necessary (e.g., waiting for a backend file transfer).

5. Business Objects and Reusability Patterns

A Visual Business Object (VBO) is an adapter that provides a standard interface to a specific application.

Reusability Patterns

  • Encapsulation: By keeping all application interactions inside the VBO, any changes to the application's UI only require updates in Object Studio, not in Process Studio.
  • Granular Actions: A VBO should be broken down into small, reusable Action pages (e.g., "Login", "Navigate to Home", "Enter Customer Details", "Click Submit", "Logout").
  • The "Attach" Pattern: Every Action page in a VBO should ensure the bot is attached to the application before interacting with it.
  • Shared VBOs: Blue Prism provides standard VBOs out-of-the-box (e.g., MS Excel VBO, File Management VBO, SQL Server VBO) which can be reused across hundreds of different processes.

6. Exception Handling (Try-Catch Equivalents)

In traditional programming, errors are handled using try-catch blocks. Blue Prism implements this visually using Block, Recover, and Resume stages.

The Mechanism

  1. Block Stage (The "Try"): A visual box drawn around a group of stages where an error might occur. It isolates the error-handling scope.
  2. Recover Stage (The "Catch"): Placed inside the Block. If any stage within the Block throws an exception, the flow immediately jumps to the Recover stage. This creates a safe "catch" mechanism preventing the bot from crashing.
  3. Resume Stage: Placed after the Recover stage. It neutralizes the exception, clearing the error state so the bot can continue executing alternative logic (e.g., marking a work queue item as an exception and moving to the next item).

Types of Exceptions

  • System Exceptions: Technical failures (e.g., application crashed, network timeout, element not found). Typically handled by retrying the action.
  • Business Exceptions: Logical rules dictated by the business (e.g., "Account balance is negative, do not process"). These are intentionally thrown by the developer using an Exception Stage and should not be retried.

7. Process Documentation Fundamentals

Robust documentation is essential for maintaining RPA deployments and ensuring business alignment.

  • Process Definition Document (PDD):
    • Created by the Business Analyst (BA) alongside Subject Matter Experts (SMEs).
    • Details the As-Is manual process and defines the To-Be automated process.
    • Includes keystroke-level step-by-step instructions, business rules, and exception scenarios.
  • Solution Design Document (SDD):
    • Created by the RPA Developer or Solution Architect.
    • Translates the PDD into technical architecture.
    • Details how Blue Prism will execute the process (Work Queue design, VBO structure, credential management, retry logic).
  • Object Design Instruction (ODI):
    • A lower-level technical document detailing the exact design, spying modes, and actions required for specific Business Objects.

8. Process Design for Sequential Flows and Basic Actions

Designing a process in Blue Prism involves connecting various stages to create a logical sequence (flowchart).

Basic Stages in Process Studio

  • Data Items: Variables used to store data (Text, Number, Date, Flag/Boolean, Password).
  • Collections: Tabular data structures (like a database table or Excel sheet) containing rows and columns.
  • Calculation Stage: Used to perform mathematical operations, string manipulations, or assign data to a Data Item.
  • Multi-Calculation Stage: Allows multiple calculations to be performed in a single stage, saving space on the canvas.
  • Decision Stage: Evaluates a condition (e.g., [Account Balance] > 0) and routes the flow down a "Yes" or "No" path.
  • Loop Stage: Used to iterate through every row in a Collection. Must always contain a Loop Start and Loop End.
  • Page Stage: Calls another page within the same Process/Object to keep the main page clean and modular.
  • Action Stage: The bridge between Process and Object. Used in Process Studio to call a specific Action page from a published Business Object (e.g., calling the "Login" action from the "CRM_Application" VBO).

Designing Sequential Flows

  • Linear Execution: The bot follows links from the Start stage to the End stage.
  • Main Page Structure: The Main Page of a Process should be a high-level executive summary of the bot's tasks (e.g., Startup -> Populate Queue -> Process Items -> Close Down). Detailed logic is pushed to sub-pages.
  • Inputs and Outputs: When calling Actions or Pages, data is passed securely using Input Parameters and returned using Output Parameters.