Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Trigger boundary events only if the flow scope is active #9281

Merged
merged 4 commits into from
May 5, 2022

Conversation

saig0
Copy link
Member

@saig0 saig0 commented May 4, 2022

Description

  • we have a deadlock if a boundary event is triggered and the flow scope is on termination
  • a special case is described in Multiple triggered interrupting boundary events can deadlock process instance #9233 where a boundary event in a child process instance was triggered and the related call activity is terminated concurrently
  • the issue is caused by writing the activating and activated events of the boundary event (that create a new element instance)
  • in the BPMN element processors, we don't check if the flow scope of the boundary event is still active
  • fixing the issue by adding a check before activating the boundary event

Related issues

closes #9233

Definition of Done

Not all items need to be done depending on the issue and the pull request.

Code changes:

  • The changes are backwards compatibility with previous versions
  • If it fixes a bug then PRs are created to backport the fix to the last two minor versions. You can trigger a backport by assigning labels (e.g. backport stable/1.3) to the PR, in case that fails you need to create backports manually.

Testing:

  • There are unit/integration tests that verify all acceptance criterias of the issue
  • New tests are written to ensure backwards compatibility with further versions
  • The behavior is tested manually
  • The change has been verified by a QA run
  • The impact of the changes is verified by a benchmark

Documentation:

  • The documentation is updated (e.g. BPMN reference, configuration, examples, get-started guides, etc.)
  • New content is added to the release announcement
  • If the PR changes how BPMN processes are validated (e.g. support new BPMN element) then the Camunda modeling team should be informed to adjust the BPMN linting.

Please refer to our review guidelines.

saig0 added 4 commits May 4, 2022 09:17
* verify that a boundary event is not activated if the flow scope is terminating
* replace the boundary test for service tasks by a parameterized test for all relevant BPMN elements
* check if the flow scope is active before activating a boundary event
* align the termination logic for the BPMN element processors
@saig0
Copy link
Member Author

saig0 commented May 4, 2022

Tested manually ✔️

image

@saig0 saig0 marked this pull request as ready for review May 4, 2022 07:32
@saig0 saig0 requested a review from korthout May 4, 2022 07:59
Copy link
Member

@korthout korthout left a comment

Choose a reason for hiding this comment

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

Nice and clean 🧽 LGTM

@saig0
Copy link
Member Author

saig0 commented May 5, 2022

bors merge

@zeebe-bors-camunda
Copy link
Contributor

@zeebe-bors-camunda zeebe-bors-camunda bot merged commit 6bff695 into main May 5, 2022
@zeebe-bors-camunda zeebe-bors-camunda bot deleted the 9233-terminate-call-activity branch May 5, 2022 03:41
@github-actions
Copy link
Contributor

github-actions bot commented May 5, 2022

Backport failed for stable/1.3, because it was unable to cherry-pick the commit(s).

Please cherry-pick the changes locally.

git fetch origin stable/1.3
git worktree add -d .worktree/backport-9281-to-stable/1.3 origin/stable/1.3
cd .worktree/backport-9281-to-stable/1.3
git checkout -b backport-9281-to-stable/1.3
ancref=$(git merge-base 7d3c4c70302b6399ed45fcbd7cb6b654b1f0cf92 d9e82d80c7d06ed5c21baa820cd1b1b569e03340)
git cherry-pick -x $ancref..d9e82d80c7d06ed5c21baa820cd1b1b569e03340

@github-actions
Copy link
Contributor

github-actions bot commented May 5, 2022

Backport failed for stable/8.0, because it was unable to create a new branch.

Please cherry-pick the changes locally.

git fetch origin stable/8.0
git worktree add -d .worktree/backport-9281-to-stable/8.0 origin/stable/8.0
cd .worktree/backport-9281-to-stable/8.0
git checkout -b backport-9281-to-stable/8.0
ancref=$(git merge-base 7d3c4c70302b6399ed45fcbd7cb6b654b1f0cf92 d9e82d80c7d06ed5c21baa820cd1b1b569e03340)
git cherry-pick -x $ancref..d9e82d80c7d06ed5c21baa820cd1b1b569e03340

zeebe-bors-camunda bot added a commit that referenced this pull request May 5, 2022
9293: [Backport 1.3] Trigger boundary events only if the flow scope is active r=saig0 a=saig0

## Description

Backport of #9281

Only one additional change compared to the origin PR for downgrading the test code to Java 11.

## Related issues

relates to #9233


Co-authored-by: Philipp Ossler <philipp.ossler@gmail.com>
zeebe-bors-camunda bot added a commit that referenced this pull request May 5, 2022
9292: [Backport 8.0] Trigger boundary events only if the flow scope is active r=saig0 a=saig0

## Description

Backport of #9281

No additional changes compared to the origin PR.

## Related issues

relates to #9233


Co-authored-by: Philipp Ossler <philipp.ossler@gmail.com>
zeebe-bors-camunda bot added a commit that referenced this pull request May 5, 2022
9293: [Backport 1.3] Trigger boundary events only if the flow scope is active r=saig0 a=saig0

## Description

Backport of #9281

Only one additional change compared to the origin PR for downgrading the test code to Java 11.

## Related issues

relates to #9233


Co-authored-by: Philipp Ossler <philipp.ossler@gmail.com>
zeebe-bors-camunda bot added a commit that referenced this pull request May 5, 2022
9292: [Backport 8.0] Trigger boundary events only if the flow scope is active r=saig0 a=saig0

## Description

Backport of #9281

No additional changes compared to the origin PR.

## Related issues

relates to #9233


Co-authored-by: Philipp Ossler <philipp.ossler@gmail.com>
zeebe-bors-camunda bot added a commit that referenced this pull request May 5, 2022
9293: [Backport 1.3] Trigger boundary events only if the flow scope is active r=saig0 a=saig0

## Description

Backport of #9281

Only one additional change compared to the origin PR for downgrading the test code to Java 11.

## Related issues

relates to #9233


Co-authored-by: Philipp Ossler <philipp.ossler@gmail.com>
zeebe-bors-camunda bot added a commit that referenced this pull request May 5, 2022
9293: [Backport 1.3] Trigger boundary events only if the flow scope is active r=saig0 a=saig0

## Description

Backport of #9281

Only one additional change compared to the origin PR for downgrading the test code to Java 11.

## Related issues

relates to #9233


Co-authored-by: Philipp Ossler <philipp.ossler@gmail.com>
zeebe-bors-camunda bot added a commit that referenced this pull request May 5, 2022
9293: [Backport 1.3] Trigger boundary events only if the flow scope is active r=saig0 a=saig0

## Description

Backport of #9281

Only one additional change compared to the origin PR for downgrading the test code to Java 11.

## Related issues

relates to #9233


Co-authored-by: Philipp Ossler <philipp.ossler@gmail.com>
zeebe-bors-camunda bot added a commit that referenced this pull request May 5, 2022
9293: [Backport 1.3] Trigger boundary events only if the flow scope is active r=saig0 a=saig0

## Description

Backport of #9281

Only one additional change compared to the origin PR for downgrading the test code to Java 11.

## Related issues

relates to #9233


Co-authored-by: Philipp Ossler <philipp.ossler@gmail.com>
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Projects
None yet
Development

Successfully merging this pull request may close these issues.

Multiple triggered interrupting boundary events can deadlock process instance
3 participants