What is RPA?
RPA is a Robotic Process Automation, which means automating the manual, repetitive, rule-based and predictable process into a workflow. The UiPath RPA Platform has been used to automate millions of tasks for business and government organizations all over the world — improving productivity, customer experience, and employee job satisfaction.
The benefits of using RPA UiPath
- Employees can focus on higher-level work, rather than the repetitive tasks
- The potential for human error is completely eliminated
- Productivity increases as cycle and transaction times fall
- Business analytics are more robust and easily accessible
Top 3 poplar RPA Platforms:
- Blue Prism
- UiPath
- Automation Anywhere
The Difference between Robotic Process Automation(RPA) and Artificial Intelligence (AI)
RPA is a software robot that mimics human actions, whereas AI is the simulation of human intelligence by machines.
Important Terminology helpful in UiPath
Activities:
- Write Line – Prints a string or the value of a string variable to the Output panel.
- Log Message – Writes the specified diagnostic message at the specified level. These messages are also sent to Orchestrator and displayed in the Logs page.
- Message Box – Displays a message box with a given text with the button options.
- Assign – Allocates any value to a variable or argument. It can be used to increment the value of a variable in a loop, sum up the value of two or more variables and assign the result to a different variable, assign values to an array and so on.
- Click – Clicks a specified UI element.
- Flow Decision – An activity which executes one of two branches, depending on whether a specified condition is met. The branches are entitled True and False by default.
- For Each – This activity enables you to step through arrays, lists, data tables or other types of collections, so that you can iterate through the data and process each piece of information individually.
- If – Enables your project to take one of two different courses of action, depending on whether a specified condition is met. This activity contains three sections: Condition, Then, and Else.
- Type Into – Sends keystrokes to a UI element. Special keys are supported and can be selected from the drop-down list.
- Sequence – Enables you to create linear processes comprised of many child activities, which are executed in sequential order.
- Flow Chart – A type of project that consists of various activities which can be connected to one another in multiple ways, enabling you to automate simple actions and create complex business processes.
Keyboard Short Cuts
Ctrl + k – Create a Variable
Ctrl + D – Comment out
File Paths
Absolute Path (Full Path) – “D:documentsTest.xaml”
Relative Path – “Test.xaml” (The file is created where main.xaml is located)
Methods to be aware of
Try to know for what these methods are used for and below listed some important methods
- Split
- Replace
- Substring
- Length
- Contains
- Trim
- Index
- ToUpper
- ToLower
- ToInt
- ToString
- StartsWith/EndsWith
- Format
To know more about methods click here
Variables
Variables are used to store multiple types of data. Another key aspect of variables is that their value can change so that you can, for example, control how many times the body of a loop is executed. The data stored within a variable is called a value, and it can be of multiple types.
The following are the types of variables that we use in UiPath Studio. You can use Keyboard shortcut to create a variable on the fly – Ctrl + K
- Scalar (Boolean, DateTime, Number, Characters),
- Collections(Array – Fixed Size, List – Flexible Size, Queue, Strings, Dictionaries),
- Tables
Note: Generic Value is variable type only specific to UIPath and it can be used as String, Boolean, Number, Date Times
Arguments
Arguments are used to pass data from a project to another. In a global sense, they resemble variables, as they store data dynamically and pass it on. Variables pass data between activities, while arguments pass data between automations. As a result, they enable you to reuse automations time and again.
UI Interactions
Two types of UI Interactions in the UiPath are Input & Output
Input UI Interactions
- Hardware Events
- Sending windows messages
- Simulate type/click
INPUT | Compatibility | Speed | Back Ground | Hotkeys | Auto Empty |
Default(H/w Events) | 100% | 50% | No | Yes | – |
Window Messages | 80% | 50% | Yes | Yes | – |
Simulate Type/Click | 95% | 100% | Yes | No | Yes |
Output UI Interactions
- Full text
- Native
- OCR
OUTPUT | Accuracy | Speed | Back Ground | Text Position | Hidden Text | Citrix |
Full Text | 100% | 100% | Yes | No | Yes | No |
Native | 100% | 80% | No | Yes | No | No |
OCR | 98% | 30% | No | Yes | No | Yes |
Selectors
Selectors are an XML string which contains some properties that uniquely defines the specified element. Displays the actual XML fragment that you have to use in a project
Wild Card Operators:
Used to replace the characters in the string
Asterisk(*) – Replace Zero or more characters
Question(?) – Replace exactly one character
Type of Selectors
Full Selector – Activity will include the top-level elements
Eg: Basic recording
Partial Selector – Top-level element included only in the main container activity and cannot be modified in child activities
Eg: Desktop Recording has the containers
Note: If any of Selector does not work as expected then you might see the error message “Cannot find the UI element corresponding to the selector” and correct the selector choosing appropriate options.
How to Pass the Variable in Selector
Pass the variables between Double Quotes “” and ++ (Sign)
Note: Pass the Variable without clicking 3 dots in the properties section of selector
Eg: “<html title=’ACME System 1 – Work Items’ /><webctrl aaname=‘” + in_TransactionNumber.ToString + “‘ tag=’LI’ />”
If something like UIExplorer wizard is not seeing then add a package UIPath.UIAutomation.Activities.
Attributes/Tags in Selector
Aaname - Activity Accessibility name of the UI element Cls - Class name of the window containing the UI element Role - Activity Accessibility role property of the UI element Id - Unique identifier of UI element Idx - Index - Pick the nth element from the Container List item <ul> - Unordered List <ol> - Ordered List <li> - List The <h1> to <h6> tags are used to define HTML headings. The <span> tag is used to group inline-elements in a document and provides no visual change by itself.
WaitForReady Property
Wait for the target to become ready, before performing the activity. There are three available options:
- None – does not wait for the target to be ready.
- For example, you can use this option if you want to retrieve just text from a web page or click a particular button, without having to wait for all UI elements to load. Note that this may have unwanted consequences if the button relies on elements which are not yet loaded, such as scripts.
- Interactive – waits until only a part of the app is loaded.
- Complete – waits for the entire app to be loaded.
- Interactive/Complete – Waits for all of the UI elements in the target app to exist before actually executing the action.
Debugging and Exception Handling
UiPath Studio comes with a debug component that helps find and locate problems easily in complex workflows.
Solving Input Issues – Make Sure Application is Visible, Change input methods, Check Selector to make sure it is correct.
- The window you are interacting make visible on the foreground of the desktop
- To work in the background – Activity Properties then Select Simulate Type/Click option.
- Still having issues – Check Selector taking help of UiExplorer
Timing and Sync Issues
If you are having an issue with while performing a process like a page loading takes the time or some times faster, then use the below activities to solve these kinds of issues
- Element Exists Activity – doesn’t affect running workflow shows true/false
- Find Element Activity – Stops workflow until condition met
- Element Vanish Activity – Waits until the UI Element Vanishes
- Activity Properties > Timeout(milliseconds) = Number
Catching Errors
Catches a specified exception type in a sequence or activity, and either displays an error notification or dismisses it and continues the execution.
The activity body contains three fields:
- Try – The activity performed which has a chance of throwing an error.
- Catches – The activity or set of activities to be performed when an error occurs.
- Exception – The exception type to look for. Please note that you can add multiple exceptions.
- Finally – The activity or set of activities to be performed after the Try Catch block. This section is executed only when no exceptions are thrown or when an error occurs and is caught in the Catch section.
Read: Important Tips About Chrome Developer Tool – Feel like a Hacker
UiPath Orchestrator
UiPath Orchestrator is the web-based application that enables the deployment, monitoring, Securing and management of UiPath Robots’ automation activity in executing repetitive business processes. It provides centralized Robot logs, remote execution, monitoring, scheduling, Storing Assets and work queues.
Building Productive Robot workflow requires
- Proper exception handlings
- Recover abilities
- Effective Logging
- Reporting functionalities
- High maintainability
- Extensibility
- Reusability
- Ease of development
UiPath REFramework
REFramework also referred to as “Robotic Enterprise Framework” it is a framework which is provided by UiPath to help developers build RPA processes quickly and efficiently. The framework is generally built on State Machines. It can be used as the starting point to all the UIPath Projects.
The above diagram itself explains a lot to understand read below
- It was built on top of Transactional Business Process template
- Using State Machine layout for the phases of the automation project
- Offering high-level exception handling and application recovery
- Keeps external settings in Config.xlsx file and Orchestrator assets
- Pulls credentials from Credential Manager and Orchestrator assets
- Gets transaction data from Orchestrator queue and updates back status
- Takes screenshots in case of application exceptions
- Provides extra utility workflows like sending a templated email
How REFramework Works
Initialize(Init) State
- InitiAllSettings – Load config data from the config file and from assets
- New Dictionary Created > for each sheet > Read Config > for each row > Increment > read Asset sheet > exception warning
- KillAllProcesses
- Eg: killing browser, Application, etc
- InitiAllApplications – Login to applications as per Config(“OpenApps”) field
- GetAppCredentials – From Orchestrator assets or local Credential Manager
- If failing, retry a few times as per Config(“ProcessRetries”)
Get Transaction Data State
- GetTransactionData – Fetches from Orchestrator queue as per Config(“TransactionQueue”)
- Check Stop Signal – Stop process requested – Transactionitem nothing then else GetTransacationData – Exception Not able get transaction
- New transaction (TransactionItem IsNot Nothing) –> Process State
- No Data (TransactionItem Is Nothing) –> End Process State
- Increment condition (in_TransactionNumber <= io_TransactionData.Rows.Count)
Process State
- Process – All application transaction process
- If application exceptions happen
- SaveErrorScreen – In Config(“ErrorsFolder”) with the exception message
- Going to re/INITIALIZE
- SetTransactionStatus – As Success, Failed or Rejected with reason
- SetTransactionStatus Success – Business Rule exceptions – System Error exception(Retry, Take ScreenShot, Kill Processes)
- Updates the Orchestrator queue item
End Process State
- CloseAllApplications – As listed in Config(“CloseApps”), it has all application Closing workflows included
- KillAllProcesses – Kills all processes and closes the browser
To Create a New Project
- Check out the Config.xlsx file and add/customize any required fields and values
- Implement OpenApp and CloseApp workflows, linking them in the Config.xlsx fields
- Implement GetTransactionData and SetTransactionStatus or use ./Framework versions for Orchestrator queues
- Implement ProcessTransaction workflow and any invoked others
Framework Process/workflows
- Main
- InitAllSettings
- InitAllApplications
- GetAppCredentials
- GetTranactionData
- SetTransactionStatus
- TakeScreenShot
- CloseAllApplications
- KillAllProcesses
- Process
Understanding Transaction Data
TransactionID and TransactionFields are additional details about TransactionItem used for logging purpose
- TransactionData – Any Collection Such as DataTable, Pages, etc
- TransactionItem – One part of TransactionData Ex: Row in DataTable
- TransactionNumber – Index(Rows Count)
- TransactionID
- TransactionFields
Key Points for getting Transaction Data
- Identify TransactionItem (An answer to For Each/Every ?)
- IT Resources – Web, Desktop, DataBase
- Transaction Passed? – If no application or business exceptions
- How TransactionNumber is used?
- To Iterate the DataRow
- Used as an index to get the TransactionItem (Default it was initialized with ‘1’)
- End the Loop?
- In DataTable, if TransactionNumber (Index) < RowCount
- In String such as page when page not appear
ReFramework has 10 Global Variables in Main.Xaml
- TransactionData – Any Collection of Such as DataTable, Pages, etc
- TransactionItem –
- TransactionNumber – (Index – default value is ‘1’)
- TransactionID – Login Field
- TransactionField1 – Login Field
- TransactionField2 – Login Field
- SystemError (Type – Exception)
- BusinessRuleException (Ex: Int got String)
- Config – (Type – Dictionary from excel file)
- RetryNumber (default value ‘0’)
If TransactionItem variable in the Main file is different than the default QueueItem type then make sure that the argument types in the files match the type of TransactionItem. Check below workflows for change in TransactionItem type.
- GetTransactionData.xaml
- Process.xaml
- SetTransactionStatus.xaml
Benefits of REFramework
- Low code signature: A handful of clearly written, commented reusable functions that anyone can understand and a clearly commented Main.xaml bringing structure to the process design architecture
- Separation of concerns: We keep framework implementation separate from business logic code, allowing developers and SMEs alike to focus on building processes
- Reusability: Works for any type of process, Independent of Data sources (QueueItems, local excel files, Database data, API retrieved data), Independent of process linearity
- Maintain, extend and upgrade: Easy to maintain, thanks to code lightness and SOC. Extend to achieve process behavior by editing 6 empty workflows that connect to the Main.xaml in a standard way. Upgrade or extend framework independently of business code, by editing only one file, the Main.xaml
- Exception recovery and retry: If all recovery options are exhausted, closing and restarting the application environment while remembering data is what humans do too. Top-level exception recovery is managed by the framework layer with Retry rules you can easily configure
- Audit: Keep track of the robot’s work, with as much detail and privacy as you choose with the new Workblock concept; Add business information of your choosing to the published log
Performance improvement of your workflow
- In Activity Properties Set Wait For Ready to None (where there is no need to be interactive with the elements)
- Selecting the option for some of the activities – Send Window Messages or Simulate Click (where the element no need to be visible and can work in background too which works faster than Default)
- Avoiding manually setting Wait Time for some of the activities by using Wait Visible properties.
- Using multiple robot processing if two independent workflows can execute parallel.
- Avoid using OCR output activities as much as you can, since they will slow down your process comparing to Full-text and native output methods.
RPA UiPath provides the free community edition.
Leave a Reply