sendMessage causes concurrency error on VariableEntity

Hi guys,

When I stress my application I get the following error:

ENGINE-03005 Execution of ‘UPDATE VariableInstanceEntity[46a89b06-4108-11ea-8cdd-000d3a2fa37e]’ failed. Entity was updated by another transaction concurrently.

This happens when I call messageEventReceived passing variables:
runtimeService.messageEventReceived(messageName, foundExecutionId, variables);

We start our processes passing some authorization variables (userId, authToken, etc.) at ProcessInstance level. Then, when we invoke completeTask, saveTask, sendMessage we pass those variables to the process, along with some other new variables we may need. Those variables are intended to be used to call some EJB’s from our Java Delegates.

I think that the problem may arise because we are saving those variables at instance level and not at execution level… or at a task level. The point is that 95% of those problems arise when we use a sendMessage with variables.

Can you give me any advice so that I can minimize those concurrency problems? Also, can you give me any advice on how to manage those credentials without having to update them on every single process action?

BTW, my camunda version is 7.8.

Thanks in advance…
Alfonso.

You’re using quite and old version of Camunda, have you tried using the newest version?

Hi Niall… well, no because we should test again our whole application and actually we don’t have the time to… Do you know that this issue has been already solved in a later version?

I read something related about variables scopes related to this error but I don’t see the way to apply it in order to workaround this error.

Can somebody else help me with this?
Thanks in advance