Design Error Handling in Workflows

Hi! All

What are the approaches to designing error handling in simple or parent-child workflows?

1 Like


Use Try-Catch whenever possible so you do not have to configure error handling for each step. You can capture specific errors (step defined, system, syntactical or runtime errors)), success, failure and error handling for the Try-Catch step pair itself. You can display the error on the AutomationEdge UI using the Set Workflow Result step.

A sample workflow with Try-Catch.

If you require custom messages, you can declare status and message in a Modified Java Script step on the error handling path. Following the Modified Java Script step, you can have the Set Variables step to set status and message as global variables. Defining status and message as global variables is particularly required in case of parent-child workflows. You can then specify the variables for status and message in the Set Workflow Result step.

Below is a sample child workflow with status and message declared in Modified Java Script and set as global variables. It is followed by a parent workflow that uses the global variables in a Set Workflow Result step.

Child workflow:

Parent workflow:

1 Like