2 Replies Latest reply on Dec 3, 2009 7:47 AM by dragos cernahoschi

    exception handling with jpdl

    dragos cernahoschi Newbie

      How can I get the root cause exception when invoking a method from a jpdl pageflow? For example:

      <page name="invoiceItems" view-id="/documentItems.xhtml">
         <transition name="save" to="view">
           <action expression="#{expeditionMg.save()}"/>                                   
         <transition name="cancel" to="end"/>

      In this case the save() method throws a OptimisticLockException, but the jbpm wraps and rethrows the exception as JbpmException having as cause a ELException.
      I've tried to catch it using the following:

      <exception-handler exception-class="org.jbpm.JbpmException">
           <action class="com.gradientis.sombrero.JbpmExceptionHandler"/>

      but I can't get to the root exception. Is there a way to catch the OptimisticLockException that I need ?