cancel
Showing results for 
Search instead for 
Did you mean: 

Inclusive gateway forking fails?

ollih
Champ in-the-making
Champ in-the-making
Hi!

I'm new here and also quite new with BPMN. I noticed behaviour with OR GW, which I think is strange.

The inclusive gateway in this process fails to fork, when a user completes the Engineering task one the second time:
[img]http://i1156.photobucket.com/albums/p567/ollih1/OR-GWsimpletestFAILING.jpg[/img]

How to repeat the failure:
1. start the process -> Engineering task one becomes active (has red border in the Activiti explorer's "My instances view")
2. User belonging to the group "Engineering" claims the task (using Activiti explorer) which was targeted to the group.
3. User completes the task -> Engineering task one and Sales task two become active.
4. User claims and completes again Engineering task one
  -> the OR GW starts, but never ends so only Sales task two remains active.


The following process, which works perfectly ok, has only one difference compared to the failing one: I have removed the never actually executed flow arrow from Sales task three to Engineering task one.
[img]http://i1156.photobucket.com/albums/p567/ollih1/OR-GWsimpletestwhichworksOK.jpg[/img]

In this case the OR GW fires all the time normally and never freezes.


Why does the OR GW stop running if I have a flow chain back to the task, which is on the incoming side of the OR GW?

Have I understood wrong some fundamental thing of using the gateways or is there a bug in the OR GW?

I'll attach the .activiti file.
(I'm using Activiti version 5.9 in windows.)

Thanks for any help!
2 REPLIES 2

trademak
Star Contributor
Star Contributor
Hi,

Interesting. The problem is that the inclusive gateway checks if there is any execution active that can lead to the inclusive gateway as input.
If this is the case then it waits until this is execution is either completed or entered the inclusive gateway.
In your example the "Sales task two" task can lead to the inclusive gateway via the "Sales task three" task and therefore it waits for that execution.
So when you remove the sequence flow from "Sales task three" to "Engineering task one" this doesn't occur anymore.

Best regards,

ollih
Champ in-the-making
Champ in-the-making
Thanks, Tijs!

You provided a very reasonable explanation for the behaviour!

But I wonder if that behaviour is acceptable.

According to the documentation http://www.activiti.org/userguide/index.html#bpmnInclusiveGateway
all concurrent executions arriving at the inclusive gateway wait in the gateway until an execution has arrived for each of the incoming sequence flows that have a process token.
In my diagram there is only one concurrent execution arriving for the only one incoming sequence flow for the OR GW. Shouldn't the GW fire immediately when the flow contains a token? Now the GW seems to freeze waiting for also possibly in the future materializing tokens (which actually can never occur).

Do you think that the OR GW works according to the Activiti documentation and BPMN 2.0 specification? Or is there a bug in the gateway?