flowable / flowable/flowable-engine

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

Aperta
#2,847 0 commenti 0 reazioni 0 assegnatari Vedi su GitHub
Lingua principale
Java
Stelle
9.5k
Fork
2.9k
Merge medio
7h 8m
PR unite (30g)
2

Descrizione

**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)

Guida per i contributori

Nessuna guida per i contributori indicizzata per questo repository

Direzione di ricerca

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.

Scritto dal modello di indicizzazione a partire dal testo della issue.

Valutazione

Stack tecnologico
java
Ambito
backend
Tipo di issue
Bug
Difficoltà
2/5
Tempo stimato
1-3 ore
Stato di attività
Ferma
Chiarezza
Specificata chiaramente
Idoneità per principianti
35/100

Ricevi le nuove issue nella tua casella

Un breve riepilogo di issue GitHub adatte ai principianti.