Integrate a CRM system and implement error handling and load balancing with Talend ESB.
The Enterprise Service Bus (ESB) has changed the face of enterprise application integration (EAI). Today, enterprises can address any EAI need using an ESB that acts as middleware for everything on the network.
The ESB is a shared central infrastructure that acts as a point of connectivity for every application, device, and system across the enterprise. The ESB makes integration faster, easier, and more flexible, enabling all endpoints to “talk to each other”. By eliminating hand-coding and providing an intuitive interface, the Enterprise Service Bus is immensely more user friendly than the preeminent integration method, Point-to-Point (P2P).
In this Entrance Power Guide to Talend ESB series, we will show you the steps we take to integrate a Customer Relationship Management (CRM) system using Talend Open Studio for ESB. We will also configure a customer look-up service and implement error handling and load balancing on top of the integration. Leveraging pre-built connectors and components, and following the “Wizard” makes this Talend ESB use case easy to demonstrate.
Entrance Power Guide to Talend ESB – Part 1 now.
An enterprise has a CRM system and Talend ESB. (This demo is using Talend Open Studio for ESB.) We will demonstrate how to integrate or expose the CRM application as a service into the Talend ESB.
First, the enterprise architects design a customer service Web Service Description Language (WSDL) which will be ingested into the Talend ESB as the service contract. That WSDL will provide the service provider interface.
Next, we will show how to create the CRM resource to expose that resource into the Talend ESB and ultimately look at how that service can be consumed and used, whether it’s using a test task like SoapUI, or it is exposed into a formal application connected to the service.
The CRM system being integrated in this ESB tutorial is a simple comma separated file with just a few custom entries in it. There is also the WSDL file, and within it is are a series of complex custom types, existing operations that enable us to update customers, insert customers, and get customers. This WSDL will frame the Web service provider implementation.
Download the archive from Talend Open Studio for ESB and unpack it into a directory that enables two parts of the distribution to be used:
- Talend Studio — The design time environment where all the functional design and testing of the individual services is achieved
- Talend Runtime — The container into which services are deployed
Upon starting Talend Open Studio for ESB, there will be a window in which the project can be created:
Create the new project and Talend Open Studio will begin to open. While the Studio is opening, go back and start up the Talend runtime components from the original screen. This is where services will be deployed into the runtime environment. We have two containers (see below). They’re both residing on the same machine and will enable us to show some of the load balancing and capabilities.
With the new containers ready, it’s time to go back to the Studio and create the new service that will implement the customer look up service. Select “Create a new service” from the home page to see this:
Follow the prompts to browse to the WSDL, and select the box to “Import WSDL schemas on finish” to enable use of the XML types and definitions that are within the WSDL.
After the WSDL is ingested into the studio, we see a graphical rendition of what this WSDL looks like:
All of the operations are using SOAP bindings, and within them there are multiple operations (getCustomer, getCustomers, updateCustomer, updateCustomers). This ESB tutorial will focus on the “getCustomer” operation to do a look up into our customer or CRM resource to get information about a specific customer. All the customer types have been imported into this studio via the WSDL. The getCustomer operation assumes that we will provide a customer ID – which you see below is the “customer [0.1] CustomerType”.
The relative operations of that service are shown in this screen:
Now let’s build the integrations to it. Select the “get customer operation” and assign an implementation to this get customer service operation.
Create a new implementation, and Talend Studio will create an outline that indicates the additional details that it needs.
Next, in the Talend Studio window, there is a canvas with three pieces on it:
- The start of the service
- The end of the service
- Piece to generate faulty information in case of a runtime or operational issue
On the right side is the design palette with all the reusable components that provide access to databases, file resources, business apps, cloud resources, forms of orchestration – all the things needed to create the implementation of service.
On the left side is service design and interface management, and within the metadata is where connectivity to key resources that will be used in the integration are defined.
Create the Integration to the Customer Data
From the left-hand menu, select “File delimited” and follow the prompts to navigate to the comma delimited customer file you are using. The wizard will take you through the steps to show you the CRM data and how to incorporate it into that file resource. Continue to follow the steps to extract the metadata associated with that resource and build an appropriate schema from it.
Talend Studio generates an associated schema to use internally, and you can see the extracted information in the screenshot below.
Return to the metadata repository via the left-hand menu, and there will be the new link to the customer data (Customer 0.1).
Now, that connectivity and the metadata associated with the customer file can be used with the components you see to the left. All of these components know how to use that particular schema. For this demo, we will use a simple one, the “tFileInputDelimited”.
Now we have created all the elements of the service needed to get the customer data: the style to the service, the end of the service, the customer information. In Part 2, we will need to build the integration to link them all together.
Try Talend Open Studio for Free
Talend Open Studio for ESB is a free ESB tool based on extensible open source technology. The Talend Open Studio for ESB makes it easy to service-enable applications and legacy systems to build a powerful service-oriented architecture.