The samples consist of a sample
parser, and the following sample nodes:
Switch |
A node, implemented in both C and Java™ versions, that propagates an input message
to one of several output terminals depending on the message content. |
Transform |
A node, implemented in both C and Java versions, that performs a simple message
transformation. |
Each sample node consists of the source files and
some files that you can use to test each node. For the sample parser
there are only source files. See Sample node files and Sample parser files for
details of the sample files and where to find them.
To implement
the supplied samples:
- Compile the samples. For information on how to compile a Java node, see Compiling a Java user-defined node. For information on how to compile a C node or
parser, see Compiling a C user-defined extension.
- Install the user-defined extension in a broker domain. For instructions
on completing this step, see Installing user-defined extension runtime files on a broker.
On the computer that hosts the workbench, extract the SampleNodesProject.zip file,
which is located in the samples subdirectory and copy the files to
a directory from which the workbench can
access them. For example, on Windows®,
the location is install_dir\sample\extensions\com.ibm.samples.nodes directory.
For further information about where to copy the files, see Installing a user-defined extension to current and past versions of the broker.
- Open the workbench and switch
to the Broker Application Development perspective. The
category called "Sample nodes" is now visible in the palette, and
the sample nodes are shown below it. Documentation about the sample
nodes is also visible in the help system under "Samples".
- Include the sample nodes in a message flow (see Adding a message flow node).
- Deploy the message flow; see Deploying.
- For the Switch and Transform nodes, you can put a message to the
input queue of the message flow and observe the results, as follows:
- Make sure that the message flow containing the sample node is
deployed successfully; see Checking the results of deployment.
- Use the Enqueue message function to put the sample input messages
(the .xml files listed above) to the input queue
named on the input node of the message flow; see Debug: putting a test message on an input queue.
You can also use a Trace node
or the Flow debugger to see what is happening in your message flow.