As early as three weeks ago, I have collected all the resources related to Cross-Reference Functoid. Although it seems that it is not very difficult now, I want to really apply it, I still need to spend some time studying it. However, it took three weeks to finish writing.
Task Objectives
1. How to import data
2. Use Get Application ID Functoid
3. Use Get Common ID Functoid
4. Test Mapping
5. Summary of scenarios
I. Data Import
Just like the previous article [BTS] BizTalk Functoid (Database Lookup), Cross-Reference also requires Database tables, except that its data definition has its own rules, the data is stored in BizTalkMgmtDB, and the table starts with xref.
Define Application Type data
ApplicationType: application type, which can be understood as the application name or system name.
I am a programmer. I regard it as a Class Name (Class MyClass)
This name must be unique and cannot be repeated.
The following is an AppType definition file.
Define AppInstance data
Instance: application instance. The instance name of an application must also be unique.
Type: the name of the previously defined application.
I understand it as an instance of a class (MyClass c1 = new MyClass ())
The data definition file is as follows:
Define Association
Name: name of the Association
(I have no idea how to say it)
Define specific data
CommonID: common ID
AppID: Application ID
I understand it as an index in the class.
Later, we need this ID to convert each other.
The data definition file is as follows:
Define the imported data file
The content is relatively simple, and the corresponding file path is enough.
Execute import command
Btsimplements the btsxrefimport.exe tool.
After the import, the data can be found in BTSMgmtDB. I simply used a view to display their relationships and data.
2. Define the Schema and Mapping.
Define the input Schema.
Output Schema
Create a Mapping file and input a Get Application ID Functoid.
Value assignment in Functoid
I used the Test function in Mapping to Test the content I mentioned previously.
Define an input message instance
After the test is executed, the result is as follows:
If I use the database query method to display it, it will look like the following.
Get Application ID is the value of appID in the preceding view, and Get Common ID is the value of commonID.
The following lists the three execution results. To be more intuitive, I put them together.
The Get Common ID test is similar to the Get Application ID method. Here, you only need to modify the input data and modify the functoid in Mapping.
Look at the figure to understand.
The test result is as follows, which is equivalent to the reverse operation of Get Application ID.
Summary
Cross-Reference is applicable to the value of a node in a message. It is used in ing when different values are displayed in different applications or systems.
For example, all nodes indicate the priority, which may be expressed in 1, 2, 3, 4, and 5 in App1; the highest, high, general, low, and extremely low in App2;
Cross-Reference is the best choice when you want to map messages from App1 to messages from app2.
After testing, the new data can be directly used in Mapping after the record in the database is directly modified.
Thanks
Cross Reference Functoid of upzone