flowable / flowable/flowable-engine
Async StartEvent causes process level 'start' execution listener to be run twice
- Dominant language
- Java
- Stars
- 9.5k
- Forks
- 2.9k
- Avg merge
- 7h 8m
- Merged PRs (30d)
- 2
Description
**Describe the bug**
If the start event element of the diagram is **async** then `ContinueProcessOperation#run` is called twice for the start event element which leads to calling any process level execution listeners twice as well (see also `ContinueProcessOperation#continueThroughFlowNode` and `ContinueProcessOperation#executeProcessStartExecutionListeners`).
If the start event element is **sync** then the listener is called just once (as expected).
**Expected behavior**
The process level start execution listener should be called just once when the process is started.
**Code**
Should be pretty straightforward for you to reproduce with any trivial diagram that starts like this:
```
...
```
**Additional context**
Using latest Flowable version (process engine only) with Spring Boot, Postgres 10.
Contributor guide
No contributing guide indexed for this repository
Research direction
Start by reading ContinueProcessOperation#run, ContinueProcessOperation#continueThroughFlowNode, and ContinueProcessOperation#executeProcessStartExecutionListeners. Reproduce the issue with a minimal executable process containing an async startEvent and a process-level start execution listener, then compare it with a synchronous start event. Done means the listener runs exactly once when the async process starts.
Written by the indexing model from the issue text.
Assessment
- Tech stack
- java
- Domain
- backend
- Issue type
- Bug
- Difficulty
- 3/5
- Estimated time
- 1-2 days
- Activity status
- Stale
- Clarity
- Mostly clear
- Newbie friendliness
- 48/100