What Happens When You Run Additional Activities While a Process is Running

Handling Errors 19-5

19.4.3 Typical Flow of an Exception in a Reusable Process

The following sequence describes what happens when the BPMN Service Engine runs a call activity that invokes a reusable subprocess that causes an exception.

1. The BPM Service Engine runs a reusable process that contains a task that invokes a

service that can throw an exception, or an end error event.

2. One of these events happens:

■ The task throws an exception. ■ The reusable process ends with an error event.

3. If the exception occurs in a task and the task has a boundary catch error event or

the reusable process contains an event subprocess that can handle the exception, then the exception does not propagated to the parent process. If the subprocess ends with an error event, or the exception occurs in a task and is not handled, then the exception propagates to the parent process.

4. The parent process can handle the exception if:

■ the call activity has a boundary catch event attached. ■ it contains an event subprocess configured to catch the exception. If the parent process cannot handle the exception, then it propagates it to its parent process. If there is no parent process, then the exception is logged to the Enterprise Manager fault recovery system. See Oracle Fusion Middleware Administrators Guide for Oracle SOA Suite and Oracle Business Process Management Suite, for more information about the Enterprise Manager fault recovery system.

19.5 Handling Exceptions in a Business Process

You can handle the exceptions that occur in an activity using the following: ■ A boundary error catch event ■ An event subprocess Boundary error catch events enable you to resume the main process flow after handling the exception. If you want to reuse the exception handling flow for multiple tasks in your process, then event subprocesses are more efficient than boundary catch events. Event subprocesses enable you to define a cleaner process with less effort because the catch error event is located within the event subprocess. To reuse an exception handling flow using boundary catch events, you must define a boundary catch event for each of the tasks, and then connect those boundary events to the exception handling flow. Figure 19–1 shows a process that handles an error using a boundary error catch event.