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

Terminate children using the new ProcessInstanceBatch command #12604

Merged
merged 4 commits into from
May 1, 2023

Conversation

remcowesterhoud
Copy link
Contributor

@remcowesterhoud remcowesterhoud commented Apr 28, 2023

Description

This PR switches the termination of child instances to use the new ProcessInstanceBatch command.

Related issues

closes #12538
closes #11355

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.)
  • 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.

Other teams:
If the change impacts another team an issue has been created for this team, explaining what they need to do to support this change.

Please refer to our review guidelines.

Verifies we can terminate a PI with a lot of children, as well as a subprocess with a lot of children.
It also verifies that is using the batching as expected.
Uses the new ProcessInstanceBatch.TERMINATE command to terminated child instances.
It will only do this if children exist.
Now that we terminate children in batches, this method is no longer used.
Fixes existing tests to adhere to batch termination

BoundaryEventTest:
This test asserts over an exact sequence of record. The terminate batch command needs to be inserted in this sequence.

ProcessInstanceCommandRejectionTest:
Because of the batch command no seconds terminate command is written anymore.
We need another setup to write 2 terminate commands.
Copy link
Contributor

@berkaycanbc berkaycanbc left a comment

Choose a reason for hiding this comment

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

Looks clean! 🚀

Really good test cases covering the possible occurring problem!

@berkaycanbc
Copy link
Contributor

bors merge

zeebe-bors-camunda bot added a commit that referenced this pull request May 1, 2023
12604: Terminate children using the new `ProcessInstanceBatch` command r=berkaycanbc a=remcowesterhoud

## Description

<!-- Please explain the changes you made here. -->

This PR switches the termination of child instances to use the new `ProcessInstanceBatch` command.

## Related issues

<!-- Which issues are closed by this PR or are related -->

closes #12538 
closes #11355 



Co-authored-by: Remco Westerhoud <remco@westerhoud.nl>
@zeebe-bors-camunda
Copy link
Contributor

Build failed:

@remcowesterhoud
Copy link
Contributor Author

Lot of issues connecting to Maven today

bors merge

@zeebe-bors-camunda
Copy link
Contributor

Build succeeded:

@zeebe-bors-camunda zeebe-bors-camunda bot merged commit e3b025a into main May 1, 2023
32 checks passed
@zeebe-bors-camunda zeebe-bors-camunda bot deleted the 12538_terminate_using_batch branch May 1, 2023 15:12
@backport-action
Copy link
Collaborator

Successfully created backport PR for stable/8.1:

@backport-action
Copy link
Collaborator

Successfully created backport PR for stable/8.2:

@backport-action
Copy link
Collaborator

Successfully created backport PR for release-8.3.0-alpha1:

zeebe-bors-camunda bot added a commit that referenced this pull request May 1, 2023
12616: [Backport release-8.3.0-alpha1] Terminate children using the new `ProcessInstanceBatch` command r=remcowesterhoud a=backport-action

# Description
Backport of #12604 to `release-8.3.0-alpha1`.

relates to #12538 #11355

Co-authored-by: Remco Westerhoud <remco@westerhoud.nl>
zeebe-bors-camunda bot added a commit that referenced this pull request May 1, 2023
12614: [Backport stable/8.1] Terminate children using the new `ProcessInstanceBatch` command r=remcowesterhoud a=backport-action

# Description
Backport of #12604 to `stable/8.1`.

relates to #12538 #11355

Co-authored-by: Remco Westerhoud <remco@westerhoud.nl>
zeebe-bors-camunda bot added a commit that referenced this pull request May 2, 2023
12614: [Backport stable/8.1] Terminate children using the new `ProcessInstanceBatch` command r=remcowesterhoud a=backport-action

# Description
Backport of #12604 to `stable/8.1`.

relates to #12538 #11355

Co-authored-by: Remco Westerhoud <remco@westerhoud.nl>
zeebe-bors-camunda bot added a commit that referenced this pull request May 2, 2023
12615: [Backport stable/8.2] Terminate children using the new `ProcessInstanceBatch` command r=remcowesterhoud a=backport-action

# Description
Backport of #12604 to `stable/8.2`.

relates to #12538 #11355

Co-authored-by: Remco Westerhoud <remco@westerhoud.nl>
@remcowesterhoud remcowesterhoud added version:8.3.0-alpha1 Marks an issue as being completely or in parts released in 8.3.0-alpha1 version:8.1.12 Marks an issue as being completely or in parts released in 8.1.12 version:8.2.4 Marks an issue as being completely or in parts released in 8.2.4 labels May 3, 2023
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
backport stable/8.2 Backport a pull request to 8.2.x version:8.1.12 Marks an issue as being completely or in parts released in 8.1.12 version:8.2.4 Marks an issue as being completely or in parts released in 8.2.4 version:8.3.0-alpha1 Marks an issue as being completely or in parts released in 8.3.0-alpha1
Projects
None yet
3 participants