[jboss-user] [jBPM] New message: "Re: Exception handling in JBPM4"

Flavio N. do-not-reply at jboss.com
Thu Feb 4 06:54:39 EST 2010


User development,

A new message was posted in the thread "Exception handling in JBPM4":

http://community.jboss.org/message/524145#524145

Author  : Flavio N.
Profile : http://community.jboss.org/people/VegaMilano

Message:
--------------------------------------------------------------
This is my first exeperience in JBPM 4 and I can't believe it does not have a way to handle Exceptions in Java, especially if it was in JBPM 3.
Consider a very simple example:
 
http://community.jboss.org/servlet/JiveServlet/showImage/1985/jbpm.png
 
corresponding to code:
 
<?xml version="1.0" encoding="UTF-8"?>

<process name="MyProcess" xmlns="http://jbpm.org/4.3/jpdl">

    <start g="122,135,48,48" name="startBlock">
        <transition g="-55,-18" name="execute method" to="Call Java Method" />
    </start>

    <java name="Call Java Method" class="org.jbpm.helloworld.MyClass" continue="sync"
        g="291,136,112,52" method="doSomething">
        <transition name="terminate process" to="endBlock" g="-42,-18" />
    </java>

    <end g="519,136,48,48" name="endBlock" />

</process>
 
If my Java method throws an Exeception, HOW CAN IT BE HANDLED IN JBPM 4? Obviously I don't want to wrap each class to make a try-catch, so I suppose there is a way to define exception handler and redirect execution to a specified transition or something.
A sample code will be appreciate.
Thanks in advance

--------------------------------------------------------------

To reply to this message visit the message page: http://community.jboss.org/message/524145#524145




More information about the jboss-user mailing list