flowable / flowable/flowable-engine

BPMN Boundary error events with specific error code also catch error events with null error code

Offen
#2,847 0 Kommentare 0 Reaktionen 0 zugewiesene Personen Auf GitHub ansehen
Vorherrschende Sprache
Java
Sterne
9.5k
Forks
2.9k
Ø Merge
7 Std. 8 Min.
Gemergte PRs (30 T.)
2

Beschreibung

**Describe the bug**
A boundary error with errorRef specified (not null), will catch an error event with null errorRef.

**Expected behavior**
Boundary events with specific errorRef should only catch error events with the same error code. The opposite is okay though, a boundary error with null error code should catch all error events.

I am in the process of migrating from Activiti 6 to Flowable 6 and the same workflow process behaves differently in Flowable due to this.

**Code**
This boundary error event with error code "testRef":
```

```

Catches this error event with null error code within "testSubprocess":
```

```

[The line in Flowable that causes the issue](https://github.com/flowable/flowable-engine/blob/51d5dac5052d2863b40e599f7fd1de3dc6366d12/modules/flowable-engine/src/main/java/org/flowable/engine/impl/bpmn/helper/ErrorPropagation.java#L296)

[It has been fixed in Activiti](https://github.com/Activiti/Activiti/blob/01813c105679e8d9a6587fd9f4c40428b73ff691/modules/activiti-engine/src/main/java/org/activiti/engine/impl/bpmn/helper/ErrorPropagation.java#L238)

As you can see, this can be fixed be removing `compareErrorCode == null || ` from that line. I made a pull request earlier with that change, but ran into some issues with the tests so I cancelled it.

**Additional context**
Version of Flowable: flowable-engine-6.6.1.8 (with flowable-spring)

Beitragsleitfaden

Für dieses Repository ist kein Beitragsleitfaden indexiert

Rechercherichtung

Start in modules/flowable-engine/src/main/java/org/flowable/engine/impl/bpmn/helper/ErrorPropagation.java at the linked line, then compare the corresponding Activiti implementation. Reproduce the boundary-event case with a specific errorRef and a null errorRef, and resolve the test issues noted in the report. Done means a specific boundary error catches only the matching error code while a null-code boundary still catches all errors.

Vom Indexierungsmodell aus dem Issue-Text verfasst.

Bewertung

Tech-Stack
java
Bereich
backend
Issue-Typ
Bug
Schwierigkeit
2/5
Geschätzter Aufwand
1-3 Stunden
Aktivitätsstatus
Veraltet
Klarheit
Klar beschrieben
Anfängerfreundlichkeit
35/100

Neue Issues direkt in Ihr Postfach

Eine kurze Übersicht über anfängerfreundliche GitHub-Issues.