1 Reply Latest reply on Mar 7, 2006 6:15 AM by Koen Aers


    Nidhi Sobti Newbie


      I am trying to write a simple example for exception handlers

      I have the following process definition

      <process-definition name='test'>
      <start-state name='start'>
      <transition to='state1' />
      <node name='state1'>
      <action class='org.jbpm.tutorial.moretests.TestActionHandler' />
      <transition name='transition1' to='end' />
      <end-state name='end' />
      <exception-handler exception-class='java.lang.Exception'action='TestAction' />
      <action name='TestAction' class='org.jbpm.tutorial.moretests.TestExceptionHandler' />

      The code for the 2 action handlers is as follows:

      public class TestActionHandler implements ActionHandler{
       public void execute(ExecutionContext ctx) throws Exception{
       throw new Exception ("Dummy Exception");


      public class Testimplements ActionHandler{
       public void execute( ExecutionContext executionContext ) throws Exception{
       System.out.println(">>>>>in TestExceptionHandler>>>>>>>>>>");

      However, the workflow doesnt seem to be responding to the exception thrown in 'TestActionHandler.execute()', and I dont see the statement being printed in 'TestExceptionHandler'.

      What am I missing?