org.jbpm.pvm
Interface ExceptionHandler
- All Known Implementing Classes:
- ExceptionHandlerImpl
public interface ExceptionHandler
can handle exceptions that occur in user code like Activity
s
and ExternalActivity
s.
To better understand what exception handlers can do and what they
can't do, we have to look at persistence. When an exception comes
out of an Execution
, it can be in an inconsistent state.
Therefore, when an exception occurs in a persistent transaction,
clients cannot persist that execution. So the only option is to
rollback the transaction. As a consequence of a rollback, any
resource update done as part of exception handling is compensated
as well.
TODO separate between ExceptionHandlers for actions (in that case
they CAN control flow of execution) and exception handlers for nodes
(in that case exception handlers can only rethrow, which means
rollback or they handle the exception and then continue execution
as planned.
TODO add option to run exception handlers in a separate transaction
so that the processDefinition updates are rolled back, but that rollback
is immediately followed by a new transaction that will get the
execution and the exception in a new transaction.
- Author:
- Tom Baeyens
getDbid
long getDbid()
- the meaningless database primary key
getExceptionClassName
java.lang.String getExceptionClassName()