WebSphere Transformation Extender

15
© 2014 Copyright DeBruin Consulting. Do not reproduce. Not for distribution. 1 WebSphere Transformation Extender LAB 35 Creating a Message Flow with a WTX Node on the Broker In this lab we’ll be using the following materials: Maps: cpy2xml.mms Trees: Copybook_Data.mtt, XML_Data.mtt Text Files: data.txt Flow: WTX_Flow.msgflow) Software: WTX 8.3.0.4, Toolkit 7, Filezilla Description: In order to build a Message Flow containing a WTX Node there are several setup steps. We must do the following: 1. Determine the Execution Group to which your flow will be deployed or create a new Execution 2. Create a new Message Flow Project (NOTE: This is not the same thing as creating a Project). 3. Create a Message Flow. 4. Add nodes to your message flow including a WTX node. 5. Create a BAR file. 6. Deploy *.sun 7. Deploy BAR file.

Transcript of WebSphere Transformation Extender

Page 1: WebSphere Transformation Extender

© 2014 Copyright DeBruin Consulting. Do not reproduce. Not for distribution. 1

WebSphere Transformation Extender LAB 35

Creating a Message Flow with a WTX Node on the Broker

In this lab we’ll be using the following materials:

Maps: cpy2xml.mms

Trees: Copybook_Data.mtt, XML_Data.mtt

Text Files: data.txt

Flow: WTX_Flow.msgflow)

Software: WTX 8.3.0.4, Toolkit 7, Filezilla

Description:

In order to build a Message Flow containing a WTX Node there are several setup steps. We must do the following:

1. Determine the Execution Group to which your flow will be deployed or create a

new Execution

2. Create a new Message Flow Project (NOTE: This is not the same thing as

creating a Project).

3. Create a Message Flow.

4. Add nodes to your message flow including a WTX node.

5. Create a BAR file.

6. Deploy *.sun

7. Deploy BAR file.

Page 2: WebSphere Transformation Extender

© 2014 Copyright DeBruin Consulting. Do not reproduce. Not for distribution. 2

Steps

1. Determine if an Execution Group that uses 32-bit is available for deployment.

2. Create a new Message Flow Project:

Page 3: WebSphere Transformation Extender

© 2014 Copyright DeBruin Consulting. Do not reproduce. Not for distribution. 3

Click Finish.

3. Create a new Message Flow as shown below:

Use the WTX_Node for your Message Flow:

Page 4: WebSphere Transformation Extender

© 2014 Copyright DeBruin Consulting. Do not reproduce. Not for distribution. 4

Page 5: WebSphere Transformation Extender

© 2014 Copyright DeBruin Consulting. Do not reproduce. Not for distribution. 5

4. Your Broker Toolkit should appear as follows:

5. Add a directory using your name, for example barry, to the EDIBD environment in the following location and change permissions on the directory to 775:

Page 6: WebSphere Transformation Extender

© 2014 Copyright DeBruin Consulting. Do not reproduce. Not for distribution. 6

Add three more subdirectories under your directory named in, out, and maps.

6. Add a FileInput node to your message flow by dragging and dropping the FileInput node to your palette with “Input Directory” and “File name or pattern” as show below:

7. Add a WTX node to your message flow by dragging & dropping the WTX node to your flow with Map path as shown below:

Page 7: WebSphere Transformation Extender

© 2014 Copyright DeBruin Consulting. Do not reproduce. Not for distribution. 7

8. Add a FileOutput node to your message flow by dragging & dropping the FileOutput node to your palette and giving the Directory path and “File name or pattern” as follows:

9. Now that we have a flow with input, map, and output we should be ready to create a BAR that can be deployed to our environment:

Page 8: WebSphere Transformation Extender

© 2014 Copyright DeBruin Consulting. Do not reproduce. Not for distribution. 8

10. The BAR file opens in the Toolkit and we need to select the flow to include in this BAR file. We’ll use the flow we created earlier named LAB24_yourname:

11. Save your BAR file and click the Build Broker archive button as show:

Page 9: WebSphere Transformation Extender

© 2014 Copyright DeBruin Consulting. Do not reproduce. Not for distribution. 9

After a few moments you should see the window below showing success:

12. Before we deploy our BAR file to the broker environment we must first deploy our WTX map. Open your map and build it as a .sun file. FTP the sun file to the directory as show below:

13. Click the Broker Administration Perspective and select your BAR file. Right click the your BAR file and select Deploy File… as shown below:

Page 10: WebSphere Transformation Extender

© 2014 Copyright DeBruin Consulting. Do not reproduce. Not for distribution. 10

14. The “Deploy a BAR File” window will appear. Select the EDI_WTX_Training execution group and click OK:

15. You’ll see that the broker will be loading for a few moments before you message flow appears in the execution group:

Page 11: WebSphere Transformation Extender

© 2014 Copyright DeBruin Consulting. Do not reproduce. Not for distribution. 11

16. When we look on edibd box we see that two broker system directories have been create in our in directory named mqsitransitin and mqsibackout. These are used by the broker for process files and should not be modified or deleted.

17. We are now ready to unit test by dropping a copybook flat file to our in directory. If our test is successful we will see an XML file created in our out directory:

Page 12: WebSphere Transformation Extender

© 2014 Copyright DeBruin Consulting. Do not reproduce. Not for distribution. 12

The file has been picked up:

However, we did not have an XML file created in our out directory:

18. This could be due to two reasons:

Page 13: WebSphere Transformation Extender

© 2014 Copyright DeBruin Consulting. Do not reproduce. Not for distribution. 13

a. Partial file issue: The file was picked up before it was fully sent to the box

causing a map validation and parsing error.

To solve the partial file issue we can drop the file with an extention that the broker is not looking for such as *.tmp.

b. Permissions issue: The file was picked up, but it was not given the

proper permissions for the broker to be able to pick it up.

c. To solve the Permissions issue we can change the permissions of the

*.tmp file (as listed above) before the broker picks up the file.

19. The following illustrates the steps to follow using FileZilla. NOTE: There are alternative ways to avoid these issues when using other FTP utilities such as WS_FTP. Use the techniques you are most comfortable:

Page 14: WebSphere Transformation Extender

© 2014 Copyright DeBruin Consulting. Do not reproduce. Not for distribution. 14

20. When we drop the file again we notice that the file will not even be processed. Check the mqsitransin directory for a file that is “locking” the broker. The broker will not allow a file to be dropped with the same name if a previous file was dropped with a permissions issue:

Delete this file and try the steps above once again:

21. Success! We should now see the data.xml file created in our out directory:

Page 15: WebSphere Transformation Extender

© 2014 Copyright DeBruin Consulting. Do not reproduce. Not for distribution. 15

22. The output XML format should appear as shown below: