flowable / flowable/flowable-engine
Different behaviour between parallel and inclusive gateways
- Lingua principale
- Java
- Stelle
- 9.5k
- Fork
- 2.9k
- Merge medio
- 7h 8m
- PR unite (30g)
- 2
Descrizione
Hello,
It seems that Parallel and Inclusive Gateways don't have the same behaviour (in the same configuration).
Tests done on processes with 3 parallel branches (1 branch with a catching message event):
I have used 2 test sets: 1 using Parallel gateways, 1 using Inclusive gateways.
And the Inclusive gateway use always the 3 branches (should so be equivalent to the parallel gateway, without default branch for this test).
**Test set 1: Parallel gateways**

**Test set 2: Inclusive gateways**

For each set, different settings on the Join gateway (4):
- Sync (no Async & Exclusive flags)
- Sync & Exclusive
- Async
- Async & Exclusive
What is strange to me is that we do not get the same result with parallel and inclusive gateways.
With Parallel gateway, we have 2 scenarios without OptimisticLock exception.
_But with Inclusive gateway, all scenarios generate an OptimisticLock exception!.._
And it’s really problematic (to me at least :)).
For now, I see 2 "workarounds" to avoid OptimisticLockExceptions:
- use a Triggerable task to embed both Send and Receive tasks. But in this case, no way to use a Camel task. And not sure it will solve the problem.
- convert my parallel process in a serial process (3 branches in 1), but really not what I want..
Here's the post in the forum:
https://forum.flowable.org/t/different-behaviour-between-parallel-and-inclusive-gateways-tests-using-async-and-or-exclusive-flags/3848
I join the project I used for my tests (includes 8 BPMN & Java Test file):
[UnitTesting-ParallelGateway.zip](https://github.com/flowable/flowable-engine/files/3171583/UnitTesting-ParallelGateway.zip)
Best Regards
William
Guida per i contributori
Nessuna guida per i contributori indicizzata per questo repository
Direzione di ricerca
Inizia eseguendo il progetto allegato UnitTesting-ParallelGateway e confrontando i suoi otto casi di test BPMN e Java per i gateway paralleli e inclusivi nelle quattro impostazioni di join. Leggi la discussione correlata sul forum per il contesto, quindi traccia l'esecuzione del gateway coinvolta nell'eccezione OptimisticLock. Il lavoro è completato quando i gateway inclusivi si comportano in modo equivalente ai gateway paralleli per questa configurazione senza tali eccezioni.
Scritto dal modello di indicizzazione a partire dal testo della issue.
Valutazione
- Stack tecnologico
- java
- Ambito
- backend
- Tipo di issue
- Bug
- Difficoltà
- 4/5
- Tempo stimato
- 3-5 giorni
- Stato di attività
- Ferma
- Chiarezza
- Abbastanza chiara
- Idoneità per principianti
- 35/100