1. Problem
You wish to statically
cross-reference state values between two or more systems. The reference
data already exists, but you must load the data into the BizTalk
cross-reference tables before you may use the cross-reference functoids
or API.
2. Solution
Within an XML configuration file you name List_Of_App_Type.xml, insert the XML shown in Listing 1, and insert an appType node for each system that will have static cross-references.
Example 1. List_Of_App_Type.xml
<?xml version="1.0" encoding="UTF-8"?> <listOfAppType> <appType> <name>Oracle</name> <description/> </appType> <appType> <name>Siebel</name> <description/> </appType> </listOfAppType>
|
NOTE
The node values in Listings 1 through 3 have been placed in the XML as an example. You should remove them and insert your own.
Within an XML configuration file you name List_Of_ValueXRef.xml, insert the XML shown in Listing 2.
Example 2. List_Of_ValueXRef.xml
<?xml version="1.0" encoding="UTF-8"?> <listOfValueXRef> <valueXRef> <name>Order.Status</name> <description/> </valueXRef> </listOfValueXRef>
|
For each field you plan to statically cross-reference, insert a valueXRef node with a unique child node name.
This value will be used to identify the static field. For instance, if
you plan to map between order status codes, you might create a common
value of Order.Status.
Within an XML configuration file you name List_Of_ValueXRef_Data.xml, insert the XML shown in Listing 3.
Example 3. List_Of_ValueXRef_Data.xml
<?xml version="1.0" encoding="UTF-8"?> <listOfValueXRefData> <valueXRef name="Order.Status"> <appType name="Oracle"> <appValue commonValue="Open">OP</appValue> <appValue commonValue="Pending">PD</appValue> <appValue commonValue="Closed">CD</appValue> </appType> <appType name="Siebel"> <appValue commonValue="Open">1:Open</appValue> <appValue commonValue="Pending">2:Pending</appValue> <appValue commonValue="Closed">3:Closed</appValue> </appType> </valueXRef> </listOfValueXRefData>
|
For each static field you create in the List_Of_ValueXRef.xml file, insert a valueXRef node. For each system you create in the List_Of_App_Type.xml file, insert an appType node. Insert one or more appValue nodes for each value that is permissible for this valueXRef field. Insert a commonValue
attribute to store the common name for the value, and set the
application-specific value within the node. The common value will be
repeated for each appType that is cross-referenced.
Within an XML configuration file you name Setup-Config.xml, insert the XML shown in Listing 4.
Example 4. Setup-Config.xml
<?xml version="1.0" encoding="UTF-8"?> <Setup-Files> <App_Type_file>c:\List_OF_App_Type.xml</App_Type_file> <ValueXRef_file>c:\List_Of_ValueXRef.xml</ValueXRef_file> <ValueXRef_Data_file>c:\List_Of_ValueXRef_Data.xml</ValueXRef_Data_file> </Setup-Files>
|
Each node should point to the physical location where you have created the corresponding XML configuration files.
Seed the BizTalk cross-reference tables by opening a command-line window and running the BizTalk cross-reference import tool, BTSXRefImport.exe (found in the BizTalk installation directory), passing in the path to the Setup-Config.xml cross-reference file:
BTSXRefImport.exe -file=C:\Setup-Config.xml
3. How It Works
During installation of BizTalk, several static cross-reference tables are created in the BizTalkMgmtDb database. All the cross-reference tables begin with the prefix xref_, and the BTSXRefImport tool imports the data from the XML files provided to the table structure for access at runtime. It is not necessary to use the BTSXRefImport.exe tool to insert data into the cross-reference tables. You may insert data directly into the following tables:
xref_AppType
xref_ValueXRef
xref_ValueXRefData
In a denormalized form, the table would look like this after running the BTSXRefImport tool:
AppType | ValueXRef | CommonValue | AppValue | AppType |
---|
Oracle | Order.Status | Open | OP | Oracle |
Siebel | Order.Status | Open | 1:Open | Siebel |
Oracle | Order.Status | Pending | PD | Oracle |
Siebel | Order.Status | Pending | 2:Pending | Siebel |
Oracle | Order.Status | Closed | CD | Oracle |
Siebel | Order.Status | Closed | 3:Closed | Siebel |