Join wMUsers | Blog at wMUsers | User Control Panel | Site Map | webMethods Jobs |For Employers

Rob Eamon -- webMethods Ezine Columnist

Subscription-style Delivery of Trading Networks Documents



By Rob Eamon

 


Introduction

Trading Networks facilitates document exchange between partners or systems within an organization. This article describes how to use profiles, document types and processing rules to define the processing rules of inbound and outbound documents.

One limitation of TN that new users often find surprising is the one-to-one nature of TN processing -- a document submitted to TN can be delivered to just one recipient. Various approaches can be used to overcome this limitation:

  • Instead of submitting the document to TN immediately, a service duplicates the document, one copy for each recipient, and submits each to TN for delivery;
  • When a document is submitted to TN, it invokes a service that duplicates the document for each intended recipient and submits each duplicate to TN for delivery;
  • Use a custom delivery service that duplicates and/or delivers the document to each recipient.

There are pros and cons to each approach but each can be used successfully. This article details the first option, with the added twist that the intended recipients are unknown to the document publisher. With minor changes to processing rules the presented solution can be applied to the second option as well.


One Document, Many Recipients

Sometimes it is desirable to send a document to many recipients that have an interest in that document, but the source of the document does not know who these recipients might be. Thus the source cannot provide a list of the profile identifiers needed by TN to do delivery. What is needed is a way to look up the profiles that are to receive documents of a particular type.

TN provides the ability to store custom profile attributes, referred to as extended fields. The desire to receive a particular document type can be easily stored in an extended profile field. A service tasked with delivering a document to all subscribers looks up the extended field for all profiles. Based on the extended field setting, the document can be delivered to all subscribers.


Step One: Add the Extended Profile Field

Adding an extended field to profiles is easily accomplished using the TN Console. Extended fields have a group and a name. A reasonable convention is to place subscription fields in a group named "Subscriptions" and to name the field using the form docType, where docType is a descriptive name of the document type being subscribed to. For the steps below, we’ll create an extended field named "CustomerChange".

  1. Start TN Console.
  2. Select View | Profile from the TN Console menu, or click the Profile button on the toolbar.
  3. Select Profile | Profile Fields from the menu.
  4. Click the Extended tab.
  5. Click the New button on the toolbar.
  6. In the dialog, type "CustomerChange" in the Name field.
  7. Type "Subscriptions" in the Group field.
  8. In the Description field, type "Indicates whether or not this profile is to receive a Customer Change document".
  9. Select String as the Data Type.
  10. Type "N" in the Default field.
  11. Type "1" in the Maximum Length field.
  12. Click on the Add New button next to the Valid Values fields. A new row will appear. Click on the row and type "N".
  13. Repeat step 12 to add "Y" to the list.
  14. Click on OK.
The extended field is now available for all profiles. Repeat this step for each document type. For example, you might wish to use a pub/sub technique for catalog item data. Follow the instructions in this step to add an extended field for each desired document type.


Step Two: Set the Extended Profile Field for Selected Profiles

Now that the extended field is available, we need to set each profile that is to subscribe to our document type. Once again, TN Console provides a simple way to do what we need.

The steps below establish a subscription for the "CustomerChange" document for an existing profile named "XYZ Corp." (Refer to the webMethods documentation for profile creation instructions.)

  1. Click the Partner radio button on the selector panel (the toolbar just below the menu).
  2. Select XYZ Corp. from the drop-down list box on the selector panel.
  3. Select View | Profile from the TN Console menu, or click the Profile button on the toolbar.
  4. Click the Extended Fields tab.
  5. Select Subscriptions under the Group heading on the left side of the window.
  6. Click the Edit Field button next to the Group heading. This enables the fields on the right panel.
  7. Select "Y" from the drop-down list box for CustomerChange field.
  8. Click on Save.
The XYZ Corp. profile now indicates it is to receive all Customer Change documents that are processed. Repeat this step for each profile that needs a subscription for a particular document type.



[1]  2  Next>>

Go Deeper on the Subject: The wMUsers Discussion Forums


Rob Eamon is a consultant with SBI and Company and has over 17 years experience in IT-related areas. He has completed several successful integration projects using the webMethods Platform.

Rob can be reached via email at


Advertise at wMUsers






  Home | Join wMUsers | Discussion Forums | Knowledge Center | Jobs | Shareware | User Groups | Links |
Contact Us | Terms of Service | Privacy Policy

wMUsers is an independent organization and is not sponsored in any manner by Software AG.


© All Rights Reserved, 2001-2008.