Hello,
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' /> </start-state> <node name='state1'> <action class='org.jbpm.tutorial.moretests.TestActionHandler' /> <transition name='transition1' to='end' /> </node> <end-state name='end' /> <exception-handler exception-class='java.lang.Exception'action='TestAction' /> <action name='TestAction' class='org.jbpm.tutorial.moretests.TestExceptionHandler' /> </process-definition>
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>>>>>>>>>>");
}
}AFAIR the TestAction should be specified as a nested element in the exception-handler element instead of as an attribute.
Regards,
Koen