hello everyone,
I have a method that is called during a process by camunda.
I have put a mechanism in this method to show the appropriate error message to the user if an error occurs.
But when this method hits an error, instead of displaying my proper error message, it throws this error message:
Transaction silently rolled back because it has been marked as rollback-only
In fact, camunda converts my type of error, which is a RuntimeException, to UnexpectedRollbackException.
Does anyone have an idea to solve this problem?
Thanks
from my understanding any uncatched exception will lead to Camunda attempting a rollback. While I would recommend against changing this behaviour, I do not think, this is possible. What you could do instead would be to catch your user-defined exception and raise a bpmn error. Maybe the following documentation helps you on this:
@Adagatiya Thank you for your guidance
I don’t want to prevent camunda rollback.
I want to inform the user about the reason why camunda has hit the exception using the appropriate exception message, but Camunda destroys my exception.