This scenario uses two databases to store and retrieve information that correlates the documents exchanged in a business transaction to the correct XLANG schedule instances. Without this mechanism, documents would not be properly synchronized when multiple orders are processed simultaneously. This could result in a payment being issued on the wrong invoice. One database exists on the hub system to correlate the documents processed by the Hub.skx XLANG schedule, and one database exists on the supplier system for documents processed by the Supplier.skx XLANG schedule. The BizTalk Server channel called by the XLANG schedules uses a custom pipeline component to save and recall correlation information in these databases. The correlation information consists of two parts:
The XLANG Scheduler Engine automatically generates the XLANG schedule GUID when the XLANG schedule begins. The TransactionID is a unique identifier contained within a specific document instance, such as a purchase order number or invoice number. The hub TransactionID for a purchase order is obtained from the Number field on the hub ordering application. The user can modify this value before submitting a purchase order. By contrast, the supplier TransactionID for an invoice is automatically generated by the SQL Server stored procedure usp_InsertCorrInfo that is associated with the SupplierCustomCorrelation database.