Search icon CANCEL
Subscription
0
Cart icon
Your Cart (0 item)
Close icon
You have no products in your basket yet
Arrow left icon
Explore Products
Best Sellers
New Releases
Books
Videos
Audiobooks
Learning Hub
Free Learning
Arrow right icon
Arrow up icon
GO TO TOP
Robotic Process Automation Projects

You're reading from   Robotic Process Automation Projects Build real-world RPA solutions using UiPath and Automation Anywhere

Arrow left icon
Product type Paperback
Published in May 2020
Publisher Packt
ISBN-13 9781839217357
Length 388 pages
Edition 1st Edition
Arrow right icon
Authors (3):
Arrow left icon
Ivan Loncar Ivan Loncar
Author Profile Icon Ivan Loncar
Ivan Loncar
Arun Kumar Asokan Arun Kumar Asokan
Author Profile Icon Arun Kumar Asokan
Arun Kumar Asokan
Nandan Mullakara Nandan Mullakara
Author Profile Icon Nandan Mullakara
Nandan Mullakara
Arrow right icon
View More author details
Toc

Table of Contents (14) Chapters Close

Preface 1. Getting Started with Robotic Process Automation 2. Help Desk Ticket Generation FREE CHAPTER 3. CRM Automation 4. Moderating Social Media Using AI 5. Purchase Order Processing with UiPath ReFramework 6. Completing an RPA Challenge 7. Sales Order Processing 8. ERP User Administration 9. Employee Emergency Notifications 10. Using AI and RPA for Invoice Processing 11. Other Books You May Enjoy Appendix A and B for UiPath 1. Appendix: Looking Forward and Next Steps

Invoking the Excel workflow from Main

Let's now go back to the Main sequence to invoke this newly created ReadExcelRequest workflow. If you recall, we added a message within the main workflow if there are requests available to process. Let's invoke the read Excel workflow right after that:

  1. Let's add the Invoke Workflow File UiPath activity in the Then block of the If control:

  1. Let's populate this new activity with the ReadExcelRequest workflow path. To do that, click on the three dots on the right of the first parameter. Select the ReadExcelRequest.xaml file in your project folder:

  1. Now, let's create three new variables to store the data that we would get from the ReadExcelRequest workflow. Go to the Variables pane at the bottom of Studio and add variables for contact name, email, and subject, as shown in the following screenshot:

Note Variable type and Scope and ensure that you match what is shown.

Naming convention: Please use descriptive names for variables and arguments to enable easy understanding. We recommend that variables follow camel case, with the standard prefixed with the type of variable, for example, boolFileExists. Arguments can follow Pascal case; for example, ContactName.
  1. If you recall, we had a few arguments in the ReadExcelRequest workflow to pass data back to Main. Let's now pass data by clicking on Import Arguments and mapping the data. For that, within the Invoked workflow's arguments window, let's perform the following steps: 
    • Populate RequestFilePath with the path to the file: Environment.CurrentDirectory+"\Requests\Request.xlsx":

    • Map the new variables we added previously to the respective argument value:

  1. Since this is a learning exercise, let's add a message box to display ContactName, Email, and Subject for us to establish whether the bot got it right:

  1. Let's now perform a quick test of the workflow so far. Click on Run to run this main workflow. Please ensure that your Excel file is closed before you run the workflow:

You should get the initial message that we added: Agent Ready. Press Alt + s to trigger Automation. Click OK on this message box to acknowledge and press Alt + S to start the bot. Next, you should get the second message that there is a Request file to process and so to proceed with ticket creation. Finally, when it runs successfully, we can expect the message box with the name, email, and subject content that we added in the steps we just completed. 

Automation will always continue to run by default. Therefore, please click on the Studio Stop button to stop the bot. 

We have now completed the part where we read the data from the Request spreadsheet and are now ready to take this data and create our support ticket. Let's go!

You have been reading a chapter from
Robotic Process Automation Projects
Published in: May 2020
Publisher: Packt
ISBN-13: 9781839217357
Register for a free Packt account to unlock a world of extra content!
A free Packt account unlocks extra newsletters, articles, discounted offers, and much more. Start advancing your knowledge today.
Unlock this book and the full library FREE for 7 days
Get unlimited access to 7000+ expert-authored eBooks and videos courses covering every tech area you can think of
Renews at $19.99/month. Cancel anytime
Banner background image