Implementing the supplied user-defined extension samples

IBM® Integration Bus provides some sample code to help you understand how to write user-defined nodes and parsers.

About this task

The sample code consists of a sample parser, and the following sample nodes:
Node Description
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 from the sample code that is installed with IBM Integration Bus, complete the following steps:

Procedure

  1. Compile the samples by following the instructions in Compiling a Java user-defined node or Compiling a C user-defined extension.
  2. Install the user-defined extension in an integration node domain by following the instructions in Installing user-defined extension runtime files on an integration node.
  3. Copy and extract the SampleNodesProject.zip file.

    On a computer that has the IBM Integration Toolkit installed, extract the install_dir\server\sample\extensions\nodes\com.ibm.samples.nodes\SampleNodesProject.zip file to the dropins directory.

    For example, on Windows, the default location to extract the file to is C:\Program Files\IBM\IIB\10.0.0.n\tools\dropins.
  4. Restart the IBM Integration Toolkit, specifying the -clean option.

    For example, on Windows, open a command line, navigate to the installation directory (by default C:\Program Files\IBM\IIB\10.0.0.n\tools) and run the command mb.exe -clean. For more information about where to copy the files, see Installing a user-defined extension to current and past versions of IBM Integration Bus.

  5. Open the IBM Integration Toolkit and switch to the Integration 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".
  6. Include the sample nodes in a message flow.
    For more information, see Adding a message flow node.
  7. Deploy the message flow.
    For more information, see Deploying integration solutions.
  8. For the Switch and Transform nodes, you can put a message to the input queue of the message flow and observe the results by completing the following steps:
    1. Ensure that the message flow that contains the sample node is deployed successfully.
      For more information, see Checking the results of deployment.
    2. Use the Enqueue message function to put the sample input messages (provided in .xml files) to the input queue named on the input node of the message flow.
    You can also use a Trace node or the Flow debugger to see what is happening in your message flow.