Professional Documents
Culture Documents
Referencing Databases in A Message Flow
Referencing Databases in A Message Flow
message flow
InputRoot
OutputRoot
InputBody
Database Database
Root
OutputRoot
Body
Database Database
Example:
INSERT INTO Database.DSN2.Schema2.PRICEDATA
(PRODUCT_NAME, ITEM_PRICE, STATUS)
VALUES (Body.Message.ProductID,
Body.Message.UnitPrice,'OPEN');
• To enable XA:
1. Set up XA for the integration node queue manager
2. In the BAR file, display the properties of the .cmf and select Coordinated
transaction
3. Change the transaction to Automatic on the database nodes
4. Enable XA in the application database, if necessary
© Copyright IBM Corporation 2013
ESQL SELECT compared with SQL SELECT
• ESQL limitations on SQL SELECT
• SELECT DISTINCT
– SELECT ALL
– GROUP BY or HAVING
– AVG is a column function
Haas Thompson
Msg
SET
OutputRoot.XML.Msg.Name[]= Name Name
(SELECT E.LASTNAME from
Database.EMPLOYEE as E);
LASTNAME LASTNAME
Haas Thompson
SET
Msg
OutputRoot.XML.Msg.Name[]=
(SELECT ITEM E.LASTNAME from Name Name
Database.EMPLOYEE as E);
Haas Thompson
If Customer
STATUS is
“Silver”
Look up
CUSTOMER If Customer
STATUS is
“Gold”
If Customer
STATUS is
“Platinum”
© Copyright IBM Corporation 2013
Configuring the DatabaseRoute node
1. The workspace must have:
– A database definition
– A message model
2. Add custom output terminals to the DatabaseRoute node
3. Add query elements
4. Add filter expressions
5. Set the Distribution mode to propagate messages to the FIRST
terminal that matches, or to ALL that match
6. Wire the node terminals
7. Configure JDBC for the integration node
8. Deploy
2. Identify the two nodes that can transform the message and update a
database:
a. Route node
b. Database node
c. Compute node
d. JavaCompute
2. Identify the two nodes that can transform the message and update a
database:
a. Route node
b. Database node
c. Compute node
d. JavaCompute
Answer: c and d.
© Copyright IBM Corporation 2013
Exercise 9