External task one for all process instances

Is external task one for all process instates?

I have created next schema


Where ProduceMilk, Order truck, Order bottles, All done are external task which do API call’s to my services. Service code look’s like just delay for 3 second and for all done is on 1min.

I tried to run 300 process instances and found that external task working only one for all process instances.

So all 300 tasks will not be executed in parallel but wait one by one all external tasks.
On my logs it look’s next
9/17/2020 9:29:50 AM: Start order milk
9/17/2020 9:29:53 AM: Milk is ordered
9/17/2020 9:29:53 AM: Start order milk
9/17/2020 9:29:56 AM: Milk is ordered
9/17/2020 9:29:56 AM: Start order milk
9/17/2020 9:29:59 AM: Milk is ordered
9/17/2020 9:29:59 AM: Start order milk
9/17/2020 9:30:02 AM: Milk is ordered
9/17/2020 9:30:03 AM: Start order milk
9/17/2020 9:30:06 AM: Milk is ordered
9/17/2020 9:30:06 AM: Start order milk
9/17/2020 9:30:09 AM: Milk is ordered
9/17/2020 9:30:09 AM: Start order milk
9/17/2020 9:30:12 AM: Milk is ordered
The same for rest external tasks?

Is it by design? Can I fix it somehow

How many external task clients are you running and how many topics does a single client subscribe to.
Also - how exactly have you configured the external tasks.

Sorry, it was my mistake. In c# code I set workers should work in one thread.
Nothing related to camunda .

Explanation for c# devs,
if you are using Comunda.Workers https://github.com/AMalininHere/camunda-worker-dotnet
Make sure that you set WorkerCount more than 1,in this case you will have the same problem.
When I set 100 it work as I expect in parallel

1 Like