# BPMN inclusive gateway - one path always fires, other conditional. How to model?

**URL:** <https://community.ofelia.com/t/bpmn-inclusive-gateway-one-path-always-fires-other-conditional-how-to-model/6906>\
**Category:** Q&A\
**Created:** [27 January 2016 09:36 UTC](https://community.ofelia.com/t/bpmn-inclusive-gateway-one-path-always-fires-other-conditional-how-to-model/6906 "2016-01-27T09:36:54Z")\
**Posts on this page:** 10\
**Page:** 1

<div class="post-metadata">

**Author:** ![stefandebruijn](https://avatars.discourse-cdn.com/v4/letter/s/cdc98d/32.png) [@stefandebruijn](https://community.ofelia.com/u/stefandebruijn)\
**Post date:** [27 January 2016 09:36 UTC](https://community.ofelia.com/t/bpmn-inclusive-gateway-one-path-always-fires-other-conditional-how-to-model/6906/1 "2016-01-27T09:36:54Z")

</div>

Hi all,

I am using an inclusive gateway with two exit sequences. One sequence should always be executed, the other sequence only when an expression is true. It looks like this:

![flow](https://cdn.pbrd.co/images/16qT0S6I.png "flow")

The problem is that (for an inclusive split) I have to define a default flow. The problem is that the default sequence only fires when all of the other expressions are false.  
So with only two exit sequences (one default and one with condition), the inclusive gateway seems to behave like an exclusive gateway: in all cases only one of the exit sequences is fired.

Does anyone have an idea how to model this correctly?

Thanks in advance,  
Stefan

---

<div class="post-metadata">

**Author:** ![system](https://europe1.discourse-cdn.com/flex013/uploads/community_bonitasoft/original/2X/6/6b7b18c0478f2645369e82e009b65e3b97f2cc12.svg) [@system](https://community.ofelia.com/u/system)\
**Post date:** [27 January 2016 10:01 UTC](https://community.ofelia.com/t/bpmn-inclusive-gateway-one-path-always-fires-other-conditional-how-to-model/6906/2 "2016-01-27T10:01:57Z")

</div>

Hi,

Default flow is optional.

So you your design seems to be perfectly valid.  
For “always” transition you can define a “Constant” expression with value set to `true`.

I did a quick test with 7.1.5 and it run just fine.

---

<div class="post-metadata">

**Author:** ![valerioneri.de](https://avatars.discourse-cdn.com/v4/letter/v/ecae2f/32.png) [@valerioneri.de](https://community.ofelia.com/u/valerioneri.de)\
**Post date:** [27 January 2016 10:25 UTC](https://community.ofelia.com/t/bpmn-inclusive-gateway-one-path-always-fires-other-conditional-how-to-model/6906/3 "2016-01-27T10:25:47Z")

</div>

The same hack I’ve used 🙂

---

<div class="post-metadata">

**Author:** ![stefandebruijn](https://avatars.discourse-cdn.com/v4/letter/s/cdc98d/32.png) [@stefandebruijn](https://community.ofelia.com/u/stefandebruijn)\
**Post date:** [28 January 2016 09:11 UTC](https://community.ofelia.com/t/bpmn-inclusive-gateway-one-path-always-fires-other-conditional-how-to-model/6906/4 "2016-01-28T09:11:43Z")

</div>

Thanks for the replies. I have tried this hack as well: the model is executing indeed, but I still get a validation warning: “An output default flow should be defined for Gateway 1” .

---

<div class="post-metadata">

**Author:** ![system](https://europe1.discourse-cdn.com/flex013/uploads/community_bonitasoft/original/2X/6/6b7b18c0478f2645369e82e009b65e3b97f2cc12.svg) [@system](https://community.ofelia.com/u/system)\
**Post date:** [28 January 2016 09:35 UTC](https://community.ofelia.com/t/bpmn-inclusive-gateway-one-path-always-fires-other-conditional-how-to-model/6906/5 "2016-01-28T09:35:09Z")

</div>

Actually this warning should be an information message. It is just a general best practice to have default transition on exclusive and inclusive gateway to avoid to lock the process execution in the gateway.

You can safely ignore this warning.

---

<div class="post-metadata">

**Author:** ![stefandebruijn](https://avatars.discourse-cdn.com/v4/letter/s/cdc98d/32.png) [@stefandebruijn](https://community.ofelia.com/u/stefandebruijn)\
**Post date:** [28 January 2016 09:45 UTC](https://community.ofelia.com/t/bpmn-inclusive-gateway-one-path-always-fires-other-conditional-how-to-model/6906/6 "2016-01-28T09:45:52Z")

</div>

OK. Many thanks Antoine and Velerioneri.

---

<div class="post-metadata">

**Author:** ![stefandebruijn](https://avatars.discourse-cdn.com/v4/letter/s/cdc98d/32.png) [@stefandebruijn](https://community.ofelia.com/u/stefandebruijn)\
**Post date:** [6 February 2016 10:42 UTC](https://community.ofelia.com/t/bpmn-inclusive-gateway-one-path-always-fires-other-conditional-how-to-model/6906/7 "2016-02-06T10:42:32Z")

</div>

After a bit of thinking, I guess this is the best way to model it:

![Inclusive](https://cdn.pbrd.co/images/1lIudVIE.png)

This works without errors or warnings.

---

<div class="post-metadata">

**Author:** ![sunnyape](https://avatars.discourse-cdn.com/v4/letter/s/dfb087/32.png) [@sunnyape](https://community.ofelia.com/u/sunnyape)\
**Post date:** [9 August 2016 23:14 UTC](https://community.ofelia.com/t/bpmn-inclusive-gateway-one-path-always-fires-other-conditional-how-to-model/6906/8 "2016-08-09T23:14:20Z")

</div>

I’m a newbie converting to Bonita and this hack seems counter-intuitive.

If I don’t mark one transition as being the default, the inclusive gateway acts as I expect, but I get a validation warning that an output default flow should be defined for the gateway.

If I mark one of the gateway’s transitions as being the default path, I don’t get the warning, but the process omits that transition if the true condition is meet for the other transition.

That’s not how BPMN 2.0 says a inclusive gateway should behave and not how other modelling apps behave. Having to make a ‘ghost’ transition between the gateways is silly.

---

<div class="post-metadata">

**Author:** ![system](https://europe1.discourse-cdn.com/flex013/uploads/community_bonitasoft/original/2X/6/6b7b18c0478f2645369e82e009b65e3b97f2cc12.svg) [@system](https://community.ofelia.com/u/system)\
**Post date:** [29 August 2016 14:50 UTC](https://community.ofelia.com/t/bpmn-inclusive-gateway-one-path-always-fires-other-conditional-how-to-model/6906/9 "2016-08-29T14:50:48Z")

</div>

After reading BPMN 2.0 it seems that Bonita BPM inclusive gateway behave exactly as recommended by the specification. I’m quoting here the specification (10.5.3 Inclusive Gateway):

> A diverging Inclusive Gateway (Inclusive Decision) can be used to create alternative but also parallel paths within a Process flow. Unlike the Exclusive Gateway, all condition Expressions are evaluated. The true evaluation of one condition Expression does not exclude the evaluation of other condition Expressions. All Sequence Flows with a true evaluation will be traversed by a token. Since each path is considered to be independent, all combinations of the paths MAY be taken, from zero to all. However, it should be designed so that at least one path is taken.

And about default path:

> A default path can optionally be identified, to be taken in the event that none of the conditional Expressions evaluate to true. If a default path is not specified and the Process is executed such that none of the conditional Expressions evaluates to true, a runtime exception occurs.

So again I agree that having a warning if you don’t have any default path is probably not the perfect solution but still the behavior as run time comply to BPMN 2.0 standard.

---

<div class="post-metadata">

**Author:** ![sunnyape](https://avatars.discourse-cdn.com/v4/letter/s/dfb087/32.png) [@sunnyape](https://community.ofelia.com/u/sunnyape)\
**Post date:** [29 August 2016 23:22 UTC](https://community.ofelia.com/t/bpmn-inclusive-gateway-one-path-always-fires-other-conditional-how-to-model/6906/10 "2016-08-29T23:22:24Z")

</div>

OK, fair enough.

I always considered that the path that didn’t have a condition associated with it WAS the default path and didn’t need to be declared as such. The other path only became included if the condition associated with it became true. This meant the inclusive gateway only needed to test for one condition, not two.
