Handle Errors with Event Subprocesses

Use event subprocesses to handle exceptions that occur in the runtime life cycle of a process and cause it to fail.

Using an event subprocess activity, you can catch all or specific system exceptions and recover the original process flow or supply an alternative, exception-handling flow.

You can define more than one event subprocess to handle different exceptions within a single process.

Note the following:
  • It is not possible to define multiple event subprocesses catching the same error in the same scope.
  • It is not possible to have more than one event subprocesses catching all errors in the same scope.
  • Subprocesses can have their own event subprocesses to handle errors. An error that occurs in the subprocess can be caught by the subprocess level event subprocess instead of the process level subprocess.

In the example below, an event subprocess Handle Payment Failure is used to handle any payment failure errors in the main process. When an error occurs in the Make Payment service task, it gets canceled and the Handle Payment Failure event subprocess is triggered. The process then continues to run in the event subprocess flow and completes.

Description of event-subprocess-example.png follows
Description of the illustration event-subprocess-example.png

Add an Event Subprocess

  1. In the Activities palette, expand Systems.
  2. Drag the Event Subprocess activity onto the process editor canvas, and drop it at the required position. Note that you should add the activity outside your process flow as event subprocesses don’t support incoming or outgoing flows.
  3. Expand the event subprocess activity. You’ll see a default error-handling flow with a Start Error event and an End event. You can add other activities, such as human tasks, to the flow according to your requirements.

    You cannot configure properties or define data association for the event subprocess activity as a whole; however, you can configure the Start Error event to catch and handle exceptions.

Configure a Start Error Event

  1. Open the properties pane of the Start Error event.
  2. In the Exception drop-down field, select Service Invocation Failure.
    Setting this property will catch service invocation failures in the following activities:
    • service task
    • integration
    • form upload
  3. Optionally, you can choose to catch all system exceptions in the process. Select Catch all system exceptions.
  4. Close the properties pane to save the changes.

In order to give users data to analyze the error, some data objects such as error code, error payload, uri and error name are provided out of the box in the data association editor of the Start Error event activity. In runtime, users are able to analyze the cause of the error with this information.

Description of error-start-da.png follows
Description of the illustration error-start-da.png