same task Complete event trigger twice

After the completion of the first user task, I check in the task listener if the subsequent user task has the same approver. If it is the same approver, there is an automated approval process.

However, I have noticed that the completion event of the automated approval user task is triggered twice.

Hi @marun,

Could you please share your model?

my.bpmn (10.5 KB)

my springboot and camunda version

        <camunda.spring-boot.version>7.19.0</camunda.spring-boot.version>
        <spring-boot.version>2.7.11</spring-boot.version>

Hi @marun,

Can you explain what you are trying to achieve? Using boundary conditional event might be a simple solution that can easily serve your needs.

Does the autoComplete method get called from within the task listener? Where is the check for the same approval located?