Exclusive gateway: Condition on default flow is not ignored

Description

This bug concerns the exclusive gateway with a default flow. According to BPMN 2.0 if there is a condition on the default flow, it should be ignored. The current condition for choosing the sequence flow chooses the default flow if it has a condition evaluating to true, possibly ignoring other condition flows with a true condition.

To fix this, the if condition on line 63 of
engine.impl.bpmn.behavior.ExclusiveGatewayActivityBehavior.class
should contain the following expression instead:
(defaultSequenceFlow == null || !defaultSequenceFlow.equals(seqFlow.getId()))
&& (condition == null || condition.evaluate(execution))

Environment

None

Assignee

Bernd Ruecker (camunda)

Reporter

David Moser

Labels

None

Components

Fix versions

Affects versions

Priority

Minor
Configure