AtomicOperationProcessEnd does not propagate caught Exceptions

Description

AtomicOperationProcessEnd contains two catch blocks that catch and log an exception but do not rethrow it.

If an exception is thrown in an execution after a sub process ends, the exception is only logged and not propagated to the client code.

1) The client code is not notified that something went wrong.

2) No exception usually means that the current transaction is committed and resources could end up in an inconsistent state:

  • process state in the Activiti database

  • some external XA resources

IMHO the correct solution would be throwing exceptions in both catch blocks. This would allow the client to react to the exception (and JtaTransactionInterceptor to roll back the current transaction).

I have attached a patch (for 5.8) with my proposed solution.

Environment

None

Assignee

Tijs Rademakers

Reporter

Vlastimil Mencik

Labels

None

Components

Fix versions

Affects versions

Priority

Critical
Configure