Error Events
Error events are a class of events that start, stop, or change process flows based on whether certain custom errors occur. These custom errors are defined by the person designing the process. For example, you may want to define an error as happening when a variable's value falls outside a certain range. Software errors, such as failing to connect to a database or failing to find a user, cannot be acted on by error events.
Error Start Event
Error start events are represented by the following symbol:
Error start events start a process flow based on a custom error generated from an error end event.
To configure an error start event
- Double-click the error start event on the canvas to open its properties window.
- Under Catch, configure whether to catch any custom errors generated by error end events or to catch a specific custom error.
Error End Event
Error end events are represented by the following symbol:
Error end events generate a custom error and then end the current process flow. The custom error can be caught by error start events and error catch events.
Custom errors that are not caught by an error start event or error catch event will not terminate the process flow, but will be logged in the instance log.
Using Error Start and End Events
The following example shows how you can use error start events and error end events in a process. In a sales process, the initial submission of a form containing details of a potential sale starts three different process flows. In the first flow, the legal department reviews the prospective sale for any issues. In the second flow, the sales department verifies the client's information. If the client's information is not updated in the Customer Relations Management (CRM) system, an error end event happens. A third process flow starts off a proof-of-concept (POC) demonstration.
When the error end event in the second process flow occurs, it is caught by an error start event in a separate process flow. This flow leads to the account manager being notified of the outdated client information in the CRM system.
Error Catch Event
In the previous example, we did not use error catch events because our process did not use sub-processes. Error catch events can be attached to a sub-process to listen for custom errors generated by an error end event. The error catch event always interrupts the entire sub-process to which it is attached. In the following example, we have a sub-process that leads to an error end event when a form with invalid field values is submitted.
The sub-process is embedded in a main process, as depicted in the next diagram, and has an error catch event attached to it. After being attached to a process, error catch events look as follows:
The error catch event detects when the error end event in the sub-process occurs (that is, when a form with invalid field values is submitted). When this happens, the error catch event triggers the error start event, which terminates the entire sub-process and starts a new process flow.
If you are not looking for an error inside a sub-process, you do not need to use an error catch event. For errors within the main process, an error end event together with an error start event (as demonstrated in our first example) are enough. The error start event will respond directly to the error end event without having to wait for a signal from an error catch event.
To attach an error catch event
- Right-click a sub-process and click Attach error event.
- Double-click the error catch event that appears on top of the sub-process to view its properties window.
- Under Catch, configure whether to catch any custom errors generated by error end events or to catch a specific custom error.