What are the steps to reproduce your problem?
Use spring engine setup.
try to do error handling on camunda service call, for example raise a bpmnError when dmn evaluation fails:
 @Component
    public static class EvaluateDmn implements JavaDelegate {
        @Override
        public void execute(DelegateExecution execution) throws Exception {
            try {
                execution.getProcessEngineServices().getDecisionService()
                        .evaluateDecisionByKey("does not exist")
                        .variables(Variables.createVariables())
                        .evaluate();
            } catch (Exception e) {
                throw new BpmnError("DmnFailed", e.getMessage());
            }
        }
    }
What is the problem?
Bpmn error is not handled, instead exception is thrown, process is rolled back:
org.springframework.transaction.UnexpectedRollbackException: Transaction rolled back because it has been marked as rollback-only
What would be the expected behavior:
Exception is caught, Bpmn Error is raised, process continues
Hints (optional):
- This is not limited to decision service, also happens with correlateMessage for example
- Askar already showed a work around on https://app.camunda.com/jira/browse/SUPPORT-2745