# Exclusive gateway conditions not working

**URL:** <https://forum.bpmn.io/t/exclusive-gateway-conditions-not-working/7914>\
**Category:** Modeler\
**Created:** [August 30, 2022, 8:52am UTC](https://forum.bpmn.io/t/exclusive-gateway-conditions-not-working/7914 "2022-08-30T08:52:20Z")\
**Posts on this page:** 4\
**Page:** 1

<div class="post-metadata">

**Author:** ![Code\_Guru](https://forum.bpmn.io/user_avatar/forum.bpmn.io/code_guru/32/3742_2.png) [@Code\_Guru](https://forum.bpmn.io/u/Code_Guru)\
**Post date:** [August 30, 2022, 8:52am UTC](https://forum.bpmn.io/t/exclusive-gateway-conditions-not-working/7914/1 "2022-08-30T08:52:20Z")

</div>

I am using exclusive gateway and on sequence lines i have added following conditions that calls function from service like this

`next(null, this.environment.services.conditionFlowVarChk(this.environment.variables.ivrVar,\"myVar.key.code\",\"CCC\"));`

and the xml

```auto
<sequenceFlow id=\"Flow_1bb2juj\" sourceRef=\"Gateway_0xe3hgk\" targetRef=\"Activity_02y8kmr\">\n <conditionExpression xsi:type=\"tFormalExpression\" language=\"javascript\">next(null,this.environment.services.conditionFlowVarChk(this.environment.variables.ivrVar,\"myVar.key.code\",\"CCC\"));</conditionExpression> </sequenceFlow>\n    

<sequenceFlow id=\"Flow_06cjcev\" sourceRef=\"Gateway_0xe3hgk\" targetRef=\"Activity_16q2nem\">\n <conditionExpression xsi:type=\"tFormalExpression\" language=\"javascript\">next(null,this.environment.services.conditionFlowVarChk(this.environment.variables.ivrVar,\"myVar.key.code\",\"DC\"));</conditionExpression> </sequenceFlow>

```

and the function

```auto
async function conditionFlowVarChk(ivrVar, variable, value) {

  let propInfo - <some_logic>
  return propInfo ? true : false;

}

```

now on the condition if conditionFlowVarChk returns the false still it execute the same flow. and does not check the other condition.

Am i missing something?

if u can help @nikku

---

<div class="post-metadata">

**Author:** ![nikku](https://forum.bpmn.io/user_avatar/forum.bpmn.io/nikku/32/5130_2.png) [@nikku](https://forum.bpmn.io/u/nikku)\
**Post date:** [August 30, 2022, 11:04am UTC](https://forum.bpmn.io/t/exclusive-gateway-conditions-not-working/7914/2 "2022-08-30T11:04:57Z")

</div>

It looks like your question is not related to [our project](https://bpmn.io/) or one of our toolkits. For questions regarding other tools please refer to their respective communication channels. If your question is about the [Camunda platform](https://github.com/camunda) or the Camunda Modeler, please head over to the [Camunda forum](https://forum.camunda.io/c/modeler) for assistance.

As it looks like though your question is not about the Camunda Platform? In that case consider another (more appropriate) place to ask your question.

Please provide more context if you are certain this is the right place to get an answer and we may be able to help you.

Thank you ☀

---

<div class="post-metadata">

**Author:** ![Code\_Guru](https://forum.bpmn.io/user_avatar/forum.bpmn.io/code_guru/32/3742_2.png) [@Code\_Guru](https://forum.bpmn.io/u/Code_Guru)\
**Post date:** [August 30, 2022, 11:14am UTC](https://forum.bpmn.io/t/exclusive-gateway-conditions-not-working/7914/3 "2022-08-30T11:14:46Z")

</div>

oh sorry my mistake → question is realated to bpmn-engine actually!!

---

<div class="post-metadata">

**Author:** ![barmac](https://forum.bpmn.io/user_avatar/forum.bpmn.io/barmac/32/974_2.png) [@barmac](https://forum.bpmn.io/u/barmac)\
**Post date:** [July 9, 2025, 10:16am UTC](https://forum.bpmn.io/t/exclusive-gateway-conditions-not-working/7914/4 "2025-07-09T10:16:28Z")

</div>

Closed on July 9, 2025, 10:16am UTC

Closing old topics.
