# Multiple Concurrent Complete Task API Calls

**URL:** <https://forum.camunda.io/t/multiple-concurrent-complete-task-api-calls/24818>\
**Category:** Discussion & Questions\
**Tags:** process-engine\
**Created:** [January 12, 2021, 3:44pm UTC](https://forum.camunda.io/t/multiple-concurrent-complete-task-api-calls/24818 "2021-01-12T15:44:51Z")\
**Posts on this page:** 4\
**Page:** 1

<div class="post-metadata">

**Author:** ![enricoelio](https://forum.camunda.io/letter_avatar_proxy/v4/letter/e/e36b37/32.png) [@enricoelio](https://forum.camunda.io/u/enricoelio)\
**Post date:** [January 12, 2021, 3:44pm UTC](https://forum.camunda.io/t/multiple-concurrent-complete-task-api-calls/24818/1 "2021-01-12T15:44:51Z")

</div>

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.

 ![Screenshot 2021-01-12 at 16.41.07](https://forum.camunda.io/uploads/default/original/2X/3/32886f15d98e47ba5a92fe4cdb102111c5326cc9.png)  
 ![Screenshot 2021-01-12 at 16.40.06](https://forum.camunda.io/uploads/default/original/2X/3/3a35cb25f5bf8da5367c759a964ee34627be3417.png)

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.

---

<div class="post-metadata">

**Author:** ![Ingo\_Richtsmeier](https://forum.camunda.io/user_avatar/forum.camunda.io/ingo_richtsmeier/32/25968_2.png) [@Ingo\_Richtsmeier](https://forum.camunda.io/u/Ingo_Richtsmeier)\
**Post date:** [January 13, 2021, 8:39am UTC](https://forum.camunda.io/t/multiple-concurrent-complete-task-api-calls/24818/2 "2021-01-13T08:39:26Z")

</div>

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: [https://docs.camunda.org/manual/7.14/user-guide/process-engine/transactions-in-processes/#common-places-where-optimistic-locking-exceptions-are-thrown](https://docs.camunda.org/manual/7.14/user-guide/process-engine/transactions-in-processes/#common-places-where-optimistic-locking-exceptions-are-thrown).

Hope this helps, Ingo

---

<div class="post-metadata">

**Author:** ![enricoelio](https://forum.camunda.io/letter_avatar_proxy/v4/letter/e/e36b37/32.png) [@enricoelio](https://forum.camunda.io/u/enricoelio)\
**Post date:** [January 13, 2021, 1:40pm UTC](https://forum.camunda.io/t/multiple-concurrent-complete-task-api-calls/24818/3 "2021-01-13T13:40:37Z")

</div>

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

---

<div class="post-metadata">

**Author:** ![system](https://forum.camunda.io/uploads/default/original/3X/5/8/58d50142eacca605d35cb1ef9e6b86ae85f49436.png) [@system](https://forum.camunda.io/u/system)\
**Post date:** [January 30, 2024, 12:50pm UTC](https://forum.camunda.io/t/multiple-concurrent-complete-task-api-calls/24818/4 "2024-01-30T12:50:38Z")

</div>

Closed on January 30, 2024, 12:50pm UTC


