OptimisticLockingException - causes duplicate execution of service tasks

Hi team,

Version- Camunda BPM 7.12
Setup - Spring Boot
Database - MariaDB (10.3)
Environment - OpenShift
no changes in the default configuration

We are getting ‘OptimisticLockingException’ at the end of process flow which in turn retries from the last save point. some of our service tasks are sending message to active-mq, so when retrying, it send duplicate messages to external queue. Pls advice on how to handle this scenario.

Attaching related bpmn and logs.

Thanks,
Prabhakar M

opal_deal_eval_processing_user_rule_process.bpmn (9.0 KB) opal_eval_confogen_validator.bpmn (8.3 KB) camunda_opt_lock_log.txt (4.2 KB) opal_deal_eval_processing_user_rule_process.bpmn (9.0 KB) opal_eval_confogen_validator.bpmn (8.3 KB)