flowable / flowable/flowable-engine

BPMN Boundary error events with specific error code also catch error events with null error code

Open
#2,847 0 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

**Describe the bug**
A boundary error with errorRef specified (not null), will catch an error event with null errorRef.

**Expected behavior**
Boundary events with specific errorRef should only catch error events with the same error code. The opposite is okay though, a boundary error with null error code should catch all error events.

I am in the process of migrating from Activiti 6 to Flowable 6 and the same workflow process behaves differently in Flowable due to this.

**Code**
This boundary error event with error code "testRef":
```

```

Catches this error event with null error code within "testSubprocess":
```

```

[The line in Flowable that causes the issue](https://github.com/flowable/flowable-engine/blob/51d5dac5052d2863b40e599f7fd1de3dc6366d12/modules/flowable-engine/src/main/java/org/flowable/engine/impl/bpmn/helper/ErrorPropagation.java#L296)

[It has been fixed in Activiti](https://github.com/Activiti/Activiti/blob/01813c105679e8d9a6587fd9f4c40428b73ff691/modules/activiti-engine/src/main/java/org/activiti/engine/impl/bpmn/helper/ErrorPropagation.java#L238)

As you can see, this can be fixed be removing `compareErrorCode == null || ` from that line. I made a pull request earlier with that change, but ran into some issues with the tests so I cancelled it.

**Additional context**
Version of Flowable: flowable-engine-6.6.1.8 (with flowable-spring)

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.