No ratings

Creating Error Handling Task with Logging

Topic

Error handling is a Task created to tell the bot what to do when it encounters an error.

Error handling can be wrapped around parts of the script as needed to tell the bot what to do.

 

For instance, after data is imported and records are being run, there may be an issue where the bot is not able to continue to run and needs some logic to tell it what to do.

Instructions


These instructions are to create a Log, create an Error Task, implement the Error Task, and test it.

 

First import your data first in RPA.

 

A. Create Log

1. Open Excel locally and save a blank csv file. // this is going to be where your logging will go
2. Close the csv file.
3. Open RPA, on the far right column click '+', click 'Log', give it a Name, select the location of the csv file that you created.
4. Click the top left '+' icon in this popup, click 'Record Number', click 'Item to process' or the name of the record that identifies which record value to log
5. There should be a couple of rows generated and the preview field should have some values.
6. Click Ok

 

B. Create the Error Task

1. Go to the far right column in RPA and click the '+' icon
2. Select 'Task'
3. Title it 'Error Task: Log and go to next record'
4. You should now see 2 Tasks, double click on the Error Task (observe that the title 'Error Task:..' is listed in the top Left Column)
5. Go to far left column under Actions, click Data, click Write Log, change the message type to Error, toggle to "Don't Run", click OK
6. Go to the far left column under Actions and click Flow->Resume, select 'Skip the Action', toggle to "Don't Run", click OK


C. Implement the Error Task

1. On the far right column in RPA, click Tasks, double click on the name of your main task
2. Your main task with the steps should show in the left column
3. Locate the spot in your script after you have imported your data and before you begin to process your data,
4. Go to the far Left column, under Actions, click Flow, click 'Set Error Task'
5. From the drop down, select the name of the Error Task that you already created, toggle "Don't Run", click OK
6. Locate the point in your script where all of the records should be done processing
7. Go to the far Left column, under Actions, click Flow, click 'Clear Error Task', toggle "Don't Run", click OK

-------

Test the script by running it from the top, each record that is missed will go to the CSV file created.

 

Additional Information

 

 

Related Links

Labels: (2)
Version history
Last update:
‎03-23-2022 05:25 AM
Updated by:
Contributors