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.

Generally, a process can encounter two types of exceptions, namely system and business exceptions.

  • System exceptions: Exceptions related to the underlying software or hardware infrastructure of Processes; for example, connectivity loss, database connection failure, or invoke activity failure.
  • Business exceptions: Faults related to process applications that occur when there’s a problem with information processing; for example, a stock control and inventory service throwing an error when a stock item is not found.

Using an event subprocess element, you can catch all or specific exceptions and recover the original process flow or supply an alternative, exception-handling flow. You can reuse an event subprocess (or the exception-handling flow) with multiple elements in your process. Also, you can define more than one event subprocess to handle different exceptions within a single process.

Add an Event Subprocess

To add an event subprocess to your flow:
  1. On the Elements palette, expand System.
  2. Drag the Event Sub-Process element onto the process editor canvas, and drop it at the required position. Note that you should add the element outside your process flow as event subprocesses don’t support incoming or outgoing flows.
  3. Click Expand Expand icon to expand the element. You’ll see a default error-handling flow with a Start Error event and an End event. You can add other elements, such as human tasks, to the flow according to your requirements.
    You cannot configure properties or define data association for the element as a whole; however, you can configure the Start Error event to catch and handle exceptions. See Configure a Start Error Event.

Configure a Start Error Event

You can configure the Start Error event within an event subprocess to catch system or business exceptions.

Catch an Exception

Select the Start Error event, click Menu Menu icon, and then click Open Properties. In the Properties pane:
  1. Select Catch all Business Exceptions to capture any business faults in runtime.
  2. Select Catch all System Exceptions to capture any system faults in runtime.
  3. Click Browse Browse iconnext to the Exception field to browse for specific exceptions.
    1. In the exception bowser, click Search to look for and select a specific business exception you’ve defined, and then click OK. You can define business exceptions for a process application on the Business Types tab.
    2. Select Show System Faults to view all predefined system exceptions. Click on an exception to add it to the Exception field. The following table describes all available system faults:
    System Fault Description
    AssertFailure The specified assertion has failed.
    BindingFault The preparation of the operation invoked in a flow object has failed.

    You cannot retry the invocation after a binding fault as recovering from this error generally requires human intervention.

    InvalidVariables The variables used aren’t valid.
    RemoteFault Problem invoking a service in a flow object. For example, a remote service has returned a SOAP fault.
    Rollback The receiver of the exception is enabled to roll back the current Java Transaction API (JTA) transaction from within the process flow.
    Timeout The service has exceeded the response time-out period.
    ConflictingReceive There are multiple receive activities to respond to the invoked operation.
    ConflictingRequest There are multiple requests on the same partner link for the invoked operation.
    CorrelationViolation The message doesn’t provide the required correlation information.
    ForcedTermination The service has been terminated due to a SOAP fault.
    InvalidReply The reply doesn’t contain the correlation information required by the corresponding receive.
    MismatchedAssignmentFailure The assigned types are incompatible.
    RepeatedCompensation A compensation handler is invoked multiple times.
    SelectionFailure Error running a selection operation.
    UninitializedVariable The variable you’re trying to access has not been initialized.