Skip to content

Fix boundary event iterator desynchronization in ContinueProcessOperation#4158

Open
uucoding wants to merge 4 commits intoflowable:mainfrom
uucoding:main
Open

Fix boundary event iterator desynchronization in ContinueProcessOperation#4158
uucoding wants to merge 4 commits intoflowable:mainfrom
uucoding:main

Conversation

@uucoding
Copy link

The executeBoundaryEvents method had a critical iterator desynchronization bug. The while loop assumed that the boundaryEvents and boundaryEventExecutions lists contained matching elements in the same order, but they did not due to inconsistent filtering.

For example:

  • createBoundaryEvents returns only: [TimerExec, ErrorExec] (compensation events are skipped)
  • executeBoundaryEvents receives: [Timer, Compensation, Error] (all events)

Loop pairing comparison:

Expected pairing:              Actual incorrect pairing:
Timer ↔ TimerExec ✓            Timer ↔ TimerExec ✓
Error ↔ ErrorExec ✓            Compensation ↔ ErrorExec ✗ 

…tion

**The `executeBoundaryEvents` method had a critical iterator desynchronization bug. The `while` loop assumed that the `boundaryEvents` and `boundaryEventExecutions` lists contained matching elements in the same order, but they did not due to inconsistent filtering.**

**For example:**
- `createBoundaryEvents` returns only: `[TimerExec, ErrorExec]` (compensation events are skipped)
- `executeBoundaryEvents` receives: `[Timer, Compensation, Error]` (all events)

**Loop pairing comparison:**
```
Expected pairing:              Actual incorrect pairing:
Timer ↔ TimerExec ✓            Timer ↔ TimerExec ✓
Error ↔ ErrorExec ✓            Compensation ↔ ErrorExec ✗ 
```
…sOperation

Fix boundary event iterator desynchronization in ContinueProcessOpera…
@filiphr
Copy link
Contributor

filiphr commented Feb 3, 2026

@uucoding can you please write a test case for this?

@uucoding
Copy link
Author

uucoding commented Feb 3, 2026

@uucoding can you please write a test case for this?

@filiphr Sure, I've already submitted it. Please take a look.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

2 participants