The exception handling mechanism of jBPM only applies to java exceptions. Graph execution on itself cannot result in problems. It is only the execution of delegation classes that can lead to exceptions.
On process-definition
s, node
s and
transition
s, a list of exception-handler
s
can be specified. Each exception-handler
has a list of actions.
When an exception occurs in a delegation class, the process
element parent hierarchy is serached for an appropriate exception-handler
.
When it is found, the actions of the exception-handler
are
executed.
Note that the exception handling mechanism of jBPM is not completely similar to
the java exception handling. In java, a caught exception can have an influence on
the control flow. In the case of jBPM, control flow cannot be changed by the
jBPM exception handling mechanism. The exception is either caught or uncaught.
Uncaught exceptions are thrown to the client (e.g. the client that called the
token.signal()
) or the exception is caught by a jBPM
exception-handler
. For caught exceptions, the graph execution
continues as if no exception has occurred.
Note that in an action
that handles an exception, it
is possible to put the token in an arbitrary node in the graph with
Token.setNode(Node node)
.