# Setting up Exlcusive Gateway

**URL:** <https://community.ofelia.com/t/setting-up-exlcusive-gateway/10790>\
**Category:** Q&A\
**Created:** [5 May 2021 15:25 UTC](https://community.ofelia.com/t/setting-up-exlcusive-gateway/10790 "2021-05-05T15:25:07Z")\
**Posts on this page:** 3\
**Page:** 1

<div class="post-metadata">

**Author:** ![nbito](https://avatars.discourse-cdn.com/v4/letter/n/ecc23a/32.png) [@nbito](https://community.ofelia.com/u/nbito)\
**Post date:** [5 May 2021 15:25 UTC](https://community.ofelia.com/t/setting-up-exlcusive-gateway/10790/1 "2021-05-05T15:25:07Z")

</div>

Hi Newbie on Bonita here. I am trying&nbsp; to get a exclusive gateway set up but can't figure it out. The first gateway Has the flow defaulting on the Yes track and it's giving me the message at the bottom of the screen. How do I resolve this?&nbsp; [Screenshot here](https://drive.google.com/file/d/11NR2L6cQf-wKD2FXTm8N16CkVHiLtk8V/view?usp=sharing)  
  
Thanks  
  
&nbsp;

---

<div class="post-metadata">

**Author:** ![alexjhcm\_2529035](https://avatars.discourse-cdn.com/v4/letter/a/c5a1d2/32.png) [@alexjhcm\_2529035](https://community.ofelia.com/u/alexjhcm_2529035)\
**Post date:** [5 May 2021 21:09 UTC](https://community.ofelia.com/t/setting-up-exlcusive-gateway/10790/2 "2021-05-05T21:09:26Z")

</div>

If the default Flow is _"Yes"_, then you have to select the flow named _"No"_, then click on the **General** tab and select the condition **"Use the expression"** and then click on the pencil icon to the right of that option and write a Groovy script which should return a boolean value, for example:

```
if (employeeAge >= 18) {
    return true
} else {
    return false
}
```

&nbsp;

Anyway I attach the link to a sample project that makes use of the XOR gateways, just download the .bos file and import it into your Bonita Studio.

[https://github.com/Bonitasoft-Community/vacation-management-example](https://github.com/Bonitasoft-Community/vacation-management-example)

---

<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:** [6 May 2021 07:26 UTC](https://community.ofelia.com/t/setting-up-exlcusive-gateway/10790/3 "2021-05-06T07:26:19Z")

</div>

An in addition to alexjhcm\_2529035 answer, don't forget to select the other transition (Yes) as default by clicking the checkbox as shown here:

.&nbsp; &nbsp; &nbsp;

 ![](https://europe1.discourse-cdn.com/flex013/uploads/community_bonitasoft/original/1X/c10e8188077bf49a08cadddd01801707b16974d9.png).&nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp;&nbsp; ![](https://europe1.discourse-cdn.com/flex013/uploads/community_bonitasoft/original/1X/1ce5d1b4162954ceea868959a7947ae380c386b1.png)

It seems that this default flow is missing in your process screenshot.&nbsp;
