flowable / flowable/flowable-engine

Different behaviour between parallel and inclusive gateways

Offen
#1,741 18 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

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**
![image](https://user-images.githubusercontent.com/43992260/57603215-63505f80-7561-11e9-85ca-3de014373ad4.png)

**Test set 2: Inclusive gateways**
![image](https://user-images.githubusercontent.com/43992260/57603250-824ef180-7561-11e9-9418-7235ecd90a02.png)

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

Beitragsleitfaden

Für dieses Repository ist kein Beitragsleitfaden indexiert

Rechercherichtung

Beginne damit, das angehängte Projekt UnitTesting-ParallelGateway auszuführen und seine acht BPMN- und Java-Testfälle für parallele und inklusive Gateways unter den vier Join-Einstellungen zu vergleichen. Lies die zugehörige Forendiskussion als Kontext und verfolge anschließend die Gateway-Ausführung, die an der OptimisticLock-Ausnahme beteiligt ist. Erledigt ist die Aufgabe, wenn sich inklusive Gateways für diese Konfiguration ohne diese Ausnahmen genauso wie parallele Gateways verhalten.

Vom Indexierungsmodell aus dem Issue-Text verfasst.

Bewertung

Tech-Stack
java
Bereich
backend
Issue-Typ
Bug
Schwierigkeit
4/5
Geschätzter Aufwand
3-5 Tage
Aktivitätsstatus
Veraltet
Klarheit
Größtenteils klar
Anfängerfreundlichkeit
35/100

Neue Issues direkt in Ihr Postfach

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