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.

650) this.width=650; "src=" Http://s2.51cto.com/wyfs02/M02/80/88/wKiom1dDzpHCI8HKAABoZR_KuPI759.png "title=" Lyzhjzsm1.png "width=" "height=" 427 "border=" 0 "hspace=" 0 "vspace=" 0 "style=" WIDTH:500PX;HEIGHT:427PX; "alt=" Wkiom1ddzphci8hkaabozr_kupi759.png "/>

    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:

650) this.width=650; "src=" Http://s4.51cto.com/wyfs02/M01/80/87/wKioL1dDz6SicPeMAACVutubUFU110.png "title=" Lyzhjzsm2.png "width=" "height=" 321 "border=" 0 "hspace=" 0 "vspace=" 0 "style=" width:500px;height:321px; "alt=" Wkiol1ddz6sicpemaacvutubufu110.png "/>

      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.
650) this.width=650; "src=" Http://s1.51cto.com/wyfs02/M00/80/88/wKiom1dDztDh6X0iAAAcxwwIlbk298.png "title=" Lyzhjzsm3.png "width=" "height=" border= "0" hspace= "0" vspace= "0" style= "width:500px;height:105px;" alt= " Wkiom1ddztdh6x0iaaacxwwilbk298.png "/>
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:

650) this.width=650; "src=" Http://s3.51cto.com/wyfs02/M02/80/88/wKiom1dDzvHT9pZEAAAgyYctcoo889.png "style=" width : 500px;height:107px; "title=" Lyzhjzsm4.png "width=" "height=" 107 "border=" 0 "hspace=" 0 "vspace=" 0 "alt=" Wkiom1ddzvht9pzeaaagyyctcoo889.png "/>

650) this.width=650; "src=" Http://s2.51cto.com/wyfs02/M00/80/87/wKioL1dDz-OzGJ1tAAAxX-WS1CA731.png "style=" float: none; "title=" Lyzhjzsm5.png "alt=" Wkiol1ddz-ozgj1taaaxx-ws1ca731.png "/>

650) this.width=650; "src=" Http://s2.51cto.com/wyfs02/M01/80/88/wKiom1dDzvGgX0mzAAAdi8WTXF0284.png "style=" width : 500px;height:105px; "title=" Lyzhjzsm6.png "width=" height= "0" border= "0" hspace= "0" vspace= " Wkiom1ddzvggx0mzaaadi8wtxf0284.png "/>

4.3java Conversion

Variable data conversions and assignments can be made, and code extensions are supported when the model does not meet the requirements.
650) this.width=650; "src=" Http://s3.51cto.com/wyfs02/M02/80/87/wKioL1dD0Abiq9QTAACnLKb7xA4819.png "title=" Lyzhjzsm7.png "width=" "height=" 538 "border=" 0 "hspace=" 0 "vspace=" 0 "style=" width:500px;height:538px; "alt=" Wkiol1dd0abiq9qtaacnlkb7xa4819.png "/>
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:

650) this.width=650; "src=" Http://s3.51cto.com/wyfs02/M00/80/88/wKiom1dDzzOxQWsPAACdMXQzYs4358.png "title=" Lyzhjzsm8.png "width=" "height=" 538 "border=" 0 "hspace=" 0 "vspace=" 0 "style=" width:500px;height:538px; "alt=" Wkiom1ddzzoxqwspaacdmxqzys4358.png "/>

  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 the category is selected as a conversion, a dataset is converted to a data table, the dataset is converted to a basic chart, the dataset is converted to a basic list, and if none of the requirements can be selected custom code template conversions

  5. The dataset is converted to a data table: Convert the data in the dataset to JSON data, click "Next" for the following interface: 650) this.width=650; "Src=" http://s4.51cto.com/wyfs02/M00/80/ 87/wkiol1dd0gejma5paabaapuxhm0399.png "title=" Lyzhjzsm9.png "width=" "height=" 538 "border=" 0 "hspace=" 0 "vspace=" 0 "style=" width:500px;height:538px; "alt=" Wkiol1dd0gejma5paabaapuxhm0399.png "/>

  6. The dataset is converted to a basic chart: Convert the data in the dataset to XML data, click "Next" for the following interface: 650) this.width=650; "Src=" http://s3.51cto.com/wyfs02/M01/80/ 88/wkiom1ddz4vj7rqiaaa7utuhdfo848.png "title=" Lyzhjzsm10.png "width=" "height=" 538 "border=" 0 "hspace=" 0 "vspace= "0" style= "width:500px;height:538px;" alt= "Wkiom1ddz4vj7rqiaaa7utuhdfo848.png"/>

  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:

650) this.width=650; "src=" Http://s3.51cto.com/wyfs02/M00/80/88/wKiom1dDz6yDxWPXAABQM_Wsb0U808.png "title=" Lyzhjzsm11.png "width=" "height=" 221 "border=" 0 "hspace=" 0 "vspace=" 0 "style=" width:500px;height:221px; "alt=" Wkiom1ddz6ydxwpxaabqm_wsb0u808.png "/>
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:
650) this.width=650; "src=" Http://s3.51cto.com/wyfs02/M01/80/89/wKiom1dDz9KCIwhVAAAPL0KaYk8268.png "title=" Lyzhjzsm12.png "width=" "height=" "border=" 0 "hspace=" 0 "vspace=" 0 "style=" WIDTH:500PX;HEIGHT:69PX; "alt=" Wkiom1ddz9kciwhvaaapl0kayk8268.png "/>
Click the line between the branch routing node and the branch node, set the flow type to condition, and click 650) this.width=650; "Src=" http://s3.51cto.com/wyfs02/M02/80/87/ Wkiol1dd0nnycghuaaadfq8wjyw825.png "title=" Lyzhjzsm13.png "alt=" Wkiol1dd0nnycghuaaadfq8wjyw825.png "/> button to add a conditional expression.
650) this.width=650; "src=" Http://s2.51cto.com/wyfs02/M00/80/89/wKiom1dDz_exDKwHAAAI6RrP2cE897.png "title=" Lyzhjzsm14.png "alt=" Wkiom1ddz_exdkwhaaai6rrp2ce897.png "/>
When the HttpResponse node prints information to complete, review the console log
650) this.width=650; "src=" Http://s1.51cto.com/wyfs02/M00/80/87/wKioL1dD0PawKVNrAAAoiLGrF6U141.png "title=" Lyzhjzsm15.png "alt=" Wkiol1dd0pawkvnraaaoilgrf6u141.png "/>
The test results are as follows:

650) this.width=650; "src=" Http://s2.51cto.com/wyfs02/M02/80/89/wKiom1dD0BXjg7-mAAAqqJHxNQc525.png "style=" width : 500px;height:83px; "title=" Lyzhjzsm16.png "width=" height= "0" border= "0" hspace= "0" vspace= " Wkiom1dd0bxjg7-maaaqqjhxnqc525.png "/>

650) this.width=650; "src=" Http://s2.51cto.com/wyfs02/M02/80/87/wKioL1dD0QiDDR6BAAB8M0DFIhc160.png "style=" width : 500px;height:183px; "title=" Lyzhjzsm17.png "width=" "height=" 183 "border=" 0 "hspace=" 0 "vspace=" 0 "alt=" Wkiol1dd0qiddr6baab8m0dfihc160.png "/>

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:
650) this.width=650; "src=" Http://s4.51cto.com/wyfs02/M00/80/89/wKiom1dD0DTCGbGQAABQM_Wsb0U791.png "title=" Lyzhjzsm18.png "width=" "height=" 221 "border=" 0 "hspace=" 0 "vspace=" 0 "style=" width:500px;height:221px; "alt=" Wkiom1dd0dtcgbgqaabqm_wsb0u791.png "/>
Click the Branch routing node to set the control type to and (all processes will walk) as follows:
650) this.width=650; "src=" Http://s2.51cto.com/wyfs02/M01/80/89/wKiom1dD0FDy5W1lAAASXdn2Fhw171.png "title=" Lyzhjzsm19.png "width=" height= "border=" 0 "hspace=" 0 "vspace=" 0 "style=" width:500px;height:71px; "alt=" Wkiom1dd0fdy5w1laaasxdn2fhw171.png "/>
Click the line between the branch routing node and the branch node and set the flow type to auto respectively.
650) this.width=650; "src=" Http://s2.51cto.com/wyfs02/M01/80/89/wKiom1dD0GHzQEbzAAAQbraoRdA965.png "title=" Lyzhjzsm20.png "width=" height= "border=" 0 "hspace=" 0 "vspace=" 0 "style=" width:500px;height:72px; "alt=" Wkiom1dd0ghzqebzaaaqbraorda965.png "/>
when the HttpResponse node prints information to complete, review the console log
650) this.width=650; "src=" Http://s4.51cto.com/wyfs02/M02/80/89/wKiom1dD0HXgoZgAAAAoiLGrF6U338.png "title=" Lyzhjzsm21.png "alt=" Wkiom1dd0hxgozgaaaaoilgrf6u338.png "/>
The test results are as follows:

650) this.width=650; "src=" Http://s2.51cto.com/wyfs02/M02/80/87/wKioL1dD0XfAaf1EAAA82b0Lfkw792.png "style=" width : 500px;height:106px; "title=" Lyzhjzsm22.png "width=" "height=" 106 "border=" 0 "hspace=" 0 "vspace=" 0 "alt=" Wkiol1dd0xfaaf1eaaa82b0lfkw792.png "/>

650) this.width=650; "src=" Http://s2.51cto.com/wyfs02/M00/80/89/wKiom1dD0IbgBbBsAAC0zPEYrfk913.png "style=" width : 500px;height:296px; "title=" Lyzhjzsm23.png "width=" "height=" 296 "border=" 0 "hspace=" 0 "vspace=" 0 "alt=" Wkiom1dd0ibgbbbsaac0zpeyrfk913.png "/>

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:
650) this.width=650; "src=" Http://s5.51cto.com/wyfs02/M00/80/89/wKiom1dD0KGjj4J1AABKP9bdDL4638.png "title=" Lyzhjzsm24.png "width=" "height=" 244 "border=" 0 "hspace=" 0 "vspace=" 0 "style=" width:500px;height:244px; "alt=" Wkiom1dd0kgjj4j1aabkp9bddl4638.png "/>
Add a parameter to the HttpRequest node counter
Create global variables as follows:
650) this.width=650; "src=" Http://s3.51cto.com/wyfs02/M00/80/87/wKioL1dD0bjT8z19AAAl4jphVg4816.png "title=" Lyzhjzsm25.png "width=" height= "border=" 0 "hspace=" 0 "vspace=" 0 "style=" width:500px;height:72px; "alt=" Wkiol1dd0bjt8z19aaal4jphvg4816.png "/>
Initialize the parameter node extension code as follows:
650) this.width=650; "src=" Http://s5.51cto.com/wyfs02/M01/80/87/wKioL1dD0cyzpgH3AAAqOGXOdho296.png "title=" Lyzhjzsm26.png "width=" "height=" 187 "border=" 0 "hspace=" 0 "vspace=" 0 "style=" WIDTH:500PX;HEIGHT:187PX; "alt=" Wkiol1dd0cyzpgh3aaaqogxodho296.png "/>
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:
650) this.width=650; "src=" Http://s4.51cto.com/wyfs02/M02/80/87/wKioL1dD0dyjfWMLAAAhLwGc5ks375.png "title=" Lyzhjzsm27.png "width=" "height=" 102 "border=" 0 "hspace=" 0 "vspace=" 0 "style=" width:500px;height:102px; "alt=" Wkiol1dd0dyjfwmlaaahlwgc5ks375.png "/>
The number of loop body node print cycles Extension code is as follows:
650) this.width=650; "src=" Http://s1.51cto.com/wyfs02/M01/80/89/wKiom1dD0RGwpe-NAAAiPPdWSQE839.png "title=" Lyzhjzsm28.png "alt=" Wkiom1dd0rgwpe-naaaippdwsqe839.png "/>
Click the Loop Branch node configuration as follows:
650) this.width=650; "src=" Http://s4.51cto.com/wyfs02/M00/80/87/wKioL1dD0hHjyAcEAAAO_XrB7Pc903.png "title=" Lyzhjzsm29.png "width=" height= "border=" 0 "hspace=" 0 "vspace=" 0 "style=" width:500px;height:71px; "alt=" Wkiol1dd0hhjyaceaaao_xrb7pc903.png "/>

The node connection between the Loop branch and the loop merge is configured as follows:
650) this.width=650; "src=" Http://s1.51cto.com/wyfs02/M01/80/87/wKioL1dD0iKR8ORlAAAPPqXu7vM739.png "title=" Lyzhjzsm30.png "width=" "height=" border= "0" hspace= "0" vspace= "0" style= "width:500px;height:73px;" alt= " Wkiol1dd0ikr8orlaaappqxu7vm739.png "/>
The loop variables are printed on the HttpResponse node, such as:
650) this.width=650; "src=" Http://s3.51cto.com/wyfs02/M02/80/87/wKioL1dD0jCRHKzJAAAnYNxr8Dk422.png "title=" Lyzhjzsm31.png "alt=" Wkiol1dd0jcrhkzjaaanynxr8dk422.png "/>
The test results are as follows:

650) this.width=650; "src=" Http://s4.51cto.com/wyfs02/M01/80/89/wKiom1dD0U2C43WyAAAmS46viQI686.png "style=" width : 500px;height:96px; "title=" Lyzhjzsm32.png "width=" height= "0" border= "0" hspace= "0" vspace= " Wkiom1dd0u2c43wyaaams46viqi686.png "/>

650) this.width=650; "src=" Http://s4.51cto.com/wyfs02/M01/80/87/wKioL1dD0j-AUoAiAACT0JqqHOM310.png "style=" width : 500px;height:272px; "title=" Lyzhjzsm33.png "width=" "height=" 272 "border=" 0 "hspace=" 0 "vspace=" 0 "alt=" Wkiol1dd0j-auoaiaact0jqqhom310.png "/>

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.

This article is from the "Digital unobstructed portal Integration Platform" blog, please be sure to keep this source http://aeaiportal.blog.51cto.com/9300497/1782441

Aeai ESB Route transformation 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.