Knowledge Base

Create Error Handling Task with Logging

  • 15 February 2022
  • 0 replies
  • 53 views

Userlevel 1
Badge +8

Error handling is a task created to tell the bot what to do when encountering 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 in RPA LE.

Create Log

  1. Open Excel locally and save a blank CSI file. This is going to be where your logging will go.
  2. Close the CSV file.
  3. Open RPA LE. On the far right column, click +, click Log, give it a Name, and 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. A couple of rows should be generated and the preview field should have some values.
  6. Click OK.

Create the Error Task

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

Implement the Error Task

  1. On the far right column in RPA LE, click Tasks, and 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, and then click Set Error Task.
  5. From the drop-down, select the name of the Error Task that you already created, toggle Don't Run, and click OK.
  6. Locate the point in your script where all the records should be processed.
  7. Go to the far left column, under Actions, click Flow, click Clear Error Task, toggle Don't Run, and 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


0 replies

Be the first to reply!

Reply