0% found this document useful (0 votes)
354 views76 pages

Robotics Final PDF

The document is a study material for the course CCS361 - Robotic Process Automation at Mailam College of Engineering, detailing the syllabus and key topics such as app integration, recording, scraping, exception handling, and code management. It includes definitions, benefits, technologies, and various models related to application and data integration, as well as practical aspects of automation like recording mouse and keyboard actions. The material is prepared by faculty members and serves as a comprehensive guide for students in the Electronics and Communication Engineering department.

Uploaded by

Amsakumari R
Copyright
© © All Rights Reserved
We take content rights seriously. If you suspect this is your content, claim it here.
Available Formats
Download as PDF, TXT or read online on Scribd
0% found this document useful (0 votes)
354 views76 pages

Robotics Final PDF

The document is a study material for the course CCS361 - Robotic Process Automation at Mailam College of Engineering, detailing the syllabus and key topics such as app integration, recording, scraping, exception handling, and code management. It includes definitions, benefits, technologies, and various models related to application and data integration, as well as practical aspects of automation like recording mouse and keyboard actions. The material is prepared by faculty members and serves as a comprehensive guide for students in the Electronics and Communication Engineering department.

Uploaded by

Amsakumari R
Copyright
© © All Rights Reserved
We take content rights seriously. If you suspect this is your content, claim it here.
Available Formats
Download as PDF, TXT or read online on Scribd
You are on page 1/ 76

MAILAM COLLEGE ENGINEERING

MAILAM (PO), Villupuram (Dt). Pin: 604 304


(Approved by AICTE New Delhi, Affiliated to Anna University Chennai &
Accredited to NBA, NAAC with ‘A’ Grade & TCS)

CCS361 -ROBOTIC PROCESS AUTOMATION

[REGULATION-2021]

STUDY MATERIAL

DEPARTMENT OF ELECTRONICS AND COMMUNICATION ENGINEERING

NAME OF THE STUDENT……………………………………………………………….

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

SUB CODE/NAME: CCS361 -ROBOTIC PROCESS AUTOMATION


YEAR/SEM: IV / VII
SYLLABUS

UNIT III APP INTEGRATION, RECORDING AND SCRAPING

App Integration, Recording, Scraping, Selector, Workflow Activities. Recording


mouse and keyboard actions to perform operation, Scraping data from websiteand
writing to CSV, Process Mininum

UNIT IV EXCEPTION HANDLING AND CODE MANAGEMENT

Exception handling, common exception ,logging -debugging techniques, collection


crashdump,Error reporting ,code management and maintenance, project rganization
workflows, reusability, templates, commenting technique ,state machine., template ,
nesting workflow.
CS361-ROBOTIC PROCESS AUTOMATION UNIT III - APP INTEGRATION, RECORDING AND SCRAPING

Mailam (Po), Villupuram (Dt). Pin: 604 304


(Approved by AICTE, New Delhi, Affiliated to Anna University - Chennai
& Accredited by NBA, NAAC with 'A' Grade and TATA Consultancy Services)

DEPARTMENT OF ELECTRONICS AND COMMUNICATION ENGINEERING

CS361-ROBOTIC PROCESS AUTOMATION


UNIT III APP INTEGRATION, RECORDING AND SCRAPING

App Integration, Recording, Scraping, Selector, Workflow Activities. Recording


mouse and keyboard actions to perform operation, Scraping data from website
and writing to CSV, Process Mining.
PART-A
1. Define App Integration.
Application integration is the process of connecting different applications, systems, and
subsystems so they can work together. This can be done to improve operational efficiency,
scalability, and user experience.

2. What are the benefits of application integration?


Automation
Applications can communicate with each other to facilitate complex workflows.
Data consistency
Application integration can preserve consistent copies of data across independently created
applications.
Data transfer and synchronization
Application integration creates a single, unified system for data transfer and
synchronization.
User experience
Application integration can give users access to information and features from various
programs using a single user interface.

3. What is the technology used in API?


API is a set of rules or protocols that lets software applications communicate with each
other to share data, features and functions. APIs simplify and accelerate software
development by enabling developers to integrate data, services and capabilities from other
applications, instead of developing them from scratch.
Middleware
Middleware is software that enables communication and connectivity between applications or
components in a distributed network, essentially creating "software glue" that binds different
systems together. Using a range of intelligent features (message brokers, enterprise service
buses (ESBs) and web app servers, for instance), middleware streamlines app development

1
CS361-ROBOTIC PROCESS AUTOMATION UNIT III - APP INTEGRATION, RECORDING AND SCRAPING

by facilitating communication between platforms that weren’t designed to organically


connect.

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 .

4. Compare the application integration and data integration

"Application integration" and "data integration" are sometimes used interchangeably.

However, these concepts—and their use cases—are quite different.

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.

Unlike data integration, application integration directly links multiple applications at a


functional level. Application data can be linked in near real-time, allowing organizations to
create dynamic and highly adaptable applications and services.

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.

Businesses can use a range of integration methods, deployed independently or in


combination. Modern API-led integration, for instance, enables teams to discover IT assets
quickly and securely and a traditional service-oriented architecture (SOA) uses a
communication layer (bus) to quickly integrate new applications.

2
CS361-ROBOTIC PROCESS AUTOMATION UNIT III - APP INTEGRATION, RECORDING AND SCRAPING

5.What are the models used in app integration ?

 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)

6. What is recording in Uipath?


There are five types of recordings available in Studio: Basic – Generates a full selector for
each activity and no container. The resulted automation is slower than one that uses
containers and is suitable for single activities. Desktop – Suitable for all types of desktop
apps and multiple actions.

7. What is a controller in robotics?


The robot controller is a computer system that connects to the robot in order to control the
movements of the industrial robot arm. In addition to the robot arm, the controller is also
responsible for the end-effectors and to prevent interference from occurring within the robots
work area.

8. What are controllers and sensors?


Controllers and sensors are important parts of the control system; without information from
the sensor, the controller cannot make a decision and instruct the valve to move. This
tutorial briefly discusses the different types of controllers and sensors available and how they
operate

9. What is data scraping in RPA?


Data scraping is an indispensable tool for streamlining mundane processes through RPA
systems while ensuring accuracy and staying compliant with applicable regulations. It is
important to choose wisely when selecting a tool best suited for your purposes

10. What is scraping in automation?


A web scraper automates the process of extracting information from other websites, quickly
and accurately. The data extracted is delivered in a structured format, making it easier to
analyze and use in your projects. The process is extremely simple and works by way of two
parts: a web crawler and a web scraper.

11. What is called scraping?


Scraping noun (RUBBING) the act of rubbing against a surface so that slight damage or an
unpleasant noise is produced: I heard the scraping of a chair and then footsteps. There was a
scraping noise as the train derailed.

12. What is an example of scraping?


For example, data scraping is often used to harvest email addresses for the purpose of
spamming or scamming. Scraping can also be used to retrieve copyrighted content from one
website and automatically publish it on another website.

13. What tool is used for scraping?


Scrappy is a free, open source scraping tool that uses the Python framework to build web
crawlers that can run on Linux, Windows, Mac, and BSD. Scrappy provides a free tool for web
developers to extract web data in a simple way

3
CS361-ROBOTIC PROCESS AUTOMATION UNIT III - APP INTEGRATION, RECORDING AND SCRAPING

14. What is data scraping used for?


Data scraping, in its most general form, refers to a technique in which a computer program
extracts data from output generated from another program. Data scraping is commonly
manifest in web scraping, the process of using an application to extract valuable information
from a website.

15. What are the types of scrapers?


There are following types of scraper tools are used, and their uses are described below in
detail.
 Flat Scraper.
 Half Round Scraper.
 Three Square Scraper.
 Bull nose Scraper.
 Two Handle Scraper.
 Hook Scraper.

16. What are the features of scraper?


The scraper bowl is a large, open-top container with a vertical cutting edge at the front and a
horizontal apron at the bottom. The primary function of a motor scraper is to cut, load, and
transport large volumes of earth, soil, or other loose materials over short to medium
distances.

17. How is scraping detected?

Using fingerprinting to detect web scraping


Fingerprinting is collecting browser attributes and saving the information in a special POST
data parameter. The system can use the collected information to identify suspicious clients
(potential bots) and recognize web scraping attacks more quickly

18.What is a 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 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

19. How many types of Selector in are there in Ui-path?

 Full Selectors.
 Partial Selectors.
 Dynamic Selectors

20. What is a selector function?

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

21. What are the uses of selector?


CSS selectors are used to select the content you want to style. 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.

22. Which is an example of a selector?


The element selector selects HTML elements based on the element name (or tag) for
example p, h1, div, span,

23. What is workflow in automation?


Workflow automation refers to the use of software to complete some tasks and activities,
without the need for human input. It's a tool for making work faster, easier, and more
consistent. By automating workflows, companies reduce the need for manual work and
repetitive tasks.

24. How do you create workflow automation?


Steps to Automate Workflows
Step 1: Understand the workflow.
Step 2: Draft the workflow. ...
Step 3: Identify opportunities for integration. ...
Step 4: Address the inefficiencies. ...
Step 5: Create the workflow. ...
Step 6: Create the automations. ...
Step 7: Consistently test, monitor, and optimize your workflow. ...
Step 8: Train your team.
28. What is workflow with example?
Any series of steps that involves processing data can be defined as a workflow — and there
are countless examples in the business world. Some common examples include: Equipment
Inspection: The workflow begins when a technician opens the equipment inspection checklist.

29. What is mouse recording?


Recording mouse coordinates - mouse recording is nothing but tracking the mouse cursor
coordinates as you move the mouse. But the window that is supposed to receive the mouse
commands may open at a different location next time you launch a program.

30. What is automation in recording?


In the case of music production, automation means having a DAW (Logic Pro X, Pro Tools,
Ableton, etc.) automatically perform tasks over time, particularly moving knobs, faders, and
switches for you. The most popular use of automation in mixing is to adjust the volume of a
track.

31. What are the two types of recording?


Records can be physical (e.g., paper documents) or digital (e.g., electronic records), and
they can pertain to different aspects of an individual or organization's life (e.g., financial
records, medical records, legal records, personnel records).

32. What is the difference between recording and re-recording?


A re-recording is a recording produced following a new performance of a work of music. This
is most commonly, but not exclusively, by a popular artist or group. It differs from a reissue,
which involves a second or subsequent release of a previously-recorded piece of music.
5
CS361-ROBOTIC PROCESS AUTOMATION UNIT III - APP INTEGRATION, RECORDING AND SCRAPING

33. What is mouse smart tracking?


Mouse tracking (also known as cursor tracking) is the use of software to collect users' mouse
cursor positions on the computer. This goal is to automatically gather richer information
about what people are doing, typically to improve the design of an interface.

34. How to perform keyboard actions in Robot framework?


Keyboard methods in Robot class
 Key Press (int key code): This method presses a given key. The parameter keycode is an
integer value for the key pressed. ...
 key Release(int key code): This method releases a given key. For Example, the Shift key
pressed using the *key Press(Key Event.

35. How to use keyboard in UiPath?


The complete list of keyboard shortcuts for UiPath Studio:
File Management. link. Ctrl + Shift + N - Creates a new Blank Process. ...
Search. link. F3 or Ctrl + Shift + P - Opens the Command Palette. ...
Comment. link. ...
Debugging. link. ...
Recording. link. ...
Workflow Analysis and Execution. link.
Selected Activity. link. ...
Test Automation. link.
34. How to scrape data from website to CSV?
This section will guide you through the steps to efficiently extract data from a website and
save it in a CSV format.
Step 1: Understand the Website Structure. ...
Step 2: Set Up the Script. ...
Step 3: Make HTTP Requests and Parse the HTML. ...
Step 4: Extract and Clean the Data. ...
Step 5: Save Data in CSV Format.

35. What is an example of web scraping data?


Web scraping refers to the extraction of web data on to a format that is more useful for the
user. For example, you might scrape product information from an ecommerce website onto
an excel spreadsheet. Although web scraping can be done manually, in most cases, you
might be better off using an automated too.

36. How to scrape data from a website?


The web scraping process
 Identify the target website.
 Collect URLs of the target pages.
 Make a request to these URLs to get the HTML of the page.
 Use locators to find the information in the HTML.
 Save the data in a JSON or CSV file or some other structured format.

37. What is process mining with examples?


Process mining is a technique to analyze, improve, and track processes. In the old days of
managing business processes, people used meetings, interviews, and simply observing things
to understand how processes worked. However, this approach often painted an incomplete,
and one-sided view of processes.

6
CS361-ROBOTIC PROCESS AUTOMATION UNIT III - APP INTEGRATION, RECORDING AND SCRAPING

38. What are the 4 types of process mining?


The four basic types of process mining: (1) process discovery, (2) conformance checking, (3)
process reengineering (changing the process model), and (4) operational support (influencing
the process without reengineering it).

39. What are the main process mining techniques?


The most commonly used techniques or algorithms are Trace Clustering, Fuzzy Miner and
Heuristics Miner, mainly due to the fact that they adequately manage noise and
incompleteness, and allow models to be identified for less-structured processes, which is
often the case in healthcare.

40. What are the three steps in process mining?


Process mining step-by-step
Case ID - A unique reference to each business object.
Activity - The stage of the process the case went through.
Timestamp - The time that that specific case went through that state.

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

Communication Protocols: Standardized protocols for data exchange between systems,


Such as ROS (Robot Operating System), TCP/IP, and UDP.
APIs (Application Programming Interfaces): Defined interfaces for software c
omponents to interact With each other.
Data Integration: Combining data from various sources, such as sensors and databases.
Challenges and Considerations:
a. Interoperability: Ensuring compatibility between different systems and components.
b. Data Consistency: Managing data formats and ensuring consistency across systems.
c. System Complexity: Managing complexity and ensuring scalability.
● Examples and Applications
a. Industrial Robotics: Integrating robots with CNC machines and conveyor belts.
b. Service Robotics: Integrating robots with sensors and navigation systems.
c. Autonomous Vehicles: Integrating sensors, GPS, and control systems.

Application Integration benefits:


Application integration provides important benefits to businesses, including:

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:

Application integration services involve connecting and integrating different software


applications, systems and technologies.
● To enable seamless data exchange, improved workflows, and enhanced functionality.
● Some Common application integration services include

API Integration: Connecting applications through APIs (Application Programming


Interfaces) to enable data Exchange and functionality sharing.

Data Integration: Integrating data from various sources, such as databases, files, and
applications, to provide a Unified view and enable data-driven decision-making.

Cloud Integration: Integrating cloud-based applications and services, such as SaaS


(Software as a Service) and PaaS (Platform as a Service), with on-premise systems.

Enterprise Application Integration (EAI): Integrating multiple enterprise applications,


such as ERP (Enterprise Resource Planning), CRM (Customer Relationship Management),
and SCM (Supply Chain Management).

Business Process Integration (BPI): Automating and streamlining business processes by


integrating applications and systems.

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.

Micro services Integration: Integrating micro services-based architectures to enable


scalability, flexibility, and rapid development.

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.

● RECORD AND PLAY


The facility of recording user steps on a computer and playing them back has made
Robotic Process Automation (RPA) highly successful. UiPath stack There are three basic
components in UiPath:
•UiPath Studio
•UiPath Robot
•UiPath Orchestrator

The UiPath platform is available in two variations:

● 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

required activity into the required location in the Designer panel.

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.

3. Write the steps to be followed in Task Recorder in Robotics Process Automation.

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.

7. Reset Settings: This is used to reset all settings to defaults.

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 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.

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

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

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
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.

The Screen Scraper wizard has three scraping methods:


 Full Text
 Native
 OCR
Full text: The Full text activity is used to extract information from various types of
documents and websites. It has a 100% accuracy rate. It is the fastest method among all
three methods. It even works in the background. It is also capable of extracting hidden
text. However, it is not suitable for Citrix environments.

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.

It also does not work with a Citrix environment.

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.

1. Create a Blank project and give it a meaningful name.


2. Log on to the UiPath website by logging in to IUUQTXXXVJQBUIDPN in your browser.

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

Fig 3.1 Scraping in Robotics Process

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.

Types of Scraping in Robotics Process A

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.

Applications of Scraping in Robotics Process Automation:

1. Data Migration: Automating data transfer between systems, applications, or databases

2. Data Analytics: Extracting data for analysis, reporting, or business intelligence.

3. Automation of Manual Tasks: Automating tasks that involve manual data entry or
copy-pasting

4. Monitoring and Surveillance: Monitoring websites, social media, or online platforms


for specific information.

Tools and Technologies Used:

1. RPA Platforms: Automation Anywhere, Blue Prism, UiPath, and Kofax

2. Web Scraping Libraries: Beautiful Soup, Scrapy, and Selenium.

3. Document Processing Libraries: Tesseract OCR, PyPDF2, and OpenCV

4. Scripting Languages: Python, Java, C#, and VBA.

Benefits of Scraping in Robotics Process Automation:

1. Increased Efficiency: Automating manual data extraction tasks

2. Improved Accuracy: Reducing human error in data entry

3. Cost Savings: Reducing labor costs associated with manual data extraction.

4.Enhanced Decision-Making: Providing timely and accurate data for businessdecisions

Challenges and Limitation:

1. Data Quality Issues: Handing inconsistent or unstructured data.

2. Security and Compliance: Ensuring data scraping complies with regulations and
security policies.

3. Website Structure Changes: Adapting to changes in website structure or layout.

4. Anti-Scraping Measures: Overcoming measures to prevent scraping, such as

18
CS361-ROBOTIC PROCESS AUTOMATION UNIT III - APP INTEGRATION, RECORDING AND SCRAPING

CAPTCHAs.

To implement scraping in robotics process automation, follow these best


practices:

1. Define clear objectives: Identify specific data requirements and goals.

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.

By leveraging scraping in robotics process automation, organizations can streamline data


extraction, improve efficiency, and enhance decision-making capabilities.

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:

 Basic Selectors: These are straightforward selectors based on the attributes of UI


elements, like id, name,
 Full Selectors: These include the entire path to the element in the hierarchy, often
making them more reliable but also more sensitive to changes in the UI.
 Partial Selectors: These include only part of the selector, which can be useful for
elements that may change but have consistent identifiers.
 Wildcards: You can use and in selectors to represent any number of characters or a
single character, respectively. This is helpful when dealing with dynamic attributes.
 Anchor Base: This selector type allows you to find an element based on the position of a
nearby stable element, which helps in scenarios where the target element's properties
change.
 Image Selectors: Instead of relying on attributes, these selectors use images of UI
elements. This can be useful when other selector types fail.
 UI Automation Activities: Some activities, like Click or Type Into, may allow you to
configure additional options for selectors, including using regular expressions for more
flexible matching.
 Dynamic Selectors: These are selectors that can adapt to changes in the UI by using
variables or arguments in the selector strings.

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

flowcharts. Sequences represent a linear set of activities executed in order, while

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

that specify the libraries or packages requiredfor theexecutionof the automation

process. These dependencies caninclude UiPath activities, custom libraries, or third-

party components.

● Annotations and Comments: Developers can add annotations and comments within

the workflow to provide additional information about specific activities or sections. This

helps document the logic and purpose of the automation.

● Arguments Panel: UiPath Studio provides an "Arguments" panel where users can

define input and output arguments for the workflow. Arguments enable communication

between different workflows or components.

● 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

processes. Activities cover a variety of tasks, from UI interactions to data manipulation.

● Project Structure: A UiPath project typically consists of multiple workflow files

organized in a project structure. The main workflow, often named "Main.xaml," serves

as the entry point for the automation.

● State Machines (Optional): UiPath allows the use of state machines for more

advanced workflow control.

l. State machines are used when the automation needs to transition between different

states based on conditions.

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?

● Recoding a mouse in Robotic Process Automation (RPA) involves programming software


robots to mimic human mouse interactions. This allows automation of tasks that typically
require manual mouse actions.

● RPA Mouse Recoding Tools:

a. Automation Anywhere.

b. UiPath

c. Blue Prism

d. Work Fusion

e. Kofax RPA.

Mouse Recoding Techniques:

● Mouse Recording: Capture and replay mouse movements and clicks.

● Mouse Scripting: Write code to simulate mouse actions (e.g., Python, VBScript).

● Image Recognition: Use OCR or image recognition to identify screen elements.

Common Mouse Recoding Actions:

● Clicks (left, right, double)

● Mouse Movements (move to, hover)

● Drag and Drop

● Scroll

● Mouse Wheel

● Benefits

● Increased Efficiency

● Reduced Manual Effort

● 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

● Legacy System Integration

● Best Practices

● Use relative mouse positions.

● Implement error handling.

● Optimize scripts for performance.

● Use variables for flexibility.

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.

1. Create a blank project and give it a meaningful name. Click Create.

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.

4. Click on the Next button.

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

Web Scraping Techniques:

1. HTML Parsing

2. XPath

3. CSS Selectors

4. Regular Expressions

5. API Integration (if available)

Steps to Scrape Data and Write to CSV:

1. Inspect website structure (HTML, XPath, CSS)

2. Configure web scraping tool

3. Extract data (text, attributes, tables)

4. Clean and format data

5. Write data to CSV file

RPA Web Scraping Actions:

1. Navigate to website

2. Click elements

3. Extract text/data

4. Loop through pages/elements

5. Write to CSV

32
UNI UNIT III - APP INTEGRATION, RECORDING AND SCRAPING
CCS361-ROBOTICPROCESSAUTOMATION

CSV Writing Options:

1. Append

2. Overwrite

3. Specify delimiter (comma, semicolon)

4. Choose encoding (UTF-8, ASCII)

Best Practices:

1. Handle anti-scraping measures

2. Respect website terms of service

3. Use proxies or rotate IPs (if necessary)

4. Monitor website changes

5. Validate data quality

Example RPA Web Scraping Tasks:

1. Extract product prices/information

2. Gather market research data

3. Monitor social media sentiment

4. Collect customer feedback

5. Automate data entry.

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

9. Explain in detail about process mining using Software to Optimize Processes in

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 Software:

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.

Process mining algorithms


Process mining algorithms are sets of mathematical rules used to discover process models from
business systems using data mining techniques. Process mining algorithms allow you to map
the true state of business processes, identify bottlenecks and efficiencies, and improve your
business processes in a data-driven way.
Purpose of process mining :
Process mining is a widely-used technology to model, analyze, and optimize business processes.
Think of a MRI that shows how your processes actually run — not how you think they run.

As part of a student consultancy in Germany in 2011, a group of college friends – including


Alexander Rinke, Bastian Nominacher, and Martin Klenk – begun assisting Bayerischer
Rundfunk to improve their customer service department.
Steps in process mining :
Reconstruct data - process data is collected and harmonized in preparation for analysis.
Visualize data - process mining algorimths are used to display as-is state of processes. Analyze
data - process data is analyzed to identify process improvement opportunities .

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.

According to Arena Holdings CEO Feroz Dewan:

“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.

How Process Mining Works process can be very complicated.

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.

Fig 3.4 Process Mining Works process

“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 Future of Process Mining

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

10. Explain in detail about types of recording in Ui-path Studio.

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.

This flow is generated Desktop recorder:

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.

1. Create a blank project and give it a meaningful name. Click Create.

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.

4. Click on the Next button.

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

4. Select & Copy

41
UNI UNIT III - APP INTEGRATION, RECORDING AND SCRAPING
CCS361-ROBOTICPROCESSAUTOMATION

42
CCS361-ROBOTICPROCESSAUTOMATION UNIT -4 EXCEPTION HANDLING AND CODE MANAGEMENT

Mailam (Po), Villupuram (Dt). Pin: 604 304


(Approved by AICTE, New Delhi, Affiliated to Anna University - Chennai
& Accredited by NBA, NAAC with 'A' Grade and TATA Consultancy Services)

DEPARTMENT OF ELECTRONICS AND COMMUNICATION ENGINEERING

CS361-ROBOTIC PROCESS AUTOMATION

Unit 4- Exception handling and code management


Exception handling, common exception ,logging -debugging techniques, collection
crashdump,Error reporting ,code management and maintenance, project organization
,workflows, reusability, templates, commenting technique ,state machine., template , nesting
workflow.

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.

2. What is Exception handling in robotic automation?


Exception handling is a mechanism that allows Power Automate for desktop to handle and
recover from unexpected circumstances and issues that might occur during a flow run.

3. What is the exception log in RPA?


An exception log should contain data relevant to the transaction, including the time the error
occurred, the error message string, and any unique identifiers. These logs can be used to help
debug the automation and fine-tune business requirements.

4. What is exception handling in robotic process automation?


In a dynamic business environment, systems and processes change frequently. Exception
handling allows RPA bots to adapt to these changes by gracefully recovering from errors and
continuing their tasks. This ensures uninterrupted automation and minimizes manual
intervention.

5. Define common exception.


The most common errors or exceptions for an RPA bot are either business exceptions or
application exceptions. A business exception happens when a software bot is unable to process
a transaction due to its programmed instructions. In other words, the business exception is
written into the automation's code.

6. What are the exceptions in RPA?


Exceptions are errors or unexpected events that disrupt the normal execution of an RPA
workflow. They can be caused by various factors, such as changes in the application interface,
network issues, data inconsistencies, or user input errors.

1
CCS361-ROBOTICPROCESSAUTOMATION UNIT -4 EXCEPTION HANDLING AND CODE MANAGEMENT

7. Define logging in RPA.


During process execution, the Robot generates a message (Log) for each step along the way.
These are gathered and stored in a Log File. The overall operation of gathering and storing Logs
is called Logging.

8. Define debugging in RPA.


Debugging is the process of identifying, analyzing, and fixing errors or bugs in your automation.
It involves several steps to ensure that your automation functions as intended and meets the
desired requirements.
9. Give an example of debugging.
In hardware development, the debugging process looks for hardware components that are not
installed or configured correctly. For example, an engineer might run a JTAG connection test to
debug connections on an integrated circuit.

10. Why do we need debugging?


Bugs (logical errors, runtime errors, syntax errors and others) can lead to crashes, incorrect or
inaccurate outputs, security vulnerabilities, data loss and more. Debugging is critical
for preventing software functionality issues.

11. When to use logging?


Logging is essential when running applications in production; it allows us to identify issues that
might surface during periods of increased traffic. Too many log messages could harm system
performance; therefore, we must select an appropriate logging level according to your
circumstances.

12. What is the lowest level of logging?


Log levels typically follow this order from lowest to highest: DEBUG - INFO - WARNING - ERROR
- CRITICAL.

13. Define collection crash dump.


In Robotic Process Automation (RPA), crash dumps are a way to collect information about a
crash in UiPath Studio. There are two types of memory dumps: full dumps and minidumps. Full
dumps provide the most information about a crash, while minidumps only provide the main
information.

14. Explain about Error reporting.


Error reporting in robotic process automation (RPA) is the process of identifying, monitoring,
and reporting errors that occur during the automation process. The goal is to find the root
cause of the error so that it can be permanently fixed.

15. What are the errors in RPA?


The most common errors or exceptions for an RPA bot are either business exceptions or
application exceptions. A business exception happens when a software bot is unable to process
a transaction due to its programmed instructions.

16. What is managing and maintenance?


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.

17.How does Project organization in robotic process automation


While working on any automation project, it is very important to work with a proper set of rules
2
CCS361-ROBOTICPROCESSAUTOMATION UNIT -4 EXCEPTION HANDLING AND CODE MANAGEMENT

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:
 Pick an appropriate layout for each workflow
 Break the whole process into smaller parts
 Use exception handling
 Make your workflow readable.

18. Briefly explain about workflow?


A workflow is a repeatable sequence of tasks organized into processes that transform
resources, provide services, or process information. You can document workflows in different
notations.

19. Define Reusability in RPA?

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.

20.Eplain about templates?


In Robotic Process Automation (RPA), templates are pre-configured automations that can be
used to speed up the design of new automation projects. Templates can be built-in, custom, or
from other sources.

21.What is commenting technique?


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. Therefore, commenting in a complex workflow is
considered to be good while debugging:
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

22. What is working of state machine?

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.

23. What is nesting workflow?

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.

24. Give the operations of workflows in RPA?


A workflow is a repeatable sequence of tasks organized into processes that transform
resources, provide services, or process information. You can document workflows in different
notations.

3
CCS361-ROBOTICPROCESSAUTOMATION UNIT -4 EXCEPTION HANDLING AND CODE MANAGEMENT

25.why workflow is needed in RPA?


Increase efficiency:
 Workflows can help to make processes more efficient and accurate by reducing errors
that can occur in manual processes.
 Improve collaboration:
 Automated workflows can help to improve collaboration by reducing communication
breakdowns.

26. What are the Debugging techniques?


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.

 Setting breakpoints

 Slow step

 Highlighting

 Break

27. Define 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 screenshot shows a Blank project.

4
CCS361-ROBOTICPROCESSAUTOMATION UNIT -4 EXCEPTION HANDLING AND CODE MANAGEMENT

PART-B

1. Explain in detail about Exception handling in Robotics Process Automation ?

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:

Figure 4.1: Exception handling

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

Figure 4.2: Catches.

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.

Figure 4.3: Message box

6
CCS361-ROBOTICPROCESSAUTOMATION UNIT -4 EXCEPTION HANDLING AND CODE MANAGEMENT

2. Explain in detail about Common exceptions and ways to handle them.

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

Figure 4.4: UI element When working on UiPath

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

3.Explain Briefly about debugging techniques ?

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

Figure 4.5: Debugging techniques

 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

Figure 4.6: Setting breakpoints

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

Figure 4.7: Slow step.

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.

Figure 4.8: Highlighting

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.

Figure 4.9: Break

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,

Figure: 4.10 Break at any point.

4. Explain in detail about collection crash dump in robotics process automation?

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

Enabling crash dumps

The following are the steps to enable crash dumps:

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

Disabling crash dumps

To disable crash dumps, perform the following steps:

1. Download the %JTBCMF%VNQSFH file from IUUQTDEOIVCTQPUOFUIVCGT


2VJDL"OTXFST%JTBCMF%VNQSFHU.

2. Double-click the file and click Yes to disable crash dumps, Administration rights are needed
for this action

5. Explain in detail about error reporting in Ui path and its types ?

A user may encounter an error in UiPath and want to report it. As mentioned before, there are

Two types of customer for UiPath:

● Enterprise Edition customers


● Community Edition customers

Enterprise Edition customers:

If you are an Enterprise customer, then you can report the error to the UiPath community in a
very simple way.

1. Just go to this link: IUUQTXXX6J1BUIDPNDPOUBDUUFDIOJDBMBOE BDUJWBUJPOT.

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.

Figure 4.11: enterprise edition customers.

12
CCS361-ROBOTICPROCESSAUTOMATION UNIT -4 EXCEPTION HANDLING AND CODE MANAGEMENT

Community Edition users:

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

Figure 4.12: Community edition users

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.

6. Explain in detail about managing and maintaining?

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 2 – Build a Guiding Coalition: Change is more likely to happen if it is powered by


influential people within the organization. Yet this is not a list of executives. The power can
be based on expertise, credibility, leadership, and reputation. You essentially want to
create a wave of momentum for the project

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

organization on why certain actions should be taken

6. Explain in detail about Project organization in Uipath of Automation Process.

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.

 Pick an appropriate layout for each workflow

 Break the whole process into smaller parts

 Use exception handling

 Make your workflow readable

 Keep it clean

 We will now elaborate on each of the best practices

Picking an appropriate layout for each workflow :

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.

Figure 4.13: Layout for each workflow

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.

Figure 4.14 :Blank

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

Figure 4.15 : Simple process

Agent process improvement

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

Figure 4.16: Agent process improvement

Transactional business process :

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.

This layout is categorized into different states:

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.

Process Transaction: In this State, all the transaction data is processed.

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

Figure 4.17:Transactional business process

Breaking the process into smaller parts:

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

Figure 4.18: Breaking the process into smaller parts

7. Explain in detail about nest a workflow inside a single workflow in Robotics Process
Automation?

Making your workflow readable:


It is good practice to name activities on the basis of the operations they perform to ensure that
when we return to the workflow, we can easily identify each and every step used in it. This
becomes very helpful while finding and resolving errors as it specifies the process when
showing an error during debugging. If activities are properly named, we get to know exactly
which part of the workflow is not working. For example, we will create a workflow that will ask
the user to guess a number, on the basis of which we will perform an addition and finally
display the answer. The following figure 4.19 shows the proper naming of the steps involved
in the process

21
CCS361-ROBOTICPROCESSAUTOMATION UNIT -4 EXCEPTION HANDLING AND CODE MANAGEMENT

Figure 4.19: Workflow

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

How to nest a workflow inside a single workflow:

1. Add an Invoke workflow file activity to the first workflow

Figure 4.20: Add an invoke

2. Click on the Edit Arguments option available.

3. Define an argument and type it in the Invoke workflow arguments that app

Figure 4.21: Define argument

• . 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:

• Invoke workflow file

• Templates

Invoke workflow file:

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.

Figure 4.22: Invoke workflow file

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

8. Write a short notes on Strategies for achieving Code Reusability in robotics


process automation.

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.

Introduction to Code Reusability:

 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:

 Efficiency: Reduces redundancy, saving time and effort.


 Maintainability: Simplifies updates and bug fixes.
 Consistency: Ensures uniform behavior across applications.

Strategies for Achieving Reusability :

 Modular Programming:

 Break down code into smaller, independent modules or functions.


 Each module should perform a specific task.

 Object-Oriented Programming (OOP):

 Utilize classes and objects to encapsulate data and behavior.


 Promote inheritance and polymorphism to create extensible code.

 Libraries and Frameworks:

 Develop or utilize existing libraries to group reusable functions and classes.


 Use frameworks that provide built-in functionalities for common tasks.

 Design Patterns:

 Implement design patterns (e.g., Singleton, Factory, Strategy) that offer proven
solutions for common problems, enhancing reusability.

Exception Handling Overview

 Definition: Exception handling is a programming construct that handles the occurrence


of exceptions—unexpected errors that disrupt the normal flow of a program.
 Purpose:
a. To manage errors gracefully without crashing the program.
b. To separate error-handling code from regular code, improving clarity and
maintainability.

Best Practices in Exception Handling:

 Use Try-Catch Blocks:

 Wrap code that may throw exceptions in try blocks.

25
CCS361-ROBOTICPROCESSAUTOMATION UNIT -4 EXCEPTION HANDLING AND CODE MANAGEMENT

 Handle exceptions in catch blocks, allowing the program to continue running.

 Create Custom Exceptions:

 Define custom exception classes for specific error scenarios.


 This improves clarity and makes it easier to manage specific errors.

 Log Exceptions:

 Implement logging to capture exception details for troubleshooting.


 Use logging libraries to standardize error reporting.

 Avoid Silent Failures:

 Always handle exceptions explicitly rather than suppressing them.


 Ensure that the user or system is aware of any issues.

 Clean Up Resources:
o Use finally blocks or using statements (in languages like C#) to ensure resources
(e.g., files, connections) are released properly.

Enhancing Reusability in Exception Handling:

 Centralized Error Handling:


a. Create a centralized error handler that can be reused across different modules or
applications.
 Reusable Error Messages:
a. Define a set of standard error messages to promote consistency in user feedback.
 Exception Hierarchies:
a. Organize exceptions in a hierarchy to allow for more specific exception handling.
 Middleware for Web Applications:
a. Use middleware components to handle exceptions across different routes or
services in web applications.

Applications of RPA:

 Open mail and attachments.


 Fill in forms and move files and folders.
 Follow if-then decision rules.
 Connect to system APIs.
 Extract structured data from documents.
 Make complex calculations.
 Monitor manual processes and learn how to automate them.
 Copy and paste.

Conclusion:

1. Balancing Reusability and Performance:


a. While aiming for reusability, consider performance implications, especially in high-
traffic applications.
2. Continuous Improvement:
a. Regularly refactor code to enhance reusability and improve exception handling
strategies based on lessons learned from previous projects.

26
CCS361-ROBOTICPROCESSAUTOMATION UNIT -4 EXCEPTION HANDLING AND CODE MANAGEMENT

9. Explain in detail about templates, commenting technique in code management of


robotics process automation.

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.

Adding a workflow as a template:

Follow the steps given to add a workflow as a template, which is explained as follows:

1. Add a new folder in the Library

Figure 4.23 : Library

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

Figure 4.24: Remove in robotics process automation

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.

Therefore, commenting in a complex workflow is considered to be good while


debugging:

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.

Figure 4.25: Installation

28
CCS361-ROBOTICPROCESSAUTOMATION UNIT -4 EXCEPTION HANDLING AND CODE MANAGEMENT

Figure 4.26: Comment

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

Figure 4.27: State machine

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.

Figure 4.28: Final state

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

Figure 4.29: State 1

When to use Flowcharts, State Machines, or Sequences

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

Figure 4.30: Flowcharts, State Machines, or Sequences

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

You might also like