Duplicated Activity Instance

Hi everyone,

I have a java class implementing java delegate which is handling the service tasks of our project. Something strange happened and I was wondering if you could help me find the reason.

I have this simple process that was called and for the same process instance the service task was handled twice by camunda and the delegator.

Can anyone help me understand why 2 different activity instances were run for this service task?

When I query camunda’s database to get the activity instance history for that process instance, I only get one of the activities instances:

Thank you for the help!

Something similar happened to me once. In my case, I had created two arrows going into that service task, but they were hidden one behind the other. Might be worth checking if that is the case.

Thank you for your response but that’s not the case. Also if that had happened both activity instances would be registered in database. In this case I only have record of 1 of them, the other doesn’t exist in camunda’s database.

We have 2 pods of camunda running, I believe the issue might be related to that fact but was wondering if someone could give some one feedback.

Did you marked your service task async?

We have all our service tasks like this:

image

Your service task is async and it might be taking greater than 5min. After 5 min your sevice task acquired by another job executor and the other executor try to execute it. Maybe that’s why it’ s getting executed twice but stored only one time in db.