To create routing rules for the insert operation:
-
Double-click the Mediator2 Oracle Mediator.
The Mediator Editor is displayed.
-
In the Routing Rules section, click the Create a new Routing Rule icon.
The Target Type dialog is displayed.
-
Select Service.
The Target Services dialog is displayed.
-
Navigate to XrefOrderApp > Mediators > Common, Services > Common.
-
Select Insert and click OK.
-
Click the Filter icon.
The Expression Builder dialog is displayed.
-
In the Expression field, enter the following expression:
$in.Sap05Collection/top:Sap05Collection/top:Sap05/top:operation='INSERT'
-
Click OK.
-
Next to the Using Transformation field, click the Transformation icon.
The Request Transformation map dialog is displayed.
-
Select Create New Mapper File and enter
SAP_TO_COMMON_INSERT.xsl
. -
Click OK.
An SAP_TO_COMMON_INSERT.xsl file is displayed.
-
Drag and drop the top:SAP05 source element to the inp1:Order target element.
The Auto Map Preferences dialog is displayed.
-
From the During Auto Map options list, deselect Match Elements Considering their Ancestor Names.
-
Click OK.
The transformation is created, as shown in Figure 44-54.
Figure 44-54 SAP_TO_COMMON_INSERT.xsl Transformation
Description of "Figure 44-54 SAP_TO_COMMON_INSERT.xsl Transformation" -
From the Components window, select Advanced.
-
Select XREF Functions.
-
Drag and drop the populateXRefRow1M function from the Components window to the line connecting the top:id and inp1:id elements.
-
Double-click the populateXRefRow1M icon.
The Edit Function-populateXRefRow dialog is displayed.
-
To the right of the xrefLocation field, click Search.
The SOA Resource Lookup dialog is displayed.
-
Select Order.xref and click OK.
-
In the referenceColumnName field, enter
"SAP_05"
or click Search to select the column name. -
In the referenceValue column, enter
/top:Sap05Collection/top:Sap05/top:id
. -
In the columnName field, enter
"Common"
or click Search to select the column name. -
In the value field, enter
orcl:generate-guid()
. -
In the mode field, enter
"Add"
or click Search to select this mode.Figure 44-55 shows the populated Edit Function – populateXRefRow1M dialog.
Figure 44-55 Edit Function – populateXRefRow1M Dialog: XrefOrderApp Use Case
Description of "Figure 44-55 Edit Function – populateXRefRow1M Dialog: XrefOrderApp Use Case" -
Click OK.
-
From the File menu, select Save All and close the SAP_TO_COMMON_INSERT.xsl file.
The Routing Rules section appears, as shown in Figure 44-56.
Figure 44-56 Routing Rules Section with Insert Operation
Description of "Figure 44-56 Routing Rules Section with Insert Operation"