# Catch changes on gateway once its connected SequenceFlow has been updated

**URL:** <https://forum.bpmn.io/t/catch-changes-on-gateway-once-its-connected-sequenceflow-has-been-updated/4451>\
**Category:** Modeler\
**Created:** [February 27, 2020, 8:17am UTC](https://forum.bpmn.io/t/catch-changes-on-gateway-once-its-connected-sequenceflow-has-been-updated/4451 "2020-02-27T08:17:35Z")\
**Posts on this page:** 4\
**Page:** 1

<div class="post-metadata">

**Author:** ![Oumayma\_LTAIEF](https://forum.bpmn.io/user_avatar/forum.bpmn.io/oumayma_ltaief/32/1386_2.png) [@Oumayma\_LTAIEF](https://forum.bpmn.io/u/Oumayma_LTAIEF)\
**Post date:** [February 27, 2020, 8:17am UTC](https://forum.bpmn.io/t/catch-changes-on-gateway-once-its-connected-sequenceflow-has-been-updated/4451/1 "2020-02-27T08:17:35Z")

</div>

Hello, I’m trying to detect changes on element bpmn:Gateway on changes on its connected SequenceFlow (deleted/move/changed). I’m searching for a suitable event of EventBus listener to catch the change on gateway. Any hints about it please?  
Thanks

---

<div class="post-metadata">

**Author:** ![Niklas\_Kiefer](https://forum.bpmn.io/user_avatar/forum.bpmn.io/niklas_kiefer/32/3882_2.png) [@Niklas\_Kiefer](https://forum.bpmn.io/u/Niklas_Kiefer)\
**Post date:** [February 27, 2020, 9:42am UTC](https://forum.bpmn.io/t/catch-changes-on-gateway-once-its-connected-sequenceflow-has-been-updated/4451/2 "2020-02-27T09:42:22Z")

</div>

What about listening to the `element.changed` event for sequence flows and check whether it is / was connected to a gateway element and then doing your crazy stuff with this gateway?

```auto
import { is } from '../util/ModelUtil';

eventBus('element.changed', function(e) {
  const {
    element
  } = e;

  if(is(element, 'bpmn:SequenceFlow') {
   // check for connected `bpmn:Gateway` elements, e.g. via element.incoming or element.outgoing
   // do stuff
  } 
});
```

---

<div class="post-metadata">

**Author:** ![Oumayma\_LTAIEF](https://forum.bpmn.io/user_avatar/forum.bpmn.io/oumayma_ltaief/32/1386_2.png) [@Oumayma\_LTAIEF](https://forum.bpmn.io/u/Oumayma_LTAIEF)\
**Post date:** [February 27, 2020, 1:41pm UTC](https://forum.bpmn.io/t/catch-changes-on-gateway-once-its-connected-sequenceflow-has-been-updated/4451/3 "2020-02-27T13:41:22Z")

</div>

This would help if the change is just a usual update on SequenceFlow that is connected to a gateway, but it wouldn’t help in cases:

- delete SequenceFlow that was connected to a gateway =\> cannot detect the change on incoming/outgoing properties
- update link connection SequenceFlow from gateway to other element  
So the perfect solution will be catch event changes in incoming or outgoing Array properties on any gateway element. Any help about that?  
Thanks

---

<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:** [July 22, 2025, 3:31pm UTC](https://forum.bpmn.io/t/catch-changes-on-gateway-once-its-connected-sequenceflow-has-been-updated/4451/4 "2025-07-22T15:31:02Z")

</div>

Closed on July 22, 2025, 3:31pm UTC


