Training
Certifications
Books
Special Offers
Community




 
Microsoft® .NET Server Solutions for the Enterprise
Author Microsoft Corporation
Pages 560
Disk 1 Companion CD(s)
Level All Levels
Published 04/24/2002
ISBN 9780735615694
Price $49.99
To see this book's discounted price, select a reseller below.
 

More Information

About the Book
Table of Contents
Sample Chapter
Index
Related Series
Related Books
About the Author

Support: Book & CD

Rate this book
Barnes Noble Amazon Quantum Books

 


Chapter 11: Automating Electronic Procurement



Chapter 11   Automating Electronic Procurement

Scenario

This scenario represents a business situation in which your company is purchasing products from several different suppliers. We will focus on setting up a business solution by using Microsoft BizTalk Server 2002 to automate the procurement process that takes place between your company and its suppliers over the Internet. We call this solution e-procurement.

In this scenario you set up a purchasing hub for your company. The hub handles all the inbound and outbound documents that are exchanged between your company and the suppliers. For the purposes of this scenario, a business transaction between your hub and the suppliers uses four different documents. A transaction starts when a purchase order (PO) is sent from the hub to the supplier. Upon receipt of the PO, the supplier generates an invoice for that PO, which is returned to the hub. When the hub receives an invoice for an outstanding PO, the hub sends a payment to the supplier. Finally, the supplier sends a payment acknowledgement to the hub and the e-procurement transaction is complete. The following illustration shows the business transaction used in this sample.

Click to view graphic
Click to view graphic

E-procurement scenario data flow

The documents in this transaction are transmitted to their destinations over the Internet by using XML Web services created with Microsoft Visual Studio .NET. All of the custom components used in this scenario are written in the Microsoft Visual C# .NET (C sharp) programming language.

Solution

Microsoft BizTalk Server 2002 provides a rich set of features to use in implementing an automated e-procurement system. On both the hub and the supplier systems, BizTalk Server XLANG schedules are used to implement the business processes and logic required to complete a business transaction.

The following topics describe the flow of documents through both systems, as shown in the preceding illustration.

  • Hub: Send Purchase Order to Supplier
  • Supplier: Receive PO and Send Invoice to Hub
  • Hub: Receive Invoice and Send Payment to Supplier
  • Supplier: Receive Payment and Send Acknowledgement to Hub

The following topics describe how BizTalk Server 2002 features are used in this scenario:

  • XLANG Schedule Activation
  • E-Procurement XLANG Schedule Correlation

Hub: Send Purchase Order to Supplier

The following illustration shows the purchase order flow through the hub system.

Click to view graphic
Click to view graphic

Hub system initiates a business transaction

A business transaction is initiated when the ordering application generates a purchase order (PO) named PO.xml, and delivers it to the receivepo message queue, which is monitored by the Receive PO receive function. The document is submitted to a BizTalk Messaging Services channel configured for PO processing. The HubReceivePO messaging port activates a new instance of the XLANG schedule Hub.skx, and then delivers the document to the ReceivePO port on that XLANG schedule. The schedule contains some business logic to apply a simple approval process to the purchase order. For this scenario, the purchase order is automatically approved if the total value is less than $1,000.00. If the PO.xml document is approved, it is sent to the HubSendPO channel for further processing. When the processing completes and the correlation information is written to a database, the purchase order is sent to the supplier by means of an application integration component (AIC) that functions as a client to the supplier's XML Web service.

Supplier: Receive PO and Send Invoice to Hub

The following illustration shows the incoming purchase order and the resulting invoice flow through the supplier system.

Click to view graphic
Click to view graphic

Supplier system receives a purchase order and sends back an invoice

The supplier's XML Web service accepts the incoming purchase order. The XML Web service submits the PO to a BizTalk Messaging Services channel configured for PO processing. The SupplierReceivePO messaging port then activates a new instance of the XLANG schedule Supplier.skx, and delivers the document to the ReceivePOfromHub port on that XLANG schedule. The schedule contains some business logic to apply a simple approval process to the purchase order. For this scenario, the purchase order is automatically rejected if the total value is less than $300.00. If the PO.xml document is approved, it is sent to a component that transforms the purchase order into an invoice document. Then the invoice is sent to the SupplierSendInvoice channel for further processing. When the processing completes and the correlation information is written to a database, the invoice is sent back to the hub by means of an AIC that functions as a client to the hub's XML Web service.

Hub: Receive Invoice and Send Payment to Supplier

The following illustration shows the invoice and the resulting payment flow through the hub system.

Click to view graphic
Click to view graphic

Hub system receives an invoice and sends back a payment

The hub's XML Web service accepts the incoming invoice. The XML Web service submits the invoice to a BizTalk Messaging Services channel configured for invoice processing. Then the pipeline component on that channel correlates the incoming document with an XLANG schedule instance identifier. This correlation information is obtained by reading the key-pair values from the custom correlation database. The invoice is sent to the correlated XLANG schedule instance, and resumes processing on the ReceiveInvoice port. After the document is back in the schedule, it is sent to a component that transforms the invoice into a payment. The payment is sent to the HubSendPayment channel for further processing. When the processing completes, the payment is sent to the supplier by means of an AIC that functions as a client to the supplier's XML Web service.

Supplier: Receive Payment and Send Acknowledgement to Hub

The following illustration shows the payment and the resulting acknowledgement flow through the supplier system.

Click to view graphic
Click to view graphic

Supplier system receives a payment and sends back an acknowledgement

The supplier's XML Web service accepts the incoming payment for the invoice that it issued. The XML Web service submits the payment to a BizTalk Messaging Services channel configured for payment processing. Then the pipeline component on that channel correlates the incoming document with an XLANG schedule instance identifier. This correlation information is obtained by reading the key-pair values from the supplier custom correlation database. The payment is sent to the correlated XLANG schedule instance, and resumes processing on the ReceivePayment port. After the document is back in the schedule, it is sent to a component that transforms the payment into a payment acknowledgement. The payment acknowledgement is sent to the SupplierSendPaymentAck channel for further processing. When the processing completes, the payment acknowledgement is sent back to the hub by means of an AIC that functions as a client to the hub's XML Web service. At this point, the supplier XLANG schedule for this transaction completes.

The XLANG schedule instance on the hub system completes after it receives the payment acknowledgement, correlates it to the correct purchase order, and writes the acknowledgement document to the folder \Microsoft .NET Server Solutions for the Enterprise\E-Procurement\Application\eprocurement\PaymentAckReceived.

XLANG Schedule Activation

BizTalk Server messaging ports activate the XLANG schedules used in this scenario. However, the first actions within the schedules are bound to Message Queuing shapes, rather than BizTalk Messaging shapes, so that per-instance message queues are not created. This helps to optimize the performance of the schedule by preventing the creation, and subsequent deletion, of a message queue used only for initiating the schedule. The following illustration shows the hub XLANG schedule drawing.

Click to view graphic
Click to view graphic

E-Procurement XLANG Schedule Correlation

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 globally unique identifier (GUID) of the XLANG schedule instance. This value is stored in the database in the SkedInstanceGUID column.
  • A user-defined transaction identifier. This value is stored in the database in the TransactionID column.

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.

Storing the Correlation Information

In this scenario, when the hub receives a new purchase order from the ordering application, the GUID of the XLANG schedule is extracted and stored in the CustomCorrelation database along with the PO number as a TransactionID. When the supplier receives the purchase order and activates an XLANG schedule of its own, the GUID of the supplier's XLANG schedule is stored along with the invoice number as the TransactionID. The supplier system stores this pair of values in its own SupplierCustomCorrelation database. These initial correlation values are used to associate the remaining incoming and outgoing documents to the correct running XLANG schedule instance as the transaction progresses until the XLANG schedule completes.

Reading the Correlation Information

The correlation of a document to its running XLANG schedule instance begins when the hub receives an invoice associated with a purchase order. At this point, BizTalk Server queries the invoice for the TransactionID (PO number) and looks up the associated XLANG schedule GUID in the CustomCorrelation database. The invoice document is passed to the Hub.skx schedule instance that matches the GUID, and the schedule continues running.

Similarly, when the supplier receives a payment from the hub, BizTalk Server queries the payment for the TransactionID (invoice number) and looks up the associated XLANG schedule GUID in the SupplierCustomCorrelation database. The payment document is passed to the Supplier.skx schedule instance that matches the GUID, and the schedule continues running.

Finally, when the hub receives the payment acknowledgement, BizTalk Server queries the acknowledgement for the TransactionID (PO number) and looks up the associated XLANG schedule GUID in the CustomCorrelation database. The payment acknowledgement is passed to the Hub.skx schedule instance that matches the GUID, and the schedule continues running.

Tools and Technologies

This section describes the hardware and software requirements for running the e-procurement sample included on the CD-ROM provided with this book.

Hardware and Software Requirements

This sample assumes that you have the following installed on the computer that is running BizTalk Server:

  • Microsoft BizTalk Server 2002
  • Microsoft Visual Studio .NET
  • Microsoft SQL Server
  • Message Queuing (also known as MSMQ)
  • Microsoft Internet Information Services (IIS)

Using Microsoft Visual Studio .NET

The components and XML Web services used in the e-procurement scenario were created by using Microsoft Visual Studio .NET. These components and services use a set of primary interop assemblies (PIAs) to access the COM-based BizTalk Server 2002 application programming interfaces (APIs).

For more information about using PIAs to access any BizTalk Server 2002 API from managed code, download the BizTalk Server 2002 Toolkit for Microsoft .NET from the Microsoft Developer Network.

Creating XML Web Services

This section contains information about creating the XML Web services used in this scenario. These XML Web services provide a mechanism for accepting incoming documents through SOAP. The documents are sent from a client to the host running an XML Web service. The client obtains a reference, also called a proxy, to the remote host by specifying the URL of the XML Web service. After the proxy is established, the client can use the methods provided by the XML Web service.

In this scenario, the BizTalk messaging ports contain an application integration component (AIC) that uses a proxy to the appropriate remote XML Web service method call. For example, the messaging port on the supplier system that sends an invoice contains an AIC with a proxy to the XML Web service method Process_invoice(invoice) provided by the hub system. Note that the invoice argument passed to the method represents a strongly typed object corresponding to the CommonInvoice.xml document schema.

The XML Web services provide methods to accept a specific document type, such as a purchase order or invoice, and submit that document directly to a BizTalk Server 2002 channel for further processing.

Converting a BizTalk Document to a C# Class

For every document that is passed to an XML Web service, you need to create a corresponding C# class. The following steps illustrate this process:

  1. On the Start menu, point to Programs, point to Microsoft BizTalk Server 2002, and then click BizTalk Editor.
  2. On the File menu, click Retrieve from WebDAV.
  3. The Retrieve from WebDAV dialog box appears.

  4. Browse for an XML document schema, and then click Open.
  5. On the Tools menu, click Export XSD Schema.
  6. The Export XSD Schema dialog box appears.

  7. Type a name for the XSD file in the File name box, and then click Save.
  8. Close BizTalk Editor.
  9. On the Start menu, point to Programs, point to Microsoft Visual Studio .NET, point to Visual Studio .NET Tools, and then click Visual Studio .NET Command Prompt.
  10. The Visual Studio .NET Command Prompt window appears.

  11. Run the XSD program to create a C# class from the XSD file you created previously by typing:
  12. XSD filename.xsd /c

    This command creates a new C# class named filename.cs.

  13. Edit this C# class file to add a namespace declaration. For example:
  14. namespace namespacename {
    <contents of file>
    }

  15. Update the XML element information.
  16. For example, using the following output:

    /// <remarks/>
    [System.Xml.Serialization.XmlRootAttribute("Seller", Namespace="", IsNullable=false)]
    public class Seller {

     
    /// <remarks/>
    [System.Xml.Serialization.XmlElementAttribute("Address", typeof(Address))]
    [System.Xml.Serialization.XmlElementAttribute("ContactInfo", typeof(ContactInfo))]
    public object[] Items;
    }
     
    Remove the public object[] Items statement, and add new declarations, shown in bold:
    /// <remarks/>
    [System.Xml.Serialization.XmlRootAttribute("Seller")]
    public class Seller {
     
    /// <remarks/>
    [System.Xml.Serialization.XmlElementAttribute("Address", typeof(Address))]
    public Address[] Address;
     
    [System.Xml.Serialization.XmlElementAttribute("ContactInfo", typeof(ContactInfo))]
    public ContactInfo[] ContactInfo;
    }

  17. Make the changes in the preceding step to all XML element declarations in the file.
  18. Create a new Web Service project in Visual Studio .NET.
  19. Add the C# (.cs) file created from the document specification to the Web Service project.
  20. Add a custom method to the XML Web service code. For example:
  21. [WebMethod]
    public string Process_invoice(CommonInvoice invoice)
    {
    StringWriter sw = new StringWriter();
    XmlSerializer serializer = new XmlSerializer(typeof(CommonInvoice));
    serializer.Serialize(sw, invoice);
     
    Interop.BTSInterchangeLib.InterchangeClass BTSObj = new Interop.BTSInterchangeLib.InterchangeClass();
    string result = BTSObj.Submit(Interop.BTSInterchangeLib.BIZTALK_OPENNESS_TYPE.BIZTALK_OPENNESS_TYPE_NOTOPEN,
    sw.ToString(), // the document body
    null, // docname
    null, // sourcequalifier
    null, // sourceid
    null, // destqualifier
    null, // destid
    "HubReceiveInvoice", // channel
    null, // filepath
    null, // envelope
    0); // passthrough
     
    BTSObj = null;
    return result;
    }

At this point, the client program can add a reference to the XML Web service method that you just created. This allows you to call the XML Web service from an application integration component (AIC), which is bound to a BizTalk Server messaging port. As a result, BizTalk Server can process a document and then deliver it directly to the XML Web service.

Calling an XML Web Service from an AIC

This section describes the steps required for an AIC to call an XML Web service.

Update the resource file

Create a C# class project in Microsoft Visual Studio .NET for the AIC that calls the XML Web service. View the Reference.cs file to ensure that the XMLRoot information contained in this class is correct, and that the structure matches the class in the original .cs file created for the XML Web service.

To view and update the Reference.cs file

  1. In the Solution Explorer, click Show All Files.
  2. Expand Web References, expand the name of the XML Web service host, expand Reference.map, and then double-click Reference.cs.
  3. Every element in the XML file has been converted to a public class. Search for the root element in the XML file.
  4. The root element appears as:

    [System.Xml.Serialization.XmlAttribute("Namespace=http://tempuri.org")]
    public class RootElementName {

  5. Change this to the following:
  6. [System.Xml.Serialization.XmlRoot("RootElementName")]
    public class RootElementName {

    Where RootElementName is the name of the document's root element.

  7. Repeat steps 3 and 4 for every element in the document.

Add a reference to the XML Web service

The AIC project must contain a reference to access the XML Web service remotely. After this reference is made, the project acts as a client to that XML Web service. For example:

// Reference to the hub XML Web service
using Supp_send_invoice.localhost;

Implement the IBTSAppIntegration.ProcessMessage method

To indicate that the project is an AIC, the code must implement the ProcessMessage method on the IBTSAppIntegration interface.

The following example is from the supplier's client code that sends an invoice to the hub XML Web service:

string IBTSAppIntegration.ProcessMessage(string strDocument)
{
// The incoming string is CommonInvoice, convert the
// xml string into an object by deserializing it
CommonInvoice invoice;
XmlSerializer serializer = new XmlSerializer(typeof(CommonInvoice));
TextReader stringstream = new StringReader(strDocument);
invoice = ((CommonInvoice)serializer.Deserialize(stringstream));
 
// Open up the hub XML Web service
Hub_services web_service = new Hub_services();
 
// Process the order
string result = web_service.Process_invoice(invoice);
 
web_service = null;
return result;
}

Register the AIC for use with COM

When creating your AIC project in Microsoft Visual Studio .NET, you might want to use a fixed GUID value to maintain binary compatibility. Otherwise, the GUID for the component changes every time you compile the code. In that case, any references to this component would have to be rebound in your XLANG schedules.

The following procedure assigns a static GUID value to the component and registers the AIC for COM interoperability:

  1. Add the following reference to your project:
  2. using System.Runtime.InteropServices;

  3. Just before the class declaration in your project, add the GUID declaration (shown in bold):
  4. [Guid("")]
    public class AIC_name : IBTSAppIntegration

  5. On the Tools menu, click Create GUID.
  6. The Create GUID dialog box appears.

  7. Select option 4, Registry Format, click Copy, and then click Exit.
  8. Place your cursor between the quotes in the [Guid("")] declaration and paste in the GUID value.
  9. In the Solution Explorer pane, right-click the project and then click Properties.
  10. The project Property Pages dialog box appears.

  11. Click the Configuration Properties folder in the left pane.
  12. On the Configuration drop-down menu, click All Configurations.
  13. Change the value of the Register for COM interop property to True.

Summary

In this section, you learned how to use Microsoft Visual Studio .NET to:

  • Convert a BizTalk document specification into a C# class
  • Create an XML Web service
  • Call the XML Web service from a BizTalk Server AIC
  • Register the component for COM interoperability

All of the source code for the examples in this section is included on the CD-ROM provided with this book. To view the source code, open the file \Microsoft .NET Server Solutions for the Enterprise\E-Procurement\Application\eprocurement\Build_everything.sln. The next section explains how to configure and run the e-procurement sample.

Implementation

Before you can run the e-procurement sample, you must register components, attach the correlation databases, and configure the BizTalk Messaging objects on the hub and supplier systems. In this scenario, both the hub and the supplier are configured on one BizTalk Server installation. In an actual production environment, the hub and the supplier would be two separate entities connected to the Internet.

Preliminary Setup

The steps in this section explain how to configure your system to run the e-procurement sample provided on the CD-ROM that accompanies this book. After you run the CD-ROM setup, the e-procurement sample is located on the installation drive in the folder \Microsoft .NET Server Solutions for the Enterprise\E-Procurement.

Update the Global Assembly Cache

The primary interop assemblies required for BizTalk Server 2002 must be added to your Microsoft .NET global assembly cache (GAC). This provides a single access location for components using the assemblies, so that multiple local copies of the assemblies are not required. To update the GAC with the BizTalk Server 2002 assemblies, run the following script:

\Microsoft .NET Server Solutions for the Enterprise\E-Procurement\Application\setup_eproc.cmd

Attach the SQL Server 2000 Databases

In this procedure you set up the correlation databases that are used with the e-procurement sample. You should use these instructions if you are using Microsoft SQL Server 2000 in your BizTalk Server installation. If you are using Microsoft SQL Server 7.0, use the instructions in the following topic titled "Create the SQL Server 7.0 Databases" instead of this one.

The following instructions assume that SQL Server 2000 is installed on the same computer as BizTalk Server. If SQL Server is installed on a different computer, you will need to modify these instructions so that they will work in your environment. The hub database files (CustomCorrelation_Data.*) are located in the \Microsoft .NET Server Solutions for the Enterprise\E-Procurement\Application\eprocurement\hub_database folder, and the supplier database files (SupplierCustomCorrelation_Data.*) are located in the \Microsoft .NET Server Solutions for the Enterprise\E-Procurement\Application\eprocurement\supplier_database folder.

  1. On the Start menu, point to Programs, point to Microsoft SQL Server, and then click Enterprise Manager.
  2. The SQL Server Enterprise Manager appears.

  3. Expand Microsoft SQL Servers, expand SQL Server Group, and then expand the server on which you want to attach the database.
  4. Click Databases.
  5. On the Action menu, point to All Tasks and click Attach Database.
  6. The Attach Database dialog box appears.

  7. Click the browse button (.).
  8. The Browse For Existing File dialog box appears.

  9. Browse to the folder \Microsoft .NET Server Solutions for the Enterprise\E-Procurement\Application\eprocurement\hub_database.
  10. Click CustomCorrelation_Data.MDF, and then click OK.
  11. A message box appears indicating that the process was successful.

  12. Repeat the steps in this procedure to attach the file SupplierCustomCorrelation_Data.MDF located in the folder \Microsoft .NET Server Solutions for the Enterprise\E-Procurement\Application\eprocurement\supplier_database.

Create the SQL Server 7.0 Databases

You should use the following procedure if you are using Microsoft SQL Server 7.0 in your BizTalk Server installation. If you are using Microsoft SQL Server 2000, use the instructions in the preceding topic titled "Attach the SQL Server 2000 Databases" instead of this one.

  1. On the Start menu, point to Programs, point to Microsoft SQL Server 7.0, and then click Enterprise Manager.
  2. The SQL Server Enterprise Manager appears.

  3. Expand Microsoft SQL Servers, expand SQL Server Group, and then expand the server on which you want to attach the database.
  4. Click Databases.
  5. On the Action menu, click New Database.
  6. The Database Properties menu appears.

  7. In the Name field, type CustomCorrelation as the name of the database.
  8. Click OK.
  9. On the Action menu, click New Database.
  10. The Database Properties menu appears.

  11. In the Name field, type SupplierCustomCorrelation as the name of the database.
  12. Click OK.
  13. Close the SQL Server Enterprise Manager.
  14. On the Start menu, point to Programs, point to Microsoft SQL Server 7.0, and then click Query Analyzer.
  15. The Connect to SQL Server menu appears.

  16. Ensure that the correct information to connect to SQL Server is entered. Click OK.
  17. On the menu bar, make sure that the value in the DB field is CustomCorrelation. If it is not, click the DB drop-down list box and select CustomCorrelation.
  18. On the File menu, click Open.
  19. Browse to the folder \Microsoft .NET Server Solutions for the Enterprise\E-Procurement\Application\eprocurement\hub_database.
  20. Click the CustomCorrelationTable.sql file.
  21. On the Query menu, click Execute.
  22. This will process the CustomCorrelationTable.sql file. If the SQL file has been run, you will see a message stating: The command(s) completed successfully.

  23. Repeat the steps in this procedure for the SupplierCustomCorrelationTable.sql file located in the folder \Microsoft .NET Server Solutions for the Enterprise\E-Procurement\Application\eprocurement\supplier_database.
  24. Close Query Manager.

Configure BizTalk Messaging Services

In this procedure you run the setup application to configure the BizTalk Messaging Services for the hub and the supplier to run the e-procurement sample.

The e-procurement setup application performs the following tasks:

  • Creates these message queues:
  • .\private$\receiveinvoice

    .\private$\receivepayment

    .\private$\receivepaymentack

    .\private$\receivepo

    .\private$\receivepo2

    .\private$\supplierreceivepo

    .\private$\supplierreceivepo2

    .\private$\status

    The queues are used to transfer data between the business partners represented by the running hub and supplier XLANG schedules. The status queue is used to provide dynamic updates to the application used to submit orders from the hub.

  • Creates the channels and ports
  • Each channel is configured to override the messaging port default values and associate the message with a specific XLANG schedule instance by using the message label.

  • Registers the COM components
  • Creates the Message Queuing receive function
  • Creates the XML Web services
  • Moves the document specifications to the WebDAV folder
  •  

  • Configures the BizTalk Messaging Management database
  • Registers the necessary DLLs

Prior to running the setup application, verify that none of the message queues listed above exist. If any of these queues exist, the e-procurement sample setup might fail.

To set up the e-procurement sample

  1. In Windows Explorer, browse to the folder \Microsoft .NET Server Solutions for the Enterprise\E-Procurement\Application\eprocurement\Setup.
  2. Double-click eProcSetup.exe.
  3. A setup dialog box appears.

  4. Click Setup.
  5. A status field in the dialog box displays the progress of the setup until it completes.

Running the E-Procurement Sample

The e-procurement sample demonstrates how to exchange documents through XML Web services and correlate user-defined fields in an XLANG schedule. This sample allows you to use a data value that uniquely identifies a document, such as a purchase order number, and associate that identifier with a running XLANG schedule instance to process a document through the steps of a business transaction.

To run this sample

  1. In Windows Explorer, browse to the folder \Program Files\Microsoft BizTalk Server\SDK\XLANG Tools.
  2. Double-click XLANGMon.exe.
  3. The XLANG Event Monitor appears. Running the XLANG Event Monitor allows you to view the progress of the hub and supplier XLANG schedules as they progress through the transaction. This is an optional step.

  4. In Windows Explorer, browse to the folder \Microsoft .NET Server Solutions for the Enterprise\E-Procurement\Application\bin\Debug on the BizTalk Server installation drive.
  5. Double-click HubOrders.exe.
  6. The Hub Order Application appears.

    Click to view graphic
    Click to view graphic

  7. Enter values in the purchase order Number and Amount fields if desired.
  8. Click Send Order.
  9. An order is submitted to the e-procurement system, and the progress of the order is displayed in the Document processing status area.

    Click to view graphic
    Click to view graphic

  10. To verify that the transaction completed successfully, browse to the folder \Microsoft .NET Server Solutions for the Enterprise\E-Procurement\Application\eprocurement\PaymentAckReceived. This folder should contain a payment acknowledgement XML file that uses the following naming convention: payack_[GUID].xml. This document contains the purchase order number and dollar amount for which the payment was issued.

If you are using the XLANG Event Monitor to view the schedules, the hub schedule appears first in the folder of running schedules, followed by the supplier schedule. Eventually, the supplier schedule finishes and moves to the completed folder, followed by the hub schedule.

To run the sample and have the purchase order denied on the hub, change the purchase order Amount field to a value greater than $1000.00. To run the sample and have the purchase order denied by the supplier system, change the purchase order Amount field to a value less than $300.00.

Uninstalling the E-Procurement Sample

A script is not provided to remove the files and BizTalk Messaging Configuration objects, such as messaging ports and channels, that are created by running the setup application. The following list contains the BizTalk Messaging Configuration objects, files, folders, and libraries used by this sample. These can be manually deleted when you are finished running the sample.

Channels

HubReceivePO, HubSendPO, SupplierReceivePO, HubReceiveInvoice, SupplierSendInvoice, HubSendPayment, SupplierReceivePayment, SupplierSendPaymentAck, HubReceivePaymentAck, HubSendPayAckToFile

Messaging ports

HubReceivePO, HubSendPO, SupplierReceivePO, HubReceiveInvoice, SupplierSendInvoice, HubSendPayment, SupplierReceivePayment, SupplierSendPaymentAck, HubReceivePaymentAck, HubSendPayAckToFile

Organizations

Hub, Supplier

Document definitions

ECommonInvoice, ECommonPayment, ECommonPO, EPaymentAck, EStatus

Receive functions

Receive PO

Private messaging queues

receiveinvoice, receivepayment, receivepaymentack, receivepo, receivepo2, supplierreceivepo, supplierreceivepo2, status

BizTalk Server repository files (WebDAV)

ECommonInvoice.xml, eCommonPayment.xml, ECommonPO.xml, ePaymentAck.xml, eStatus.xml

Registered libraries

db_common.dll, hub_send_payment.dll, hub_send_po.dll, hub_comps.dll, hub_correlation.dll, supp_send_invoice.dll, supp_send_payack.dll, supp_comps.dll, supplier_correlation.dll

Primary Interop Assemblies

BTSComponentsLib.dll, BTSInterchangeLib.dll, MSCSCoreLib.dll, PipeCompLib.dll

XML Web services

E_Proc_Hub_WS, E_Proc_Supplier_WS

Additional Information

This section provides additional resource information.

Microsoft BizTalk Server 2002

  • BizTalk Server 2002 Web site http://www.microsoft.com/biztalk/
  • BizTalk Server Framework overview Web site http://www.biztalk.org/
  • BizTalk Server online help
  • BizTalk Server 2002 Toolkit for Microsoft .NET on the Microsoft Developer Network (MSDN) Web site http://msdn.microsoft.com

Microsoft SQL Server

  • SQL Server Web site http://www.microsoft.com/sql
  • SQL Server online documentation

Microsoft Message Queuing

Message Queuing Web site http://www.microsoft.com/msmq/



Last Updated: April 10, 2002
Top of Page