Lab1 Build and Execute A Simple Message Flow
Lab1 Build and Execute A Simple Message Flow
The flow will be deployed to an Integration Server in an Integration Node where it will execute. An
Integration Server is an operating system process where user flows execute. The flow will then be
available to process messages. There is no need to restart the Integration Node or the Integration
Server for the deployment of a new or changed message flow.
The unit of deployment is a Broker Archive file (BAR). Broker archive files have a file extension of “bar”.
It is essentially a zip file with a deployment descriptor. The deployment descriptor allows certain
properties of the message flow to be overridden.
The Broker Archive file will hold the artifacts to be deployed to a specific Integration Server in a specific
Integration Node. It may contain applications and libraries as well as message flows, message sets, XSL
Transformations (XSLT) Style Sheets, Java™ Archive (JAR) files, XML schema files or WSDL files. In
addition, the related source files may also be included. When you add a message flow to the BAR file,
additional validation of the message flow is performed. The BAR file is then deployed to the Integration
Node. The final validation of the artifacts is done by the Integration Node. If errors are found by the
Integration Node, they will be reported back in the Event Log.
As a convention for these labs, a red box will be used to identify a particular area, and when information
is to be entered and/or an action is to be taken, it will be in bold characters. Red lines may be used to
indicate where nodes are to be placed when building your message flow.
NOTE: This lab assumes that the IBM Integration Bus Default Configuration has been created.
“3.IIBv9.0_Create_Default_Configuration_And_First_Integration”
The icon for the IBM Integration Toolkit is located in the system tray on the desktop. In later labs,
you will also be using some of the icons that have been placed on the smart bar.
__1. Click on All Programs->IBM Integration Toolkit 9.0.0.0 to start the toolkit
The splash screen is displayed when starting the IBM Integration Toolkit.
If this is the first time you have opened the IIB toolkit you will be presented with the following welcome
screen
“3.IIBv9.0_Create_Default_Configuration_And_First_Integration”
An new workspace with just the default configuration created will look as follows.
If the “Default Configuration” has been created the “default” Integration Server (or Execution Group) will
have been created.
The Integration Toolkit is based on Eclipse and includes components from IBM Rational® Application
Developer. It provides one Perspective specifically for IBM Integration Bus as well as additional
Perspectives from Rational Application Developer and Eclipse. This system is using the default
installation. During the labs and lectures, you will be learning more about the components in a typical
development and runtime environment.
The screenshot on the previous page is of the Integration Development perspective. It is divided into
multiple views (or panes). Each view is identified by a tab at the top of the view. On the lower left is the
Outline view
On the upper left is the Navigator view, which has tabs for projects (Integration Development) and
patterns (Patterns Explorer). The Navigator view contains the projects that are available within the
Eclipse workspace. There is a set of resources already provided for your use during the labs.
The area below the navigator view is the summary area. The Integration Nodes tab will show all
defined local nodes as well as connections to remote nodes that have been created.
The large area on the right is used by the resource editors. When an editor has opened a resource, it
will also be represented by a tab. Below the editor view is a pair of views for Properties and Problems.
On the top right are tabs for the perspectives that have been opened. To change an open perspective,
you can simply click on its tab.
Quick Start wizards are displayed as links in the center of the screen, which is the default blank palette
within the Editor view. You can also access these by right clicking whitespace in the Applications view
on the left. The wizards do some of the initial work for creating various types of solutions.
The Integration Toolkit provides several Quick Start wizards plus a number of pre-defined patterns to
assist in creating Applications and Libraries. We will see more of these in later labs.
Eclipse is project oriented – artifacts are organized into projects. A project is typed. Project types that
are specific to IBM Integration Bus are Applications and Libraries. Also, legacy projects of type Message
Flow Project and Message Set Project can be created or imported into the toolkit. Since they pre-date
the concept of Applications and Libraries, they will be visible in the hierarchy under a Folder called
“Independent Resources”.
As an alternative, you can click File on the Menu Bar, and select NewOther, type Application in the
selection box, and click Next.
The options for the New action will be different depending on how the request is made. For example,
when using the File New from the Menu bar, all of the options will be listed. However, in this case, by
starting from an Application, the only options shown are those that are related to the selected project.
__12. Open the WebSphere MQ drawer by clicking on it. If a drawer is open, it will close when clicked.
__14. Either drag it to the canvas or move the mouse to the canvas and click again.
A “best practice” is to provide a new name for each node that is descriptive of the function that it
provides. For most of the labs, you will be renaming the nodes. If you use the names as suggested it
will make it easier to follow the lab guide. Another “naming convention” for MQInput and MQOutput
nodes is to use the queue name that the node is accessing.
The Queue name in the node properties must be set. The Basic tab should be selected. A Queue
name is required and this is indicated by a message in red.
__18. Enter LAB.IN as the Queue name. Queue names are case sensitive. All queue names in the
labs are upper case.
__21. Enter your choice of text for the Long description (Getting Started is shown in the screen
shot).
The information in the Short description field is displayed. When there are multiple nodes on the canvas,
if you move from node to node with the mouse, the same tab in the Properties will be displayed.
__24. Select the Trace node and place it on the canvas to the right of the XML_Input node. As shown
in the example, when you place the cursor on a node name, a description is shown. You do not
need to rename the Trace node.
__25. Press the Enter key to accept the default node name (Trace).
The information in the Pattern box tells the node what information to produce in the trace output. If you
type a line of raw text, it is echoed to the output.
__28. Enter a line of your choice in the Pattern box – no quotes are needed.
__29. In the Pattern box, enter the string ${Root} exactly as indicated – this tells the trace node to
dump out the entire contents of the message that enters the node. Important – the pattern uses
curly braces, not parenthesis. The expression between the curly braces will be evaluated at run
time.
__34. Press the Enter key to accept the new node name.
__36. Set the Queue name to LAB.SEND.AS.XML. Queue names are case sensitive. It is a Best
Practice to separate words in the queue name with a dot.
__37. Make sure you did not enter this information in the Queue manager name field!!
As you work with the various nodes, you will also be working with their Input and Output terminals. Input
terminals are typically named In. Most nodes have an Output terminal named Out. They may have
several others.
Some of these will have common names such as Failure or Catch and others will be unique to that
particular node. Some nodes allow you to define the terminals. The terminals are given a name when
they are defined.
The lab instructions will identify the Output terminal to be used when connecting nodes together. If you
hover the mouse pointer over a terminal, a small popup will appear that identifies the name of the
terminal.
You will now wire the nodes together to create a logical path for the message to follow through the
message flow. You want to wire the Out terminal of the XML_Input node to the In terminal of the Trace
node. There are two techniques:
One – position the mouse over the Out terminal (in the middle), click and drag to the target and click
again.
Two – right click on a node and select Create Connection. This is an example of a Terminal Selection
presented as a result of the Create Connection.
The rest of the Lab instructions show the first method for wiring.
__43. Click the left mouse button to anchor it, creating a connection between the two nodes.
__44. Place your mouse pointer on the connection. A pop up a summary of “from-to” information will
appear.
__46. Select Create Connection. This time you immediately get a “rubber-band” connector. No
selection list of terminals is presented because there is only an Out terminal on the Trace node.
Your message flow should now look like the above diagram. Notice the small asterisk next to the
message flow name. This indicates that the message flow has not been saved to disk.
__49. It is time to save your work – hold down the Ctrl key and press the S key to save the message
flow. You can also click on the “diskette” icon or use File Save to perform a save.
The following graphic will be used as a reminder when it is time to save your work.
__50. Find the WebSphere MQ Alert Monitor in the Windows system tray.
The Integration Explorer is a lightweight eclipse tool for the administration of your Integration Bus and
MQ topology. Technically, the Integration Explorer is an extension to the MQ Explorer that adds
Integration Bus administrative capabilities to the tool. A few examples of these tasks include
adding/modifying/deleting Brokers, access control, the deployment and modification of Apps and
Libraries, viewing Administrative and Event logs, and administering the MQ Pub/Sub engine.
Test Client instances can be created for MQ, JMS, HTTP, SOAP and SCA input nodes. They exist as a
single file in the workspace with a .mbtest file extension. They can be embedded into the Applications or
Libraries and thus passed from developer to developer with a project.
The Test Client has many useful features such as monitoring all supported output paths through a flow
and storing sample messages to a data pool. It also encapsulates the build and deploy process, and can
be used to launch the debugger. Since it encapsulates a full test, including data, it can be used for
regression testing.
__15. Click the green Play button. (The Send Message button will also do the same thing.)
__22. To see the actual payload or application data scroll down to the bottom (Ctrl+End).
So what’s going on here? The message is a BLOB – a Binary Large Object. Just a string of bytes
shown in hexadecimal that happens to be XML.
In the next lab we’ll associate an XML parser with the input message.
Each time that you test the message flow new data will be appended to the end of the trace file. You will
need to scroll down to the end of the file to see the latest information.