Skip to content

Conversation

berkaycanbc
Copy link
Contributor

@berkaycanbc berkaycanbc commented Jun 26, 2025

Description

Relax the boundary‐event outgoing‐flow rule so non-compensation events can be sink, while still enforcing “no outgoing + association” for compensation boundaries; update the validator messages and existing BPMN validation tests, and add a concise parameterized runtime test covering interrupting vs. non-interrupting behavior for all boundary event types.

Checklist

Related issues

closes #33589

@github-actions github-actions bot added the component/zeebe Related to the Zeebe component/team label Jun 26, 2025
@berkaycanbc berkaycanbc added backport stable/8.4 OUTDATED, DON'T USE (Backport a pull request to 8.4.x) backport stable/8.5 Backport a pull request to stable/8.5 backport stable/8.6 Backport a pull request to stable/8.6 backport stable/8.7 Backport a pull request to stable/8.7 labels Jun 26, 2025
@berkaycanbc berkaycanbc force-pushed the bcan-33589-unable-to-deploy-process-with-boundary-event-without-outgoing-flows branch from 3f910fb to fdb876c Compare June 26, 2025 19:14
Add a Parameterized test class covering all supported boundary event types
(message, timer, signal, escalation, error, compensation) in both interrupting
and non-interrupting modes. Verifies that interrupting events terminate the
attached activity and non-interrupting events keep it running to completion.
Boundary events no longer require outgoing sequence flows by default.
Only compensate boundary events still must have no outgoing flows and a compensation association.

- Remove global “must have outgoing” check
- Add hasCompensationDefinition guard
- Introduce isValidCompensationBoundaryEvent to enforce association
- Update validation messages accordingly
- CompensationEventTest: expect new message for missing compensation
association:
  “Compensation boundary events must have a compensation association and
   no outgoing sequence flows”
- ZeebeBoundaryEventValidationTest: remove old “must have outgoing” case
 and add compensation‐specific scenario using the updated validation
 message
@berkaycanbc berkaycanbc force-pushed the bcan-33589-unable-to-deploy-process-with-boundary-event-without-outgoing-flows branch from fdb876c to e66e109 Compare June 26, 2025 23:31
@berkaycanbc berkaycanbc requested review from korthout and Copilot June 27, 2025 09:14
@berkaycanbc
Copy link
Contributor Author

@korthout I asked a review from you as you were involved in the conversation. But let me know if you do not have the capacity.

Copy link
Contributor

@Copilot Copilot AI left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Pull Request Overview

Relax boundary‐event validation to allow non-compensation events without outgoing flows, enforce strict rules for compensation boundaries, update error messages, and add runtime tests for interrupting vs. non-interrupting behavior.

  • Refactor BoundaryEventValidator to only apply compensation rule to compensation boundary events
  • Update validation error messages in model and engine tests for compensation boundaries
  • Add BoundaryEventWithoutOutgoingSequenceFlowTest to cover various non-compensation boundary event behaviors at runtime

Reviewed Changes

Copilot reviewed 4 out of 4 changed files in this pull request and generated 1 comment.

File Description
CompensationEventTest.java Updated expected validation message for compensation boundary events without an association
BoundaryEventWithoutOutgoingSequenceFlowTest.java New parameterized runtime tests for boundary events without outgoing sequence flows
ZeebeBoundaryEventValidationTest.java Updated model validation test to expect the new compensation-specific error message
BoundaryEventValidator.java Refactored validation logic and updated the compensation boundary error message
Comments suppressed due to low confidence (2)

zeebe/engine/src/test/java/io/camunda/zeebe/engine/processing/bpmn/compensation/CompensationEventTest.java:34

  • Add a test case for the scenario where a compensation boundary event has a compensation association but also an outgoing sequence flow, which should be rejected by the new rule.
  public void shouldNotDeployCompensationBoundaryEventWithoutAssociation() {

zeebe/engine/src/test/java/io/camunda/zeebe/engine/processing/bpmn/boundary/BoundaryEventWithoutOutgoingSequenceFlowTest.java:60

  • Consider adding a parameterized scenario for a compensation boundary event to verify its non-interrupting runtime behavior, matching the validation rule changes.
  @Parameterized.Parameters(name = "{0}")

validationResultCollector.addError(
0, "Must have at least one outgoing sequence flow or association");
0,
"Compensation boundary events must have a compensation association and no outgoing sequence flows");
Copy link
Preview

Copilot AI Jun 27, 2025

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

[nitpick] Extract this error message into a constant shared between the validator and tests to ensure consistency and make future updates easier.

Copilot uses AI. Check for mistakes.

@korthout
Copy link
Member

@berkaycanbc I don't have capacity for it. This PR might be a good opportunity to share knowledge about the engine in your team.

@korthout korthout removed their request for review June 30, 2025 07:31
@berkaycanbc
Copy link
Contributor Author

Hey @georgios-goulos and @tsedekey, did you remember we talked about a PR that you can review in the team meeting? It is this one. Please let me know if you need more context.

@berkaycanbc
Copy link
Contributor Author

@georgios-goulos thanks for following up on the fix! Still waiting for a full review. I would like to merge this before I get far away from the topic. Thanks already! FYI also @tsedekey

@berkaycanbc berkaycanbc added this pull request to the merge queue Aug 8, 2025
@github-merge-queue github-merge-queue bot removed this pull request from the merge queue due to failed status checks Aug 8, 2025
@berkaycanbc berkaycanbc added this pull request to the merge queue Aug 12, 2025
Merged via the queue into main with commit 8dfaf15 Aug 12, 2025
105 of 107 checks passed
@berkaycanbc berkaycanbc deleted the bcan-33589-unable-to-deploy-process-with-boundary-event-without-outgoing-flows branch August 12, 2025 19:42
@backport-action
Copy link
Collaborator

Created backport PR for stable/8.4:

Please cherry-pick the changes locally and resolve any conflicts.

git fetch origin backport-34459-to-stable/8.4
git worktree add --checkout .worktree/backport-34459-to-stable/8.4 backport-34459-to-stable/8.4
cd .worktree/backport-34459-to-stable/8.4
git reset --hard HEAD^
git cherry-pick -x dbc9a3ac3469bc23054d8aac72e8f5574ef97a71 9cb86dce64ba91fdd56a6e8609a26fae8ee0887c e66e109bcc5e786d7f7f7124d20b14db2d26c918 ef889158b4b2d79ad5ebff574a7341c7f4121590
git push --force-with-lease

@backport-action
Copy link
Collaborator

Successfully created backport PR for stable/8.5:

@backport-action
Copy link
Collaborator

Successfully created backport PR for stable/8.6:

@backport-action
Copy link
Collaborator

Successfully created backport PR for stable/8.7:

@nikku
Copy link
Member

nikku commented Aug 12, 2025

Amazing to see this fixed ⭐

github-merge-queue bot pushed a commit that referenced this pull request Aug 12, 2025
…thout outgoing flows (#36707)

# Description
Backport of #34459 to `stable/8.6`.

relates to #33589
github-merge-queue bot pushed a commit that referenced this pull request Aug 14, 2025
…thout outgoing flows (#36708)

# Description
Backport of #34459 to `stable/8.7`.

relates to #33589
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
backport stable/8.4 OUTDATED, DON'T USE (Backport a pull request to 8.4.x) backport stable/8.5 Backport a pull request to stable/8.5 backport stable/8.6 Backport a pull request to stable/8.6 backport stable/8.7 Backport a pull request to stable/8.7 component/zeebe Related to the Zeebe component/team version:8.6.25 version:8.7.11
Projects
None yet
Development

Successfully merging this pull request may close these issues.

Unable to deploy process with boundary event without outgoing flows
5 participants