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

feat(client): provide the Java client's interfaces for migrating a process instance #15199

Conversation

berkaycanbc
Copy link
Contributor

@berkaycanbc berkaycanbc commented Nov 14, 2023

Description

  • New command interface is created to define process instance migration steps
  • A MigrationPlan object is added along with a builder implementation to allow reusing migration plans
  • Noop implementation of process instance migration is implemented
  • Tests added to verify building of the process instance migration request

Related issues

closes #15161

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.

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 work @berkaycanbc 🙌

👍 I really like the examples in the command method's JavaDoc. They inspire me to ask for more of these in other places.

❌ There are a few small things that I believe should be changed.

🔧 I also made some suggestions. Please have a look.

Copy link
Contributor Author

@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.

Great feedback @korthout, thanks! 😍

I sent changes based on your comments. 👍

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.

Thanks for the changes @berkaycanbc ❤️

I have a few last suggestions, but nothing major. Please have a look.

LGTM 👍

@berkaycanbc berkaycanbc force-pushed the bcan-15161-provide_the_java_clients_interfaces_for_migrating_a_process_instance branch 2 times, most recently from 2915c67 to 1be8626 Compare November 17, 2023 09:32
A MigrationPlan object and its builder is added. The MigrationPlan
object can be reused to migrate different process instances with the same
active elements that needs to be migrated to the same process definition.
Steps are structured in a way that they force users to follow required order.
E.g. targetProcessDefinitionKey needs to be provided before mappingInstructions.
Also, addMappingInstruction method is duplicated in both step 2 and final step.
This is because we still want to be able to add intermediate steps to the command
chain using step 2 interface.
…gration

The implementation of process instance migration command left
unimplemented because no actual implementation is available in the
engine at the moment.
Tests only verify the command chain at the moment. Later will be updated
once actual implementation takes place in the engine.
@berkaycanbc berkaycanbc force-pushed the bcan-15161-provide_the_java_clients_interfaces_for_migrating_a_process_instance branch from 1be8626 to 8a5e443 Compare November 17, 2023 10:36
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.

Thanks for the more detailed commits ❤️

LGTM 👍

@berkaycanbc
Copy link
Contributor Author

bors merge

@zeebe-bors-camunda
Copy link
Contributor

Build succeeded:

@zeebe-bors-camunda zeebe-bors-camunda bot closed this pull request by merging all changes into main in 8b70dcd Nov 17, 2023
@zeebe-bors-camunda zeebe-bors-camunda bot deleted the bcan-15161-provide_the_java_clients_interfaces_for_migrating_a_process_instance branch November 17, 2023 11:50
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.

Provide the Java client's interfaces for migrating a process instance
2 participants