IBM webMethods Hybrid Integration allows the running of ACE integration flows using the IBM App Connect capability. These flows are authored using a standalone App Connect Enterprise Toolkit IDE which runs on a developer's machine. The developer can test these locally using the software version of ACE, but to deploy and test them in IWHI, they must create a broker archive (BAR) file and then upload this into the IWHI App Connect capability. This slows down the development cycle requiring several actions for the developer to complete each time they make a change.
In this article, I will provide a local application which can be used to completely automate this process. Every time a flow is changed in the Toolkit, and updated in a local BAR file, the application will detect the change and update the IWHI system with the latest BAR file. The IWHI system will then automatically reconfigure any runtime using the BAR file to start using the new version.
The application will make use of the IWHI App Connect public API, and it can be used as an example of how to write your own application that can automate the configuration and deployment to the IWHI system.
Prerequisites
The following GitHub repository contains everything required to run the automatic BAR syncing application:
You will need to git clone this repository locally to set up and run the application, or download and unzip the following file which contains the same files:
You will need to install node and npm to run the JavaScript application. The easiest way to do this is to install nvm and use that to install the latest node and npm.
In addition, you will need the following IBM products:
which will provide the local ACE Toolkit to develop an integration flow in and the remote IWHI instance to automatically sync the BAR file to.
Setting up automatic BAR file syncing
The first thing you need to do is to create a set of credentials for accessing the admin API for your IWHI App Connect instance. Log in to the IWHI instance and from the top left menu select the App Connect capability:
Once in App Connect select from the left side navigation panel “Public API credentials“:
Generate a new credential called bar-sync. Copy the client id and client secret as these will be needed by the bar sync application to access the public API.
As well as creating the client secret, you also need an API key. To create that, click on the “API key” link and generate a new key. You will need to record that API key for the future setup steps:
Next create or reuse a Toolkit workspace. To do this, start up the local ACE Toolkit and select the workspace you want to use. You need to then make a note of the directory that BAR files get created in for that workspace. The easiest way to do that is to click on the BARfile directory in the Toolkit and look at preferences. From there you can copy the full path:
The final pieces of information you need are the host name for the admin API and the instance ID for your IWHI instance. You get this by looking at the URL you are logged into in the App Connect capability.
The URL will look like: https://test709433-ui.a-vir-c1.appconnect.ipaas.automation.ibm.com and the first part is the instance id (i.e test709433 without the “-ui”). The admin API host name can then be derived from the second part which is the region inserted into: https://api.region.appconnect.ipaas.automation.ibm.com (i.e.https://api.a-vir-c1.appconnect.ipaas.automation.ibm.com).
Now you have collected all the required information you need to download the node application which will do the automatic syncing from here: ace-bar-file-syncer.zip. Unzip it and then you will need to create an .env file to store the configuration. Copy the .env.example file to a new .env in the unzipped folder.
Then update the config file .env with the information you have collected like the following:
Once the .env has been configured then in the unzipped directory run:
npm install
npm start
Once running it should sync any BAR files created (or already existing) in the Toolkit BAR file directory to the IWHI instance.
To use the BAR files in an integration runtime then create a new runtime in IWHI and deploy the BAR file to the integration runtime (or deploy to an existing runtime). Now whenever you change the BAR file in the Toolkit it will automatically push the change to the IWHI instance, and the runtime will restart picking up the new BAR file.
Closing thoughts
This article shows how easy it is to use the IWHI App Connect public administration API to automate various development tasks.
In particular, it shows how syncing BAR files can be automated to speed up the development process.
To understand more about using this API then take a look at: https://community.ibm.com/community/user/blogs/adam-roberts/2023/07/27/introducing-the-app-connect-public-api and also take a look at the source code in the GitHub repo: https://github.com/jareeve/ace-bar-file-syncer is used for this example application but any programming language capable of REST calls could be used.
Look out in the future for many more articles showing how to improve productivity using the IWHI App Connect Public Admin API.