Try-Catch
This activity specifies a sequence of activities to perform (in a try branch) and additional activities to perform (in a catch branch) if an activity in the try branch encounters an error. This prevents the workflow from terminating due to the error. The Rethrow activity recreates the error that started a Try-Catch activity's catch branch. Learn about tokens this activity produces
To set up this activity:
- Drag the activity from the toolbox pane and drop it in the Designer pane.
- In the properties pane, type a name and description of the activity.
- In the Connection Profile property box, select the repository you want the activity to use.
- Drag the activities you want to attempt and drop them into the Try Branch.
- Drag the activities you want to catch and drop them into the Catch Branch.
- Select the Catch Branch.
- In the Error Type property box, select the error type to cause the Catch Branch to run.
- All Errors: The Catch Branch will run if the try branch encounters any error.
- Only errors of type: The Catch Branch will run only if the try branch encounters a specified type of error. To specify the type of error:
- Click the Browse button (ellipsis) to browse to an exception type.
- Select an error type by expanding a node. If you cannot find the error type, type the assembly qualified name of the exception type in the text box.
- Click OK.
To delete a catch branch:
- Select a branch in the designer pane to highlight it.
- Click the Delete Selected Activity button in the toolbar.