It is not possible for the business process to have a fault defined for each custom exception that can be thrown in the JCD. The JavaException fault does however have include the Type, Message and Stacktrace fields. The details of the exception that occurs within the JCD are mapped to these fields. When handling the exception in the business process you can check the values of the these fields to determine what subsequent actions need to be followed.
For example:
- If you highlight the JCD in the business process and then select the properties for the JCD you will see that there is a fault field. This could be set to for example 'ns0:JavaException'.
- You can then add an exception handler to the business process ('Catch Named Exception') and configure it to use 'ns0:JavaException'.
- In the exception handler you can then check the values of the Type and Message fields for the fault and process as required.
|