Error in service task is not terminated process

Hello all.
I have situation, when my service task throw Exception (or I tried throw ProcessEngineException), but process staied in state “Active”. But I expect, that process would be terminated and would have state like “INTERNALLY_TERMINATED”.
Is it possible? Or it is not expected behavior?
And I don’t want to have any error boundary events because I handle this errors in another service. This service just lean on process state.

And, I think, the problem may be in property “enableExceptionsAfterUnhandledBpmnError” that default is false. But I can’t find info about how I can set this prop to true, if my camunda-instance lounched in docker.

Camunda version is 7.14.0

Hi @anastasiya.belikova9 ,

from my understand it is as follows.

Case A: You start a process instance or complete a task and the exception is thrown synchronously.
=> In this situation the exception will be thrown to the caller of the method. Any actions already taken will be rolled back.

Case B: You start a process instance or complete a task and the exception is thrown asynchronously (process approached a transaction boundary and returned prematurely to the caller).
=> In this situation the exception will lead to a rollback and creation of an incident.

In any of the afore mentioned cases, the process will remain active (excluding a failed process start of course.)

Depending on your specific use case we may be able to find another solution, tho. Does the service, which checks the state, need to be notified or does it poll / request current status?

I hope this helps,
Adagatiya

1 Like