IBM BPM, V8.0.1, All platforms > Programming IBM BPM > Developing client applications for BPEL processes and tasks > Developing web applications using JSF components
Error handling in JSF components
The JavaServer Faces (JSF) components exploit a predefined managed bean, BPCError, for error handling. In error situations that trigger the error page, the exception is set on the error bean.
This bean implements the com.ibm.bpc.clientcore.util.ErrorBean interface. The error page is displayed in the following situations:
- If an error occurs during the execution of a query that is defined for a list handler, and the error is generated as a ClientException error by the execute method of a command
- If a ClientException error is generated by the execute method of a command and this error is not an ErrorsInCommandException error nor does it implement the CommandBarMessage interface
- If an error message is displayed in the component, and you follow the hyperlink for the message
A default implementation of the com.ibm.bpc.clientcore.util.ErrorBeanImpl interface is available.
The interface is defined as follows:
public interface ErrorBean { public void setException(Exception ex); /* * This setter method call allows a locale and * the exception to be passed. This allows the * getExceptionMessage methods to return localized Strings * */ public void setException(Exception ex, Locale locale); public Exception getException(); public String getStack(); public String getNestedExceptionMessage(); public String getNestedExceptionStack(); public String getRootExceptionMessage(); public String getRootExceptionStack(); /* * This method returns the exception message * concatenated recursively with the messages of all * the nested exceptions. */ public String getAllExceptionMessages(); /* * This method is returns the exception stack * concatenated recursively with the stacks of all * the nested exceptions. */ public String getAllExceptionStacks();}
Developing web applications for BPEL processes and human tasks, using JSF components
Related concepts:
Error handling in the List component