XML

Using BizTalk Management Desk

Now that we've created the agreement , the next step will be to create a document definition. A document definition provides a reference to a specification, which can be created using BizTalk Editor. The outbound and inbound documents will both be associated with a document definition. A pipeline connects the document definition of an outbound document with the document definition of an inbound document. Pipelines are defined in agreements and distribution lists.

You can use the predefined document definitions, or you can use a specification, such as one that is created with BizTalk Editor, to create a new definition. To create a new definition, from the View menu, choose Document Definitions. This will open the Document Definitions Viewer. You can use any specification that is published to a server. For this example, click New to display the Document Definition Editor screen. Click Browse in the Document Definition Editor screen, choose Microsoft, and then choose Common PO.xml in the local server. Type CommonPO.xml in the Document Definition Name field. You can select the Tracking tab if you want to log any of the fields. You can add two of the following types of fields to log: integer, real, date, and text. You can select multiple fields as a custom data type. These fields will become an XML concatenated string. You can only track fields that have a data type specified. You can use the information that is logged to perform tracking of certain business operations. The quantity field for a particular item or the total for purchase orders are two examples of fields that you might want to track and could use to perform an analysis of various business processes.

You can also add selection criteria in the Document Definition Editor. BizTalk Server 2000 determines what document definition to associate a document with by getting information from the document. For X12 and EDIFACT documents, it is not possible to obtain this information from the document. Thus, the information concerning which document definition to use must be placed in the functional group header of the X12 or EDIFACT document. The selection criteria is used to uniquely identify the document definition when processing an inbound EDI document. The selection criteria can also be used to create functional group header information for outbound EDI document envelopes. When working with X12 and EDIFACT, you'll need to add the following selection criteria: application_sender_code, application_receiver_code, and functional_identifier. The X12 format will also need the standards_version selection criteria, and the EDIFACT will need the standards_version_type and the standards_version_value selection criteria. We will not add any selection criteria for tracking, therefore just click OK in the Document Definition Editor and then click Close on the Document Definition Viewer. Next, go to the Agreement Editor and click on the Document Definition icon. This will bring up the Select Document Definition screen. Click on the CommonPO.xml file that you just selected and then click Add. Click OK. You should now see that the text below the Document Definition icon reads Complete.

You will now need to select a Transport method. Click on the Transport icon. This will bring up the Transport screen. In this screen, select a transport type. For this example, select HTTP. For the Address field, type http://localhost, where localhost is the name of your local server. Then click OK to close the Transport screen.

At this point, we have completed all the required steps for creating agreements. There are some optional things we can do. We can create an envelope that creates headers and sometimes footers for the document. BizTalk Server 2000 currently supports Custom XML, ANSI X12, UN/EDIFACT and flat file (either delimited or positional) envelope formats. You can also create your own custom envelope formats.

We will not create an envelope or set security properties in this example, so you can now click Save in the Agreement Editor to open the Save As screen. Click Save Agreement as Complete and then click OK. In the BizTalk Management Desk you can see that this is an outbound agreement because the default organization is the sender.

Now let's create an inbound agreement:

  1. On the File menu, click New, and then choose Agreement. This will bring up the Agreement Editor. Name the agreement Internal Order.

  2. Click the Source icon to open the Select An Organization screen. In this screen, click New to open the Organization Editor.

  3. In the Organization Editor, type Northwind Traders Order Dept for the Organization Name field.

  4. Click the Identifiers tab, type NWTOD for the value, and then click Set As Default. Click Refresh, and then click OK in the Organization Editor. Close the Select An Organization screen.

  5. In the Agreement Editor, click the Source icon to open the Select An Organization screen. In this screen, choose the Northwind Traders Order Dept and then click OK.

  6. Click the Document Definition icon to open the Select Document Definition screen. In this screen, choose CommonPO.xml and then click OK.

  7. Click the Transport icon, choose HTTP for the Transport Type field, and then type http://localhost. The destination should be Northwind Traders.

  8. Click Save to open the Save As screen. Choose the Save Agreement As Complete option. You should now see that this agreement is listed as an inbound agreement in the BizTalk Management Desk.


by BrainBellupdated
Advertisement: