This guide is no longer valid and is kept only for historical reasons.
Starting with IntegrationManager 4.5.0, it is possible to share Java classes in a single library. Here is a brief description and manual on how to use it.
Overview
Components library (complib) is used for sharing a custom logic in the form of Groovy classes across multiple IMs, completely removing the action of copying the same classes between IMs. All classes in Components library are available to all IMs.
To create components for a single IM, use Classes.
Components library does not work in ‘private’ mode. If the policy requires for such components to be private (e.g. partner only), it is advised to use your own solution and share the components with the IM via Maven private server.
Versioning
Starting with IM version 5.0.0, this schema is used:
|
IM Version |
Components Library Version |
Note |
|---|---|---|
|
5.0.0 |
5.0.0 |
|
|
6.10.0 |
6.10.0 |
|
|
5.10.1 |
5.10.0 |
Complib is not released for hotfixes |
|
5.10.25 |
5.10.0 |
Complib is not released for hotfixes |
|
5.0.1 |
5.0.0 |
Complib is not released for hotfixes |
For older versions, the following schema is used:
|
IM Version |
Components Library Version |
Note |
|---|---|---|
|
4.10.15 |
1.5.0_over_4.10.0 |
Complib is not released for hotfixes |
|
4.10.1 |
1.5.0_over_4.10.0 |
Complib is not released for hotfixes |
|
4.10.0 |
1.5.0_over_4.10.0 |
|
|
4.5.0 |
1.4.0_over_4.5.0 |
|
How to Use Components in IM
The usage depends on whether it is used in a manual or provisioned IM.
|
Step |
Manual IM |
Provisioned IM |
|---|---|---|
|
Add to pom.xml:
Where the version follows the above schema. |
Skip, it is automatically set. |
|
Add the following property:
|
Skip, it is automatically set. |
|
Assuming the following component is present in the Components library: Groovy
|
Assuming the following component is present in the Components library: Groovy
|
|
Add the following code to the camel-context.xml file: XML
|
Create a new file debugBreakpointProcessor.xml in the beans folder with the following code: XML
|
|
In a route, use: |
|
How to Check Existing Components
-
Go to https://gitlab.pricefx.eu/im/services/im-components-library/-/branches.
-
Pick a correct branch according to the IM version with the following schema: release/VERSION
-
Go to component/src/main/java and package net.pricefx.integration.library.component.
How to Develop New Component
-
Update to the currently supported IM version (= latest release or latest LTS).
-
Locate the correct release branch in the Components library, e.g. release/5.0.0.
-
Create a feature branch over the release branch., e.g. feature/myNewComponent from release/5.0.0.
-
Create a component with tests and push it to Git.
-
Create a merge request to the origin branch, e.g. feature/myNewComponent → release/5.0.0.
-
Create a merge request to the develop branch, e.g. feature/myNewComponent → develop.
-
Request an approval from IM team for both merge requests.
-
Once merged, you can start using your component.