OptimisticLockingException on UPDATE or DELETE of Task

Hello!

Environment:

  • Camunda version: 7.8.0, integrated into Wildfly 10.1.0 (i.e., not the pre-packaged version).
  • Database: Oracle data base
  • Default process engine
  • Camunda-REST-API integrated by using the provided Maven-Artefact

Created a simple workflow containing a user task, it is deployed under the process-definition key “genericOrder”.

A process can be launched by “POST /process-definition/key/genericOrder/start”.

By “GET gasport-camunda-bpm-restservice/task” I get

[
{
“created” : “2017-12-21T12:43:00.308+0000”,
“parentTaskId” : null,
“executionId” : “7a5ba9cb-e64c-11e7-a8e0-80c16efba18a”,
“followUp” : null,
“assignee” : null,
“id” : “7a5fa16f-e64c-11e7-a8e0-80c16efba18a”,
“caseDefinitionId” : null,
“processInstanceId” : “7a5ba9cb-e64c-11e7-a8e0-80c16efba18a”,
“caseExecutionId” : null,
“due” : null,
“name” : “Approve Order”,
“suspended” : false,
“priority” : 50,
“tenantId” : null,
“processDefinitionId” : “genericOrder:1:67a3c07a-e64b-11e7-a8e0-80c16efba18a”,
“caseInstanceId” : null,
“delegationState” : null,
“owner” : null,
“taskDefinitionKey” : “UserTask_0b3v36h”,
“description” : null,
“formKey” : null
}
]

For instance, “POST /task/7a5fa16f-e64c-11e7-a8e0-80c16efba18a/complete” with an empty JSON content always returns

{
“type”: “RestException”,
“message”: “Cannot complete task 7a5fa16f-e64c-11e7-a8e0-80c16efba18a: ENGINE-03005 Execution of ‘DELETE TaskEntity[7a5fa16f-e64c-11e7-a8e0-80c16efba18a]’ failed. Entity was updated by another transaction concurrently.”
}

The same is true for “PUT /task/task/7a5fa16f-e64c-11e7-a8e0-80c16efba18a” with some JSON content to update the task:

{
“type”: “RestException”,
“message”: “Cannot complete task 7a5fa16f-e64c-11e7-a8e0-80c16efba18a: ENGINE-03005 Execution of ‘UPDATE TaskEntity[7a5fa16f-e64c-11e7-a8e0-80c16efba18a]’ failed. Entity was updated by another transaction concurrently.”
}

The entities are not changed in the data base at all, as far as I can see. Thus, I do not understand, which other transaction should have changed them after the transactions started by the REST calls began.

I would be grateful for pointers, what might be wrong.

Greetings
Clemens

I would like to add, that I observe the same behaviour, if I deploy the WAR, into which the user workflow is packaged, into the pre-packaged Camunda Wildfly edition.

Hi @clemens_august,
what version of Oracle are you using?

If you’re on version less than 12, you must switch off batch SQL processing in Camunda configuration:
<property name="jdbcBatchProcessing">false</property>

Documented here: https://docs.camunda.org/manual/7.8/user-guide/process-engine/database/#database-configuration

1 Like

Hello

Thank you very much for the hint! I was using Oracle 11, but the documentation you linked has escaped my attention, albeit I was looking at the page.

I was just about to report, that I switched to an Oracle 12 data base, and the error has vanished, when I read your reply.

Best regards, and thanks again for your time!
Clemens

1 Like

Hi , I am also getting the same error
''ENGINE-03005 Execution of ‘UPDATE PropertyEntity[next.dbid]’ failed. Entity was updated by another transaction concurrently. "
and we are on Oracle 12 (12.1.0.2 to be precise).
Any suggestions?