-
Notifications
You must be signed in to change notification settings - Fork 555
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
Migrate child process instances #18509
Conversation
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Thanks @berkaycanbc 🚀 This will enable a lot of new migrations use cases!
👍 Great work analyzing whether call activity properties need updates!
❌ I have a single change request. Please add the requested assertion and feel free to merge after. So, I'll pre-approve it.
...va/io/camunda/zeebe/engine/processing/processinstance/migration/MigrateCallActivityTest.java
Show resolved
Hide resolved
...amunda/zeebe/engine/processing/processinstance/ProcessInstanceMigrationMigrateProcessor.java
Outdated
Show resolved
Hide resolved
Three different test cases are added. First one is testing if the migration of a child process instance can be successfully completed. Second, the test verifies if the flow can continue as expected in both parent and child process instances. Third, we add test if cancellation of a parent process instance still works as expected. It is basically the same test cases as we have for call activity migration but with migrating child process instance this time.
The test was implemented to make sure we reject migrating child process instances. But with this PR, we support migrating them. Therefore, the related test is removed.
The precondition to prevent migrating child process instances is removed. There's no need to do anything to the child process instance specifically. We've verified that the call activity that is referencing the migrated child process instance does not have any properties that needs to be updated on migration. Following fields can be changed during the migration of child process instance: - the process definition key of the child process instance - the bpmn process id of the child process instance - the version of the child process instance - the element id of the active element inside the child process instance Checked following classes to see if anything needs to be updated for the calling call activity: `ProcessInstanceRecord` -> no data kept for child process instance `ElementInstance` -> only called child instance's key is kept but it will not change during the migration `DBElementInstanceState` -> parent and child instances are connected through instance keys that will not change during the migration of child process instance Therefore, there is no need to update call activity neither in log stream nor in the state.
a0aac70
to
fc088b1
Compare
/backport |
Backport failed for Please cherry-pick the changes locally and resolve any conflicts. git fetch origin stable/8.5
git worktree add -d .worktree/backport-18509-to-stable/8.5 origin/stable/8.5
cd .worktree/backport-18509-to-stable/8.5
git switch --create backport-18509-to-stable/8.5
git cherry-pick -x ac9c59550d9231f78db35a24c28ca146a8970036 7a352801196dc170b25f35bf478eb460fe4a8373 fc088b120deb1e23c36b961d9d46719ceaf22d3c |
/backport |
Successfully created backport PR for |
# Description Backport of #18509 to `stable/8.5`. relates to #18328 #15922 original author: @berkaycanbc
Description
We've verified that the call activity that is referencing the migrated child
process instance does not have any properties that needs to be updated on migration.
Following fields can be changed during the migration of child process instance:
Checked following classes to see if anything needs to be updated for the calling
call activity:
ProcessInstanceRecord
-> no data kept for child process instanceElementInstance
-> only called child instance's key is kept but it will not changeduring the migration
DBElementInstanceState
-> parent and child instances are connected through instancekeys that will not change during the migration of child process instance
Therefore, there is no need to update call activity neither in log stream nor in the
state.
Related issues #18328
closes #15922