UiPath – Different Types of Activities | Intellipaat

Rethrow: From a Try Catch activity, it throws an exception that has already been thrown. The mistake is rethrown while keeping the exception’s original source. Only the Catch block of the Try Catch data relevant for the use of Rethrow. It’s really rethrowing the very same error to the outside try catch block, to put it another way. This most frequently occurs while using a framework and several workflow modules.

 

Rethrow – How to Use

  • From the activity screen, search for Rethrow activity.
  • Rethrow activity should be dropped into the catch part.

Terminate Workflow: You can utilize the Terminate Workflow action to end a Workflow Job at a given time and with a certain exception. With the designated exception a Final Severity of “Error,” the Terminate Workflow action immediately terminates the Workflow Job.

 

  • The activity panel’s activity is stopped by searches.
  • In the action pDrag & drop Terminate Activity.anel, searches for activity termination.
  • Put the exception’s declaration in the exception field.

 

Throw: – The Throw Activity can be used to create a user-defined exception. You can implement all business scenario verification in your code by using the Throw activity. Consider the following scenario: You receive an Excel file containing 10 columns for your project. Therefore, you can add a verification if the file’s “.xls” extension is missing or its column count is less than or larger than 10, issue a business exception, and email each needed stack holder to ask them to fix the file’s formatting and resubmit it.

  • Activity is thrown into the activity panel by search.
  • Enter your exception for the Throw activity’s property.

 

Try Catch Workflow: The core skeleton of the code is try catch. Anywhere that feels like there might be a mistake, Try Catch is a technique that can assist you in identifying errors and handling them politely so that other transactions can be completed and your process won’t be interrupted.

 

Catches a specific exception of a certain type inside a sequence or activity and either displays a failure warning or ignores it so that the execution can go on.

 

The task is divided into three primary parts:

 

  • The function “try” holds the possible exception-throwing behaviour.
  • Specifies the type of exception and, if present, holds an action that alerts the user to the discovered exception.
  • Finally – contains a function that should only be used if there was no error or if the issue has previously been detected.

 

You can utilise as many Catches as you want in a Try Catch activity.

Remember that at minimum two of the fields must be in use for this activity to take place. It cannot be run with just the Try field filled in.

 

  • In the activity panel, search for and then drag and drop any relevant activity. Alternatively, you can right-click on the action or sequence that you want to include in the try-catch condition.
  • Make your exception actionable after selecting your exception type in the catch part’s drop-down selection.

Leave a Reply

Your email address will not be published. Required fields are marked *