Aeai ESB Route conversion mechanism description

Source: Internet
Author: User

1. Background Overview

I believe that the people who understand the Aeai ESB is not unfamiliar, its designer esbdesigner built-in components include: Routing and Transformation, data adapter, protocol adapter, protocol access adapter and other 4 types of components, each type of component below contains various types of component nodes, can make the program flow more intuitive, Speed up development.
The Routing and Transformation includes three nodes: branch, merge, and Java transformations, which are used to divide a line into multiple branches, merge routes to merge multiple branching together, and the Java Transformation node can make data conversions and assignments of variables, and support code extensions when the model does not meet the requirements. This document provides a detailed description of the Routing and Transformation mechanism, which we hope will help the user.

2. Prospective Readers
    1. Number of smooth joint in-house technician
    2. Number of smooth partner technicians
3. Noun interpretation
    1. ESB : Enterprise Service Bus is generally used as a data integration platform and application integration platform.
    2. Branch Routes: Aeai ESB built-in component for dividing a line into multiple branches
    3. Merge routes: Aeai ESB built-in components, merging multiple branches together
    4. Java Conversion: Aeai ESB built-in components that allow data conversion and assignment of variables, and support code expansion when the model does not meet the requirements
4. Introduction of Components4.1 Branch Routing

Selecting a branch route can only be configured in basic information to divide a line into multiple branches.

    1. Aliases: Here can be filled with Chinese characters, you can make the node below the current Chinese, easy to more intuitive use of this node.
    2. Control type: Click the drop-down arrow to see: And, XOR, or three optional, and for all branch lines will go, XOR is judged in a way similar to if () {}else if () {}else{}, or is judged in a way similar to if () {}if () {}if () {} is judged by the way that XOR and or's judgment trend needs to be used in conjunction with the basic information configuration of the line separated by the branch route, and when the line is clicked, the basic information of the line is as follows:

    1. Flow type: Click the flow type of the drop-down arrow will appear auto and condition options, when the direction does not need to make a judgment, you can choose Auto, when the need to make a judgment on the direction, you can add judgment in the conditional expression.
    2. Conditional expression: When it is necessary to judge the direction, the flow type is selected as condition, you need to add a judgment condition here, you can only fill in the Boolean type of variable expression, click "Select Variable" to select.

Description: This node function can be described in a simple, convenient for yourself and others to view later.
Note:

    1. When the control type is and, the branching process is concurrent but the system will give an error when the branching process is data-inserted and the data source is selected the same.
    2. When the control type is XOR, the flow type ratio is condition and must have the judging condition.
4.2 Merging Routes

Merging routes merges multiple branches together, using methods that are essentially the same as branch routes, as described in branch routing.

Matching branches: Select which branch route matches the current merge route by matching branches.
Note:

    1. In most processes, branch routing is the same as the control type of the merge route selection, but the control type is different when only the merge has no branches.
    2. When the control type is "or" you need to select a matching branch route as follows:



4.3 java conversion

Variable data conversions and assignments can be made, and code extensions are supported when the model does not meet the requirements.

When the category is selected as an assignment, support Databox assignment to the dataset, Databag assignment to the DataRow, DataRow assignment to the DataRow, and the dataset to the dataset, if none of the requirements can be selected to automatically assign values to the code, click "Next "For the following interface:

    1. SOURCE variable type: Automatically filled in for the previous step by selecting an Assignment variable type.
    2. SOURCE Variable expression: Select the source variable here by clicking the "Select" button.
    3. Target Variable type: If the target variable already exists can fill the next box directly, if the target variable does not exist, first click the drop-down arrow to select the target variable type, and then click the "Create" button to fill in the variable name.
    4. if the target variable already exists, you can click the "Select" button to select the variable.  Extension Code: If the template does not meet the actual conditions, cocoa chooses to extend the code, write code implementation. when a category is selected for conversion, a dataset is converted to a data table, a dataset is converted to a basic chart, a DataSet is converted to a base list, and a custom code template transformation can be selected if none of the requirements are met.
    5. DataSet to Data table: Convert the data in the dataset to JSON data and click "Next" for the following interface:
    6. The dataset is converted to a basic chart: Convert the data in the dataset to XML data, and click "Next" for the following interface:
    7. The dataset is converted to a basic list: The same as the dataset converted to the basic chart usage, converting the data to the XML format of the list graphic. Custom Code Template transformation: If the template does not meet the actual conditions, you can choose to extend the code, write code implementation.
5. Sample DescriptionMore than 5.1 pieces of branch

The connections that are routed to each branch of the branch are condition-type and have conditional expressions. By setting the control type to XOR (if () {}else if () {}else{}), reaching different expression results limits the flow direction to achieve the control effect of the branching route.
The flowchart is as follows:

Add a parameter to the HttpRequest node condition
Click the Branch routing node to set the control type to XOR (if () {}else if () {}else{}) as:

Click the line between the branch routing node and the branch node, set the flow type to condition, and click the button to add the conditional expression.

When the HttpResponse node prints information to complete, review the console log

The test results are as follows:

5.2 Multi-threaded branch

In the flowchart, all the connectors are auto-flow type, i.e. there is no conditional expression. Then all processes will go.
The flowchart is as follows:

Click the Branch routing node to set the control type to and (all processes will walk) as follows:

Click the line between the branch routing node and the branch node and set the flow type to auto respectively.

When the HttpResponse node prints information to complete, review the console log

The test results are as follows:

5.3 Cycle Example

A component that uses merge routes and spoke routes, with the conditional expression of a connector, enables looping operations.
The flowchart is as follows:

Add a parameter to the HttpRequest node counter
Create global variables as follows:

Initialize the parameter node extension code as follows:

Gets the value of the parameter counter passed by the HttpRequest and holds it in the variable "counter"
Assign an initial value of 0 to the variable "index"
Click the Loop merge node configuration as follows:

The number of loop body node print cycles Extension code is as follows:

Click the Loop Branch node configuration as follows:

The node connection between the Loop branch and the loop merge is configured as follows:

The loop variables are printed on the HttpResponse node, such as:

The test results are as follows:

6. Sentiment and Harvest

Aeai ESB is mainly used for integration of various business systems, to realize the interconnection of heterogeneous systems, I know that their knowledge accumulation is not enough, but into the contact Aeai ESB since the gradual learning progress, found that Aeai ESB not only realized the graphical interaction, support drag-and-drop creation of Web services, message flow, Easy to build quickly, with flexible scalability and the ability to support hot deployment patterns and can be remotely debugged to set breakpoints, step-up debugging, easy to accurately debug positioning.

Aeai ESB Route conversion mechanism description

Contact Us

The content source of this page is from Internet, which doesn't represent Alibaba Cloud's opinion; products and services mentioned on that page don't have any relationship with Alibaba Cloud. If the content of the page makes you feel confusing, please write us an email, we will handle the problem within 5 days after receiving your email.

If you find any instances of plagiarism from the community, please send an email to: info-contact@alibabacloud.com and provide relevant evidence. A staff member will contact you within 5 working days.

A Free Trial That Lets You Build Big!

Start building with 50+ products and up to 12 months usage for Elastic Compute Service

  • Sales Support

    1 on 1 presale consultation

  • After-Sales Support

    24/7 Technical Support 6 Free Tickets per Quarter Faster Response

  • Alibaba Cloud offers highly flexible support services tailored to meet your exact needs.