SlideShare a Scribd company logo
1 of 12
Download to read offline
Hands-On with
UiPath Studio Web
Practical Task Demonstrations
2
Vajrang Billlakurthi
Transformation Leader
@Vajrang IT Services Pvt Ltd
Swathi Nelakurthi
Associate Automation Developer
@Vajrang IT Services Pvt Ltd
3
• Overview:
- "Try Catch Finally" is used to handle exceptions and errors that may occur during the execution of a workflow. These
activities are essential for building robust and fault- tolerant automation processes.
- Try Catch Finally:
• Try: This is where you put the activities that you want to execute. These activities are the ones that might throw
exceptions during runtime. The Try block encapsulates these activities.
• Catch: This is where you handle any exceptions that occur within the Try block. You specify the type of exception
you want to catch (e.g., System.Exception) and what actions you want to take when that specific type of exception
occurs. You can have multiple Catch blocks to handle different types of exceptions.
• Finally: This block is optional. It contains activities that you want to execute regardless of whether an exception
occurs or not. This block is typically used for cleanup actions, such as closing files or connections.
• Retry:
- The "Retry" activity is used when you want to retry a specific set of activities a certain number of times or until a
specific condition is met. It is often used in scenarios where network issues, temporary glitches, or intermittent
errors may cause a workflow to fail
• Activity Body: Container where you can specify the activities
• Condition: You can set a condition that, if met, will stop the retry attempts even if the maximum number of retries
has not been reached. This is useful when you want to stop retrying after a certain condition is satisfied
Exception Handling
4
• Throw and Rethrow
• Throw:
- In UiPath, the "Throw" activity is used to manually generate an exception during the execution of a
workflow. This can be useful for various purposes, such as error handling or to force a specific behavior in
your automation process.
- When you use the "Throw" activity, you specify the type of exception you want to throw and provide an
optional message to describe the exception. This activity is typically used within a Try-Catch block or at
specific points in your workflow where you want to handle exceptions.
• Throw activity:
- Example Expression: New Exception(“An error occurred while reading the file.")
• Rethrow activity
- In UiPath, the "Rethrow" activity is used within a Catch block of a Try Catch activity. It throws a previously
caught exception. This allows the exception to be propagated to higher levels of exception handling.
- When an exception occurs within a Try Catch block and is caught by a Catch block, "Rethrow" allows you to
pass the exception to the next higher level of exception handling. This is useful if you want activities to occur
before the exception is thrown. It enables you to handle the exception at different levels of exception
handling or perform additional logging or cleanup operations before the exception is ultimately dealt with.
5
• Scenario:
- Retrieve a list of text files from Orchestrator Storage bucket, read the text and display their content.
• Requirements:
- Create a storage bucket named “StorageTextFiles” in the Orchestrator storage bucket to store text files.
- Upload Text files to the StorageTextFiles bucket. The following are the text files to be uploaded: 1.txt, 2.txt, 3.txt,
4.txt, 5.txt, 6.txt.
• Projects Objective:
- The project aims to retrieve text files from the "StorageTextFiles" bucket, read their content, and display the results.
- The scenario addresses handling exceptions, ensuring the process continues smoothly even if any file is missing
from the bucket
• Variables Used:
- StorageFilesList (IEnumerable<StorageFileInfo>) : This variable holds the list of storage file information
- currentItem: This is the autogenerated variable that holds each file's information from the list.
- ReadStorageTextResult: This variable holds the text file’s extracted text data using Read Storage Text activity.
Example Process on Exception Handling
6
• Get Storage Files List
- Use the List Storage Files activity to list the content of a certain directory in an Orchestrator storage bucket
• Orchestrator Folder Path: Provide the folder path in which your storage bucket exists (e.g., Shared).
• Storage Bucket name: Provide the storage bucket name (e.g., StorageTextFiles).
• Directory: Provide “” for the directory.
• The Result is the autogenerated variable of type IEnumerable<StorageFileInfo>, which holds the list of storage file
information. Create a new variable named StorageFilesList of type IEnumerable<StorageFileInfo> in place of the
autogenerated variable for better understanding.
• Log Files Count
- Use the Log Message activity to o log the count of files retrieved from the storage bucket.
• Message: The message format is specified as StorageFilesList.Count to display the count of files
Workflow Overview
7
• Iterate through each file:
- Use For Each activity to iterate through each file
• Provide the StorageFilesList variable in List of Items
• "currentItem" is the autogenerated variable that holds each file's information from the list.
- Inside the For Each:
• Read the Text Files:
• Use the Read Storage Text activity to read each text file from the list of files
- Orchestrator Folder Path: Provide the folder path in which your storage bucket exists (e.g., Shared).
- Storage Bucket name: Provide the storage bucket name (e.g., StorageTextFiles).
- File Path: Provide currentItem.FileFullPath, i.e., we are getting the text file (e.g., 1.txt).
- The Result is the autogenerated variable that holds the text file’s extracted text data using Read Storage
Text activity. Create a new variable named ReadStorageTextResult of type string in place of the
autogenerated variable for better understanding.
• Display the result:
• Use Log message activity to display the result
- Message: "Text File "+currentItem.FileFullPath+" data is"+Environment.NewLine+ReadStorageTextResult.
8
• Raise a scenario to show an exception:
- Add a breakpoint at the Read Storage Text activity.
- Test the process. The process pauses the automation at the breakpoint.
- Process Till breakpoint:
• Run the process, which pauses at the breakpoint.
• The automation successfully retrieves the list of files and logs the count as 6.
• It iterates through each file, holding the data in the currentItem variable
• Delete Text Files From StorageTextFiles bucket:
- Manually delete any 2 text files (e.g., 2.txt and 5.txt) from the StorageTextFiles bucket.
• Return to Process:
- Resume the process after deleting the files.
- The process attempts to read each file from the storage bucket.
- Due to missing files, it encounters an exception ("BlobFileInfo does not exist. Error code: 1002").
- As a result, the automation stops abruptly without processing the remaining files.
• Exception Handling Analysis:
- The scenario highlights the importance of robust exception handling.
- Without proper handling, encountering an exception disrupts the automation flow and prevents processing of
subsequent files.
9
• How to Handle Exception:
- Let's restore the deleted text files, specifically 2.txt and 5.txt, back into the StorageTextFiles bucket. This action is
essential to ensure that we have a sufficient number of text files to effectively demonstrate our exception
handling mechanisms.
• Try Catch activity
- Use Try Catch activity to handle exceptions
- To address the exception encountered during the reading of the storage text,
• We should relocate the "Read Storage Text" activity into the Try block.
• Additionally, transfer the Log Message activity responsible for outputting the extracted storage text result into
the same Try block.
• Handling Exceptions
- Now, the workflow will attempt to read the text if it's available and output the result. If the file doesn't exist, the
execution will transition to the Catch block where activities within it will be executed.
• In the Catch block, add an Exception variable to catch any exceptions.
• Insert a Log Message activity within the Catch block to output the exception message caught by the Catch
block.
• Test the process at a breakpoint to pause the execution.
• Manually delete "2.txt" and "5.txt" from the "StorageTextFiles" bucket.
• Return to the UiPath process and resume testing.
10
• The process will attempt to read each file and extract the text from it.
• For "1.txt", since the file is available, the Read Storage Text activity will read the file and store the extracted
text in a variable.
• Use a Log Message activity to display the result.
• However, for "2.txt", as the text file has been deleted, the process will check for its existence.
• Since the file is not found in the "StorageTextFiles" bucket, it will throw an exception stating "BlobFileInfo does
not exist. Error code: 1002".
• In this scenario, even if we encounter an exception, the process will not abruptly stop. It will provide details of
the exception and continue processing the next file.
• For instance, after successfully reading and outputting the results for "3.txt" and "4.txt", when attempting to
process "5.txt" (which was deleted), the process will check for its existence. Since the file is missing, it will
throw an exception stating "BlobFileInfo does not exist. Error code: 1002". However, the automation will
continue smoothly, proceeding to read "6.txt" and outputting its results.
• This demonstrates how exceptions can be handled gracefully, allowing the automation to continue processing
subsequent tasks without interruption.
11
• Conclusion:
- In this task, we have successfully demonstrated the importance of exception handling in UiPath automation
processes. By retrieving text files from the Orchestrator storage bucket, reading their content, and displaying the
results, we encountered a scenario where missing files caused exceptions.
- Through careful implementation of Try Catch activities, we were able to gracefully handle these exceptions
without disrupting the automation flow. By relocating the "Read Storage Text" activity into the Try block and
adding a Catch block to handle exceptions, we ensured that the process continued smoothly even when
encountering errors.
- Furthermore, by testing the process at breakpoints and manually deleting files to simulate real-world scenarios,
we verified that our exception handling mechanisms functioned effectively. Despite encountering exceptions,
the automation continued processing subsequent tasks, demonstrating the resilience and reliability of our
solution.
- In conclusion, proper exception handling is essential for building robust and fault-tolerant automation processes
in UiPath. By implementing Try Catch activities and handling exceptions gracefully, we can ensure the stability
and reliability of our automation solutions even in the face of unexpected errors or issues.
12
Studio Web Tenant Access
https://forms.office.com/r/pMKwTRDkkw

More Related Content

Similar to UiPath Studio Web workshop series - Day 7

Mulesoft idempotent Message Filter
Mulesoft idempotent Message FilterMulesoft idempotent Message Filter
Mulesoft idempotent Message Filterkumar gaurav
 
Until successful scope in mule
Until successful scope in muleUntil successful scope in mule
Until successful scope in muleAnkit Lawaniya
 
Fault-Tolerant File Input & Output
Fault-Tolerant File Input & OutputFault-Tolerant File Input & Output
Fault-Tolerant File Input & OutputApache Apex
 
File handling in Python
File handling in PythonFile handling in Python
File handling in PythonMegha V
 
Variables Arguments and control flow_UiPath.ppt
Variables Arguments and control flow_UiPath.pptVariables Arguments and control flow_UiPath.ppt
Variables Arguments and control flow_UiPath.pptRohit Radhakrishnan
 
Project FoX: A Tool That Offers Automated Testing Using a Formal Approach
Project FoX: A Tool That Offers Automated Testing Using a Formal ApproachProject FoX: A Tool That Offers Automated Testing Using a Formal Approach
Project FoX: A Tool That Offers Automated Testing Using a Formal ApproachIvo Neskovic
 
QTP Automation Testing Tutorial 6
QTP Automation Testing Tutorial 6QTP Automation Testing Tutorial 6
QTP Automation Testing Tutorial 6Akash Tyagi
 
Accelerating Data Ingestion with Databricks Autoloader
Accelerating Data Ingestion with Databricks AutoloaderAccelerating Data Ingestion with Databricks Autoloader
Accelerating Data Ingestion with Databricks AutoloaderDatabricks
 
Working with files (concepts/pseudocode/python)
Working with files (concepts/pseudocode/python)Working with files (concepts/pseudocode/python)
Working with files (concepts/pseudocode/python)FerryKemperman
 
Various types of File Operations in Java
Various types of  File Operations in JavaVarious types of  File Operations in Java
Various types of File Operations in JavaRanjithaM32
 
.NET Multithreading/Multitasking
.NET Multithreading/Multitasking.NET Multithreading/Multitasking
.NET Multithreading/MultitaskingSasha Kravchuk
 
Hybrid automation framework
Hybrid automation frameworkHybrid automation framework
Hybrid automation frameworkdoai tran
 
( 12 ) Office 2007 Features Custom List
( 12 ) Office 2007   Features   Custom List( 12 ) Office 2007   Features   Custom List
( 12 ) Office 2007 Features Custom ListLiquidHub
 
Performance Tuning - Memory leaks, Thread deadlocks, JDK tools
Performance Tuning -  Memory leaks, Thread deadlocks, JDK toolsPerformance Tuning -  Memory leaks, Thread deadlocks, JDK tools
Performance Tuning - Memory leaks, Thread deadlocks, JDK toolsHaribabu Nandyal Padmanaban
 
Roger Kenner Automating Posting
Roger Kenner Automating PostingRoger Kenner Automating Posting
Roger Kenner Automating PostingRoger Kenner
 

Similar to UiPath Studio Web workshop series - Day 7 (20)

Mulesoft idempotent Message Filter
Mulesoft idempotent Message FilterMulesoft idempotent Message Filter
Mulesoft idempotent Message Filter
 
Qtp launch
Qtp launchQtp launch
Qtp launch
 
Until successful scope in mule
Until successful scope in muleUntil successful scope in mule
Until successful scope in mule
 
Fault-Tolerant File Input & Output
Fault-Tolerant File Input & OutputFault-Tolerant File Input & Output
Fault-Tolerant File Input & Output
 
File handling in Python
File handling in PythonFile handling in Python
File handling in Python
 
Variables Arguments and control flow_UiPath.ppt
Variables Arguments and control flow_UiPath.pptVariables Arguments and control flow_UiPath.ppt
Variables Arguments and control flow_UiPath.ppt
 
41c
41c41c
41c
 
Project FoX: A Tool That Offers Automated Testing Using a Formal Approach
Project FoX: A Tool That Offers Automated Testing Using a Formal ApproachProject FoX: A Tool That Offers Automated Testing Using a Formal Approach
Project FoX: A Tool That Offers Automated Testing Using a Formal Approach
 
QTP Automation Testing Tutorial 6
QTP Automation Testing Tutorial 6QTP Automation Testing Tutorial 6
QTP Automation Testing Tutorial 6
 
Accelerating Data Ingestion with Databricks Autoloader
Accelerating Data Ingestion with Databricks AutoloaderAccelerating Data Ingestion with Databricks Autoloader
Accelerating Data Ingestion with Databricks Autoloader
 
Working with files (concepts/pseudocode/python)
Working with files (concepts/pseudocode/python)Working with files (concepts/pseudocode/python)
Working with files (concepts/pseudocode/python)
 
Various types of File Operations in Java
Various types of  File Operations in JavaVarious types of  File Operations in Java
Various types of File Operations in Java
 
.NET Multithreading/Multitasking
.NET Multithreading/Multitasking.NET Multithreading/Multitasking
.NET Multithreading/Multitasking
 
Hybrid automation framework
Hybrid automation frameworkHybrid automation framework
Hybrid automation framework
 
( 12 ) Office 2007 Features Custom List
( 12 ) Office 2007   Features   Custom List( 12 ) Office 2007   Features   Custom List
( 12 ) Office 2007 Features Custom List
 
Performance Tuning - Memory leaks, Thread deadlocks, JDK tools
Performance Tuning -  Memory leaks, Thread deadlocks, JDK toolsPerformance Tuning -  Memory leaks, Thread deadlocks, JDK tools
Performance Tuning - Memory leaks, Thread deadlocks, JDK tools
 
Tibco business works
Tibco business worksTibco business works
Tibco business works
 
AtoM's Command Line Tasks - An Introduction
AtoM's Command Line Tasks - An IntroductionAtoM's Command Line Tasks - An Introduction
AtoM's Command Line Tasks - An Introduction
 
Data file handling
Data file handlingData file handling
Data file handling
 
Roger Kenner Automating Posting
Roger Kenner Automating PostingRoger Kenner Automating Posting
Roger Kenner Automating Posting
 

More from DianaGray10

UiPath manufacturing technology benefits and AI overview
UiPath manufacturing technology benefits and AI overviewUiPath manufacturing technology benefits and AI overview
UiPath manufacturing technology benefits and AI overviewDianaGray10
 
Connector Corner: Accelerate revenue generation using UiPath API-centric busi...
Connector Corner: Accelerate revenue generation using UiPath API-centric busi...Connector Corner: Accelerate revenue generation using UiPath API-centric busi...
Connector Corner: Accelerate revenue generation using UiPath API-centric busi...DianaGray10
 
Take control of your SAP testing with UiPath Test Suite
Take control of your SAP testing with UiPath Test SuiteTake control of your SAP testing with UiPath Test Suite
Take control of your SAP testing with UiPath Test SuiteDianaGray10
 
Women in Automation 2024: Career session - explore career paths in automation
Women in Automation 2024: Career session - explore career paths in automationWomen in Automation 2024: Career session - explore career paths in automation
Women in Automation 2024: Career session - explore career paths in automationDianaGray10
 
Automation Ops Series: Session 3 - Solutions management
Automation Ops Series: Session 3 - Solutions managementAutomation Ops Series: Session 3 - Solutions management
Automation Ops Series: Session 3 - Solutions managementDianaGray10
 
Efficiencies in RPA with UiPath and CyberArk Technologies - Session 2
Efficiencies in RPA with UiPath and CyberArk Technologies - Session 2Efficiencies in RPA with UiPath and CyberArk Technologies - Session 2
Efficiencies in RPA with UiPath and CyberArk Technologies - Session 2DianaGray10
 
UiPath Platform: The Backend Engine Powering Your Automation - Session 2
UiPath Platform: The Backend Engine Powering Your Automation - Session 2UiPath Platform: The Backend Engine Powering Your Automation - Session 2
UiPath Platform: The Backend Engine Powering Your Automation - Session 2DianaGray10
 
Women in Automation 2024: Technical session - Get your career started in auto...
Women in Automation 2024: Technical session - Get your career started in auto...Women in Automation 2024: Technical session - Get your career started in auto...
Women in Automation 2024: Technical session - Get your career started in auto...DianaGray10
 
Unleashing the power of AI in UiPath Studio with UiPath Autopilot.
Unleashing the power of AI in UiPath Studio with UiPath Autopilot.Unleashing the power of AI in UiPath Studio with UiPath Autopilot.
Unleashing the power of AI in UiPath Studio with UiPath Autopilot.DianaGray10
 
Connector Corner: Extending LLM automation use cases with UiPath GenAI connec...
Connector Corner: Extending LLM automation use cases with UiPath GenAI connec...Connector Corner: Extending LLM automation use cases with UiPath GenAI connec...
Connector Corner: Extending LLM automation use cases with UiPath GenAI connec...DianaGray10
 
UiPath Solutions Management Preview - Northern CA Chapter - March 22.pdf
UiPath Solutions Management Preview - Northern CA Chapter - March 22.pdfUiPath Solutions Management Preview - Northern CA Chapter - March 22.pdf
UiPath Solutions Management Preview - Northern CA Chapter - March 22.pdfDianaGray10
 
UiPath Studio Web workshop series - Day 8
UiPath Studio Web workshop series - Day 8UiPath Studio Web workshop series - Day 8
UiPath Studio Web workshop series - Day 8DianaGray10
 
UiPath Platform: The Backend Engine Powering Your Automation - Session 1
UiPath Platform: The Backend Engine Powering Your Automation - Session 1UiPath Platform: The Backend Engine Powering Your Automation - Session 1
UiPath Platform: The Backend Engine Powering Your Automation - Session 1DianaGray10
 
Secure your environment with UiPath and CyberArk technologies - Session 1
Secure your environment with UiPath and CyberArk technologies - Session 1Secure your environment with UiPath and CyberArk technologies - Session 1
Secure your environment with UiPath and CyberArk technologies - Session 1DianaGray10
 
UiPath Studio Web workshop series - Day 6
UiPath Studio Web workshop series - Day 6UiPath Studio Web workshop series - Day 6
UiPath Studio Web workshop series - Day 6DianaGray10
 
UiPath Clipboard AI: "A TIME Magazine Best Invention of 2023 Unveiled"
UiPath Clipboard AI: "A TIME Magazine Best Invention of 2023 Unveiled"UiPath Clipboard AI: "A TIME Magazine Best Invention of 2023 Unveiled"
UiPath Clipboard AI: "A TIME Magazine Best Invention of 2023 Unveiled"DianaGray10
 
UiPath Studio Web workshop series - Day 5
UiPath Studio Web workshop series - Day 5UiPath Studio Web workshop series - Day 5
UiPath Studio Web workshop series - Day 5DianaGray10
 
UiPath Studio Web workshop series - Day 4
UiPath Studio Web workshop series - Day 4UiPath Studio Web workshop series - Day 4
UiPath Studio Web workshop series - Day 4DianaGray10
 
Automation Ops Series: Session 2 - Governance for UiPath projects
Automation Ops Series: Session 2 - Governance for UiPath projectsAutomation Ops Series: Session 2 - Governance for UiPath projects
Automation Ops Series: Session 2 - Governance for UiPath projectsDianaGray10
 
UiPath Studio Web workshop Series - Day 3
UiPath Studio Web workshop Series - Day 3UiPath Studio Web workshop Series - Day 3
UiPath Studio Web workshop Series - Day 3DianaGray10
 

More from DianaGray10 (20)

UiPath manufacturing technology benefits and AI overview
UiPath manufacturing technology benefits and AI overviewUiPath manufacturing technology benefits and AI overview
UiPath manufacturing technology benefits and AI overview
 
Connector Corner: Accelerate revenue generation using UiPath API-centric busi...
Connector Corner: Accelerate revenue generation using UiPath API-centric busi...Connector Corner: Accelerate revenue generation using UiPath API-centric busi...
Connector Corner: Accelerate revenue generation using UiPath API-centric busi...
 
Take control of your SAP testing with UiPath Test Suite
Take control of your SAP testing with UiPath Test SuiteTake control of your SAP testing with UiPath Test Suite
Take control of your SAP testing with UiPath Test Suite
 
Women in Automation 2024: Career session - explore career paths in automation
Women in Automation 2024: Career session - explore career paths in automationWomen in Automation 2024: Career session - explore career paths in automation
Women in Automation 2024: Career session - explore career paths in automation
 
Automation Ops Series: Session 3 - Solutions management
Automation Ops Series: Session 3 - Solutions managementAutomation Ops Series: Session 3 - Solutions management
Automation Ops Series: Session 3 - Solutions management
 
Efficiencies in RPA with UiPath and CyberArk Technologies - Session 2
Efficiencies in RPA with UiPath and CyberArk Technologies - Session 2Efficiencies in RPA with UiPath and CyberArk Technologies - Session 2
Efficiencies in RPA with UiPath and CyberArk Technologies - Session 2
 
UiPath Platform: The Backend Engine Powering Your Automation - Session 2
UiPath Platform: The Backend Engine Powering Your Automation - Session 2UiPath Platform: The Backend Engine Powering Your Automation - Session 2
UiPath Platform: The Backend Engine Powering Your Automation - Session 2
 
Women in Automation 2024: Technical session - Get your career started in auto...
Women in Automation 2024: Technical session - Get your career started in auto...Women in Automation 2024: Technical session - Get your career started in auto...
Women in Automation 2024: Technical session - Get your career started in auto...
 
Unleashing the power of AI in UiPath Studio with UiPath Autopilot.
Unleashing the power of AI in UiPath Studio with UiPath Autopilot.Unleashing the power of AI in UiPath Studio with UiPath Autopilot.
Unleashing the power of AI in UiPath Studio with UiPath Autopilot.
 
Connector Corner: Extending LLM automation use cases with UiPath GenAI connec...
Connector Corner: Extending LLM automation use cases with UiPath GenAI connec...Connector Corner: Extending LLM automation use cases with UiPath GenAI connec...
Connector Corner: Extending LLM automation use cases with UiPath GenAI connec...
 
UiPath Solutions Management Preview - Northern CA Chapter - March 22.pdf
UiPath Solutions Management Preview - Northern CA Chapter - March 22.pdfUiPath Solutions Management Preview - Northern CA Chapter - March 22.pdf
UiPath Solutions Management Preview - Northern CA Chapter - March 22.pdf
 
UiPath Studio Web workshop series - Day 8
UiPath Studio Web workshop series - Day 8UiPath Studio Web workshop series - Day 8
UiPath Studio Web workshop series - Day 8
 
UiPath Platform: The Backend Engine Powering Your Automation - Session 1
UiPath Platform: The Backend Engine Powering Your Automation - Session 1UiPath Platform: The Backend Engine Powering Your Automation - Session 1
UiPath Platform: The Backend Engine Powering Your Automation - Session 1
 
Secure your environment with UiPath and CyberArk technologies - Session 1
Secure your environment with UiPath and CyberArk technologies - Session 1Secure your environment with UiPath and CyberArk technologies - Session 1
Secure your environment with UiPath and CyberArk technologies - Session 1
 
UiPath Studio Web workshop series - Day 6
UiPath Studio Web workshop series - Day 6UiPath Studio Web workshop series - Day 6
UiPath Studio Web workshop series - Day 6
 
UiPath Clipboard AI: "A TIME Magazine Best Invention of 2023 Unveiled"
UiPath Clipboard AI: "A TIME Magazine Best Invention of 2023 Unveiled"UiPath Clipboard AI: "A TIME Magazine Best Invention of 2023 Unveiled"
UiPath Clipboard AI: "A TIME Magazine Best Invention of 2023 Unveiled"
 
UiPath Studio Web workshop series - Day 5
UiPath Studio Web workshop series - Day 5UiPath Studio Web workshop series - Day 5
UiPath Studio Web workshop series - Day 5
 
UiPath Studio Web workshop series - Day 4
UiPath Studio Web workshop series - Day 4UiPath Studio Web workshop series - Day 4
UiPath Studio Web workshop series - Day 4
 
Automation Ops Series: Session 2 - Governance for UiPath projects
Automation Ops Series: Session 2 - Governance for UiPath projectsAutomation Ops Series: Session 2 - Governance for UiPath projects
Automation Ops Series: Session 2 - Governance for UiPath projects
 
UiPath Studio Web workshop Series - Day 3
UiPath Studio Web workshop Series - Day 3UiPath Studio Web workshop Series - Day 3
UiPath Studio Web workshop Series - Day 3
 

Recently uploaded

Apidays New York 2024 - Scaling API-first by Ian Reasor and Radu Cotescu, Adobe
Apidays New York 2024 - Scaling API-first by Ian Reasor and Radu Cotescu, AdobeApidays New York 2024 - Scaling API-first by Ian Reasor and Radu Cotescu, Adobe
Apidays New York 2024 - Scaling API-first by Ian Reasor and Radu Cotescu, Adobeapidays
 
Corporate and higher education May webinar.pptx
Corporate and higher education May webinar.pptxCorporate and higher education May webinar.pptx
Corporate and higher education May webinar.pptxRustici Software
 
FWD Group - Insurer Innovation Award 2024
FWD Group - Insurer Innovation Award 2024FWD Group - Insurer Innovation Award 2024
FWD Group - Insurer Innovation Award 2024The Digital Insurer
 
Apidays New York 2024 - Accelerating FinTech Innovation by Vasa Krishnan, Fin...
Apidays New York 2024 - Accelerating FinTech Innovation by Vasa Krishnan, Fin...Apidays New York 2024 - Accelerating FinTech Innovation by Vasa Krishnan, Fin...
Apidays New York 2024 - Accelerating FinTech Innovation by Vasa Krishnan, Fin...apidays
 
Spring Boot vs Quarkus the ultimate battle - DevoxxUK
Spring Boot vs Quarkus the ultimate battle - DevoxxUKSpring Boot vs Quarkus the ultimate battle - DevoxxUK
Spring Boot vs Quarkus the ultimate battle - DevoxxUKJago de Vreede
 
Six Myths about Ontologies: The Basics of Formal Ontology
Six Myths about Ontologies: The Basics of Formal OntologySix Myths about Ontologies: The Basics of Formal Ontology
Six Myths about Ontologies: The Basics of Formal Ontologyjohnbeverley2021
 
Apidays New York 2024 - Passkeys: Developing APIs to enable passwordless auth...
Apidays New York 2024 - Passkeys: Developing APIs to enable passwordless auth...Apidays New York 2024 - Passkeys: Developing APIs to enable passwordless auth...
Apidays New York 2024 - Passkeys: Developing APIs to enable passwordless auth...apidays
 
How to Troubleshoot Apps for the Modern Connected Worker
How to Troubleshoot Apps for the Modern Connected WorkerHow to Troubleshoot Apps for the Modern Connected Worker
How to Troubleshoot Apps for the Modern Connected WorkerThousandEyes
 
AWS Community Day CPH - Three problems of Terraform
AWS Community Day CPH - Three problems of TerraformAWS Community Day CPH - Three problems of Terraform
AWS Community Day CPH - Three problems of TerraformAndrey Devyatkin
 
[BuildWithAI] Introduction to Gemini.pdf
[BuildWithAI] Introduction to Gemini.pdf[BuildWithAI] Introduction to Gemini.pdf
[BuildWithAI] Introduction to Gemini.pdfSandro Moreira
 
CNIC Information System with Pakdata Cf In Pakistan
CNIC Information System with Pakdata Cf In PakistanCNIC Information System with Pakdata Cf In Pakistan
CNIC Information System with Pakdata Cf In Pakistandanishmna97
 
"I see eyes in my soup": How Delivery Hero implemented the safety system for ...
"I see eyes in my soup": How Delivery Hero implemented the safety system for ..."I see eyes in my soup": How Delivery Hero implemented the safety system for ...
"I see eyes in my soup": How Delivery Hero implemented the safety system for ...Zilliz
 
AI in Action: Real World Use Cases by Anitaraj
AI in Action: Real World Use Cases by AnitarajAI in Action: Real World Use Cases by Anitaraj
AI in Action: Real World Use Cases by AnitarajAnitaRaj43
 
Cloud Frontiers: A Deep Dive into Serverless Spatial Data and FME
Cloud Frontiers:  A Deep Dive into Serverless Spatial Data and FMECloud Frontiers:  A Deep Dive into Serverless Spatial Data and FME
Cloud Frontiers: A Deep Dive into Serverless Spatial Data and FMESafe Software
 
Rising Above_ Dubai Floods and the Fortitude of Dubai International Airport.pdf
Rising Above_ Dubai Floods and the Fortitude of Dubai International Airport.pdfRising Above_ Dubai Floods and the Fortitude of Dubai International Airport.pdf
Rising Above_ Dubai Floods and the Fortitude of Dubai International Airport.pdfOrbitshub
 
MINDCTI Revenue Release Quarter One 2024
MINDCTI Revenue Release Quarter One 2024MINDCTI Revenue Release Quarter One 2024
MINDCTI Revenue Release Quarter One 2024MIND CTI
 
presentation ICT roal in 21st century education
presentation ICT roal in 21st century educationpresentation ICT roal in 21st century education
presentation ICT roal in 21st century educationjfdjdjcjdnsjd
 
AI+A11Y 11MAY2024 HYDERBAD GAAD 2024 - HelloA11Y (11 May 2024)
AI+A11Y 11MAY2024 HYDERBAD GAAD 2024 - HelloA11Y (11 May 2024)AI+A11Y 11MAY2024 HYDERBAD GAAD 2024 - HelloA11Y (11 May 2024)
AI+A11Y 11MAY2024 HYDERBAD GAAD 2024 - HelloA11Y (11 May 2024)Samir Dash
 

Recently uploaded (20)

Apidays New York 2024 - Scaling API-first by Ian Reasor and Radu Cotescu, Adobe
Apidays New York 2024 - Scaling API-first by Ian Reasor and Radu Cotescu, AdobeApidays New York 2024 - Scaling API-first by Ian Reasor and Radu Cotescu, Adobe
Apidays New York 2024 - Scaling API-first by Ian Reasor and Radu Cotescu, Adobe
 
Corporate and higher education May webinar.pptx
Corporate and higher education May webinar.pptxCorporate and higher education May webinar.pptx
Corporate and higher education May webinar.pptx
 
FWD Group - Insurer Innovation Award 2024
FWD Group - Insurer Innovation Award 2024FWD Group - Insurer Innovation Award 2024
FWD Group - Insurer Innovation Award 2024
 
Apidays New York 2024 - Accelerating FinTech Innovation by Vasa Krishnan, Fin...
Apidays New York 2024 - Accelerating FinTech Innovation by Vasa Krishnan, Fin...Apidays New York 2024 - Accelerating FinTech Innovation by Vasa Krishnan, Fin...
Apidays New York 2024 - Accelerating FinTech Innovation by Vasa Krishnan, Fin...
 
Spring Boot vs Quarkus the ultimate battle - DevoxxUK
Spring Boot vs Quarkus the ultimate battle - DevoxxUKSpring Boot vs Quarkus the ultimate battle - DevoxxUK
Spring Boot vs Quarkus the ultimate battle - DevoxxUK
 
+971581248768>> SAFE AND ORIGINAL ABORTION PILLS FOR SALE IN DUBAI AND ABUDHA...
+971581248768>> SAFE AND ORIGINAL ABORTION PILLS FOR SALE IN DUBAI AND ABUDHA...+971581248768>> SAFE AND ORIGINAL ABORTION PILLS FOR SALE IN DUBAI AND ABUDHA...
+971581248768>> SAFE AND ORIGINAL ABORTION PILLS FOR SALE IN DUBAI AND ABUDHA...
 
Six Myths about Ontologies: The Basics of Formal Ontology
Six Myths about Ontologies: The Basics of Formal OntologySix Myths about Ontologies: The Basics of Formal Ontology
Six Myths about Ontologies: The Basics of Formal Ontology
 
Apidays New York 2024 - Passkeys: Developing APIs to enable passwordless auth...
Apidays New York 2024 - Passkeys: Developing APIs to enable passwordless auth...Apidays New York 2024 - Passkeys: Developing APIs to enable passwordless auth...
Apidays New York 2024 - Passkeys: Developing APIs to enable passwordless auth...
 
How to Troubleshoot Apps for the Modern Connected Worker
How to Troubleshoot Apps for the Modern Connected WorkerHow to Troubleshoot Apps for the Modern Connected Worker
How to Troubleshoot Apps for the Modern Connected Worker
 
AWS Community Day CPH - Three problems of Terraform
AWS Community Day CPH - Three problems of TerraformAWS Community Day CPH - Three problems of Terraform
AWS Community Day CPH - Three problems of Terraform
 
[BuildWithAI] Introduction to Gemini.pdf
[BuildWithAI] Introduction to Gemini.pdf[BuildWithAI] Introduction to Gemini.pdf
[BuildWithAI] Introduction to Gemini.pdf
 
Understanding the FAA Part 107 License ..
Understanding the FAA Part 107 License ..Understanding the FAA Part 107 License ..
Understanding the FAA Part 107 License ..
 
CNIC Information System with Pakdata Cf In Pakistan
CNIC Information System with Pakdata Cf In PakistanCNIC Information System with Pakdata Cf In Pakistan
CNIC Information System with Pakdata Cf In Pakistan
 
"I see eyes in my soup": How Delivery Hero implemented the safety system for ...
"I see eyes in my soup": How Delivery Hero implemented the safety system for ..."I see eyes in my soup": How Delivery Hero implemented the safety system for ...
"I see eyes in my soup": How Delivery Hero implemented the safety system for ...
 
AI in Action: Real World Use Cases by Anitaraj
AI in Action: Real World Use Cases by AnitarajAI in Action: Real World Use Cases by Anitaraj
AI in Action: Real World Use Cases by Anitaraj
 
Cloud Frontiers: A Deep Dive into Serverless Spatial Data and FME
Cloud Frontiers:  A Deep Dive into Serverless Spatial Data and FMECloud Frontiers:  A Deep Dive into Serverless Spatial Data and FME
Cloud Frontiers: A Deep Dive into Serverless Spatial Data and FME
 
Rising Above_ Dubai Floods and the Fortitude of Dubai International Airport.pdf
Rising Above_ Dubai Floods and the Fortitude of Dubai International Airport.pdfRising Above_ Dubai Floods and the Fortitude of Dubai International Airport.pdf
Rising Above_ Dubai Floods and the Fortitude of Dubai International Airport.pdf
 
MINDCTI Revenue Release Quarter One 2024
MINDCTI Revenue Release Quarter One 2024MINDCTI Revenue Release Quarter One 2024
MINDCTI Revenue Release Quarter One 2024
 
presentation ICT roal in 21st century education
presentation ICT roal in 21st century educationpresentation ICT roal in 21st century education
presentation ICT roal in 21st century education
 
AI+A11Y 11MAY2024 HYDERBAD GAAD 2024 - HelloA11Y (11 May 2024)
AI+A11Y 11MAY2024 HYDERBAD GAAD 2024 - HelloA11Y (11 May 2024)AI+A11Y 11MAY2024 HYDERBAD GAAD 2024 - HelloA11Y (11 May 2024)
AI+A11Y 11MAY2024 HYDERBAD GAAD 2024 - HelloA11Y (11 May 2024)
 

UiPath Studio Web workshop series - Day 7

  • 1. Hands-On with UiPath Studio Web Practical Task Demonstrations
  • 2. 2 Vajrang Billlakurthi Transformation Leader @Vajrang IT Services Pvt Ltd Swathi Nelakurthi Associate Automation Developer @Vajrang IT Services Pvt Ltd
  • 3. 3 • Overview: - "Try Catch Finally" is used to handle exceptions and errors that may occur during the execution of a workflow. These activities are essential for building robust and fault- tolerant automation processes. - Try Catch Finally: • Try: This is where you put the activities that you want to execute. These activities are the ones that might throw exceptions during runtime. The Try block encapsulates these activities. • Catch: This is where you handle any exceptions that occur within the Try block. You specify the type of exception you want to catch (e.g., System.Exception) and what actions you want to take when that specific type of exception occurs. You can have multiple Catch blocks to handle different types of exceptions. • Finally: This block is optional. It contains activities that you want to execute regardless of whether an exception occurs or not. This block is typically used for cleanup actions, such as closing files or connections. • Retry: - The "Retry" activity is used when you want to retry a specific set of activities a certain number of times or until a specific condition is met. It is often used in scenarios where network issues, temporary glitches, or intermittent errors may cause a workflow to fail • Activity Body: Container where you can specify the activities • Condition: You can set a condition that, if met, will stop the retry attempts even if the maximum number of retries has not been reached. This is useful when you want to stop retrying after a certain condition is satisfied Exception Handling
  • 4. 4 • Throw and Rethrow • Throw: - In UiPath, the "Throw" activity is used to manually generate an exception during the execution of a workflow. This can be useful for various purposes, such as error handling or to force a specific behavior in your automation process. - When you use the "Throw" activity, you specify the type of exception you want to throw and provide an optional message to describe the exception. This activity is typically used within a Try-Catch block or at specific points in your workflow where you want to handle exceptions. • Throw activity: - Example Expression: New Exception(“An error occurred while reading the file.") • Rethrow activity - In UiPath, the "Rethrow" activity is used within a Catch block of a Try Catch activity. It throws a previously caught exception. This allows the exception to be propagated to higher levels of exception handling. - When an exception occurs within a Try Catch block and is caught by a Catch block, "Rethrow" allows you to pass the exception to the next higher level of exception handling. This is useful if you want activities to occur before the exception is thrown. It enables you to handle the exception at different levels of exception handling or perform additional logging or cleanup operations before the exception is ultimately dealt with.
  • 5. 5 • Scenario: - Retrieve a list of text files from Orchestrator Storage bucket, read the text and display their content. • Requirements: - Create a storage bucket named “StorageTextFiles” in the Orchestrator storage bucket to store text files. - Upload Text files to the StorageTextFiles bucket. The following are the text files to be uploaded: 1.txt, 2.txt, 3.txt, 4.txt, 5.txt, 6.txt. • Projects Objective: - The project aims to retrieve text files from the "StorageTextFiles" bucket, read their content, and display the results. - The scenario addresses handling exceptions, ensuring the process continues smoothly even if any file is missing from the bucket • Variables Used: - StorageFilesList (IEnumerable<StorageFileInfo>) : This variable holds the list of storage file information - currentItem: This is the autogenerated variable that holds each file's information from the list. - ReadStorageTextResult: This variable holds the text file’s extracted text data using Read Storage Text activity. Example Process on Exception Handling
  • 6. 6 • Get Storage Files List - Use the List Storage Files activity to list the content of a certain directory in an Orchestrator storage bucket • Orchestrator Folder Path: Provide the folder path in which your storage bucket exists (e.g., Shared). • Storage Bucket name: Provide the storage bucket name (e.g., StorageTextFiles). • Directory: Provide “” for the directory. • The Result is the autogenerated variable of type IEnumerable<StorageFileInfo>, which holds the list of storage file information. Create a new variable named StorageFilesList of type IEnumerable<StorageFileInfo> in place of the autogenerated variable for better understanding. • Log Files Count - Use the Log Message activity to o log the count of files retrieved from the storage bucket. • Message: The message format is specified as StorageFilesList.Count to display the count of files Workflow Overview
  • 7. 7 • Iterate through each file: - Use For Each activity to iterate through each file • Provide the StorageFilesList variable in List of Items • "currentItem" is the autogenerated variable that holds each file's information from the list. - Inside the For Each: • Read the Text Files: • Use the Read Storage Text activity to read each text file from the list of files - Orchestrator Folder Path: Provide the folder path in which your storage bucket exists (e.g., Shared). - Storage Bucket name: Provide the storage bucket name (e.g., StorageTextFiles). - File Path: Provide currentItem.FileFullPath, i.e., we are getting the text file (e.g., 1.txt). - The Result is the autogenerated variable that holds the text file’s extracted text data using Read Storage Text activity. Create a new variable named ReadStorageTextResult of type string in place of the autogenerated variable for better understanding. • Display the result: • Use Log message activity to display the result - Message: "Text File "+currentItem.FileFullPath+" data is"+Environment.NewLine+ReadStorageTextResult.
  • 8. 8 • Raise a scenario to show an exception: - Add a breakpoint at the Read Storage Text activity. - Test the process. The process pauses the automation at the breakpoint. - Process Till breakpoint: • Run the process, which pauses at the breakpoint. • The automation successfully retrieves the list of files and logs the count as 6. • It iterates through each file, holding the data in the currentItem variable • Delete Text Files From StorageTextFiles bucket: - Manually delete any 2 text files (e.g., 2.txt and 5.txt) from the StorageTextFiles bucket. • Return to Process: - Resume the process after deleting the files. - The process attempts to read each file from the storage bucket. - Due to missing files, it encounters an exception ("BlobFileInfo does not exist. Error code: 1002"). - As a result, the automation stops abruptly without processing the remaining files. • Exception Handling Analysis: - The scenario highlights the importance of robust exception handling. - Without proper handling, encountering an exception disrupts the automation flow and prevents processing of subsequent files.
  • 9. 9 • How to Handle Exception: - Let's restore the deleted text files, specifically 2.txt and 5.txt, back into the StorageTextFiles bucket. This action is essential to ensure that we have a sufficient number of text files to effectively demonstrate our exception handling mechanisms. • Try Catch activity - Use Try Catch activity to handle exceptions - To address the exception encountered during the reading of the storage text, • We should relocate the "Read Storage Text" activity into the Try block. • Additionally, transfer the Log Message activity responsible for outputting the extracted storage text result into the same Try block. • Handling Exceptions - Now, the workflow will attempt to read the text if it's available and output the result. If the file doesn't exist, the execution will transition to the Catch block where activities within it will be executed. • In the Catch block, add an Exception variable to catch any exceptions. • Insert a Log Message activity within the Catch block to output the exception message caught by the Catch block. • Test the process at a breakpoint to pause the execution. • Manually delete "2.txt" and "5.txt" from the "StorageTextFiles" bucket. • Return to the UiPath process and resume testing.
  • 10. 10 • The process will attempt to read each file and extract the text from it. • For "1.txt", since the file is available, the Read Storage Text activity will read the file and store the extracted text in a variable. • Use a Log Message activity to display the result. • However, for "2.txt", as the text file has been deleted, the process will check for its existence. • Since the file is not found in the "StorageTextFiles" bucket, it will throw an exception stating "BlobFileInfo does not exist. Error code: 1002". • In this scenario, even if we encounter an exception, the process will not abruptly stop. It will provide details of the exception and continue processing the next file. • For instance, after successfully reading and outputting the results for "3.txt" and "4.txt", when attempting to process "5.txt" (which was deleted), the process will check for its existence. Since the file is missing, it will throw an exception stating "BlobFileInfo does not exist. Error code: 1002". However, the automation will continue smoothly, proceeding to read "6.txt" and outputting its results. • This demonstrates how exceptions can be handled gracefully, allowing the automation to continue processing subsequent tasks without interruption.
  • 11. 11 • Conclusion: - In this task, we have successfully demonstrated the importance of exception handling in UiPath automation processes. By retrieving text files from the Orchestrator storage bucket, reading their content, and displaying the results, we encountered a scenario where missing files caused exceptions. - Through careful implementation of Try Catch activities, we were able to gracefully handle these exceptions without disrupting the automation flow. By relocating the "Read Storage Text" activity into the Try block and adding a Catch block to handle exceptions, we ensured that the process continued smoothly even when encountering errors. - Furthermore, by testing the process at breakpoints and manually deleting files to simulate real-world scenarios, we verified that our exception handling mechanisms functioned effectively. Despite encountering exceptions, the automation continued processing subsequent tasks, demonstrating the resilience and reliability of our solution. - In conclusion, proper exception handling is essential for building robust and fault-tolerant automation processes in UiPath. By implementing Try Catch activities and handling exceptions gracefully, we can ensure the stability and reliability of our automation solutions even in the face of unexpected errors or issues.
  • 12. 12 Studio Web Tenant Access https://forms.office.com/r/pMKwTRDkkw