IBM BPM, V8.0.1, All platforms > Authoring services in Integration Designer > Services and service-related functions > Access external services with adapters > Configure and using adapters > IBM WebSphere Adapters > JDBC > Overview of IBM WebSphere Adapter for JDBC > Technical overview

Business faults

The adapter supports business faults, which are exceptions that are anticipated and declared in the outbound service description, or import. Business faults occur at predictable points in a business process, and are caused by a business rule violation or a constraint violation.

Although IBM Integration Designer and WebSphere Enterprise Service Bus support other types of faults, the adapter returns only business faults, which are called simply faults in this documentation. Not all errors become faults. Faults are generated for errors that are actionable, that is, errors that can have a recovery action that does not require the termination of the application. The adapter returns a fault when it receives a business object for outbound processing that does not contain the required data or when the adapter encounters certain errors during outbound processing. Use the information in this topic to create fault handlers in IBM BPM or WebSphere Enterprise Service Bus.


Fault business objects

The external service wizard creates a business object for each fault that the adapter can generate. In addition, the wizard creates a WBIFault superset business object, which has information common to all faults, such as the message, errorCode, and primaryKeySet attributes as shown in Figure 1.

Figure 1. The structure of the WBIFault business object


Custom faults

Service runtime exceptions can be caught as business faults by predefining fault patterns in the Specify Composite Properties window of the external service wizard. When you define a custom fault, the adapter returns the customized fault business object instead of a runtime exception, thus avoiding huge system log entries. For instance, if the database locks a record, you can define the fault pattern string by adding a regular expression like ".*Record is locked.*". During run time, if there is an exception, the adapter matches the fault pattern string with the exception message.

If the exception message matches any of the enabled predefined fault pattern string, the adapter returns the custom BusinessFault business object. This business object contains the faultPattern attribute and faultName attribute, which is the predefined fault pattern string and fault name.

Figure 2. The structure of the custom BusinessFault object

Technical overview


Related tasks:

Setting global properties for operations and creating wrapper business objects