Figure 9-3 shows an example of mapping array data (cell) from the RepConnector-extracted iface schema as the source, to strongly-typed data in the Purchase Order-extracted iface schema as the target.
Figure 9-3: Mapping example using a RepConnector schema
DbeventIN_TO_poOUT.map:
Converts RepConnector replication data to Purchase Order input data.
Reformats the RepConnector data from the source table format to the target table format. Reformatting from one table to another requires the map to move source columns to target columns, which is not straight-through mapping. While converting from replication data to Purchase Order data, the map is converting RepConnector array data to Purchase Order data.
Two schemas are required to do the mapping:
The schema named GETdbeventstreamINPUT.xsd, which is generated from the GETdbeventstreamINPUT Service Interaction for the source schema in the map.
The schema named SENDpurchaseorderOUTPUT.xsd, which is generated from SENDpurchaseorderOUTPUT Service Interaction as the target.
The sequence of cells is an unbounded array, meaning there can be any number of cells. Each cell corresponds to a table column in the source database and has a name, type, and isNull attribute. The type and isNull attributes are not used in the map, but knowing their expected values is important when creating the parameters for the deliverApproval operation. However, the name attribute does the actual mapping.
To do the mapping, connections are made from the cell element to all of the input parameters in the target schema. You can edit each connection by double-clicking the connector. This opens a mapping XPath editor, which defaults to the cell’s XPath. All XPaths must be modified to indicate which column in the source database is mapped to which input parameter of the deliverApproval operation. The column names in the source database must be known to complete this process.
Table 9-1 shows the modified XPaths that map the source database columns to Purchase Order parameters. In this example, each source column maps to a single input parameter.
Parameter in PO |
Cell-mapping XPath |
---|---|
ClientID |
/dbStream/dbEvent/insert/values/cell[@name='CustomerID'] |
Author |
/dbStream/dbEvent /insert/values/cell[@name='AuthorLastName'] |
CustomerFirstName |
/dbStream/dbEvent /insert/values/cell[@name='FirstName'] |
CustomerLastName |
/dbStream/dbEvent /insert/values/cell[@name='LastName'] |
PONumber |
/dbStream/dbEvent /insert/values/cell[@name='PurchaseOrderNumber'] |
Title |
/dbStream/dbEvent /insert/values/cell[@name='Title'] |
OrderID |
/dbStream/dbEvent /insert/values/cell[@name='OrderNumber'] |
See the Unwired Orchestrator online documentation for more information.