-
1. Re: jBPM Exception Hanlding, how to pass the exception objec
syedtaj Mar 18, 2008 3:03 AM (in response to syedtaj)Sorry the code did not come correctly
Here goes -
<exception-handler
exception-class="com.grow.automation.client.tn3.handlers.CommonHandlerException">
<!-- <acton name="Handle any exceptions that occur in the nodes"
class="com.grow.automation.client.tn3.handlers.ExceptionHandler">
</acton> -->
</exception-handler> -
2. Re: jBPM Exception Hanlding, how to pass the exception objec
syedtaj Mar 18, 2008 3:07 AM (in response to syedtaj)Pardon again, the code just doesnt come in quotes.
Let me repeat the question -
Here goes -
I am trying to write exception handlers for a process definition.
When an exception occurs, I would like the ExceptionHandler to be executed. However it would be crucial for me to know what exception message was in CommonHandlerException.<exception-handler
exception-class="com.grow.automation.client.tn3.handlers.CommonHandlerException">
action name="Handle any exceptions that occur in the nodes"
class="com.grow.automation.client.tn3.handlers.ExceptionHandler">
/action
</exception-handler>
Thus when a CommonHandlerException is thrown, ExceptionHandler will be executed as action, but how do I make sure that the exception object is passed on to the action class. -
3. Re: jBPM Exception Hanlding, how to pass the exception objec
syedtaj Apr 22, 2008 11:22 AM (in response to syedtaj)Hi,
Can anyone guide me on this please.
When we get an exception during the jBPM process, an exception handler is invoked. But this exception handler is not aware of the exception that occurred.
I need to capture the error message and the stacktrace.
I am sure everyone will face this problem. Currently I am setting the exception object as a process variable. However to do that, I am forced to put a try catch block in all the action classes and catch Exception like the following (so that all runtime exceptions are also captured)public class SampleActionHandler implements ActionHandler { public void execute(ExecutionContext executionContext) { try { ................ } catch (Exception e) { executionContext.setVariable("Exception", e); } } }
This method is terrible, Does anyone have a better idea?