In this example, we will go through a scenario where an external system such as an insurance underwriting system calls an ESB integration service that takes a request, processes the request in terms of fetching the requested data by calling an API and then passes the results back to the underwriting system. To further illustrate this application integration example, the underwriter may request for specific coverage information for an insurance policy or the insured’s previous policy history or recent claims filed by the insured. By clicking on the “request info” action in the underwriting system, the application would call the ESB service running in Adeptia that would go and get the data from the underlying system and present that information to the underwriter.
The purpose of creating this type of web service is to prevent applications and clients from directly accessing the backend systems and have all the requests pass through a reusable ESB service that would authenticate, validate the request, calls and gets the requested data from the underlying systems.
In the ESB orchestration diagram, we have the main steps defined in the flow. The first step is to get and validate the request from the client system. The request is then passed to the next step that converts the request into the format that the backend system is able to parse and responds with the data. The call to the backend system can be through an API as depicted in the flow or it can be through a database connection or a particular application connector such as SAP IDOC connector. Data sent back from the backend system is passed to the client as a web service response. Data may also need to be formatted as per the response structure of the ESB web service.
To implement this example in Adeptia Connect , you would have to set up the following micro-services:
Suppose there is a scenario where a supplier wants to pull all the purchase order data from its various backend systems and want to consolidate this information in a report. The purchase order data may reside in multiple data repositories such as order management systems, databases and message queues.
In Adeptia, you can build a single service that connects to the order management system through an API, extracts records from a database and pulls data from a message queue. Once the data is pulled from all these systems, Adeptia merges the data into a single data stream. The output is converted into a custom report that is sent out to the requestor.
The advantage of using this ESB integration design pattern is to support “many to one” application integration capability in a single orchestration. In other words, taking data from many systems and combining the multiple data streams into a single output that is then consumed by the client application. The design can be further extended by adding a gateway (decision node) into the flow, where based on the type of incoming request, the process would route the request to the appropriate data source.
The individual micro-services configured to extract the purchase order data can also be a “call” to a sub-process that is executed at runtime and its response is sent back to the parent flow.
Adeptia has embedded various error-handling support within the ESB integration design framework and some of the important ones are listed here:
In this example, we will discuss a multi-step message brokering service that gets invoked by a MQ and the resulting service orchestration connects to multiple systems, combines the data into a single data stream as an output and posts the result back into the message queue. The process also has a human workflow event to handle errors and it generates a report that is sent out to the process owners.
In this example we are using a real-time message queue event that triggers a service in Adeptia. In the Adeptia Connect, users can configure a JMS trigger that listens to a new message posted to a particular queue. Once the message is posted, the JMS trigger would automatically trigger the associated service published in Adeptia. The service orchestration would take the request, parses it and routes the request to multiple applications. In this case, we are routing the request to claims and policy management applications.
As part of this orchestration design, we have also shown that you can include a decision node that can check the validity of the application response and if the resulting output is correct then the data is posted back to the Message Queue. If there are validation errors, such as invalid policy expiration date, or a policy coverage that does not cover the reported claim, then the output is routed to a workflow task for review and approval. The final step in the error-handling sub-process is that a report is generated and is sent to the business team for review.
The advantage of this type of design integration pattern is that you can persist a message in the Adeptia process flow and the flow routes the message to multiple applications. It also includes human workflow tasks needed for review and approval of the data.
Types of micro-services used in application integration are:
In cases where the ESB service is asynchronous and needs to persist the message at runtime, Adeptia provides different functions for message persistence. As part of its long-running process support, users can embed events that wait for a certain action to occur before proceeding to the next step in the process flow. Adeptia’ ESB integration services with embedded event activities support long-running transactions and can wait for events to occur before completing the execution of that service.
There can be several examples related to this scenario such as in case management where a new support ticket is created in ServiceNow that triggers a service in Adeptia. This service takes the new support ticket from ServiceNow and persists it in the process flow at runtime untill the ticket is resolved and closed. The process waits for the ticket to be assigned, worked on and completed by the support rep and when all these events are completed then it proceeds to update ServiceNow. Another example can be in the order fulfillment process where the status of the order is not changed and an invoice is not sent until an advanced shipment notice (ASN) is sent out to the customer.
To implement this process flow we can use the following micro-services:
In Adeptia, an ESB service behavior can be governed dynamically based on the type of the data received from the source application. Even if the data is in XML, EDI, CSV, Excel, Semi-structured, Fixed Width, Rosettanet, JSON or any other format, the service can look into its mapping repository at runtime to find the matching data conversion mapping needed to process the data.
In this ESB design integration example, suppose the Adeptia’s ESB service listens to an incoming SAP IDOC and needs to convert the data into an outbound EDI. The incoming data can be related to purchase orders, invoices, ASNs, payments, and financials that need to be converted into an EDI document for customers. In this example, user can design a single “template” process that would automatically look for the associated EDI data mapping needed for IDOC conversion.
The advantage of this design is that the user doesn’t have to create individual flows to handle different IDOCS. A single flow can be implemented to support all IDOC conversions. Taking this model and extending it further, we can think of using a more generic source activity that does not have to be specifically tied to a source application. Thus it can be SAP in one case, or Oracle EBS or JD Edwards sending out the source data and based on the data type, Adeptia can figure out how to process the message. Dynamic binding is one of the key methods used in Adeptia’s ESB development and is generally recommended as best practice in solution design.
Some of the key elements in designing a dynamic ESB service are:
In this example, a verification request for a new enrollee’s profile is initiated by the customer onboarding system that sends an enquiry into an ESB service to verify the enrollment data and the service sends its verification results back to the client application.
For error handling, we have added an error event on the first step of the mediation flow that checks the validity of the request. If the enquiry contains data that is incomplete or has discrepancies then the mediation flow is routed to an error handling sub-process. The normal flow from the request module to the parsing, lookup and conversion steps are not executed at runtime in case of errors in the incoming request.
Error handling events can be configured in any part of the mediation flow. When connecting to API results in connectivity errors then those errors can be routed to another step in the flow that can notify users about API connection failure after several retries.
Having a common exception handling sub-process is typically recommended in ESB design pattern when there is a commonality in handling request errors across multiple services. Sub-process can have contextual error mediation rules that can be applied based on the type of errors. Runtime errors can be both at data and process level. Mediation rules on handling data errors can be different than the process execution errors around application connectivity and integration.
Mediation modules consist of:
In a heterogeneous environment where multiple teams are responsible for maintaining different systems and data repositories, it becomes important to separate the technical details of these systems and create an abstraction layer (ESB) that allows these systems to interact with each other through an ESB service rather than through convoluted point-to-point integrations.
In this example, we will go through the steps of taking a purchase order request from a client application and routing it to multiple systems in a single data mediation flow. The example also illustrates protocol transformation, as these applications require use of different protocols such as HTTPS, AMQP, JDBC, SMTP and others.
The first step in the data mediation flow is the arrival of a purchase order from a procurement system. The request is passed via HTTPS as the ESB service is published as asynchronous REST service. As the data arrives, it is parsed and validated and sent to a repeater service.
The repeater service clones the request into two data streams. One of the data streams is routed to a data transformation service that converts the data and loads it into a product order database using JDBC protocol. The second data stream is persisted into a message queue using AMQP in order to invoke other services that require this data such as for creating shipment notice and customer invoice. Finally, email notifications using SMTP protocol are sent out by the end event to all the process owners.
Key modules of a data mediation flow that integrates with multiple systems are:
In this example, the request type determines the specific application that needs to be called and the lookup result is routed back to the requestor as a response. The source data for the request can be a file, database, message queue, or an ERP system. The gateway contains the routing rules that would direct the flow in regards to which source application to call and perform the lookup.
Calls to the various applications can also be sub-processes that contain protocol transformations related to connecting with the appropriate application, data mediation rules in terms of converting lookup results into canonical format and sending the converted output to the global flow.
In this process flow, we have added a source selector function after the application call and this function selects the particular output stream sent by the application and then passes the stream as a response to the client. The source selector consumes only one stream. This process can also be changed or further extended where multiple source applications are called and multiple streams are merged into a single normalized output that is sent out as a response. This type of multi-system application integration ESB design depends on the type of process or data mediation needed for the request.
You can easily plugin additional application connections as sub-processes that would also help modularize the ESB flow into individual flows that are easy to manage. Using the sub-process approach to encapsulate application connections, one doesn’t have to modify the parent flow if a data mediation rule needs to be changed for a particular application. Another advantage of using sub-processes is that these flows can be consumed by other global ESB services or orchestrations that require similar data lookups based on the type of request received from the client applications.
Key components for designing a multi-app ESB mediation are:
Adeptia’s ESB service can be used to convert data flowing into or off the bus, depending on the types of message formats supported by applications that are integrated into the data flow.
In this example, we are using a data conversion ESB service that takes a payload from the incoming request and converts the data into two outputs. One of the outputs is the database format that is used to load records into tables and the other format is an XML that is used to load data into a cloud ERP system.
In the Adeptia’s ESB integration solution, the types of data conversions can be many ranging from simple conversion from a CSV format to an XML or it can be more specific to the type of message or application or API that needs the data in a specific format. Adeptia supports all structured and semi-structured data. Data standards such as EDI, ACORD, BAI, ACH, MISMO, HIPAA, HL7, NCPDP, ODETTE, OAGIS, Rosettanet, FiX are supported out-of-the-box with data dictionaries for the major standards pre-bundled in the product.
The complexity of data map varies from the type of hierarchical data structure that source or target schema represents the complexity of conversion rules that the target application requires for successful data integration. Also, the mapping can be between multiple sources and targets where the data from two or more sources need to be merged or joined prior to mapping the result to the target.
The components used in building a data conversion ESB service are:
There are many ways an ESB service can be triggered such as via events like SFTP or message queues but service can also be triggered in real-time through an API call by a client application. In order for the client application to invoke an ESB service one has to publish the ESB service as a REST or SOAP service and define the request/response structures (i.e., JSON or WSDL) needed by the source application to call this service.
In this example, we have published a card payment service for an e-commerce website that calls this service and executes a card payment transaction. Adeptia Connect allows you to publish an ESB service by creating a web service provider activity. You can select the type of API in terms of REST or SOAP and provide the related parameters and methods that would be used for service invocation by source applications.
Advantages of publishing an ESB service as a consumable API by clients is that it can be used in multiple use cases. It provides the flexibility of reusing the service in multiple scenarios where for example an order fulfillment and shipment service systems can call the same service and get the information needed by the customer rep or by an ERP system.
An important part of application integration is support for Web Services. In Adeptia, process orchestrations can be published as both REST or as SOAP web services. ESB architecture supports the use of different versions for the same API and the creation of different resource end-paths.
Developers can create multiple operations for the API such as “requestCardPayment”, “getPaymentResult”, “updatePayment”, “createSalesOrder” and each of these operations can have different parameters that can be passed in the body or in the header of the request. Adeptia also supports the use of API security keys along with SSL encryption for secure connectivity for integrating with backend or cloud applications.
To learn more about Adeptia’s application integration capabilities, check out the following resources: