About the JavaComputeTransform sample

This sample demonstrates how a JavaCompute node can be used to process simple invoices, by reading input messages and producing new output messages.

Two JavaCompute nodes are provided, one of which uses XPath expressions (JavaComputeTransformXPath), and one of which uses the Java Plugin Node API (JavaComputeTransformNoXPath). This sample provides a comparison between the two different approaches, which achieve the same results.

The JavaComputeTransformXPath sample completes the following tasks:

  1. Uses the XPathOperation helper class to set up iterative operations, which creates the following items:
  2. Extracts fields from the input message, by using XPath expressions.
  3. Propagates the output message to the Out terminal of the JavaCompute node.

The JavaComputeTransformNoXPath sample completes the following tasks:

  1. Uses the ForEachChildOperation helper class to set up iterative operations, which creates the following items:
  2. Uses Java Plugin API methods to navigate the input message and extract data from it.
  3. Propagates the output message to the Out terminal of the JavaCompute node.

The following WebSphere MQ queues are created by the sample:

The following message flows, JavaComputeTransformXPathFlow and JavaComputeTransformNoXPathFlow, are imported by the sample:

JavaComputeTransformXPathFlow

JavaComputeTransformNoXPathFlow

Back to About the JavaCompute Node sample