Robotics Final PDF
Robotics Final PDF
[REGULATION-2021]
STUDY MATERIAL
REGISTER NUMBER…………………………………………………………………………....
YEAR / SEM………………………………………………………………………………………...
ACADEMIC YEAR………………………………………………………………………………
PREPARED BY
Mrs. B.Ramathilagam, ASP/ECE
Mrs.S. Subhashini, ASP/ECE
Mailam, Villupuram(Dt), Pin: 604 304
(Approved by AICTE - New Delhi, Affiliated to Anna University - Chennai
Accredited by NBA, NAAC with ‘A’ Grade & TCS)
Department of Electronics and Communication Engineering
1
CS361-ROBOTIC PROCESS AUTOMATION UNIT III - APP INTEGRATION, RECORDING AND SCRAPING
Web hooks
Unlike API-led integration, which relies on code-based data requests, web hook
integrations are HTTP callbacks that rely on events for application integration and
data transmission.
An “event” is any foundational data structure that records occurrences in the system or
environment. When a system event occurs, a webhook will automatically trigger data
exchange between network devices.
Web hooks facilitate automated, event-driven integration workflows that can transmit data in
real time .
Data integration is the practice of locating and retrieving information from various sources
and combining that information into a unified structure and view. Also referred to as batch
based data processing, data integration involves collecting time, storing it and then
eventually processing it in batches.
Data integration isn't a real-time process; it’s commonly used after processes have been
Completed. However, it can provide administrators with the data portability they need to
analyze application performance over time, eliminate redundancies and ensure data
consistency and quality.
These data connections enable IT teams to create event triggers that initiate integration
flows from one application to the next. And the near real-time interactions help enterprises
stay agile, responding to new data feeds and performance issues as they occur.
2
CS361-ROBOTIC PROCESS AUTOMATION UNIT III - APP INTEGRATION, RECORDING AND SCRAPING
Point-to-point integration
Enterprise application integration (EAI)
Enterprise service bus (ESB)
Message-oriented middleware (MOM)
Micro services integration
Integration platform as a service (iPaaS)
3
CS361-ROBOTIC PROCESS AUTOMATION UNIT III - APP INTEGRATION, RECORDING AND SCRAPING
Selectors are a combination of one or more attributes that are used in IBM Robotic Process
Automation to identify GUI controls.
A CSS selector is a string that is designed to locate one or more elements on a webpage,
specifying attributes and/or hierarchy (parent in the DOM) of the elements. CSS Selectors are
one of the locators that can be used to find elements while writing automation scripts
Full Selectors.
Partial Selectors.
Dynamic Selectors
A selector is a pure function that takes a state object from the Redux store and returns some
information extracted from that state object. Selectors are most commonly used in map State
To Props functions to provide data to your React components.
4
CS361-ROBOTIC PROCESS AUTOMATION UNIT III - APP INTEGRATION, RECORDING AND SCRAPING
6
CS361-ROBOTIC PROCESS AUTOMATION UNIT III - APP INTEGRATION, RECORDING AND SCRAPING
7
CS361-ROBOTIC PROCESS AUTOMATION UNIT III - APP INTEGRATION, RECORDING AND SCRAPING
PART -B
1. Explain Application Integration in Robotics and its types.
Introduction:
Application integration is the process of getting independently built software systems
to work together without manual intervention. Modern application design encourages
the flexible exchange of data between applications for increased efficiency,
modularity, and reusability.
Application integration in robotics refers to the process of combining multiple robotic
systems or subsystems to achieve a common goal. It involves integrating hardware
and software components to create a cohesive and functional robotic system.
Types of Integration:
● Horizontal Integration: Integrating multiple robots or systems at the same level to
achieve a common goal.
● Vertical Integration: Integrating different levels of robotic systems, such as sensors,
actuators, and control systems.
● Key Components
Information sharing: Create a single point of access across individual systems to save time
searching for information. Users from different department’s access updated data, helping to
improve collaboration between individuals from multiple departments.
1. Agility and efficiency: Business processes are streamlined, increasing overall efficiency.
Communication is easier, and work takes less time and effort with better functionality
and control. Companies can respond quickly to changes in the market, minimizing impact
to the business from unexpected disruptions.
2. Ease of use: Application integration provides a single, consistent access interface to
multiple applications, eliminating the need for users to learn different software
applications.
8
CS361-ROBOTIC PROCESS AUTOMATION UNIT III - APP INTEGRATION, RECORDING AND SCRAPING
3. Reduced IT investment and costs: By connecting processes across all channels and
applications, new and old software systems are easily integrated, reducing initial and
ongoing software investments.
5. Business process optimization: With access to near-real-time data from applications
available via a Single click, organizations can more easily leverage robotic process
automation and other process optimization technology to facilitate automated workflows.
Application Integration services:
Data Integration: Integrating data from various sources, such as databases, files, and
applications, to provide a Unified view and enable data-driven decision-making.
IoT (Internet of Things) Integration: Connecting and integrating IoT devices, sensors,
and systems with applications and analytics platforms.
Mobile Integration: Integrating mobile devices and applications with enterprise systems
and data.
Web Services Integration: Integrating web services, such as SOAP (Simple Object Access
Protocol) and REST (Representational State of Resource), to enable data exchange and
functionality sharing.
System Integration: Integrating multiple systems, such as legacy systems, with new
applications and technologies. These services help organizations achieve digital
transformation, improve efficiency, and enhance customer experiences by enabling
seamless integration and data exchange between applications and systems.
9
CS361-ROBOTIC PROCESS AUTOMATION UNIT III - APP INTEGRATION, RECORDING AND SCRAPING
2. Explain in detail about Record and Play in robotics process Automation in various
steps used in UiPath.
● Enterprise Edition: This edition is suitable for large companies starting their RPA
projects and looking to scale their Robot deployments in the future. It is integrated with
UiPath Orchestrator (we will discuss UiPath Orchestrator later). This version can be
updated by visiting the UiPath website and by downloading the newest version of the
UiPath platform installer. Running the installer automatically replaces all the old files
without modifying any of your settings.
● Community Edition: This is suitable for individual developers and small organizations
with fewer employees. The Community Edition is always up-to date, and it automatically
updates itself as soon as a new version is available.
● The Community Edition can be used to learn UiPath free of cost.
● UiPath Studio UiPath Studio is the development environment of UiPath. It is the primary
tool to develop UiPath Robots. It can be used to configure steps of a task or launch a full
recorder to record a sequence of∙ steps. The recording facility in the Studio is a game-
changing feature for RPA tools.
● Its simplicity lets even nontechnical business users design/record steps of a process. This
studio lets the user configure Robots, that is develop steps to perform tasks visually.
● Most of the configuration and coding in UiPath is visual. By using the drag-drop facility
from the toolbox, you may write a whole sequence of workflows to perform a set of tasks
by Robots.
● These steps look like a data flow diagram and are very easy to understand. It is one of
the simplest visual flow diagramming. The studio gives the same look and feel as a
workflow. The designer an activity or action includes clicking a button, writing and
reading a file, and so on.
DOWNLOADING AND INSTALLING UIPATH STUDIO
UiPath Community Edition is free to use in academia, nonprofits, and small businesses.
The UiPath Community Edition has the following features:
● Auto update
10
CS361-ROBOTIC PROCESS AUTOMATION UNIT III - APP INTEGRATION, RECORDING AND SCRAPING
● No server integration
● Community forum for support Online self-learning
● No complex installation required
● Online activation is mandatory
To get your Community Edition of UiPath Studio, type the following link in your
Browser: https://www.uipath.com/Community.
A Community Edition page opens. Click on Get Community Edition On the next page, you
must register yourself in order to download the Community Edition. So, use the correct
details and remember them because the same email will be used to activate the software.
1. Fill in the following details: First Name*, Last Name*, and Email*. Filling in the
Twitter User field is not mandatory, but it is good to provide it: Click on REQUEST
COMMUNITY EDITION.
2. You will be directed to a page that requests you to check your email for downloading the
link. Click on the link to download UiPath Studio. You may also directly download UiPath
Studio. Just click on the word here in download it.
3. Once the download is complete, open the downloaded file, UiPathtsudioSetup.Exe
4. The installation will then begin. Once the installation is complete, a welcome message will
be displayed. Click on the Start Free option.
5. Then, as requested, enter your Email Address once again and click on Activate. Please
remember to use the same email ID that you used to download the software. This email
ID will be bound to the computer. The activation will happen online. An offline activation
option is not available for the Community Edition.
6. A message will then be displayed on the screen informing you of the successful
installation. Close this window. For more convenient use, you can pin it to your taskbar
immediately; otherwise, you may have to unnecessarily search for UiPath.Exe in your
computer every time you wish to use it.
7. Your UiPath Studio is now ready for use! LEARNING Ui PATH STUDIO The UiPath Studio
platform helps to design Robotic processes with a visual interface.
Automation in UiPath Studio requires no or very little prior programming knowledge.
It is a Flowchart-based modeling tool. Thus, automation is faster and more convenient.
Robotic Process Automation 18CS745 Department of ISE, AIT Page 12 of 28 Projects The
main types of project supported by UiPath Studio are as follows
Sequence: This is suitable for simple actions or tasks. It enables you to go from one activity
to another, without interfering with your project. It consists of various activities. Creating
sequences is also useful for debugging purposes. One activity from a particular sequence can
easily be tracked. The Basic type of project can be started using the Blank option in the start
11
CS361-ROBOTIC PROCESS AUTOMATION UNIT III - APP INTEGRATION, RECORDING AND SCRAPING
tab and then adding the sequence in the diagram from the toolbox.
Flowchart: This is suitable for dealing with more complex projects. It enables you to
integrate decisions and connect activities. To start this kind of project, choose the Flowchart
Simple Process option from the new project menu.
Assistant: This is suitable for developing attended or Front Office.
Robots: sometimes these Robots are called assistants. To start this kind of project, choose
the Assistant Agent Process Improvement option from the new project menu.
State machine: This is suitable for very large projects that use a finite number of states in
their execution, triggered by a condition. To start this kind of project, choose the Process
Transaction Business Process option from the new project menu. However, if you click on the
New option in the DESIGN tab, you only get three options.
Sequence Flowchart State Machine: The preceding options selected from the DESIGN tab's
New menu become part of an existing project and are referred to as a diagram. Robotic
Process Automation 18CS745 Department of ISE, AIT Page 13 of 28.
THE USER INTERFACE: When you first open UiPath Studio, you are directed to the page.
You can either open an old project or create a new one. Let us say we are making a new
project. We click on Blank and name it. We will then be directed to a screen, which will
display
● The Ribbon
● Quick Access Toolbar
● Designer panel
● Properties panel
● Outline panel
● Arguments panel
● Variable panel
12
CS361-ROBOTIC PROCESS AUTOMATION UNIT III - APP INTEGRATION, RECORDING AND SCRAPING
● Import panel
● Activity panel
● Library panel
● Project panel
● Output panel
1. The Ribbon: This panel located at the top of the user interface and consists of four tabs:
Robotic Process Automation 18CS745 Department of ISE, AIT Page 14 of 28 1.
● START: This is used to start new projects or to open projects previously made.
● DESIGN: This is to create new sequences, Flowcharts, or state machines, or to manage
variables.
● EXECUTE: This is used to run projects or to stop them, and also to debug Projects.
● SETUP: This panel is for deployment and configuration options; it has three tools available.
● PUBLIC: This is used to publish a project or create a shortcut for it and schedule tasks -
Setup.
● EXTENATIONS: This is used to install extensions for Chrome, Firefox, Java, and Silver
light.
● RESET SETTINGs: This is used to reset all settings to defaults.
2. Quick Access Toolbar: This panel gives the user a shortcut to the most used commands.
One can also add new commands to this panel. This is located above the Ribbon on the
user interface. The Quick Access Toolbar has been circled in the following screenshot and
is indicated by the arrow can be moved above or below the Ribbon. By default, there are
two buttons available, Save and Run, which are also available in the DESIGN tab
3. Designer panel: This is the panel where one defines the steps and activities of the
projects. It is where a developer does most of the things to record activities or manually
drop activities on the canvas. In UiPath, this is equivalent to the code windows of
Microsoft Visual Studio.
When we develop a Robot, this is the window where we will be organizing various activities in
a flow or chain to accomplish a task. The project a user makes is clearly displayed on the
Designer panel and the user has the option of making any changes to it.
4.Properties panel: Robotic Process Automation 18CS745 Department of ISE, AIT Page 15
of 28 .The panel located on the right-hand side of the user interface is for viewing the
properties of the activities and for making any changes, if required. You need to select an
activity first and then go to the Properties panel to view or change any of its properties the
activities that can be used in building the project.
The activities can easily be used in making a project by simply dragging and dropping the
13
CS361-ROBOTIC PROCESS AUTOMATION UNIT III - APP INTEGRATION, RECORDING AND SCRAPING
5. Activities panel : Located on the left-hand side of the user interface, this panel contains
all
6. Project panel: With the Project panel, you can view the details of your current project
and open it in a Windows Explorer window. It is located on the extreme left-hand side of
the design panel, below the Library panel
7. Outline panel: As the name suggests, this panel gives a basic outline of the project. The
activities that make up the workflow are visible in this panel.
Using this, you may see a high-level outline of the project and you can drill down to see
deeper. This panel is especially helpful of large automation projects, where one may
otherwise have a tough time going through it.7
8. Output panel: This panel displays the output of the log message or writes line
activities. It also displays the output during the debugging process. This panel also
shows errors, warnings, information, and traces of the executed project.
It is very helpful during debugging. The desired level of detail can be changed in
Execute |Options | Log activities Robotic Process Automation 18CS745 Department of
ISE, AIT
9. Library panel: With this panel, you can reuse automation snippets. It is located on the
extreme left-hand side of the Designer panel.
10. Variable panel: This allows the user to create variables and make changes to them.
This is located below the Designer panel. In UiPath Studio, variables are used to store
multiple types of data ranging from words, numbers, arrays, dates, times, and timetables.
As the name suggests, the value of the variable can be changed.
Like variables, they can be of various types-String, Integer, Boolean, Array, Generic, and so
on. Since arguments are used to transfer data between different workflows, they also have
an added property of direction. There are four types of direction: In Out In/Out Property
These depend on whether we are giving or receiving data to or from another workflow.
TASK RECORDER
1. START: This is used to start new projects or to open projects previously made.
2. DESIGN: This is to create new sequences, Flowcharts, or state machines, or to
manage variables.
3. EXECUTE: This is used to run projects or to stop them, and also to debug Projects
4. SETUP: This panel is for deployment and configuration options; it has three tools
available.
5. Publish: This is used to publish a project or create a shortcut for it and schedule tasks
6.Setup Extensions: This is used to install extensions for Chrome, Firefox, Java, and Silver
14
CS361-ROBOTIC PROCESS AUTOMATION UNIT III - APP INTEGRATION, RECORDING AND SCRAPING
light.
8. The Quick Access Toolbar: This panel gives the user a shortcut to the most used
commands.One can also add new commands to this panel. This is located above the Ribbon
on the user interface. The Quick Access Toolbar has been circled in the following screenshot
and is indicated by the arrow can be moved above or below.
The Ribbon By default, there are two buttons available, Save and Run, which are
also available in the DESIGN tab of the Ribbon.
Designer panel: This is the panel where one defines the steps and activities of the
projects. on the canvas. In UiPath, this is equivalent to the code windows of Microsoft Visual
Studio. When wedevelop a Robot, this is the window where we will be organizing various
activities in a flow or chain to accomplish a task. The project a user makes is clearly
displayed on the Designer panel and the user has the option of making any changes to
it.
Project panel: With the Project panel, you can view the details of your current
project and open it in a Windows Explorer window. It is located on the extreme left-
hand side of the design panel,below the Library panel
Outline panel: As the name suggests, this panel gives a basic outline of the project.
The activities that make up the workflow are visible in this panel. Using this, you
may see a high-level outline of the project and you can drill down to see deeper. This
panel is especially helpful of large automation projects, where one may otherwise
have a tough time going through it.
Output panel: This panel displays the output of the log message or writes line
activities. It also displays the output during the debugging process. This panel also
shows errors, warnings, information, and traces of the executed project. It is very
helpful during debugging.
various types: String, Integer, Boolean, Array, Generic, and so on. Since
arguments are used to transfer data between different workflows, they also have an
15
CS361-ROBOTIC PROCESS AUTOMATION UNIT III - APP INTEGRATION, RECORDING AND SCRAPING
There are four types of direction: In out In/Out Property These depend on
whether we are giving or receiving data to or from another workflow
Simplicity: RPA does not need prior programming knowledge. Most platforms provide
designs in the form of flowcharts.
Scalability: RPA is highly scalable, up as well as down. Whether one requires an increase or
reduction in the virtual workforce, Robots can be quickly deployed at zero or minimum costs
while maintaining consistency in the quality of work
Time savings: Not only does the virtual workforce complete large volumes of work in a
shorter span of time with precision, but they help save time another way too.
Non-invasive: This helps in reducing risks and complexities that would arise in the case of
traditional deployments.
Better management: RPA allows for managing, deploying, and monitoring Robots through a
centralized platform. This also lessens the need for governance.
Better customer service: Since Robots can work around the clock, capacity increases. This
leaves humans to focus on customer service and satisfaction. Also, better quality of services
delivered to customers at faster speeds greatly boosts customer satisfaction.
Increased employee satisfaction: With repetitive, dreary tasks now being taken over by
the virtual workforce, employees are not just relieved of their workload, but can also engage
in better quality work that requires the use of human capabilities and strengths such as
emotional intelligence, reasoning, or tending to customers.
4. Explain in detail about scraping and its types of Screen Scraping in Robotics
Process Automation?
Screen Scraping is a method of extracting data from documents, websites, and PDFs. It is a
very powerful method for extracting text. We can extract text using the Screen Scraper
wizard.
Native:This is similar to the Full text method but has some differences. It has a slower
speed than the Full text method. It has a 100% accuracy rate, like the Full text method. It
does not work in the background. It has an advantage over the Full text method in that it is
16
CS361-ROBOTIC PROCESS AUTOMATION UNIT III - APP INTEGRATION, RECORDING AND SCRAPING
also capable of extracting the text's position. It cannot extract hidden text.
OCR: This method is used when the previous two methods fail to extract information. It
uses the two OCR engines: Microsoft OCR and Google OCR. It has also a scale property:
you can choose the scale level as per your need. Changing the scale property will give the
best results.
3. Drag and drop a Flowchart activity on the Designer panel. Click on the Screen Scraping
icon and locate the area from which you want to extract the information. Just choose an
area on the UiPath website.
A window will pop up stating that the AUTOMATIC method failed to scrape this UI
Element. By default, the Screen Scraper Wizard chooses the best scraping method to
extract data, but it failed to do so in our case
In fig 3.1 Scraping in robotics process automation refers to the automated extraction of
data from websites, documents, or other digital sources using robotic process automation
17
CS361-ROBOTIC PROCESS AUTOMATION UNIT III - APP INTEGRATION, RECORDING AND SCRAPING
(RPA) tools. RPA bots mimic human actions to navigate through websites, applications, or
documents, and extract relevant data, which can then be processed, analyzed, or stored.
1. Web Scraping: Extracting data from websites, web pages, or online documents.
2. Document Scraping: Extracting data from documents, such as PDFs, Excel files, or
Word documents
3. Screen Scraping: Extracting data from graphical user interfaces (GUIs), such as
desktop applications or web applications.
3. Automation of Manual Tasks: Automating tasks that involve manual data entry or
copy-pasting
3. Cost Savings: Reducing labor costs associated with manual data extraction.
2. Security and Compliance: Ensuring data scraping complies with regulations and
security policies.
18
CS361-ROBOTIC PROCESS AUTOMATION UNIT III - APP INTEGRATION, RECORDING AND SCRAPING
CAPTCHAs.
2. Choose the right tools: Select suitable RPA platforms, libraries, and scripting
languages.
3. Develop robust scripts: Handle errors, exceptions, and data quality issues.
4. Monitor and maintain: Regularly update scripts to adapt to changes in data sources.
5. Explain in detail about selector and its function in Robotics Process Automation?
Selector in Automation: Selectors are a combination of one or more attributes that are
used in IBM Robotic Process Automation to identify GUI controls.
A CSS selector is Scraping in Robotics Process. CSS Selectors are one of the locators that
can be used to find elements while writing automation scripts
Types of Selector in are there in Ui-path:
19
CS361-ROBOTIC PROCESS AUTOMATION UNIT III - APP INTEGRATION, RECORDING AND SCRAPING
selector function:
A selector is Scraping in Robotics Process Selectors are most commonly used in map
State ToProps functions to provide data to your React components.
Uses of selector:
CSS selectors are used Scraping in Robotics Process. Selectors are the part of CSS rule
set. CSS selectors select HTML elements according to its id, class, type, attribute etc.
There are several different types of selectors in CSS.
Example of a selector:The element selector selects HTML elements based on the element
name (or tag) for example p, h1, div,
Selector:
Sometimes, it is tedious to deal with selectors while working with them. This is because a
selector has attributes, title, and class properties. When we select a UI element using the
selector, it stores all these properties. Different instances of an application may have
different properties of a UI element.
The problem with selectors is when you select a UI element, it captures its properties.
These properties will differ when we select the UI element of a different instance of an
application with the selector.
Hence, the property will differ and the selector will fail to recognize the same UI element of
another instance of the application. We can easily fix this problem by using wildcard
characters or by attaching it to a live element.
Two wildcard characters are available with UiPath:
1. The question mark symbol, which replaces one character
2. The waste risk symbol that is which replaces a number of characters We have to simply
replace the variables (the name that changes continuously) with wildcard characters. We
can also use the Attach to live element option from the selector property window and
indicate the element again. It automatically detects the variable properties and fixes them
for us.
6. Explain in detail about workflow Files and its function in Automation Process.
In UiPath, a workflow file is a file with a "(XAML)" extension that contains the instructions
and logic for an automation process.
It is written in Extensible Application Markup Language (XAML) and serves as the blueprint
for defining and executing the sequence of actions that a software robot (UiPath Robot)
should perform. Here are key aspects of a work flow file in UiPath.
Sequencing the workflow UiPath provides four types of projects: UiPath provides
four types of projects:
20
CS361-ROBOTIC PROCESS AUTOMATION UNIT III - APP INTEGRATION, RECORDING AND SCRAPING
•Sequences
• Flowcharts
• User Events
• State Machines
These are used to design a project on the basis of type and convenience. These four types of
projects are useful in dealing with different kinds of processes. A Flowchart and Sequence are
mainly used for simple automation. User Events are beneficial for implementing front
office robots, while State Machines are used for dealing with complex business processes.
A Sequence is a group of logical steps. Each step represents an action or a piece of work. A
Sequence is used for processes that happen in linear succession, that is, one after the other.
Among the three types of projects in UiPath, Sequences are the smallest. An illustration of
how to build a Sequence in UiPath Studio is presented in the following section.
In the following example, we will make a simple project that asks for the name of the user
and then displays his or her response:
1. Open UiPath Studio and click on Blank to start a fresh project. Give it a meaningful
name. On the Designer panel, drag and drop a Flowchart activity from the Activities
panel.
2. Search for 4FRVFODF in the Activities panel and then drag and drop it into the
Flowchart, as shown in the following screenshot.
File Extension: Workflow files in UiPath have a ".xaml" extension. The file name often
reflects the purpose of the work flow or a specific activity within the automation
project.
● Graphical Representation: The content of a UiPath workflow file is represented
graphically within UiPath Studio. The file contains a visual representation of the
automation process, including a canvas where activities are arranged and connected.
● Activities: Activities are the fundamental building blocks of a UiPath workflow. Each
activity represents a specific action or task that the robot should
perform,suchasclickingabutton,typingintoatextbox,orreadingdatafrom a file.
● Variables and Arguments: Workflow files can include the definition and usage of
variables and arguments.
● Variables store data that can be manipulated during the execution of the workflow,
while arguments allow data to be passed between different workflows or invoked
processes.
● Sequences and Flowcharts: UiPath workflows can be organized into sequences and
21
CS361-ROBOTIC PROCESS AUTOMATION UNIT III - APP INTEGRATION, RECORDING AND SCRAPING
flowcharts allow for more complex branching and decision-making based on conditions.
● Imports and Dependencies: Workflow files may include imports and dependencies
party components.
● Annotations and Comments: Developers can add annotations and comments within
the workflow to provide additional information about specific activities or sections. This
● Arguments Panel: UiPath Studio provides an "Arguments" panel where users can
define input and output arguments for the workflow. Arguments enable communication
● Activities Panel: The "Activities" panel in UiPath Studio contains a wide range of pre-
built activities that users can drag and drop onto the canvas to build their automation
organized in a project structure. The main workflow, often named "Main.xaml," serves
● State Machines (Optional): UiPath allows the use of state machines for more
l. State machines are used when the automation needs to transition between different
2. UiPath allows the use of state machines for more advanced workflow control.
22
CS361-ROBOTIC PROCESS AUTOMATION UNIT III - APP INTEGRATION, RECORDING AND SCRAPING
4. Search panel of the Activities panel. Drag and drop the Input dialog activity inside the
Sequence (the Input dialog activity is a dialog box that appears with a message or a
question, in response to which the user is required to put in his or her reply)
6. Next, create a variable and give it the desired name. This variable will receive the text that
the user has entered in the Input dialog box in response to our question, that is, the
user's
23
CS361-ROBOTIC PROCESS AUTOMATION UNIT III - APP INTEGRATION, RECORDING AND SCRAPING
8. Specify the variable name that we have created in the Text area of the Message box (the
Text area of the Message box is used to input text that will be displayed in the Message box).
We need to connect the Sequence to the Start icon.
24
CS361-ROBOTIC PROCESS AUTOMATION UNIT III - APP INTEGRATION, RECORDING AND SCRAPING
This can be done by right-clicking on the Sequence activity and choosing the Set as
Start node option:
Hit the Run button and see the result. Activities in UiPath Studio, an activity represents the
unit of an action. Each activity performs some action. When these activities combine together,
it becomes a process. Every activity resides on the Activities panel of the main Designer
panel. You can search for a particular activity and use it in your project. For example, when
we search for browser, all the browser activities will appear in the Activities panel, as shown in
the following screenshot
6. Write an example of work flow activities used Brea Activity in Designer panel
Using activities with workflows We have seen how we can easily search for a
particular activity. Now, let us see how to use them in a workflow:
1. Search for 'MPXDIBSU in the same way that we have searched for the browser activities in
the Activities panel search bar. Drag and drop the Flowchart activity inside the Designer panel.
2. The Flowchart appears in the Designer panel and we have a given Start node. The Start
node specifies where the execution begins.
3. We are ready to use different activities in our Flowchart. You can use any activity/activities
inside the Flowchart. For the sake of simplicity, let us just use a Write line activity.
4. Drag and drop the Write line activity inside the Flowchart. Set its text property by providing
a string value. Connect this Write line activity with the Start node by right-clicking on the
Write line activity and selecting Set as Start Node. You may be wondering what the role of a
workflow is
Suppose you have a big project that consists of hundreds of activities.
How will you debug it?
It is a developer's nightmare to deal with such a situation. Here, the workflow comes into
play. To build such a big project, a developer will simply divide it into smaller modules and
extract it as a workflow. Now, each workflow can be tested separately. Thus, it is very easy to
find bugs and errors. Creating different workflows and combining them into a logical Sequence
will enhance our code quality, maintainability, reliability, and readability
25
CS361-ROBOTIC PROCESS AUTOMATION UNIT III - APP INTEGRATION, RECORDING AND SCRAPING
We have just used activities and extracted them in a workflow. If you check the
main Designer panel, it looks like the following
26
CS361-ROBOTIC PROCESS AUTOMATION UNIT III - APP INTEGRATION, RECORDING AND SCRAPING
It automatically generates the Invoke test Workflow activity. Now, when we run the program,
it will invoke the workflow that we have extracted (double-click on the Invoke test workflow
activity to see which workflow it is going to invoke and where it is generated.
27
CS361-ROBOTIC PROCESS AUTOMATION UNIT III - APP INTEGRATION, RECORDING AND SCRAPING
28
UNI UNIT III - APP INTEGRATION, RECORDING AND SCRAPING
CCS361-ROBOTICPROCESSAUTOMATION
7. Decriobe recoding mouse and its tools used in robotics process automation?
a. Automation Anywhere.
b. UiPath
c. Blue Prism
d. Work Fusion
e. Kofax RPA.
● Mouse Scripting: Write code to simulate mouse actions (e.g., Python, VBScript).
● Scroll
● Mouse Wheel
● Benefits
● Increased Efficiency
● Improved Accuracy
● Enhanced Reliability
● Use Case
● Data Entry
● Web Scraping
● GUI Automation
28
UNI UNIT III - APP INTEGRATION, RECORDING AND SCRAPING
CCS361-ROBOTICPROCESSAUTOMATION
● Document Processing
● Best Practices
Basic recording Desktop recording Web recording Citrix recording Basic recording This is used
to record the actions of applications that have a single window. Basic Recording uses a full
Selector. It works better for applications performing a single action. It is not suitable for
applications with multiple windows There are two types of selectors, partial selectors and full
selectors. A Full selector has all the attribute to recognize a control or application. The Basic
recording uses full selectors.
Please note that, in the preceding image that there are different activities but those
activities are not wrapped inside containers, it is generated by Basic recorder. Basic
recording generates different activities and places them directly in the sequence with full
selector. You have already seen how to automate tasks using the Basic recorder; now,
let us cover other recorders.
Web recording Web Recording can be done by using the Web recorder. For recording
web actions, the UiPath extension for that browser should be installed. Otherwise, you
will not able to automate tasks or actions using Web recording. You just have to click on
the Setup icon and then click on Setup Extensions.
Now, choose your browser and click on it. The UiPath extension will be added to your
specified browser. Web Recording is similar to Desktop Recording.
29
UNI UNIT III - APP INTEGRATION, RECORDING AND SCRAPING
CCS361-ROBOTICPROCESSAUTOMATION
You just have to record the actions and save it Create a Blank project. Drag and drop a
Flowchart activity. Now, click on the Recording icon and choose Web recording. You can
record your actions on the web on your own and then save it.
In our case, we have opened a web page using Google Chrome and logged in to . Then,
we started the recording by clicking on the Record button of the web recorder. Next, we
typed some text in the search bar of Google and performed the Click activity. Then, we
pressed the Esc key to exit the recording and clicked on the Save and Exit button. Now, a
recording sequence is generated in our Designer panel. Connect this sequence to the
Start node. Hit the Run button to see the result. In the following screenshot, you can
see the sequence generated by the Web recorder
We have seen Web recording and it is very easy. There is also another option to extract
information from websites. We can easily extract information from websites using data
scraping. Suppose we want to extract data from Amazon's website. Say we want to search for
books on Amazon and extract the search results. Extracting data from websites becomes very
easy with data scraping.
2. Log on to Amazon's website and search for books. A detailed list of books is listed on your
screen.
30
UNI UNIT III - APP INTEGRATION, RECORDING AND SCRAPING
CCS361-ROBOTICPROCESSAUTOMATION
Fig 3.3 Drag and drop a Flowchart activity on the Designer panel.
3. Now, click on the Data Scraping icon. A window will pop up.
5. You have to indicate the first book's entities. Entities can be name, price, author, and so on.
It is your choice.
6. Lets's, indicate the book's name. After that, it will ask for the next book's entities. Indicate
the second book entity as well. Click on Next
7. This means you have to indicate the second book's entities: however, the entities will be the
same. If you choose name as the first book's entity then you have to be specific and
choose name as the second book's entity. You should not choose name as the first book's
entity and then choose price as the second book's entity.
8. Again, a window will pop up asking you to configure the columns. You can also extract the
URL. If you want to do this, check the Extract URL checkbox.
9. You can specify the column name as well. Click on the Next button.
10. As you can see, all the book names are extracted to a window. If you want to extract more
columns or more entities, then click on Extract Correlated Data and you have to again
indicate another entity of the book to extract more columns, as we have done previously.
After that, all the data will be extracted and will be added to this table. Here, we have one
column but if you extract more entities, then more columns will be added to this table
31
UNI UNIT III - APP INTEGRATION, RECORDING AND SCRAPING
CCS361-ROBOTICPROCESSAUTOMATION
8.Explain in detail about scraping data from website and writing to csv (comma-
separated values)?
Web scraping in Robotics Process Automation (RPA) involves extracting data from
websites and saving it to a file, such as a CSV. Here's a general overview:
Tools:
1. Automation Anywhere
2. UiPath
3. Blue Prism
4. Work Fusion
5. Kofax RPA
1. HTML Parsing
2. XPath
3. CSS Selectors
4. Regular Expressions
1. Navigate to website
2. Click elements
3. Extract text/data
5. Write to CSV
32
UNI UNIT III - APP INTEGRATION, RECORDING AND SCRAPING
CCS361-ROBOTICPROCESSAUTOMATION
1. Append
2. Overwrite
Best Practices:
Web scraping in robotics involves automating data extraction from websites using software
robots. These robots navigate websites, identify and extract relevant data, and store it in a
structured format like CSV (Comma Separated Values).
Robotics Process Automation (RPA) tools, such as Automation Anywhere, UiPath, and Blue
Prism, enable users to create scripts that mimic human interactions on websites.
The scraped data is then written to a CSV file, allowing for easy analysis, processing, and
integration with other systems.
This automation saves time, reduces manual effort, and increases data accuracy, making web
scraping a crucial component of business process automation, data analytics, and artificial
intelligence initiatives."
33
UNI UNIT III - APP INTEGRATION, RECORDING AND SCRAPING
CCS361-ROBOTICPROCESSAUTOMATION
RPA ?
Process mining
Process Mining is a Process Management technique that allows companies to optimize individual
processes sustainably through fully automated preparation. Unlike conventional Process
Management methods, Process Mining also analyzes previously unexplored regions of your
process landscape.
Process mining applies data science to discover, validate and improve workflows. By combining
data mining and process analytics, organizations can mine log data from their information
systems to understand the performance of their processes, revealing bottlenecks and other
areas for improvement.
Example of process mining techniques in action for an insurance company:
Mapping the claims management process, from a customer getting in touch through to pay
out. Showing how many sub-processes in the wider claims process are still managed manually,
and how many can be automated.
This began as a typical IT advisory project but the students realized there was an opportunity
to create software. They would leverage something called process mining. This involves using
sophisticated Big Data techniques and algorithms to map, monitor, and improve processes – in
real-time – by analyzing event logs.
34
UNI UNIT III - APP INTEGRATION, RECORDING AND SCRAPING
CCS361-ROBOTICPROCESSAUTOMATION
In other words, you get a fact-based approach to understanding the processes, such as for
areas like P2P (purchase to pay) and O2C (order to cash). But implementing this was not easy.
So the students looked at open source projects to help speed up the development process.
There was also a focus on a narrow set of functions and use cases. And yes, all this worked out
extremely well. Rinke, Nominacher, and Klenk would quickly start their own software company,
Celonis.
By November 2019, Celonis would raise $290 million at a $2.5 billion valuation. 1 The lead
investor was Arena Holdings, which was joined by a group that included Ryan Smith, the
cofounder and CEO of Qualtrics, and Tooey Courtemanche, the founder and CEO of Procore.
Different types of mining processes:
There are four main mining methods: underground, open surface (pit), placer, and in-situ
mining. Underground mines are more expensive and are often used to reach deeper deposits.
“Celonis is the clear market leader in a category with open-ended potential. It has
demonstrated an enviable record of growth and value creation for its customers and partners.
Celonis helps companies capitalize on two inexorable. trends that cut across geography and
industry.
The use of data to enable faster, better decision-making and the desire for all businesses to
operate at their full potential.” Keep in mind that one of the key drivers for process mining is
RPA. Actually, as we’ve seen with UiPath, some of the RPA vendors are adding their own
modules f or this. So in this chapter, we’ll take a deeper look at process mining.
The academic papers are chock-full of equations and algorithms. So then, let’s take a high-
level view of process mining. At the heart of this is an event log, which is the information
generated when an application or network takes an action.
Process mining will crunch these event logs which could number in the millions – to do the
following: Discovery: This looks at the process on an “as is” basis, which is done by using the
alpha algorithm or even techniques applied within social networks.
Regardless of the approach, you can get a sense of the current mapping of the workflows –
and this will be used to create visualizations, which can be truly transformational when
understanding and optimizing processes. This can certainly be an eye-opener, as you will
quickly get a sense of the bottlenecks and points of friction in the organization.
35
UNI UNIT III - APP INTEGRATION, RECORDING AND SCRAPING
CCS361-ROBOTICPROCESSAUTOMATION
Internal Audit: By analyzing event logs, it will be easier to identify issues like duplicate
payments and missing approvals.
IoT: This technology throws off huge amounts of event logs. So yes, process mining is likely to
be critical in enhancing the analytics. In terms of best practices with process mining software,
this is similar to what we’ve covered with RPA. Just some of the initial factors to consider
include the following
Business Case:
Start with a narrow use case, such as a function within a department. By doing this, you will
learn about process mining but also get a sense of the capabilities of the technology. Along the
way, there should be documentation of the procedures and learnings.
CoE: This group should also be a part of the process mining initiative. Note IDC research found
that a majority of companies are not aware of the lost potential due to process weaknesses.
Anywhere from 20% to 30% of revenues can be lost because of this. 3 Now for the rest of the
chapter, we’ll take a look at some of the main players in the process mining market.
“We view process mining as one part of an overall approach,” said Decker. “I believe there is
too much hype about its abilities. There needs to be a much more comprehensive approach for
there to be transformation.” Like Celonis, Signavio is growing at a rapid pace (at about 70% on
an annual basis
36
UNI UNIT III - APP INTEGRATION, RECORDING AND SCRAPING
CCS361-ROBOTICPROCESSAUTOMATION
The goal is to enable a seamless generation of tailored insights and recommendations that
drive business value. In a similar vein, several parties want AI to help users identify big
improvement levers and support better process execution
Even though process mining has led to true innovation in both academia and the business
world, it is still in the nascent stages. “It was, and still is, a challenging research topic with
many interesting aspects,” said van der Aalst. “In the first couple of years, it also became clear
to me that the field of process mining is very broad. Next to process discovery, we soon
started to work on conformance checking, decision mining, predictions, etc.
All of these subfields generate interesting problem statements.” Then what are some of the
areas that need to be improved or explored? Where are the opportunities for the future? Well,
here are some thoughts from van der Aalst: Process discovery and conformance checking:
“These two foundational process mining problems have not yet been solved satisfactorily and
there is still a lot of room for improvement.
The commercial tools are still using simple Direct Follows Graphs (DFGs) and provide limited
support for conformance checking. It is clear for all involved that this is not optimal.
Conformance checking is not used as much as expected due to the poor support offered by
commercial systems. DFGs have several problems (e.g., underfitting the data and creating
non-existing loops whenever activities do not occur at a fixed position in the process).
Data extraction also remains an important topic consuming a lot of effort in real-life process
mining projects.” Modeling: “The gap between discovered and hand-made models needs to be
bridged. Both need to be integrated and supported in a seamless manner.” Events: “Traditional
process mining techniques assume that each event refers to one case and that each case
refers to one process. In reality, this is more complex.
There may be different intertwined processes as one event may be related to different cases
(convergence) and, for a given case, there may be multiple instances of the same activity
within a case (divergence).” Perhaps one of the biggest hurdles is the talent gap. “Despite the
practical relevance of process mining, there are few real process mining experts,” said van der
Aalst. “Therefore, process-mining training is important to progress the process mining
discipline
37
UNI UNIT III - APP INTEGRATION, RECORDING AND SCRAPING
CCS361-ROBOTICPROCESSAUTOMATION
In this section, we will explore recording a bit more. As we discussed earlier, there are four
types of recording in UiPath Studio:
Basic recording
Desktop recording
Web recording
Citrix recording
Basic recording :
This is used to record the actions of applications that have a single window. Basic Recording
uses a full Selector. It works better for applications performing a single action. It is not suitable
for applications with multiple windows.
There are two types of selectors, partial selectors and full selectors. A Full selector has all the
attribute to recognize a control or application. The Basic recording uses full selectors.
Please note that, in the preceding image that there are different activities but those activities
are not wrapped inside containers, it is generated by Basic recorder. Basic recording generates
different activities and places them directly in the sequence with full selector. You have already
seen how to automate tasks using the Basic recorder; now, let us cover other recorders.
Desktop recording:
This is similar to Basic recording with the added advantage of working with multiple actions.
38
UNI UNIT III - APP INTEGRATION, RECORDING AND SCRAPING
CCS361-ROBOTICPROCESSAUTOMATION
It is most suitable for automating Desktop applications. Desktop recorder generates Partial
selectors. The Partial selectors, have a hierarchical structure. They are split into parent child
views for recognizing the UI element properly.Please note in the preceding image there is a
Attach Window activities and other activities are nested under it.
Web recording :
Web Recording can be done by using the Web recorder. For recording web actions, the
UiPath extension for that browser should be installed. Otherwise, you will not able to
automate tasks or actions using Web recording. You just have to click on the Setup icon
and then click on Setup Extensions. Now, choose your browser and click on it.
The UiPath extension will be added to your specified browser. Web Recording is similar
to Desktop Recording. You just have to record the actions and save it.
Create a Blank project. Drag and drop a Flowchart activity. Now, click on the Recording
icon and choose Web recording. You can record your actions on the web on your own
and then save it. In our case, we have opened a web page using Google Chrome and
logged in to IUUQXXXHPPHMFDPN.
Then, we started the recording by clicking on the Record button of the web recorder.
Next, we typed some text in the search bar of Google and performed the Click activity.
Then, we pressed the Esc key to exit the recording and clicked on the Save and Exit
button.
Now, a recording sequence is generated in our Designer panel. Connect this sequence to
the Start node. Hit the Run button to see the result. In the following screenshot, you can
see the sequence generated by the Web recorder.
39
UNI UNIT III - APP INTEGRATION, RECORDING AND SCRAPING
CCS361-ROBOTICPROCESSAUTOMATION
We have seen Web recording and it is very easy. There is also another option to extract
information from websites. We can easily extract information from websites using data
scraping. Suppose we want to extract data from Amazon's website. Say we want to search for
books on Amazon and extract the search results. Extracting data from websites becomes very
easy with data scraping.
2. Log on to Amazon's website and search for books. A detailed list of books is listed on your
screen.
40
UNI UNIT III - APP INTEGRATION, RECORDING AND SCRAPING
CCS361-ROBOTICPROCESSAUTOMATION
3. Drag and drop a Flowchart activity on the Designer panel. Now, click on the Data Scraping
icon. A window will pop up.
5. You have to indicate the first book's entities. Entities can be name, price, author, and so on.
It is your choice.
6. Lets's, indicate the book's name. After that, it will ask for the next book's entities. Indicate
the second book entity as well. Click on Next.
7. This means you have to indicate the second book's entities: however, the entities will be the
same. If you choose name as the first book's entity then you have to be specific and choose
name as the second book's entity. You should not choose name as the first book's entity and
then choose price as the second book's entity.
8. Again, a window will pop up asking you to configure the columns. You can also extract the
URL. If you want to do this, check the Extract URL checkbox.
9. You can specify the column name as well. Click on the Next button.
10. As you can see, all the book names are extracted to a window. If you want to extract more
columns or more entities, then click on Extract Correlated Data and you have to again indicate
another entity of the book to extract more columns, as we have done previously. After that, all
the data will be extracted and will be added to this table. Here, we have one column but if you
extract more entities, then more columns will be added to this table.
9. Click on the Finish button. If the results of your query span multiple pages, it will ask you to
indicate the page navigation link on the website (Next button of the website that we used to
navigate to another/next page). If the results of your query span multiple pages, click on the
Yes button and indicate the link, otherwise click on the No button.
10. We have clicked on the No button. A data scraping sequence is generated in our Flowchart.
It will also generate a data table.
Citrix Recorder:
When dealing with the Remote Desktop connection, methods such as Basic Recording and
Desktop Recording cannot be used. In an RDP environment, images will be sent from one
desktop to another, and will be mapped by analyzing the position of the pointer of the mouse
button. Hence, basic and desktop recording cannot be used, as these recording techniques fail
to interact with the images. In a Citrix environment, we have the Click Text and Click Image
activities, using which we can work with images with ease.
You can clearly see the activities that are listed in a Citrix Recording:
1. Click Image
2. Click Text
3. Type
41
UNI UNIT III - APP INTEGRATION, RECORDING AND SCRAPING
CCS361-ROBOTICPROCESSAUTOMATION
42
CCS361-ROBOTICPROCESSAUTOMATION UNIT -4 EXCEPTION HANDLING AND CODE MANAGEMENT
PART –A
1. Define Exception handling.
Exception handling is the process of managing unexpected events or errors that may occur
during the execution of RPA bot. System changes, data inconsistencies, networking issues, or
other unforeseen circumstances could cause these events.
1
CCS361-ROBOTICPROCESSAUTOMATION UNIT -4 EXCEPTION HANDLING AND CODE MANAGEMENT
Reusability in RPA denotes leveraging the same script or code module across multiple tasks or
processes. Rather than reinventing solutions for each automation task, developers create
modular, reusable scripts that seamlessly integrate into diverse workflows.
A State Machine uses a finite number of sets in its execution. It can go into a state when it is
triggered by an activity; it exits that state when another activity is triggered. Another
important aspect of State Machines is transactions. They enable you to add conditions based
on which transactions jump from one state to another. These are represented by arrows or
branches between states.
While working in UiPath, it is better to divide the whole process into smaller parts and then
nest these workflows into a larger one or the Main workflow. This can be done using the Invoke
workflow file activity given in the Activities panel. There are several steps involved in nesting a
workflow or many workflows into a single workflow.
3
CCS361-ROBOTICPROCESSAUTOMATION UNIT -4 EXCEPTION HANDLING AND CODE MANAGEMENT
Setting breakpoints
Slow step
Highlighting
Break
4
CCS361-ROBOTICPROCESSAUTOMATION UNIT -4 EXCEPTION HANDLING AND CODE MANAGEMENT
PART-B
Exception handling is a way to handle exceptions for a process that the program or the
procedure has failed to execute. For handling exceptions in a program, the best practice
considered is to use the Try catch activity The Try catch activity can be found in the Activities
panel. By dragging and dropping the Try catch activity into the workspace, we can handle
exceptions. For handling errors in the Try catch block, we can divide the whole process into
four parts just to make it simpler: Drag and drop the Try catch activity Try block Catch block
Finally block Let's build a Try catch block to handle exceptions, in following steps
1. Try: When we double-click on the Try catch activity, dragged and dropped inside
the workspace, space for the Try activity appears, as shown in the following figure
4.1.
2. Screenshot:
3. Catches: Inside the Catches activity, first we have to click on Add new Catch and then click
on Add
Exception option, from which we have to select the type of exception. In most cases, System.
Exception is preferred. The following figure 4.2 shows the types of exception. There are many
more exceptions which can be viewed by clicking on the Browse for Types option
5
CCS361-ROBOTICPROCESSAUTOMATION UNIT -4 EXCEPTION HANDLING AND CODE MANAGEMENT
Say the execution fails: for example, the Click activity is unable to be executed because of the
unavailability of a UI element. In such a case, we can use the Catches block in order to either
view the error that has occurred or for an alternative method to be used if that particular error
occurs. As shown in the following screenshot, we will drop the activity in the Catches block. To
print a message, we use a Message box:
When we click on Add new catch, we are asked to select the type of exception. We have
selected System.Exception. Now inside the exception block, we have dropped a Message box
activity. Entering FYDFQUJPO5P4USJOH will display the error that occurred during execution.
Exception Handling, Debugging, and Logging 4. Finally: When we have defined the exception
for our sequence, the finally block will always work, regardless of whether the execution was
successful or not. Suppose we want to display a message to the user notifying that the process
is complete. To make sure that the whole Try catch activity is executed, we will just drop a
Message box activity in the area provided in the finally block, as shown in the following figure
4.3.
6
CCS361-ROBOTICPROCESSAUTOMATION UNIT -4 EXCEPTION HANDLING AND CODE MANAGEMENT
Implementing exception handling enables the robot to work in every possible situation and
tackle any exception that may arise. There are some common exceptions that we usually face
while working on UiPath. Exception Handling, Debugging, and Logging Unavailability.
UI element When working on UiPath, especially on the web, we may encounter this type of
error. This is because the UI element was not found due to the dynamic behavior of the web
page. To handle this exception, we have to make changes in the selector attributes or we have
to add new attributes to the selector so that the UI element can be easily found. For example,
if we have a variable which is dynamically changing, we can use a wildcard so that it can be
easily found by the robot.
As shown in the following figure 4.4, we can edit the dynamic attribute of the selector using
wildcard characters (in our case, *). Another way is to attach it to the live element
Handling runtime exceptions: We may encounter runtime errors while working in UiPath. To
rectify these errors, one of the best practices is to use the Try catch activity, which can be
used to handle exceptions at runtime. By keeping an alternative inside the catch block, we can
also overcome the error which we encountered before. So placing your sequence or workflow
inside the Try catch activity will help you handle runtime exceptions
Orbit reference not set to the instant of an object: This type of error usually occurs when
the default value required for some variable is not provided. In that case, we are required to
give a default value to the required variable, as shown in the following screenshot. In the
empty area indicated in the following screenshot, just type the default value of the variable in
order to overcome.
7
CCS361-ROBOTICPROCESSAUTOMATION UNIT -4 EXCEPTION HANDLING AND CODE MANAGEMENT
There are various techniques provided by UiPath Studio for debugging in order to check
whether the workflow is running successfully or to find out errors in order to rectify them. At
the top of the UiPath window, we can see various available methods of debugging inside the
EXECUTE block, as shown in the following figure 4.5
Setting breakpoints
Slow step
Highlighting
Break
Setting breakpoints
While debugging a workflow, we can set breakpoints in between if we want to run the program
up to a specific location. This is useful when we have to stop before an activity ends
completely. In such a case, we should use a breakpoint on the previous activity, as shown in
the following figure 4.6.
8
CCS361-ROBOTICPROCESSAUTOMATION UNIT -4 EXCEPTION HANDLING AND CODE MANAGEMENT
Slow step
This is an activity in the EXECUTE block through which we can reduce the execution speed of a
particular process or activity. This way, we can identify each and every process and keep an
eye on where to find the error. In the Output panel, all activities or steps can be viewed. The
following figure 4.7 shows how to use the slow step activity
9
CCS361-ROBOTICPROCESSAUTOMATION UNIT -4 EXCEPTION HANDLING AND CODE MANAGEMENT
Highlighting
Highlighting is used to highlight the steps we have taken during automation and to identify
each and every step in the workflow. It is very useful while debugging and its panel can be
found in the Options menu of the Execute section in the Ribbon shown in figure 4.8.
Break
The Break activity is used to break a process at a certain point. Suppose we have a sequence
performing seven activities together and we want to break the execution at a certain activity.
For this, we can use the Break activity show in figure 4.9.
10
CCS361-ROBOTICPROCESSAUTOMATION UNIT -4 EXCEPTION HANDLING AND CODE MANAGEMENT
While debugging, an option for Break is available (indicated by the arrow in the preceding in
4.10). We can break at any point we want to. If we want to continue any further, we just have
to click on Continue,
Collecting crash dumps basically refers to collecting information when your UiPath Studio
crashes. We can enable and disable crash dumps. These dumps provide us with
information regarding the UiPath crash. Memory dumps are of two types full dumps and
minimums. Full dumps provide us with complete information about the encountered crash
While minimums provide us with just the main information regarding the crash. When a crash
is encountered, we first have to identify the process which has crashed. Usually, a dialog
will appear on the screen indicating the nature of the crash and the application involved. A
UiPath process could crash, such as 6J4UVEJPFYF, 6JFYQMPSFSFYF, or 6JMBVODIFSFYF or
the target application you want to automate may crash
1. To enable crash dumps, we first have to download the &OBCMF'VMM%VNQFSH file for full
dumps from IUUQTDEOIVCTQPUOFUIVCGT2VJDL"OTXFST &OBCMF'VMM%VNQSFHU or the
&OBCMF.JOJ%VNQFSH file from
IUUQTDEOIVCTQPUOFUIVCGT2VJDL"OTXFST&OBCMF.JO%VNQSFH U.
2. Double-click the file and click yes. Administrator rights are needed to access the registry
settings.
3. The dumps folder is 5&.1 whose complete path is like $==VTFST VTFSOBNF="QQ%BUB=-
PDBM=5&.1 4. When the application crashes, you will find the ENQ file in the 5&.1 folder.
For example, if Unexplored crashes then a file such as 6J&YQMPSFSFYFENQ will be found
in the 5&.1 folder
11
CCS361-ROBOTICPROCESSAUTOMATION UNIT -4 EXCEPTION HANDLING AND CODE MANAGEMENT
2. Double-click the file and click Yes to disable crash dumps, Administration rights are needed
for this action
A user may encounter an error in UiPath and want to report it. As mentioned before, there are
If you are an Enterprise customer, then you can report the error to the UiPath community in a
very simple way.
2. You will be re-directed to a page where you have to fill out a simple form containing some
basic details and then upload the file in which the error is encountered, as shown in the
following figure 4.11.
3. After uploading, just click on the Submit button. UiPath will respond to you with the proper
solution.
12
CCS361-ROBOTICPROCESSAUTOMATION UNIT -4 EXCEPTION HANDLING AND CODE MANAGEMENT
Since the Community Edition is free, UiPath does not provide support to Community Edition
users. However, all solutions to errors encountered can be found by going to the UiPath forum.
All types of errors and their solutions are properly discussed in the forum. You can also go to
the resources page and find the solution to your problem
Summary:
In this chapter, you have learned how to use exception handling techniques and log
error screenshots, and other useful information to be used for debugging or reporting. You
have also learned how to debug code. You have learned how to make an automation
project, as well as how to use exception handling. Your learning, however, does not end
here. In the next chapter, we will refine your learning by teaching you best practices for
managing and maintaining your code.
Just creating an automation project is not enough. It is important to have your project
organized in a proper way whether it is deciding which layout to use, or naming your steps
properly. A project can also be reused in a new one, making it very convenient for the
user. This chapter explains ways in which we can reuse projects. We will also learn about
configuration techniques and see an example. Finally, we will learn how to integrate the
TFS server. Listed are the topics that will be covered in this chapter.
● Project organization
● Nesting workflows
● Reusability of workflows
● Commenting techniques
● Sate Machine
13
CCS361-ROBOTICPROCESSAUTOMATION UNIT -4 EXCEPTION HANDLING AND CODE MANAGEMENT
When to use Flowchart, State Machine, or Sequence .Using comfig files and examples of Config
files. Integrating the TFS serve.
Change Management
In June 2011, the beleaguered retailer J. C. Penney announced the appointment of Ron
Johnson as the company’s new CEO. Investors loved the move, as the stock price soared. Prior
to this, Johnson had served for 11 years as the senior vice president of retail at Apple. He had
also spent 15 years at Target, where he was key to the merchandising strategy. As for his
move to J. C. Penny, Johnson said the following (in a press release): “I’ve always dreamed of
leading a major retail company as CEO, and I am thrilled to have the opportunity to help J. C.
Penney re-imagine what I believe to be the single greatest opportunity in American retailing
today, the Department Store.”
He even invested $50 million in J. C. Penny stock! But unfortunately, Johnson’s actions at the
company would prove to be disastrous. He made radical changes to the store design and
pricing. He also refocused the merchandising on younger demographics. The upshot: The loyal
customer base stayed away from the stores, as sales plunged. Employees were demoralized
and productivity suffered. It was a classic case study of how “change management” can go
awry. For the most part, people do not want too much change. Change management is a vital
part of RPA as well.
As seen in this chapter, employees will likely be resistant because of the fear of losing their
jobs or having to be relocated. But there are other things to note, such as that many
companies have legacy systems – perhaps even mainframes. So to be successful, it’s
important to be mindful of the cultural impact and issues. If anything, change management is
often one of the leading causes of RPA failure. There are a myriad of frameworks for change
management. But there is one approach that is often used, which is from author and
management consultant John Kotter. He recommends an eight-step process (this was based on
research from over 100 organizations and became part of his best-selling book, Leading
Change).
Step 1 – Create a Sense of Urgency: There needs to be a major change agent that
motivates the organization into action. This can be done by the use of a story or analogy,
without jargon and buzz words. There also should not be too much reliance on data. You want
to win made it clear that this was urgent – even existential. He also personally showed his
commitment to the the hearts and minds of the organization. An example of this is Mark
Zuckerberg, when he energized his company to make the transition from web-based
technology to mobile in 2012. He vision. “I basically live on my mobile,” said Zuckerberg at the
TechCrunch conference. “I wrote the founder’s letter on my phone.
Step 3 – Form a Change Vision: Boiling things down, this means there must be a
destination. This will greatly help drive real change in an organization. Some of the factors
for a successful vision include the following: it is clear, worth achieving, realistic and
attainable, and flexible.
Kotter writes: “A useful rule of thumb: if you can’t communicate the vision to someone in
five minutes or less and get a reaction that signifies both understanding and interest, you
are not yet done with this phase of the transformation process.” 13 .
14
CCS361-ROBOTICPROCESSAUTOMATION UNIT -4 EXCEPTION HANDLING AND CODE MANAGEMENT
Step 4 – Communicating the Vision: It’s common to create a vision and then not do much
with it! But great leaders are constantly reinforcing the message – to the point where it
seems almost too much (Kotter actually advises to amply the message by a factor of ten).
But it takes time for an organization to absorb something new. You should also not assume
that the employees are clear on what’s happening. Patience is key.
Step 5 – Empower Broad-Based Action: There needs to be a focus on making sure people
are recognized for their efforts. This should be the case even if the results do not meet
expectations. After all, there should be a willingness to allow experimentation, which
means there will be some failure. The main constraint is that the vision must be the focus.
What’s more, the leaders in the organization should take actions to reduce the barriers and
friction in making the change happen. “In some cases, the elephant is in the person’s
head, and the challenge is to convince the individual that no external obstacle exists,”
writes Kotter. “But in most cases, the blockers are very real.” But there are other obstacles
to note, such as the compensation structure and the reliance on employee titles.
Step 6 – Generating Short-Term Wins: Who doesn’t like a big win? But in the early phases
of change management, this is not realistic. It can easily take a couple years for there to
be real transformation. This could drag on the organization and lead to more resistance.
This is why it’s better to look at short-term wins, which should help build momentum.
Step 7 – Consolidating Gains and Producing More Change: It’s good to celebrate a win.
But be careful. Do not give the impression that it is the end of the project. Rather, make it
clear that this is one step in a journey – and then reinforce the long-term stretch goals.
Step 8 – Anchoring New Approaches in the Culture: Sustaining the change is perhaps the
hardest part of change management. As much as possible, you want to get to the point
where people say: “This is the way we do things around here.” Basically, the change has
become a permanent part of the culture. Kotter says that this is possible when the
following are done: there are clear examples of how the change improved the organization
(this requires lots of communication) and allowing enough time to make sure new
managers can adopt the approaches.
Kotter’s methodology is extensive and is far from easy to pull off. But he has demonstrated
that it has led to great outcomes.
But with RPA, there are some other factors that can help as well. Here’s a look.
Gauge the Sentiment: It can be tough to understand if the change is taking root. Do the
employees really believe in it? To help with this, you can have periodic surveys (say, with
SurveyMonkey) to see how things are progressing.
Gamification: As the name implies, this is about using methods that mimic a game. This
could be having a score for a project or even having contests – say, prizes for the most
creative bots! By applying gamification, you can make the process more engaging and
productive.
Strategy: The case of J. C. Penny – while notable – is not an exception. The fact is that many
change management efforts fail. But even using Kotter’s methodology has its issues. Why? The
reason is that the process really does not matter if the strategic goals are not the right ones.
This is why there should be lots of analysis and thought on whether to pull the trigger on an
initiative. This certainly goes for RPA. Even though many companies are doing it right now, this
does not mean you should too. Your organization might simply not be ready yet. But
interestingly enough, even if you select the right strategy, there are still land mines! For
example, the management team will have a solid understanding of the plan. But the
temptation is to implement too quickly. Consider that it will take some time to educate the
15
CCS361-ROBOTICPROCESSAUTOMATION UNIT -4 EXCEPTION HANDLING AND CODE MANAGEMENT
While working on any automation project, it is very important to work with a proper set of
rules so that the project can be organized in an efficient way. In UiPath, the following are some
of the best practices considered while working on a project.
Keep it clean
There are various layouts available while creating a new project. Among those layouts, we
have to choose the best option on the basis of the type of automation process we are
undertaking. All the layouts are shown in the following figure 4.16.
16
CCS361-ROBOTICPROCESSAUTOMATION UNIT -4 EXCEPTION HANDLING AND CODE MANAGEMENT
Blank:
A Blank project is simply a blank page on which you can create the type of layout you
want. That is, you can simply start with a Sequence activity if your workflow is in a single
order/sequence or you can use a Flowchart activity if you have a bigger or more complex
workflow to be designed. It depends on the needs of the user or the type of automation to
be undertaken. The following figure 4.14 shows a Blank project.
Simple process The simple process is a layout that is used to model a process as a
flowchart diagram in which there is space for user input. Inside this, we can use a
sequence that processes the required input in a further transaction process. If there is no
new input for the transaction, it will end the process; inside the transaction process, we
have to make a workflow that can be used to automate it. This is by default a generated
process that can be deleted or changed if required. An example of a simple process has
been shown in the following figure 4.15.
17
CCS361-ROBOTICPROCESSAUTOMATION UNIT -4 EXCEPTION HANDLING AND CODE MANAGEMENT
This triggers the automation in response to a mouse or keyboard user event. It is basically
used when the user is automating processes that involve typing or clicking actions. A simple
layout shown in figure 4.16.
18
CCS361-ROBOTICPROCESSAUTOMATION UNIT -4 EXCEPTION HANDLING AND CODE MANAGEMENT
We will use this layout if we want to model a business process as a State Machine diagram. It
is basically a demo of how transactional business process automation works. If we want to
build a better Robot to automate such processes, it is better to use this layout.
Init: In Init state, we have to configure our settings, credentials (if any), and initialize all the
variables that are going to be used in this transaction. All configuration files of the applications
(being used in this transaction), are read and taken into account by the robot. The Init state
also invokes all the applications that are used in the transaction.
Get Transaction Data: In this state, all the transaction data is fetched from the Init state. If
there is no transaction data, then it transfers the control to End Process state.
End Process: This state ensures that all the processes are completed and there is no
transaction data available. It also closes all the applications that are used in the transaction
shown in figure 4.17.
19
CCS361-ROBOTICPROCESSAUTOMATION UNIT -4 EXCEPTION HANDLING AND CODE MANAGEMENT
To build any project, we have to use various activities. But using too many activities makes
the project clumsy and it is not readable. We have to design our project in such a way that
each independent part resides alone. We can achieve this by using workflows. We should put
each independent part of the project inside a single workflow. We can invoke all the workflows
inside the project at the appropriate position. Dividing the project into workflows makes the
project cleaner and more maintainable. Now, if any developer wants to debug your code, they
can check the different workflows and easily pinpoint in which workflow a particular error
occurred. If the project is not divided into workflows, it will be a nightmare for the developer to
fix any error. Thus, breaking an automation into smaller parts enables easy debugging shown
in figure 4.18.
20
CCS361-ROBOTICPROCESSAUTOMATION UNIT -4 EXCEPTION HANDLING AND CODE MANAGEMENT
7. Explain in detail about nest a workflow inside a single workflow in Robotics Process
Automation?
21
CCS361-ROBOTICPROCESSAUTOMATION UNIT -4 EXCEPTION HANDLING AND CODE MANAGEMENT
Keeping it clean :
Just as writing in a clean and understandable manner is the quality of a good coder, the same
holds true for an RPA developer. Clean code helps us understand the whole process very
easilydyou and whoever is reading it.
Nesting workflows :
While working in UiPath, it is better to divide the whole process into smaller parts and then
nest these workflows into a larger one or the Main workflow. This can be done using the
Invoke workflow file activity given in the Activities panel. There are several steps involved
in nesting a workflow or many workflows into a single workflow.
22
CCS361-ROBOTICPROCESSAUTOMATION UNIT -4 EXCEPTION HANDLING AND CODE MANAGEMENT
3. Define an argument and type it in the Invoke workflow arguments that app
• . In the Arguments panel in the second workflow, create an argument with the same name
as the first workflow. You will now be able to use that argument as any other variable
• Reusability of workflows
23
CCS361-ROBOTICPROCESSAUTOMATION UNIT -4 EXCEPTION HANDLING AND CODE MANAGEMENT
• Reusing workflows makes the automation process easier and better since we can use
earlier created workflows in our project that we are trying to use for automation. There are
two methods for this:
• Templates
Invoke workflow file is a good process if we have a complex automation project. We can divide
it into smaller parts and then, by using the Invoke workflow file activity, we can collect all
these smaller parts in a single workflow file. However, if we want to invoke previously created
workflows in our new workflow and make changes to the new workflow, the previous workflow
will also get affected. Hence, it is recommended to use the Invoke workflow file activity only
when we have a complex workflow and we want to divide the process into smaller parts and
then use them together. There is another property for that, what we need here; it's as follows.
As shown in the preceding screenshot, the Invoke workflow activity requires a variable
expression. We can create a variable and set a timeout that is required for the Invoke workflow
file activity
24
CCS361-ROBOTICPROCESSAUTOMATION UNIT -4 EXCEPTION HANDLING AND CODE MANAGEMENT
Reusabilities
Reusability in RPA denotes leveraging the same script or code module across multiple tasks or
processes. Rather than reinventing solutions for each automation task, developers create
modular, reusable scripts that seamlessly integrate into diverse workflows.
Definition: Code reusability refers to the practice of writing code in such a way that it
can be used multiple times across different parts of a program or in different programs.
Importance:
Modular Programming:
Design Patterns:
Implement design patterns (e.g., Singleton, Factory, Strategy) that offer proven
solutions for common problems, enhancing reusability.
25
CCS361-ROBOTICPROCESSAUTOMATION UNIT -4 EXCEPTION HANDLING AND CODE MANAGEMENT
Log Exceptions:
Clean Up Resources:
o Use finally blocks or using statements (in languages like C#) to ensure resources
(e.g., files, connections) are released properly.
Applications of RPA:
Conclusion:
26
CCS361-ROBOTICPROCESSAUTOMATION UNIT -4 EXCEPTION HANDLING AND CODE MANAGEMENT
Saving the workflow as a template helps you preserve the original workflow file. So whatever
modifications you made in the template, no changes will be made in the original workflow.
We often use templates when creating small pieces of common automation that are
reusable and applicable in multiple workflows. So you can use templates if the workflow
does not change over time. The most common example is when you create your own
reusable snippets using data, data tables, and YNM files.
Follow the steps given to add a workflow as a template, which is explained as follows:
2. After clicking on the Add Folder icon you can browse for your file containing the workflows.
Just select folder from the list that contains all the workflows. Now the folder can be used
anytime in any workflow from the Library panel
3. We can also remove an added file by just right-clicking on it and then selecting the
Remove option, as shown in the following figure 4.24
27
CCS361-ROBOTICPROCESSAUTOMATION UNIT -4 EXCEPTION HANDLING AND CODE MANAGEMENT
Commenting techniques:
Using comments in workflows is considered a good practice as it can give a better step-bystep
notification of what is done in the workflow.
The package you'll need to use comments inside a workflow needs to be installed from the
Package Manager functionality that is available in the Activities panel (the Manage Packages
icon). You can install UiPath.Core.Activities from the packages; inside you will find the
Comment activity in the Activities panel as indicated by the arrow (in this case, it is installed
shown in figure 4.25.
28
CCS361-ROBOTICPROCESSAUTOMATION UNIT -4 EXCEPTION HANDLING AND CODE MANAGEMENT
Once the package is installed, just drag and drop the Comment activity from the Activities
panel and add comments in between the workflows wherever you want.
10. Explain in detail about State Machine transactions use of Flowchart in Sequences
activity in Automation process .
A State Machine uses a finite number of sets in its execution. It can go into a state when it is
triggered by an activity; it exits that state when another activity is triggered. Another
important aspect of State Machines is transactions. They enable you to add conditions based
on which transactions jump from one state to another. These are represented by arrows or
branches between states.
There are two activities specific to State Machines. They are State and Final State, and they
are shown in the following figure 4.27.
29
CCS361-ROBOTICPROCESSAUTOMATION UNIT -4 EXCEPTION HANDLING AND CODE MANAGEMENT
The State activity consists of three sectionsdEntry, Exit, and Transitions, while the FinalState
only contains Entry. We can expand these activities by double-clicking them to view more
information and to edit them:
FinalState activity: This activity contains all those activities that need to be processed when
the state is entered: shown in figure 4.28.
State activity: Transitions contain three sectionsdTrigger, Condition, and Action, which enable
you to add a trigger for the next state or a condition under which an activity is to be executed
30
CCS361-ROBOTICPROCESSAUTOMATION UNIT -4 EXCEPTION HANDLING AND CODE MANAGEMENT
A Sequence is used only when we have a selected a straightforward set of instructions on how
to create a workflow. That is, we do not have to make decisions. It is preferred when we are
recording some steps in a sequential manner and we are creating a simple workflow. One such
sequence
Now, when it comes to State Machines and Flowcharts, both are used for complex processes
and both work well. They work in the same manner, but State Machines have some
advantages over Flowcharts, which are listed as follows:shown in figure 4.30
Complex transitions are much clearer with State Machines as they have an inbuilt layout of
the workflow.
Flowcharts do not inherently have the concept of waiting for something to happen.
State Machines do (a transition will not occur until a trigger completes and the condition
evaluates to true). State Machines naturally encapsulate the action group
31