camunda / camunda-bpm-platform

Flexible framework for workflow and decision automation with BPMN and DMN. Integration with Quarkus, Spring, Spring Boot, CDI.
https://camunda.com/
Apache License 2.0
4.13k stars 1.56k forks source link

Inclusive gateway waits for too many tokens #2305

Open ThorbenLindhauer opened 6 years ago

ThorbenLindhauer commented 6 years ago

This issue was imported from JIRA:

Field Value
JIRA Link CAM-9367
Reporter @ThorbenLindhauer
Has restricted visibility comments true

Component

https://github.com/camunda/camunda-bpm-platform/tree/master/engine

Steps to reproduce

  1. Deploy a process model as in the attachment.
  2. After starting the process, one token will be in the wait state and one token will reach the merging inclusive gateway.

Observed Behavior

Expected Behavior:

Implementation notes

Reasoning:

The second and third point are crucial here. While the token at the user task might still arrive at the gateway, it must not be waited for, because it may also arrive on a sequence flow that was already signalled.

To determine this, the process engine must store on which sequence flow a token arrives at the gateway. This can be done by extending the ACT*RU*EXECUTION table and expanding the https://github.com/camunda/camunda-bpm-platform/blob/master/engine/src/main/resources/org/camunda/bpm/engine/impl/mapping/entity/Execution.xml mapping.

Forum post: https://forum.camunda.org/t/process-stuck-at-inclusive-gateway/8939

See CAM-12074 for a detailed explanation of more failure cases and some discussion. Failing tests have been added on branch https://github.com/camunda/camunda-bpm-platform/tree/CAM-12074.

Links:

ThorbenLindhauer commented 4 years ago

This comment was imported from JIRA and written by user @romansmirnov


<^CAM_9367.zip> shares some additional test cases.