In this step, you create a transformation that contains the mapping of different source (input) types to a single target (output) type. Specifically, this tutorial provides the steps for transforming a Java primitive and two sets of XML data (valid to two different schemas) to a single set of XML data valid to a third schema, as shown in the following figure.
The RequestQuote business process takes as input a set of widget IDs and returns the price and availability of these widget IDs.
The source parameters to the myJoin Transformation method include the following:
The myJoin Transformation method takes these source parameters and invokes a query which merges the price, availability, and tax rate information into one piece of XML data valid to the XML Schema in the Quote.xsd file.
The tasks in this step include:
In this task, you create a Transformation file called MyTutorialJoin.dtf. In addition, you create a Transformation method in the Transformation file. During run time, the business process will call this method to invoke the transformation.
In the Design View, a graphical representation of the MyTutorialJoin Transformation file appears, as shown in the following figure.
To Add a Transformation method to MyTutorialJoin
A Transformation method is created in the MyTutorialJoin Transformation file.
The Configure XQuery Transformation Method - myJoin dialog box is displayed.
The Configure XQuery Transformation Method - myJoin dialog box contains the following two panes:
In this task, you select the source types for the transformation in the Configure XQuery Transformation Method - myJoin dialog box. Source types are the input data types for the transformation—the data types that are transformed to the target data type.
Note: If these files are not listed, you probably have not loaded the Tutorial: Process Application. For instructions on loading this application, see To Load The Tutorial Process Application.
The elements and attributes that make up the priceQuote element are displayed in the Selected Source Types pane.
The elements and attributes that make up the availQuote element are displayed in the Selected Source Types pane.
The available Java Types are displayed in the Available Source Types pane.
Note: The taxRate mapper variable created in the presiding step is different from the taxRate business process variable of the RequestQuote business process. The variables created in the mapper are used in transformations and not in business processes.
In this task, you select a target type for the transformation in the Configure XQuery Transformation Method -myJoin dialog box.
The elements and attributes that make up the quote element are displayed in the Selected Target Types pane.
The file: myJoin.xq is created and displayed in the Design View.
The myJoin Transformation method is added to the MyTutorialJoin Transformation file. The myJoin method contains the three source parameters selected in the previous steps.
In the Application tab, representations of the MyTutorialJoin.dtf and myJoin.xq files are displayed as shown in the following figure.
Note: In the Application tab, the myJoin.xq appears indented under the MyTutorialJoin.dtf. These files are associated and contain references to each other. To learn more, see The Association Between XQ and DTF Files.
![]() |
![]() |