This documentation supports the 22.1 version of BMC Helix Digital Workplace Basic and BMC Helix Digital Workplace Advanced. Icons distinguish capabilities available only for the Advanced and External license levels. For more information, see License types and features.

Handling errors in processes

A process contains a sequence of steps that flows from the start event to the end event. Occasionally, these steps can generate errors or exceptions. As a catalog administrator, you can use the error events in the workflow designer to capture errors and exceptions and to display appropriate messages in BMC Helix Digital Workplace Catalog.

Error events overview

The workflow designer includes the following error events:

NameSymbolDescriptionExample
Error Boundary

An Error Boundary event captures business errors and exceptions within a process and identifies the process path to be followed to resolve the error.

A work order is not completed within two business days. The system captures this business error, and a notification is sent to the manager of a department.

Error End

An Error End event ends the execution of a process at the current path, and an error is thrown. As a result, the service request is closed with a description of an error that occurred in the process.

A work order is not completed within two business days. The system captures this business error, and the service request is closed with the details about the error.

Before you begin

Open an existing workflow as described in Exploring the workflow designer, or create a workflow as described in Designing a simple workflow.

Capture of errors and exceptions with the Error Boundary event

An Error Boundary event is always placed on the boundary of any of the following workflow elements:

  • Activities: Receive TaskCall Activity, Sub-Process 

    Important

    Error Boundary events added on the boundary of a Sub-Process element catch all errors and exceptions generated from the child processes. 

  • Actions of any connector
  • Other elements of the workflow designer: Build Input Set, Create Approval Stub EntrySend In App Notification, Set Service Request Status, Track External Activity.

The Error Boundary event captures the following errors and exceptions:

Error/ExceptionDescription
Business errors

Business errors are the logical errors occurring within a process that cause the process to operate incorrectly or produce incorrect results. For example, assigning a value to the wrong variable produces an incorrect result.

Business errors are captured only for Call Activity and Sub-Process elements, and are displayed using the Error End event in a process or subprocess.

You can catch all business errors or specific business errors.

Java exceptions

Instances of different Java exceptions might be generated during a process run time. For example, if your workflow includes a Create Incident action and a system is down at the time of the process execution, an exception is generated.
The exception has an optional error number to indicate the exact problem reported through the exception.

You can catch all Java exceptions or specific Java exceptions. To capture a specific exception, you must enter the fully qualified java class name of an exception.

You can add multiple Error Boundary events to an activity or an action. 

Important

If you configure an activity with multiple Error Boundary events, the Error Boundary event configured for capturing specific errors and exceptions takes precedence over the Error Boundary event configured for capturing generic errors and exceptions.

To add an Error Boundary event in a process

  1. Open a workflow in which you want to add the Error Boundary event.

  2. Add the Error Boundary event to the process. 
    1. On the canvas, drag and drop an Error Boundary event on the boundary of an activity element (either a Call Activity element or a Sub-Process element), as required. 
    2. In the Properties pane, enter the description and select Add/Remove Errors.
      The Add/Remove Errors UI allows you to capture the errors and exceptions based on the following options:
      • All Business Errors—To capture all errors from Call Activity or Sub-Process elements.
      • Specific Business Error—To capture only the errors from the Call Activity or Sub-Process elements defined for the task.
      • All Exceptions—To capture all Java exceptions generated by the process.
      • Specific Exceptions—To capture only specifically identified exceptions.
  3. Click Save

To display errors using the Error End event

An Error End event indicates a business error in a process. This business error is captured by the relevant Error Boundary event. If no Error Boundary event is found to capture a business error, the error is displayed to the end user.

An error message is defined for a business error. The error message is an expression that refers to context data (such as a process variable, a result of an activity, or a keyword). The expression in the error message is evaluated when the process generates a business error.

  1. Open a workflow in which you want to add the Error End event.
  2. Add the Error End event to the process. 
    1. On the canvas, drag and drop an Error End event. 
    2. In the Properties pane, type a label and a description. 
    3. From INPUT MAP, select Click to build an expression.
    4. Create an expression for an error message that is displayed at runtime. 
  3. Click Save.

Where to go from here

Complete remaining aspects of the workflow, as described in Workflows for service fulfillment.

Was this page helpful? Yes No Submitting... Thank you

Comments