Phased rollout

 

This version of the software is currently available only to early adopter SaaS customers as the first step in our phased rollout. Click here to view an earlier version.

Handling errors in a process

A process contains a sequence of steps that flows from start to end. Occasionally, these steps can generate errors or exceptions. You can use the following events in the Process designer to capture and display these errors or exceptions.

NameSymbolDescription
Error Boundary

An Error Boundary event captures errors and exceptions within a process and identifies the path that should be followed to resolve the error after the Business error or exception is captured. For more information, see Capturing errors and exceptions using Error Boundary event.
Error End

An Error End event displays the business errors that occur in a process. For more information, see Displaying errors using Error End event.

Capturing errors and exceptions using Error Boundary event

An Error Boundary event is always placed on the boundary of the Activities elements such as Call Activity, User TaskSub-Process, Service Task, or Receive Task element. For example, if you add the Error Boundary event on the boundary of Sub-Process element, all the errors and exceptions generated from the child processes and all of its descendant process definitions are captured by the Error Boundary event. 

Use the Error Boundary event to:

  • Add multiple Error Boundary events to an activity.
    • 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 Business generic errors and exceptions.
  • Capture unique error or exception. No two Error Boundary events capture the same error or Java exception with the same error number.
  • Provide a fully qualified name for an exception if you want to capture a specific exception. 

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 incorrect result.

Business errors are captured only on Call Activity and Sub-Process and are displayed using the Error End event in a process or sub-process. If you add an Error Boundary event on the boundary of a Call Activity element or a Sub-Process element, you can configure the Business error to be captured by the Error Boundary event. 

Java exception

Instances of different Java exceptions are generated during the runtime process. For example, when creating a User Task record, if you do not provide the required field values, RxFrameworkException is generated.
The exception has an optional error number to indicate the exact problem reported through the exception.

To add an Error Boundary event in a process

  1. Open the process in which you want to add the Error Boundary event.
    1. Log in to BMC Helix Innovation Studio and navigate to the Workspace tab.
    2. Select the application in which your process exists.
    3. In the application, click the Processes tab.
    4. Click the process name in which you want to add events.
      The Process designer opens and displays the process on the canvas.
  2. Add the Error Boundary event to the process. 
    1. On the canvas, drag and drop an Error Boundary event on the boundary of any of the Activities elements, for example, a Call Activity element or a Sub-Process element according to the process requirement. 
    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 the errors from Call Activity or Sub-Process elements.
      • Specific Business Error – To capture those errors that are from only Call Activity or Sub-Process elements defined for the task.
      • All Exceptions – To capture all the Java exceptions generated by the process.
      • Specific Exceptions – To capture only the specifically mentioned exceptions.
  3. Click Save

Accessing errors captured by Error Boundary event

You can access the following details of error captured by the Error Boundary event:

  • Business errors—Error message
  • Java exceptions—Error message, error number and exception class. 

If there are multiple Error Boundary events, you can configure all the events individually. 

To access error details captured by Error Boundary events

  1. Open the process in which you have the Error Boundary event.
    1. Log in to BMC Helix Innovation Studio and navigate to the Workspace tab.
    2. Select the application in which your process exists. 
    3. In the application, click Processes.
    4. Click the process name from which you want to get access the error details.
  2. Drag and drop the appropriate user message Service Task (Send messageSend Message by Template or Show Alert) to the canvas and place it at that point of the process flow where you want to send the error details.
  3. In the Properties pane, select the parameter in which you want to send the error details such as Body (for Send message and Send Message by Template) or Alert text (for Show Alert). 
  4. Click Click to build an expression.
  5. In the Errors node, select the error message, exception class, and error number (for Java exception error), or error message (for business error) caught by the Error Boundary event, as shown in the following image:

  6. Save the process.

Displaying errors using Error End event 

An Error End event is used to indicate 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 the Business error, the error is displayed to the user.

An error message is defined for a Business Error. The error message is an expression which refers to context data, for example, 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.

To add an Error End event to a process

  1. Open the process in which you want to add the Error End event.
    1. Log in to BMC Helix Innovation Studio and navigate to the Workspace tab.
    2. Select the application in which your process exists.
    3. In the application, click Processes tab.
    4. Click the process name where you want to add events.
      The Process designer opens and displays the process on the canvas.
  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 description. 
    3. From INPUT MAP, select Click to build an expression.
      The Click to build an expression allows you to create an expression for an error message, which will be displayed at runtime. 
  3. Click Save.

Example of using Error Boundary and Error End events in a process

The following image depicts a sample process of reviewing a new Sales lead for an organization. The Error End events are used in this process to display the errors generated during process execution. The Error Boundary event is used to capture the errors and exceptions generated during the process execution. 


The following table describes the stages of this process example:

StageDescription
1

The Provide new sales lead User Task allows a Sales representative to provide information for the new sales lead.

2

The new sales lead information is sent to the Review sales lead sub process.

3

Using

The Review customer rating User Task allows the Sales representative to provide information for reviewing the Customer rating.

4

The Review profitability User Task allows the Sales representative to provide the profitability information related to the new sales lead.

5

After the Review profitability User Task is completed, if sufficient information to review the profitability is not provided, the following Business error is generated:

Insufficient data to review profitability.

6

An Error Boundary event captures the Insufficient data to review profitability business error, provides additional information for the sales lead, and restarts the Review sales lead sub process.

7

A second Error Boundary event captures all the exceptions and sends a message to an administrator.

8

If the Review sales lead sub process is completed successfully without generating any Business errors or exceptions, the Store lead in CRM system action stores the new sales lead in the CRM system.

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

Comments