[jboss-dev-forums] [Design of JBoss jBPM] - Exception handling

kevin.l.wilson do-not-reply at jboss.com
Thu Jul 19 13:43:53 EDT 2007


I've been trying to work with the Process-State node and implement a exception handler. However, I found that the exceptions are handled by the node previous.  (I was surprised ...) This means that if a exception is not handled by a node the previous nodes in the hierarchy have the opertunity to handle the exception. 

This does not seem like what a user would expect. 

Also, shouldn't the Process-State be able to handle the exception from the subprocess. (execute is overridden in Node which does the exception processing, and no other catches are put in the ProcessState node. 

Can fix this by doing a lot of config to get my own process state node:
1) Implement the fix in my own version of the process state node. 
 - I modified the signal call in enter() method to do the following:
  try {
     ...signal();
  } catch (Exception e) {
    raiseException(e, executionContext);
  }

This cause the exception handler I defined in the XML to be called correctly. However, I still could not call the leave() on the exception handler recieving a NullPointerException. (After, some testing I found I did not need to call leave in my code that it would leave on its own. However, this would need to be addressed in a patch. )

2) Update a modified version of the ProcessState.hbm.xml
 - Change the implementation class.
3) Update the hybernate.cfg.xml
 - Point to the new mapping file for hybernate created in 2.
4) update the node.types.xml
 - Update the implementation class
5) Update the jbpm.cfg.xml to point to the new hybernate.cfg.xml and the node.types.xml

Is this issue patchable?
Is there a way to get a patched to this issue?

View the original post : http://www.jboss.com/index.html?module=bb&op=viewtopic&p=4065913#4065913

Reply to the post : http://www.jboss.com/index.html?module=bb&op=posting&mode=reply&p=4065913



More information about the jboss-dev-forums mailing list