Many SAP Cloud Integration developers and administrators are keen to know exactly when their tenant is upgraded to the new version of the Apache Camel integration framework (from version 2.24 to version 3.14).
Fortunately, it’s easy to set up CPITracker to notify you when Camel is updated and in this blog post, I will show you how.
In case you are hearing about CPITracker for the first time: CPITracker tracks changes to the various underlying components of SAP Cloud Integration, like Apache Camel, the XSLT processor and the Java runtime. It is implemented as an integration flow and is available for free on GitHub. You can find the instructions here if you’d like to install it in your tenant.
CPITracker runs regularly and uses a handful of different techniques to check the supported components for updates. When it detects them, it passes information about the updates in XML form to an update handler integration flow (explained here) using the ProcessDirect adapter. The update handler — which you develop — then performs whatever actions you want to take, like sending out an email, posting to a Slack channel or something else entirely.
Here is an example of the updates XML document:
(These are real updates that were detected in the trial environment earlier this year.)
Setting up an update handler to only focus on Apache Camel is easy. Here’s one I implemented, that notifies me by email when Apache Camel is updated:
The Router step filters out messages that do not contain an Apache Camel update. This is an implementation of the Message Filter pattern, by the way. The Router step branches on this XPath expression:
/updates/update[characteristic = ‘camel.version’]
If the updates XML document contains an Apache Camel update, this expression will evaluate to true. The default route goes directly to an End Event.
If an Apache Camel update is present, I extract the relevant information into the following three exchange properties in the “Get update information” Content Modifier step:
NameSource TypeSource ValueData TypeupdateDiscoveredXPath/updates/discoveredjava.lang.StringpreviousCamelVersionXPath/updates/update[characteristic = ‘camel.version’]/previous-valuejava.lang.StringnewCamelVersionXPath/updates/update[characteristic = ‘camel.version’]/current-valuejava.lang.String
(Please note that the date and time in the updateDiscovered property is in the UTC time zone.)
I then use these properties to compose an email message and finally send off the email. You can, of course, choose to be notified differently. To do so, you simply add the required configuration after the “Get update information” Content Modifier step.
That’s all there is to it. Have fun with CPITracker! If you have any questions or comments feel free to post them below.
Many SAP Cloud Integration developers and administrators are keen to know exactly when their tenant is upgraded to the new version of the Apache Camel integration framework (from version 2.24 to version 3.14).Fortunately, it’s easy to set up CPITracker to notify you when Camel is updated and in this blog post, I will show you how.In case you are hearing about CPITracker for the first time: CPITracker tracks changes to the various underlying components of SAP Cloud Integration, like Apache Camel, the XSLT processor and the Java runtime. It is implemented as an integration flow and is available for free on GitHub. You can find the instructions here if you’d like to install it in your tenant.CPITracker runs regularly and uses a handful of different techniques to check the supported components for updates. When it detects them, it passes information about the updates in XML form to an update handler integration flow (explained here) using the ProcessDirect adapter. The update handler — which you develop — then performs whatever actions you want to take, like sending out an email, posting to a Slack channel or something else entirely.Here is an example of the updates XML document:(These are real updates that were detected in the trial environment earlier this year.)Setting up an update handler to only focus on Apache Camel is easy. Here’s one I implemented, that notifies me by email when Apache Camel is updated:The Router step filters out messages that do not contain an Apache Camel update. This is an implementation of the Message Filter pattern, by the way. The Router step branches on this XPath expression:/updates/update[characteristic = ‘camel.version’]If the updates XML document contains an Apache Camel update, this expression will evaluate to true. The default route goes directly to an End Event.If an Apache Camel update is present, I extract the relevant information into the following three exchange properties in the “Get update information” Content Modifier step:NameSource TypeSource ValueData TypeupdateDiscoveredXPath/updates/discoveredjava.lang.StringpreviousCamelVersionXPath/updates/update[characteristic = ‘camel.version’]/previous-valuejava.lang.StringnewCamelVersionXPath/updates/update[characteristic = ‘camel.version’]/current-valuejava.lang.String(Please note that the date and time in the updateDiscovered property is in the UTC time zone.)I then use these properties to compose an email message and finally send off the email. You can, of course, choose to be notified differently. To do so, you simply add the required configuration after the “Get update information” Content Modifier step.That’s all there is to it. Have fun with CPITracker! If you have any questions or comments feel free to post them below. Read More Technology Blogs by Members articles
#SAP
#SAPTechnologyblog