Creating a custom HCI Adapter – Part 3
Part 3 – Create integration flow using new adapter and see it working
You made it! In Part 1 of this series we created the Camel component. In Part 2 we created the HCI adapter and deployed it to our tenant. All that is left to do is to use the new adapter in a integration flow and test that the endpoints works as expected.
Step – Create an Integration project
We will create a basic HCI integration flow using our echo adapter as sender. To do this lets first create a new integration project called echo-integration. The outcome should be
Step – Modify the channel
Select the sender channel (line between Sender and Start) and select the Channels tab
On the Adapter Type click Browse. The choose adapter dialog appears and shows all the available adapters. Select the echo adapter.
After selection you will notice the Transport Protocol and Message Protocol fields contain values. These values are directly related to the metadata.xml generated in Part 2. If you have a look at the metadata.xml sender variant element you will see the VariantId element. And this is where the transport protocol and message protocol are specified.
<Variant VariantName="Echo Component Sender" gen:RuntimeComponentBaseUri="echo" VariantId="ctype::AdapterVariant/cname::me:echo/tp::echo/mp::echo/direction::Sender" MetadataVersion="2.0" AttachmentBehavior="Preserve">
Select the Adapter Specific tab and enter the following values
- First URI Part = foo
- Delay = 5000
Finish the integration flow by configuring the receiver channel. Again you can use the echo adapter, this time set the First URI Part to bar.
Step – Deploy and test
Deploy the echo-integration project to your tenant and monitor the messages. If everything worked you will see something like this
And that is it, we are done. Thank you for reading and I hope you found this information useful. Goodbye from a sunny Melbourne!