Multiple Concurrent Complete Task API Calls

Hello and happy new year to everybody!
I am trying to complete four tasks one after the other with the same post call but of course specifying the specific taskID, as shown in this image. I’ve split them into four because they have for different description fields and I need them in my Angular frontend.

I tried to use the forkJoin method to handle multiple requests at the same endpoint, but it still will complete one and return an error for concurrent transaction, throwing the following message:
"Cannot complete task a2565138-54e2-11eb-9745-8a1a18e42e25: ENGINE-03005 Execution of 'UPDATE ExecutionEntity[a2558dd5-54e2-11eb-9745-8a1a18e42e25]' failed. Entity was updated by another transaction concurrently."

I’m sorry because I know this isn’t strictly a Camunda related question, but I’m all out of ideas and was wondering if anybody could help me solve the issue.
Thank you guys in advance, all the best.

Hi @enricoelio,

if you check the Asyncronous Before on the joining parallel gateway, the OptimisticLockException should disappear.

Have a look at the docs for further details:

Hope this helps, Ingo


It’s just what I needed! Thank you very much!