Service task executed twice in parallel process

We have a parallel process and service tasks are executed twice.

The service tasks are executed exactly in same time, in same millisecond, so optimistic locking is not the reason why they are executed twice.

I upgraded the Camunda from 7.9 to 7.12, it didn’t solve the issue.
Service task they use JavaDelegate interface.
The process is running asynchronously.
parallel_service_tasks.bpmn (14.3 KB) versLesEtoilescase0.cmmn (4.7 KB)

When process is not parallel then service task is executed just one time as expected.

It would be excellent to know what happens.

Hi Erki,

I loaded up the model and there are 5 warnings that the modeler gives about it. Have you looked into fixing them?

I fixed the warnings. The result is same.
Is there somewhere any Camunda source code available which activates the JavaDelegate interface?
I would investigate this part.

Finally i found the problem.
We are using one json variable where we keep all process data.
Now when service tasks were executed parallely then the last service task overwrote previous parallel service task data and Camunda process engine executed the previous parallel service task again because it was like never-ever executed.

How to merge: Data loose in parallel process

1 Like

Thanks a lot for coming back and posting the solution! :slight_smile:

Finally, these settings solved my issue when building BPMN schema in Java:

serviceTask.setCamundaExclusive(true); // this is avoiding to run parallel service tasks same time, otherwise i got error ENGINE-03005 Execution of ‘UPDATE VariableInstanceEntity[6f21f3f8-e8fc-11ea-8ae0-0242ac12000b]’ failed. Entity was updated by another transaction concurrently