Mapping example using RepConnector Schema

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:

Two schemas are required to do the mapping:

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.

Table 9-1: RepConnector to Purchase Order Map Xpaths example

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.