Typical use cases for using this pattern is when you want to decouple your service producers from your service consumers in a typical service bus scenario to provide a visualization layer to your service topology.
Building on the existing source code prepared and presented in the first part on ICS Integration Patterns where we saw the "Map My Data" integration pattern, we will extend the ProcessPurchaseOrder interface with an additional method.
Deploy your service and go to the ICS Service Console. Because this second part is a continuation of the first part I assume that you already have a connection defined on ICS to point to the "ProcessPurchaseOrder" web service. We only added a new operation.
Unfortunately ICS doesn't have a way to invalidate its connections cache to pick up the new operation. One way to make ICS aware of your new operation on an existing SOAP connection is to drop the connection and re-create it which of course can be quite time consuming.
An alternative approach that I discovered is to make a small deliberate change to the WSDL URL, test the service (which would of course fail), save the connection and restore back the WSDL URL, testing the service again and doing one final save to the connection.
We can now go on and create our integration. Using the menu on the left click on the "Integrations" link to navigate to the integrations home page and click on the "Create New Integration" button.
From the "Create Integration" popup select the "Publish To ICS" integration pattern.
In the "New Integration - Information" popup enter an integration name, and optionally update the identifier populated automatically based on the integration name, default version and provide a description if needed, and click "Create".
You should be presented with the integration canvas with an empty source and a preconfigured target using the ICS Messaging Service.
From the "Connections" palette on the right of the canvas, drag and drop your connection (if you followed my exact instructions it should be named "Process Purchase Order") to the source placeholder.
This will bring up the SOAP Configuration Wizard to help in configuring the source endpoint. Enter a name for your endpoint (I named it "PublishToICS") and click "Next".
In the second step of the SOAP Configuration Wizard select the operation name from the "Select the Operation" drop down list (in my example I selected "processPurchaseOrderPS") and click "Next".
In the third and last step review the source endpoint configurations and click "Done".
On the top right of our integration we have a progress bar showing the progress of our integration. If you click on it you will see the missing steps. Doing so we can see that we are still missing one step, to configure tracking for our source.
Oracle ICS enables you to declaratively define business identifiers to enable runtime tracking on messages. To do so click on the "Tracking" button. This will open the "Business Identifiers for Tracking" popup. Drag and drop the "orderId" element to the tracking field and specify a business friendly tracking name (named it "Order Id") and click "Done".
The integration progress should now show 100% complete. Save and exit your integration to be redirected to the integrations home page where you should be able to see your integration at the top of the list, marked as new and with a new option to activate the integration.
Click on the "Activate" button to activate the new integration we just created. In the "Confirmation" popup click on "Yes"and your integration should show as "Active".
By activating your integration Oracle ICS has created a new ICS specific endpoint url for your integration for invocation which can be found by clicking on the "info" button next to your integration. I will use this endpoint url to test my integration (using SoapUI).
Using SoapUI I will invoke my integration by supplying a sample order.
Please note that if you attempt to invoke your integration without a username and a password token and a timestamp you will get a security exception "OSB-386200: General web service security error"). After invoking my integration supplying the request a username, password and a timestamp I can now see that my invocation was successful.
I can confirm that data was actually published to ICS by navigating to the monitoring dashboard provided where you can visually see how your integrations are performing during runtime. To access this dashboard simply click on the "Dashboard" link/button on the horizontal navigation toolbar.
The default view lists all activated integrations with a summary view on the top and a detailed view per integration just below listing key KPIs such as the average response time, messages received, message processed and faulted messages.
Click on your integration's "Messages Received" to be navigated to the "Tracking" page which will should display all messaged processed by the selected integration in the last 3 days (by default). Please note how instances are displayed; they are displaying using the custom business identifiers defined.
You can view the details of a specific instance by just clicking on the instance link. The instance will open in the integration canvas in viewing mode where you can inspect the business identifiers, go to the audit train and view any error messages.