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.
There are two JavaCompute nodes provided, one of which uses XPath expressions (JavaComputeTransformXPath),
and one of which uses the Java Plugin Node API (JavaComputeTransformNoXPath). This is intended to provide a
comparison between the two different approaches, which achieve the same results.
The JavaComputeTransformXPath sample covers the following steps:
- Uses the XPathOperation helper class to set up iterative operations. This creates the following items:
- Articles for each invoice
- Statements for each invoice
- An output invoice for each input invoice
- Extracts fields from the input message, using XPath expressions.
- Propagates the output message to the out terminal of the JavaCompute node.
The JavaComputeTransformNoXPath sample covers the following steps:
- Uses the ForEachChildOperation helper class to set up iterative operations. This creates the following items:
- Articles for each invoice
- Statements for each invoice
- An output invoice for each input invoice
- Uses Java Plugin API methods to navigate the input message and extract data from it.
- Propagates the output message to the out terminal of the JavaCompute node.
The following MQ queues are created by the sample:
- JAVACOMPUTE.TRANSFORMXPATH.IN
- JAVACOMPUTE.TRANSFORMXPATH.OUT
- JAVACOMPUTE.TRANSFORMXPATH.FAILURE
- JAVACOMPUTE.TRANSFORMNOXPATH.IN
- JAVACOMPUTE.TRANSFORMNOXPATH.OUT
- JAVACOMPUTE.TRANSFORMNOXPATH.FAILURE
The following message flows, JavaComputeTransformXPathFlow and
JavaComputeTransformNoXPathFlow, are imported by the sample:

Back to About the JavaCompute Node sample