Exception Handler
  • 23 Apr 2024
  • 4 Minutes to read
  • Dark
    Light

Exception Handler

  • Dark
    Light

Article summary

This Project is used to handle errors and exceptions that may arise in a Workflow process. The settings are passed in from the Catch Exception step and the rest as customized per use case. A log is created unless specified not to, and an assignment to resolve the issue is also created and assigned.


Key Features

  • The Error Handling Dashboard helps keep track of a Project's detected errors and exceptions over time. This Dashboard can be viewed from the Workflow Catalog in the Decisions Portal.
  • The Dashboard keeps a count of open exceptions and total exceptions. The graph allows the user to see the number of exceptions that were detected in their Projects over the last year. The pie chart shows the number of exceptions by Project.
  • The Date Range Filter on the Dashboard allows the user to view exceptions over a specific time frame. By default, it is set to show exceptions from the last 365 days.
  • The Resolved Exceptions Report displays all previous exceptions marked as Fixed. The Resolve Error user action is used to address exceptions and update their Resolution Type. This action navigates the user to the Exceptions Details Form. From here, the user can directly access the Flow, view details about the error and where it occurred, and provide comments once the error has been resolved.
  • The Quick Close action allows the user to automatically mark an exception as Fixed.
  • Emails are sent to admin or other designated users to inform them of exceptions in the system.


Considerations

Below is a list of items included in the Project. Hidden items are marked with an asterisk. 

  • Please read and review the full article on Exception Handling to better plan and apply the use of this build in future and existing Projects.
  • The Handle Exceptions Flow needs to be placed into another Flow as a Subflow in order to function. It can be ran either Synchronous or Asynchronous. It is typically paired with a Catch Exception step ahead of the Subflow.
  • Log Level: information and debugging log level will not show in your default log report unless your settings are set to include it. Read more about Logging here.

Main Elements

There are a few key elements in this build, listed below:

Handle Exceptions Flow

This Flow should be placed into other Flows and configured to detect errors. The Flow is used to log errors and create an assignment to resolve errors if desired.

Exception Type Truth Table

This Truth Table runs in the Handle Exceptions Flow and can be configured to output an updated list of assignees and error details based on the exception type and Project name. This can be used if certain groups or accounts should be assigned specific error types or errors of certain Projects.

How to Use

This section details how to set up the Handle Exceptions Flow in an existing Flow. This will detect and log errors in the existing Flow and any Subflows within it.

  1. Open the Flow that you would like to provide error handling for.
  2. Search for the Catch Exception step in the Toolbox and drop it onto the workspace.
  3. To run the flow asynchronously, search for the Start Linked Flow Async step in the Toolbox. Drop this step onto the workspace. Alternatively, this Flow can be run synchronously by using the Run Sub Flow step instead.
  4. Click Pick or Create Flow, then select Pick Existing.
  5. Under the Error Handling Project Folder, select the Handle Exceptions Flow and then configure the following input fields:
    Input FieldDescription
    Assignees
    The list of email addresses for the individuals that should have the errors assigned to them. By default, administrators will receive this assignment if this field is set to Ignore.
    Assignment Required
     A boolean denoting whether or not an assignment should be created for the errors detected. Set this to constant and click the checkbox if you wish to create assignments.
    Current Flow Id
    The unique identifier for the current Flow. For this field, click Select From Flow > Flow Data > Current Flow Id.
    Exception Message
    A string field describing the error that occurred. Depending on how the user has placed the Handle Exception Flow in their Project Flows, this data may come from the Catch Exception step or the On Exception Outcome Path on a step. For this field, click Select From Flow > ExceptionMessage.
    Exception Stack
    A string field specifying the location of the error. For this field, click Select From Flow > ExceptionStack.
    Exception Type Name
    A string that describes the error type. For this field, click Select From Flow > ExceptionTypeName.
    Extra Details
    Additional information that should be associated with the error.
    Flow Name
    The name of the current Flow. For this field, click Select From Flow > FlowName.
    Log Level
    A field that specifies the severity and importance of the error.
    Log Required
    A boolean denoting whether or not a log should be created. Set this field to constant and click the checkbox if you wish to create logs.
    Project Name
    The name of the Project that the current Flow is a part of. Set this field to constant and enter the name of the Project.
    Reporting User
    The email address of the user that kicked off the Flow when the error was detected. For this field, click Select From Flow > Flow Data > CurrentUserEmail.
    Step Id
    The unique identifier for the step associated with the error. For this field, click Select From Flow > StepId.
    Step Name
    The name of the step associated with the error. For this field, click Select From Flow > StepName.
    Top Flow Name
    The name of the Parent Flow. For this field, click Select From Flow > Flow Data > TopFlowName.
  6. Connect the Catch Exception step to the Start Linked Flow Async step.
  7. Connect the Start Linked Flow Async step to the End step.
  8. Save and exit the Flow.



Was this article helpful?