# Async inclusive joining gateway creates duplicate outgoing executions

**URL:** <https://forum.flowable.org/t/async-inclusive-joining-gateway-creates-duplicate-outgoing-executions/7122>\
**Category:** Flowable Engine\
**Created:** [November 24, 2020, 11:40am UTC](https://forum.flowable.org/t/async-inclusive-joining-gateway-creates-duplicate-outgoing-executions/7122 "2020-11-24T11:40:59Z")\
**Posts on this page:** 7\
**Page:** 1

<div class="post-metadata">

**Author:** ![holgerapel-iso](https://avatars.discourse-cdn.com/v4/letter/h/958977/32.png) [@holgerapel-iso](https://forum.flowable.org/u/holgerapel-iso)\
**Post date:** [November 24, 2020, 11:40am UTC](https://forum.flowable.org/t/async-inclusive-joining-gateway-creates-duplicate-outgoing-executions/7122/1 "2020-11-24T11:40:59Z")

</div>

Hello,

I noticed that a joining inclusive gateway which is set to be async can trigger multiple outgoing executions for the same execution path. It seems to be related to data visiblity of async jobs and the fact that a joining inclusive gateway will continue the path when no current execution can reach the gateway, see InclusiveGatewayActivityBehavior line 93.

As a test I have created this process where the gateways and task is async and exclusive. When executing the process it always finishes with two end events.

I was reading in other forum entries that async and exclusive should be used when heavily using parallel processing in order to avoid optimistic locking exceptions.

Is this an intended behavior and async inclusive joining gateways be avoided?

 ![image](https://canada1.discourse-cdn.com/flex035/uploads/flowable/original/2X/8/8d3d3a0fc6486116f824ad8c857b250de7232875.png)

Thanks for any advice  
Holger

---

<div class="post-metadata">

**Author:** ![joram](https://yyz1.discourse-cdn.com/flex035/user_avatar/forum.flowable.org/joram/32/26_2.png) [@joram](https://forum.flowable.org/u/joram)\
**Post date:** [December 4, 2020, 10:08pm UTC](https://forum.flowable.org/t/async-inclusive-joining-gateway-creates-duplicate-outgoing-executions/7122/2 "2020-12-04T22:08:48Z")

</div>

No, it isn’t the intended behavior. I’ll investigate deeper. Is the example you’re using exactly as depicted (with service1 being async)?

---

<div class="post-metadata">

**Author:** ![holgerapel-iso](https://avatars.discourse-cdn.com/v4/letter/h/958977/32.png) [@holgerapel-iso](https://forum.flowable.org/u/holgerapel-iso)\
**Post date:** [December 7, 2020, 7:41am UTC](https://forum.flowable.org/t/async-inclusive-joining-gateway-creates-duplicate-outgoing-executions/7122/3 "2020-12-07T07:41:02Z")

</div>

Yes, the service and the joining gateway are both async and exclusive. I only get this issue when the joning gateway is async.

---

<div class="post-metadata">

**Author:** ![joram](https://yyz1.discourse-cdn.com/flex035/user_avatar/forum.flowable.org/joram/32/26_2.png) [@joram](https://forum.flowable.org/u/joram)\
**Post date:** [January 4, 2021, 8:53pm UTC](https://forum.flowable.org/t/async-inclusive-joining-gateway-creates-duplicate-outgoing-executions/7122/4 "2021-01-04T20:53:49Z")

</div>

Hi @holgerapel-iso: this has been fixed here: [https://github.com/flowable/flowable-engine/commit/ffa4e4ada905f3a37b7aa172f15d014b2f876d15](https://github.com/flowable/flowable-engine/commit/ffa4e4ada905f3a37b7aa172f15d014b2f876d15)

Thanks for reporting and the analysis!

---

<div class="post-metadata">

**Author:** ![holgerapel-iso](https://avatars.discourse-cdn.com/v4/letter/h/958977/32.png) [@holgerapel-iso](https://forum.flowable.org/u/holgerapel-iso)\
**Post date:** [January 5, 2021, 1:52pm UTC](https://forum.flowable.org/t/async-inclusive-joining-gateway-creates-duplicate-outgoing-executions/7122/5 "2021-01-05T13:52:11Z")

</div>

This is excellent! Do you know already into which release the fix will go?

---

<div class="post-metadata">

**Author:** ![MirekSz](https://yyz1.discourse-cdn.com/flex035/user_avatar/forum.flowable.org/mireksz/32/2112_2.png) [@MirekSz](https://forum.flowable.org/u/MirekSz)\
**Post date:** [March 15, 2022, 11:00am UTC](https://forum.flowable.org/t/async-inclusive-joining-gateway-creates-duplicate-outgoing-executions/7122/6 "2022-03-15T11:00:39Z")

</div>

@joram Could you merge this to branch 6.6.x. This is quite important fix. We also afected by this bug

---

<div class="post-metadata">

**Author:** ![filiphr](https://yyz1.discourse-cdn.com/flex035/user_avatar/forum.flowable.org/filiphr/32/315_2.png) [@filiphr](https://forum.flowable.org/u/filiphr)\
**Post date:** [August 17, 2022, 8:11am UTC](https://forum.flowable.org/t/async-inclusive-joining-gateway-creates-duplicate-outgoing-executions/7122/7 "2022-08-17T08:11:51Z")

</div>

Hey @MirekSz,

We provide fixes to the different flowable-releases by requests from customers. If you would like to have the fix you should either upgrade to a version that has the fix or request it through your Account Manager at Flowable.

Cheers,  
Filip
