flowable / flowable/flowable-engine

Different behaviour between parallel and inclusive gateways

Open
#1,741 18 comments 0 reactions 0 assignees View on GitHub
Dominant language
Java
Stars
9.5k
Forks
2.9k
Avg merge
7h 8m
Merged PRs (30d)
2

Description

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

Contributor guide

No contributing guide indexed for this repository

Assessment

This issue has not been assessed yet.

Get new issues in your inbox

A short digest of beginner-friendly GitHub issues.