Creating an Error Handler Flow

Use the Error Handler to catch exceptions that occur while running a flow. The error handler is designed to catch exceptions in the activities within a flow. If there are multiple flows in an app, the error handler must be configured for each flow separately. Branching is supported for error handler flows similar to the other flows.

To configure the error handler:

    Procedure
  1. Click an existing activity in a flow.
  2. Click the Error handler tab.
    The error handler opens with the error Activity displayed.

    Clicking the error activity exposes the fields that you can configure for an error that is generated by the activity.

    The Map to Flow Inputs tab of the error Activity has three elements, Activity, message, and data. The activity element is used to output the name of the activity that is generating the error, the message element is used to output the error message string, and the data element can be configured to output any data related to the error. The message element on the Input tab of any activity in the Error Handler flow can be configured to output one or all of these three elements.

  3. From the Activities palette, add an activity for which you want to configure the error message. Add a branch to connect the error with the activity that you have added.

    The Input tab of that Activity displays a message in its input schema. This is a required element that you must map.

    Note: A Return Activity is not added by default. Depending on your requirements, you must add the Return Activity manually.
  4. Click the message in the input schema to open its mapper.
  5. Expand $error to expose the Activity, message, and data elements that you can configure for the error message.

    To map the message element under Activity inputs, you can either manually type in the error string enclosed in double-quotes or use the concat function under string in the mapper to output the Activity name along with a message. See Using Functions for more details.

  6. Continue configuring the error message for each activity in the flow.

    If there is error for the activity in any flow of the app, it is output in the log for the app when the app is built.

Here is an example of how an error handler flow looks after it is configured: