594
webMethods Trading Networks User’s Guide VERSION 6.5 webMethods, Inc. South Tower 3877 Fairfax Ridge Road Fairfax, VA 22030 USA 703.460.2500 http://www.webmethods.com

Web Methods Trading Networks Users Guide 65

Embed Size (px)

Citation preview

Page 1: Web Methods Trading Networks Users Guide 65

webMethods Trading NetworksUser’s Guide

VERSION 6.5

webMethods, Inc.South Tower3877 Fairfax Ridge RoadFairfax, VA 22030USA703.460.2500http://www.webmethods.com

Page 2: Web Methods Trading Networks Users Guide 65

webMethods Administrator, webMethods Broker, webMethods Dashboard, webMethods Developer, webMethods Fabric, webMethods Glue, webMethods Installer, webMethods Integration Server, webMethods Mainframe, webMethods Manager, webMethods Mobile, webMethods Modeler, webMethods Monitor, webMethods Optimize, webMethods Portal, webMethods Trading Networks, and webMethods Workflow are trademarks of webMethods, Inc. webMethods and the webMethods logo are registered trademarks of webMethods, Inc.

Acrobat, Adobe, and Reader are registered trademarks of Adobe Systems Incorporated. Amdocs is a registered trademark, and ClarifyCRM is a trademark of Amdocs Inc. Ariba is a registered trademark of Ariba, Inc. BEA and BEA WebLogic Server are registered trademarks, and BEA WebLogic Platform is a trademark of BEA Systems, Inc. BMC Software and PATROL are registered trademarks of BMC Software, Inc. BroadVision is a registered trademark of BroadVision, Inc. ChemeStandards and CIDX are registered trademarks of Chemical Industry Data Exchange. Unicenter is a trademark of Computer Associates International, Inc. PopChart is a registered trademark of CORDA Technologies, Inc. Kenan and Arbor are registered trademarks of CSG Software, Incorporated. SNAP-IX and Data Connection are registered trademarks of Data Connection Corporation. DataDirect, DataDirect Connect, and SequeLink are registered trademarks of DataDirect Technologies Corp. D & B and D-U-N-S are registered trademarks of Dun & Broadstreet, Inc. Entrust is a registered trademark of Entrust, Inc. Hewlett-Packard, HP, HP-UX, and OpenView are trademarks of Hewlett-Packard Company. i2 is a registered trademark of i2 Technologies, Inc. AIX, AS/400, CICS, DB2, Domino, IBM, Infoprint, Lotus, Lotus Notes, MQSeries, OS/390, OS/400, RACF, RS/6000, S/390, System/390, VTAM, z/OS, and WebSphere are registered trademarks; and Informix, SQL/400, Communications System for Windows NT, IMS, MVS, SQL/DS, and Universal Database are trademarks of IBM Corporation. InnoDB is a trademark of Innobase Oy. JBoss is a registered trademark, and JBoss Group is a trademark of JBoss Inc. JD Edwards is a registered trademark of J.D. Edwards & Company and OneWorld is a registered trademark of J.D. Edwards World Source Company. Linux is a registered trademark of Linus Torvalds. X Window System is a trademark of the X.org Foundation. MetaSolv is a registered trademark of Metasolv Software, Inc. ActiveX, Microsoft, Outlook, Visual Basic, Windows, and Windows NT are registered trademarks; and SQL Server is a trademark of Microsoft Corporation. MySQL is a registered trademark of MySQL AB, Ltd. Teradata is a registered trademark of NCR International, Inc. Netscape is a registered trademark of Netscape Communications Corporation. ServletExec is a registered trademark, and New Atlanta is a trademark of New Atlanta Communications, LLC. CORBA is a registered trademark of Object Management Group, Inc. UNIX is a registered trademark of X/Open Company Ltd. Oracle is a registered trademark of Oracle International Corporation. PeopleSoft and Vantive are registered trademarks, and PeopleSoft Pure Internet Architecture and WorldSoftware are trademarks of PeopleSoft, Inc. Infranet and Portal are trademarks of Portal Software, Inc. RosettaNet is a trademark of RosettaNet, a non-profit organization. SAP and R/3 are registered trademarks of SAP AG. Siebel is a registered trademark of Siebel Systems, Inc. SPARC is a registered trademark, and SPARCStation is a trademark of SPARC International, Inc. SSA Global and SSA Baan are trademarks of SSA Global Technologies, Inc. EJB, Enterprise JavaBeans, Java, JavaServer, JDBC, JSP, J2EE, Solaris, and Sun Microsystems are registered trademarks; and Java Naming and Directory Interface, SOAP with Attachments API for Java, JavaServer Pages and SunSoft are trademarks of Sun Microsystems, Inc. SWIFT and SWIFTNet are registered trademarks of Society for Worldwide Interbank Financial Telecommunication SCRL. Sybase is a registered trademark of Sybase, Inc. UCCnet and eBusinessReady are registered trademarks of Uniform Code Council, Inc. Verisign is a registered trademark of Verisign, Inc. VERITAS is a registered trademark of VERITAS Operating Corporation, and VERITAS Software and VERITAS Cluster Server are trademarks of VERITAS Software Corporation. W3C is a registered trademark of Massachusetts Institute of Technology.

All other marks are the property of their respective owners.

Copyright © 2005 by webMethods, Inc. All rights reserved, including the right of reproduction in whole or in part in any form.

Document ID: TN-UG-65-20050429

Page 3: Web Methods Trading Networks Users Guide 65

Contents

Contents

About This Guide . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 15Document Conventions . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 15Additional Information . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 16

Chapter 1. Integration Server and Trading Networks . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 17Overview . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 18Starting the Integration Server . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 18

Starting the webMethods Server from the Command Line . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 19Shutting Down the Integration Server . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 19Configuring Trading Networks . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 20

Chapter 2. Trading Networks Console . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 21Overview . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 22Starting the Trading Networks Console . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 22Opening and Closing Sessions on Servers . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 24Familiarizing Yourself with the Trading Networks Console . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 25

The Menu Bar . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 26The Selector Panel . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 26Screen Name . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 29Toolbar . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 29Display Area . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 29Refreshing the Contents of the Console . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 30

Basic Operations . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 31Multiple Panes and Tabs . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 31Resizing Panes . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 32Working with Tables . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 33Right-click menus . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 34

Selecting Trading Networks Objects . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 34Selecting a Partner . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 34Selecting TN Document Types . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 36

Coordinating Your Work . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 37Closing the Trading Networks Console . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 37

webMethods Trading Networks User’s Guide Version 6.5 3

Page 4: Web Methods Trading Networks Users Guide 65

C o n t e n t s

Chapter 3. Trading Networks Web Manager . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 39

Chapter 4. Configuring webMethods Trading Networks . . . . . . . . . . . . . . . . . . . . . . . . . . . 41Trading Networks Configuration Properties . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 42Configuring the Database Settings . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 43

Trading Networks in a High Availability Environment . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 44Shared Database in a Clustered Environment . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 44Shared Database in a Non-Clustered Environment . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 45Separate Database for Each Instance of Trading Networks . . . . . . . . . . . . . . . . . . . . . . . . 47

Configuring Trading Networks for a Clustered Environment . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 48Configuring Profile Settings . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 50Configuring E-mail Settings for Document Delivery . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 51Configuring Tasks Settings . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 52

Enabling Task Failure Notification . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 54Configuring Registry Settings . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 55Configuring Trading Networks for Large Document Handling . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 56

Minimum Hardware Requirements for Large Document Handling . . . . . . . . . . . . . . . . . . . . . . . 56Steps for Configuring Large Document Handling . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 57

Setting Properties in the Trading Networks Properties File . . . . . . . . . . . . . . . . . . . . . . . . . 57Configuring the Integration Server . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 58

Other Configuration Settings . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 61Customizing the Trading Networks Console . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 61

Predefining the List of Servers that You Want to Use . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 61Defining Proxy Servers for the Console . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 63

Chapter 5. Planning Your Network . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 67Introduction . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 68Task 1: Identify the Types of Transactions to Process . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 69Task 2: Determine the Important Document Information . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 71Task 3: Define the Types of Documents . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 72Task 4: Define Information to Maintain about Partners . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 80Task 5: Create Your Own Profile . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 81Task 6: Define Actions to Perform Against Documents . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 81Task 7: Add Partners to Your Network . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 82

Chapter 6. Trading Partners . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 83How to Manage Partners in Your Trading Network . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 84

Defining the Information You Want to Collect about Partners . . . . . . . . . . . . . . . . . . . . . . . . . . . 84Creating Your Own Profile . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 84Adding Profiles for Partners . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 85

Steps to Setting up Profiles in Trading Networks . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 85

4 webMethods Trading Networks User’s Guide Version 6.5

Page 5: Web Methods Trading Networks Users Guide 65

Contents

Chapter 7. Profile Fields . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 87What are Profile Fields? . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 88

Required Fields . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 88Standard Profile Fields . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 88

Viewing Standard Profile Fields . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 95Updating Standard Profile Fields . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 96

Extended Profile Fields . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 97Adding Extended Profile Fields . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 98Viewing Extended Profile Fields . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 101Updating Extended Profile Fields . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 102Disabling Extended Profile Fields . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 102Enabling Extended Profile Fields . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 103

Chapter 8. Your Profile (Your Enterprise) . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 105What are Profiles? . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 106Information Trading Networks Maintains in Your Profile . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 106

Information on Your Corporate Tab . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 106Information on Your Contact Tab . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 109Information on Your Delivery Method Tab . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 111Information on Your Extended Fields Tab . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 113Information on Your Security Tab . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 113

Creating Your Own Profile . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 115Specifying Your Profile Information . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 115Summary of Profile Statuses . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 116

Managing Your Profile . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 117Viewing Your Profile . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 117Updating Your Profile . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 117Enabling Your Profile—Changing the Status to Active . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 129Disabling Your Profile—Changing the Status to Inactive . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 129

Chapter 9. Partner Profiles . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 131What is a Partner’s Profile? . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 132Information Trading Networks Maintains in the Partner’s Profile . . . . . . . . . . . . . . . . . . . . . . . . . . . . 132

Information on the Partner’s Corporate Tab . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 132Information on the Partner’s Contact Tab . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 136Information on the Partner’s Delivery Method Tab . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 137Information on the Partner’s Extended Fields Tab . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 143Information on the Partner’s Security Tab . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 144

Adding Partner Profiles . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 145Step 1: Defining a Partner Profile . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 146Step 2: Enabling the Partner’s Profile . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 164

webMethods Trading Networks User’s Guide Version 6.5 5

Page 6: Web Methods Trading Networks Users Guide 65

C o n t e n t s

Step 3: Informing the Partner of the User Name and Password . . . . . . . . . . . . . . . . . . . . . . . . . 165Retrieving the Partner’s User Name and Password . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 165Supplying the User Account Information to Your Partner . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 166

About Querying and Viewing Profiles . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 166Basic Search Criteria for Profiles . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 167Custom Search Criteria for Profiles . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 167Detail View of Profiles . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 168Finding and Viewing Profiles . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 168

Managing the Partner’s Profile . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 173Updating the Profile of Your Partner . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 173Deleting a Profile . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 174Disabling a Partner’s Profile—Changing the Status to Inactive . . . . . . . . . . . . . . . . . . . . . . . . . 175Enabling a Partner’s Profile—Changing the Status to Active . . . . . . . . . . . . . . . . . . . . . . . . . . . 176

Chapter 10. Trading Partner Agreements (TPAs) . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 177What is a Trading Partner Agreement (TPA)? . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 178Information You Supply to Define a TPA . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 178Defining a TPA . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 181Managing TPAs . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 185

Finding and Viewing TPAs . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 185Updating TPAs . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 187

Changing a TPA Agreement Status . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 188Changing the TPA Data Inputs in the IS Document Type . . . . . . . . . . . . . . . . . . . . . . . . . . 190

Deleting a TPA . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 192

Chapter 11. Document Attributes . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 193What are Document Attributes? . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 194Defining Document Attributes . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 196Managing Document Attributes . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 198

Viewing Document Attributes . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 198Displaying Disabled Document Attributes . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 198Hiding Disabled Document Attributes . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 199

Updating Document Attributes . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 199Disabling Document Attributes . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 199Enabling Document Attributes . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 200Determining the TN Document Types that Use an Attribute . . . . . . . . . . . . . . . . . . . . . . . . . . . . 201

6 webMethods Trading Networks User’s Guide Version 6.5

Page 7: Web Methods Trading Networks Users Guide 65

Contents

Chapter 12. TN XML Document Types . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 203What Are TN XML Document Types? . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 204Identification Information in TN XML Document Types . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 206

Determining the TN Document Type to Use for an XML Document . . . . . . . . . . . . . . . . . . . . . . 209When an XML Document Does Not Match Any TN Document Types . . . . . . . . . . . . . . . . 209When an XML Document Matches More Than One TN Document Type . . . . . . . . . . . . . . 209

Extraction Information In TN XML Document Types . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 210Important Attributes that You Should Extract from an XML Document . . . . . . . . . . . . . . . . . . . . 210Indicating that Attributes are Required in TN XML Document Types . . . . . . . . . . . . . . . . . . . . . 213Transformation Information for Extracted Attributes of TN Document Types . . . . . . . . . . . . . . . 214

Specifying Built-in Transformation Information for SenderID and ReceiverID . . . . . . . . . . . 215Specifying Built-In Transformation Information for Attributes with the DATETIME and

DATETIME LIST Data Type . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 215Specifying Built-in Transformation Information for Attributes with the STRING or STRING LIST

Data Type . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 216Specifying Built-in Transformation Information for Attributes with the NUMBER Data Type 218Specifying a Custom Transformation Service . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 220

Namespace Mappings in TN XML Document Types . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 221XML Documents and Namespaces . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 221

How Namespaces Affect Identifying and Attribute XQL Queries . . . . . . . . . . . . . . . . . . . . . 223Namespace Mappings . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 223

Options in TN XML Document Types . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 226Specifying an IS Document Type for TN XML Document Types . . . . . . . . . . . . . . . . . . . . . . . . . 226Specifying an IS Schema for TN XML Document Types . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 227Specifying Pre-Processing Actions for TN XML Document Type . . . . . . . . . . . . . . . . . . . . . . . . 227

Verifying the Digital Signature of an XML Document . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 227Validating the Structure of an XML Document . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 228Checking for Duplicate of the XML Document . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 228Saving an XML Document to the Database . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 230

Defining TN XML Document Types . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 232Using a Sample Document to Define a TN XML Document Type . . . . . . . . . . . . . . . . . . . . . . . . 233

Working with a Sample Document . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 243Defining a TN XML Document Type without a Sample Document . . . . . . . . . . . . . . . . . . . . . . . 247

Managing TN XML Document Types . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 254Viewing TN XML Document Types . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 255Updating TN XML Document Types . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 255

Using a Sample Document when Updating a TN XML Document Type . . . . . . . . . . . . . . . 255Updating a TN XML Document Type without a Sample Document . . . . . . . . . . . . . . . . . . . 261

Disabling TN XML Document Types . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 266Enabling TN XML Document Types . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 267Testing TN XML Document Types . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 268

webMethods Trading Networks User’s Guide Version 6.5 7

Page 8: Web Methods Trading Networks Users Guide 65

C o n t e n t s

Chapter 13. TN Flat File Document Types . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 271Overview . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 272

Run-Time Processing of Flat File Documents . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 273Defining Document Gateway Services . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 276

Reading the Input Stream . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 278Determining the Content Type and Content Encoding . . . . . . . . . . . . . . . . . . . . . . . . . . . . 278Converting a Flat File Document to an IS Document . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 278

Specifying the Document Gateway Services Outputs . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 280TN Flat File Document Types . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 283

Pipeline Matching Criteria Used to Identify the TN Document Type . . . . . . . . . . . . . . . . . . . . . . 283Error Conditions When Matching Documents To TN Document Types . . . . . . . . . . . . . . . 284

Attributes To Extract From Documents . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 285Error Conditions When Extracting Attributes . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 285System Attributes To Extract From Documents . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 286Transformation Information for Extracted Attributes of TN Flat File Document Types . . . . 288

Pre-Processing Actions in the TN Flat File Document Type . . . . . . . . . . . . . . . . . . . . . . . . . . . . 294Verifying the Digital Signature of Flat File Documents . . . . . . . . . . . . . . . . . . . . . . . . . . . . 294Validating the Structure of Flat File Documents . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 295Checking for Duplicates of the Flat File Document . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 296Saving Flat File Documents to the Database . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 297

Defining TN Flat File Document Types . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 300Managing TN Flat File Document Types . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 306

Viewing TN Flat File Document Types . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 306Updating TN Flat File Document Types . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 306Disabling TN Flat File Document Types . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 308Enabling TN Flat File Document Types . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 309

Chapter 14. Processing Rules . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 311What are Processing Rules? . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 312Processing Rules Order . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 313

Adding Processing Rules and the Order of Processing Rules . . . . . . . . . . . . . . . . . . . . . . . . . . 313Reordering Processing Rules . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 316

Processing Rule Criteria . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 317Sender and Receiver Criteria . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 317Document Type Criterion . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 319User Status Criterion . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 319Document Recognition Errors Criterion . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 321

Extended Criteria—Using Custom Attributes . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 322Bypassing Lookups for Processing Rules . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 326

Pre-Processing Actions . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 327Creating a Duplicate Document Check Service . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 329

8 webMethods Trading Networks User’s Guide Version 6.5

Page 9: Web Methods Trading Networks Users Guide 65

Contents

Processing Rule Actions . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 329Action 1—Execute a Service . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 330

Executing the Service Synchronously or Asynchronously . . . . . . . . . . . . . . . . . . . . . . . . . . 331Service Execution Tasks and Reliable Execution . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 333Creating the Service for the Execute a Service Processing Action . . . . . . . . . . . . . . . . . . . 335

Action 2—Send an Alert E-mail . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 338Recipient of the E-mail Message . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 338Subject of the E-mail Message . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 340Body of the E-mail Message . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 340

Action 3—Change User Status . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 341Action 4—Deliver the Document to the Receiver . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 341

Immediate Delivery . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 342Scheduled Delivery . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 344Queued for Polling . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 345Preferred Protocol . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 346

Action 5—Respond With a Message . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 346Specifying the Message . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 347Specifying the Content Type . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 347

Defining Processing Rules . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 347Defining a Processing Rule Based on a Saved Document . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 361Setting Up a Default Processing Rule . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 362Ordering the Processing Rules . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 363

Testing the Order of Processing Rules . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 365About Querying and Viewing Processing Rules . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 366

Basic Search Criteria for Processing Rules . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 366Detail View of Processing Rules . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 367Finding and Viewing Processing Rules . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 367

Managing Processing Rules . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 372Updating Processing Rules . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 373Disabling Processing Rules . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 373Enabling Processing Rules . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 374Deleting Processing Rules . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 374

Chapter 15. Queues in Trading Networks . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 377What is a Queue? . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 378Scheduled Delivery Queues . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 378Defining Public Queues . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 380Delivery Schedule for Queues . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 384

Using the Run Once Option . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 385Using the Simple Interval Option . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 385Using the Complex Interval Option . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 386

webMethods Trading Networks User’s Guide Version 6.5 9

Page 10: Web Methods Trading Networks Users Guide 65

C o n t e n t s

Scheduled Delivery Queue States . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 390Changing the State of a Scheduled Delivery Queue . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 391Changing the State of a Public Queue . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 392Changing the State of a Private Queue . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 393

Defining Queue for Polling . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 394Setting up Queue for Polling to Poll on a Partner’s System . . . . . . . . . . . . . . . . . . . . . . . . . . . . 394Setting up Queue for Polling for webMethods for Partners . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 395

Viewing Documents in a Queue . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 396Viewing Documents that are Scheduled for Delivery . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 396Viewing Documents that are Queued for Polling . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 397

Chapter 16. Queries in Trading Networks . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 399Running Queries in Trading Networks . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 400Enabling the Query Functions . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 402Creating and Saving a Query . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 404Selecting and Running a Query . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 405

Navigating Through the Results Table . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 406Updating the Search Criteria for a Saved Query . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 406Saving a New Query Based on an Existing Query . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 407Reverting to a Saved Query . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 407Deleting Saved Queries . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 408

Chapter 17. Delivery Services . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 409What is a Delivery Service? . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 410

What is an Immediate Delivery Service? . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 410What is a Scheduled Delivery Service? . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 410

Creating an Immediate Delivery Service . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 411Retrieving the Content of a Document for Immediate Delivery . . . . . . . . . . . . . . . . . . . . . . . . . . 412

Creating a Scheduled Delivery Service . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 413Inputs and Outputs for a Scheduled Delivery Service . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 413

Inputs for Scheduled Delivery Service . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 413Outputs for Scheduled Delivery Service . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 414

Retrieving the Content of a Document for Scheduled Delivery . . . . . . . . . . . . . . . . . . . . . . . . . . 414Required Logic to Include in the Scheduled Delivery Service . . . . . . . . . . . . . . . . . . . . . . . . . . . 415Typical Logic to Include in the Scheduled Delivery Service . . . . . . . . . . . . . . . . . . . . . . . . . . . . 417Handling Exceptions . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 418The wm.tn.transport:batchFtp Service . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 419

Adding and Registering New Delivery Services . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 421

10 webMethods Trading Networks User’s Guide Version 6.5

Page 11: Web Methods Trading Networks Users Guide 65

Contents

Chapter 18. Managing and Tracking Documents . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 427About Viewing and Querying Documents . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 428

Transaction Analysis Basic Search Criteria . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 429Transaction Analysis Custom Search Criteria . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 437Detail View of Documents . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 441

Viewing Documents in Your System . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 442Viewing Documents Using the Trading Partners Selection . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 447Viewing Document Attributes and Document Content . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 448Viewing Related Documents . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 449Viewing Documents that are Scheduled for Delivery . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 450Viewing Pollable Documents . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 450Exporting Detail View Information to a File . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 450Determining the SQL for a Document Query . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 451

Viewing Documents in a Partner’s System . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 451Processing a Saved Document Again . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 452Resubmitting a Saved Document . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 452

Considerations When Resubmitting a Flat File Document . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 453Steps to Resubmit a Saved Document . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 454

Reprocessing a Saved Document . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 454Steps to Reprocess a Saved Document . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 455

Archiving and Deleting Documents . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 456Archiving Documents . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 456Deleting Documents . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 457Setting Up Basic Archival and Deletion . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 457

Setting How Many Days to Retain Documents before Archival and Deletion . . . . . . . . . . . 457Scheduling When To Archive and Delete Documents . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 458

Setting Up Configurable Archival and Deletion . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 460Scheduling When To Archive and Delete Documents . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 461

Chapter 19. Delivery Tasks . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 465What is a Delivery Task? . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 466About Viewing Delivery Tasks . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 467

Delivery Task Statuses . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 469Task Statuses for Immediate Deliveries . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 469Task Statuses for Scheduled Deliveries . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 470

Finding and Viewing Delivery Tasks . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 472Viewing the Delivery Tasks Associated with a Document . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 474Exporting Delivery Task Information to a File . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 474

Running Delivery Tasks Queries . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 475Stopping a Delivery Task for Immediate Delivery . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 476Restarting an Immediate Delivery Task . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 477

webMethods Trading Networks User’s Guide Version 6.5 11

Page 12: Web Methods Trading Networks Users Guide 65

C o n t e n t s

Deleting Delivery Tasks . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 478Reassigning a Delivery Task to Another Server . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 479

Chapter 20. Service Execution Tasks . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 481What is a Service Execution Task? . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 482About Viewing Service Execution Tasks . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 482Finding and Viewing Service Execution Tasks . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 485

Viewing the Service Execution Tasks Associated with a Document . . . . . . . . . . . . . . . . . . . . . . 487Exporting Service Execution Task Information to a File . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 488

Running Service Execution Tasks Queries . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 489Stopping a Service Execution Task . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 489Restarting a Service Execution Task . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 490Deleting Service Execution Tasks . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 491Reassigning a Service Execution Task to Another Server . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 492

Chapter 21. The Activity Log . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 495What is the Activity Log? . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 496

Activity Class Values . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 497Viewing the Activity Log . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 498

Viewing Entries that Relate to Enterprise or a Partner . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 498Viewing Entries that Relate to a Document . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 501Exporting Activity Log Information to a File . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 502

Deleting Activity Log Entries . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 503Running Activity Log Queries . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 503

Appendix A. Exporting and Importing Database Information . . . . . . . . . . . . . . . . . . . . . . . 505About Exporting and Importing Database Information . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 506Trading Networks Objects that You Can Export and Import . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 507Dependencies For Trading Networks Objects . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 508

Why You Should Use Export/Import to Migrate Dependencies . . . . . . . . . . . . . . . . . . . . . . . . . . 508Migrating Profiles . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 509

Partner Data . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 510Partner Data Dependencies . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 511

Migrating Profile Fields . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 513Field Definitions Dependencies . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 513

Migrating TN Document Types . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 514Document Type Dependencies . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 514

Migrating Custom Document Attributes . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 515Migrating Processing Rules . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 515

Processing Rules Dependencies . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 516Migrating Trading Partner Agreements (TPAs) . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 518

12 webMethods Trading Networks User’s Guide Version 6.5

Page 13: Web Methods Trading Networks Users Guide 65

Contents

Migrating Queries . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 519Exporting Database Information from the Console . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 519Importing Database Information from the Console . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 521

Importing Items that Have the Same Name as Existing Items . . . . . . . . . . . . . . . . . . . . . . . . . . 521Using the Overwrite Dialog Box . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 522Suppressing the Overwrite Dialog Box and Forcing the Overwrite of Items . . . . . . . . . . . . 523

Specifying How to Import Processing Rules . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 524Procedure for Importing Database Information from the Console . . . . . . . . . . . . . . . . . . . . . . . . 524

Using the tnexport and tnimport Utilities . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 526tnexport Utility . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 526

Examples . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 527tnimport Utility . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 528

Examples . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 529

Appendix B. XQL Reference . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 531XQL Reference Information . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 532Sample XML File . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 532Example XQL Queries . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 533Extracting Custom Attributes From XML Documents . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 536

Extracting STRINGLIST or STRING ATTRIBUTES . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 536Extracting NUMBERLIST or NUMBER ATTRIBUTES . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 537Extracting DATETIMELIST or DATETIME ATTRIBUTES . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 538

Appendix C. Large Document Handling . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 541Overview of Large Document Handling . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 542What You Need to Do to Use Large Document Handling . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 542Features Not Available for Large Documents . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 543Defining TN Document Type XQL Queries for Large Documents . . . . . . . . . . . . . . . . . . . . . . . . . . . . 544Creating Services that Recognize Large Document Handling . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 544

Determining Where the Document Content is Stored . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 545Retrieving Document Content from Hard Disk Drive Space . . . . . . . . . . . . . . . . . . . . . . . . . . . . 547Retrieving the Content for Document Delivery . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 548Programmatically Finding Nodes in a Large Document . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 548

Sending Large XML Documents for Processing . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 548Viewing Large Documents that Trading Networks Has Processed . . . . . . . . . . . . . . . . . . . . . . . . . . . 549

Index . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 551

webMethods Trading Networks User’s Guide Version 6.5 13

Page 14: Web Methods Trading Networks Users Guide 65

C o n t e n t s

14 webMethods Trading Networks User’s Guide Version 6.5

Page 15: Web Methods Trading Networks Users Guide 65

About This Guide

About This Guide

This manual describes how to configure Trading Networks and how to plan for your trading network. It provides procedures for setting up Trading Networks to build your trading network and how to manage an existing trading network, including how to define and update the information you want to collect about trading partners and how to add and maintain partners to your trading network. It also describes how to define how you want Trading Networks to process business documents that are sent to your trading network.

Additionally, this manual contains procedures for analyzing the exchange of documents in your trading network, including searching and viewing documents that have flowed through your network and viewing audit logs of events that have occurred in your trading network system.

Document Convent ions

Note: The webMethods Trading Networks and webMethods for Partners components perform the same functionality. The difference between the components is that webMethods Trading Networks allows you to have as many partners in your network as you want, and webMethods for Partners allows you to have only a single partner. This guide provides documentation for both components although it refers only to webMethods Trading Networks (referred to as Trading Networks).

Convention Description

Bold Identifies elements on a screen.

Italic Identifies variable information that you must supply or change based on your specific situation or environment. Identifies terms the first time they are defined in text. Also identifies service input and output variables.

Narrow font Identifies storage locations for services on the webMethods Integration Server using the convention folder.subfolder:service.

Typewriter font

Identifies characters and values that you must type exactly or messages that the system displays on the console.

UPPERCASE Identifies keyboard keys. Keys that you must press simultaneously are joined with the “+” symbol.

\ Directory paths use the “\” directory delimiter unless the subject is UNIX-specific.

[ ] Optional keywords or values are enclosed in [ ]. Do not type the [ ] symbols in your own code.

webMethods Trading Networks User’s Guide Version 6.5 15

Page 16: Web Methods Trading Networks Users Guide 65

A b o u t T h i s G u i d e

Addit ional Informat ionThe webMethods Advantage Web site at http://advantage.webmethods.com provides you with important sources of information about webMethods components:

Troubleshooting Information. webMethods provides troubleshooting information for many webMethods components in the webMethods Knowledge Base.

Documentation Feedback. To provide documentation feedback to webMethods, go to the Documentation Feedback Form on the webMethods Bookshelf.

Additional Documentation. All webMethods documentation is available on the webMethods Bookshelf.

16 webMethods Trading Networks User’s Guide Version 6.5

Page 17: Web Methods Trading Networks Users Guide 65

C H A P T E R 1

Integrat ion Server and Trading Networks

Overview . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 18

Starting the Integration Server . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 18

Shutting Down the Integration Server . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 19

Configuring Trading Networks . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 20

webMethods Trading Networks User’s Guide Version 6.5 17

Page 18: Web Methods Trading Networks Users Guide 65

C H A P T E R 1 I n t e g r a t i o n S e r v e r a n d Tr a d i n g N e t w o r k s

OverviewTo use webMethods Trading Networks (Trading Networks), you must start the Integration Server. Because Trading Networks is seamlessly integrated into the webMethods platform, all configuration, administration, and management tasks that you can perform for the webMethods Integration Server also apply to the Trading Networks.

This chapter describes basic tasks that you will need to perform when using the server, specifically, how to start and shut down the server.

Start ing the Integrat ion ServerThe Integration Server must be running in order for you to set up and manage Trading Networks and for your partners to submit documents to the trading network. In addition, the Integration Server must be running to use the Console or Trading Networks Web Manager.

1 On the Start menu, select Programs webMethods Servers webMethods Integration Server.

1 Locate the server.sh script file that you modified for your environment when you installed the server.

2 Execute this script.

For more information about the architecture and components of webMethods Trading Networks, see Chapter 1, "Overview of webMethods Trading Networks" in the webMethods Trading Networks Concepts Guide.

Note: For Trading Networks to function properly, the WmPublic package must be enabled. For more information on the WmPublic package and how to assure a package is enabled, see the webMethods Integration Server Administrator’s Guide.

To start the Integration Server on Microsoft Windows

Note: When you installed the Trading Networks, you installed additional packages into the webMethods Integration Server. Installing the Trading Networks added functionality to the webMethods Integration Server.

To start the Integration Server on UNIX

18 webMethods Trading Networks User’s Guide Version 6.5

Page 19: Web Methods Trading Networks Users Guide 65

Shutting Down the Integration Server

Start ing the webMethods Server from the Command LineThere are times when it is useful to start the Integration Server from the command line. Starting the Integration Server this way allows you to override certain configuration settings. It also lets you start the Integration Server in “debug” mode, so you can record or display the activity occurring in the Integration Server. For instructions on how to start the Integration Server from the command line and a description of the parameters you can specify, see the webMethods Integration Server Administrator’s Guide.

Shutt ing Down the Integrat ion ServerShut down the server to stop the Integration Server and all active sessions. When you shut down the Integration Server, the Trading Networks automatically closes its session on the server. When you start the server again, you can restore the console’s session on the server.

1 Open the webMethods Administrator if it is not already open.

To open the webMethods Administrator, start your browser and point it to the host and port where the Integration Server is running.

Example

If the server were running on port 4040 on a machine called QUICKSILVER, type:http://QUICKSILVER:4040

2 In the upper right corner of any webMethods Administrator screen, click the Shutdown and Restart link.

3 Select whether you want the server to wait before shutting down or to shutdown immediately.

Delay number minutes or until all client sessions are complete. Specify the number of minutes you want the Integration Server to wait before shutting down. Trading Networks begins monitoring user activity and automatically shuts down when all non-administrator sessions complete or when the maximum wait time you specify elapses (whichever comes first).

Immediate. The server and all active sessions terminate immediately.

Important! Run this script when logged in as a non-root user. Running the script as root might reduce the security of your system.

To shut down the server

webMethods Trading Networks User’s Guide Version 6.5 19

Page 20: Web Methods Trading Networks Users Guide 65

C H A P T E R 1 I n t e g r a t i o n S e r v e r a n d Tr a d i n g N e t w o r k s

For instructions on how to view the active sessions, see the webMethods Integration Server Administrator’s Guide.

4 Click Shutdown.

Configur ing Trading NetworksYou can configure the Integration Server to suit your site. For example, you can specify the database you want to use and the parameters that control how Trading Networks delivers documents. For complete information, see Chapter 4, “Configuring webMethods Trading Networks”.

20 webMethods Trading Networks User’s Guide Version 6.5

Page 21: Web Methods Trading Networks Users Guide 65

C H A P T E R 2

Trading Networks Console

Overview . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 22

Starting the Trading Networks Console . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 22

Opening and Closing Sessions on Servers . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 24

Familiarizing Yourself with the Trading Networks Console . . . . . . . . . . . . . . . . . . . . . . . . . . 25

Basic Operations . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 31

Selecting Trading Networks Objects . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 34

Coordinating Your Work . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 37

Closing the Trading Networks Console . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 37

webMethods Trading Networks User’s Guide Version 6.5 21

Page 22: Web Methods Trading Networks Users Guide 65

C H A P T E R 2 T r a d i n g N e t w o r k s C o n s o l e

OverviewThe Trading Networks Console (Console) is a standalone Java GUI, which is the main user interface for webMethods Trading Networks (Trading Networks). Use the Trading Networks Console to perform functions such as managing your trading partners, configuring how documents are exchanged through your network, and performing real-time monitoring and analysis

To use webMethods Trading Networks (Trading Networks), you must start the Integration Server. Because Trading Networks is seamlessly integrated into the webMethods platform, all configuration, administration, and management tasks that you can perform for the webMethods Integration Server also apply to the Trading Networks.

In addition, the Integration Server must be running to use the Trading Networks Console or Trading Networks Web Manager.

This chapter provides procedures for how to start and exit from the Console. In addition, it contains information to help you become familiar with how to use the Console.

Start ing the Trading Networks ConsoleUse the following procedure to start the Trading Networks Console on your workstation.

1 On the Start menu, select Programs webMethods Trading Networks Console.

Important! Make sure that the Integration Server with which you want to use the Console is running. You cannot work with the Console if the server is not running.

To start the Trading Networks Console

Specify the name and portassignment of a Trading

Networks Server...

...and enter a user accountthat has administrator

privileges

22 webMethods Trading Networks User’s Guide Version 6.5

Page 23: Web Methods Trading Networks Users Guide 65

Starting the Trading Networks Console

2 In the Open Session dialog box, complete the following:

3 Click OK.

In this field... Specify...

Server The name and port assignment of the Integration Server in ServerName:PortNum format.

Example localhost:5555

Note: Servers to which you have successfully logged on in the past are listed in the Server list. You can select a server from this list or type a different server name and port number.

User Name The name of a valid user account on this server. (The user name must be a member of a group belonging to the Administrators ACL and a member of a group belonging to the Developers ACL.)

Note: The user name must be a member of a group belonging to the Developers ACL because Trading Networks actually launches the Developer for some tasks, such as: specifying a service for a routing rule or a delivery queue; specifying a custom duplicate checking service or custom attribute transformation service for a doctype; browsing for an IS doctype for a TPA; and setting inputs for a TPA.

Use the exact combination of upper- and lower-case characters with which the user name was originally defined. IS user names are case-sensitive.

Password The password for the user account in User Name. Use the exact combination of upper- and lower-case characters with which it was originally defined. IS passwords are case-sensitive.

Use secure connection

Whether the connection will be made through HTTP or HTTPS. To open a session on the selected server using the Secure Socket Layer (SSL), select this check box.

Use proxy server Whether the Trading Networks opens a session on the server through the default proxy server. To open a session on the selected server using your proxy server, select this check box. For information about defining default proxy servers, see “Defining Proxy Servers for the Console” on page 63.

webMethods Trading Networks User’s Guide Version 6.5 23

Page 24: Web Methods Trading Networks Users Guide 65

C H A P T E R 2 T r a d i n g N e t w o r k s C o n s o l e

Opening and Closing Sessions on ServersWhen you start Trading Networks, you are prompted to log on to the Integration Server that you want to work with. The Trading Networks Console maintains an open session on that server until you exit Trading Networks or switch to another server.

You can open a session on only one webMethods Integration Server at a time. Before you switch to another server, you must first close the session on the current server.

1 Save any work that you want to keep.

2 Select File Close Session.

1 Select File Open Session.

2 Complete the Opening Session to Integration Server dialog box. See step 2 on page 23 for instructions.

3 Click OK.

Important! While the Trading Networks Console has an open session on a Integration Server, you are using a licensed seat for that server. When you are not actively using Trading Networks, you might want to close the session on the server or close Trading Networks to free a seat on the server for others to use.

To close a session on the current server

To open a session on a different server

Note: If you already have a session opened on a Integration Server, Trading Networks automatically closes the session you have on that server. If you have unsaved work, you are prompted to save it.

24 webMethods Trading Networks User’s Guide Version 6.5

Page 25: Web Methods Trading Networks Users Guide 65

Familiarizing Yourself with the Trading Networks Console

Famil iar iz ing Yourself with the Trading Networks ConsoleThe Trading Networks Console screen contains several different parts:

Menu bar

Selector panel with selector panel buttons

Screen name

Toolbar

Display area

Trading Networks Console for the Trading Partners screen

Selector panel

Screen name

Toolbar

Display area

Display areashowing the

query results table(e.g,. Profiles table)

Display areashowing

query tabs

webMethods Trading Networks User’s Guide Version 6.5 25

Page 26: Web Methods Trading Networks Users Guide 65

C H A P T E R 2 T r a d i n g N e t w o r k s C o n s o l e

The Menu BarThe Trading Networks menu options are:

File: Use to open, close, and restore sessions on Integration Servers and to close the Trading Networks Console. Additionally, use it to export/import database information as a deployment tool to move data from development to production environment within the same Trading Networks release.

Edit: Use to set preferences.

Screen function: Use to perform action specific to the screen you are viewing. Trading Networks displays the appropriate menu option for the screen you are viewing; e.g., Enterprise menu item for the Enterprise profile screen, Transactions menu item for Transaction Analysis screen, etc. The menu option allows you to perform functions that correspond to toolbar functions for the screen.

Tools: Use to access the Profile Assistant, access the Developer, and access the registry settings so that you can define public queues and add profile groups.

View: Use to select the screen you want to display.

Help: Use to access help information for Trading Networks.

The Selector PanelUse the selector panel buttons to choose what type of information you want to view about your trading network (Enterprise) or a partner.

The following table lists the selector panel buttons, along with a description of each button. You change the screen view of the Trading Networks Console by selecting one of these selector panel buttons. To turn the selector panel buttons on/off, select View Buttons.

This Selector Panel icon...

Performs this function...

Enterprise

Add, edit, and view the profile information for your corporation, the host of the Trading Networks system. Enterprise is also referred to as the local partner, meaning the partner hosting the network. For more information about your company’s profile, see Chapter 8, “Your Profile (Your Enterprise)”.

In addition, you can access the Profile Fields screen from the Enterprise profile screen.

26 webMethods Trading Networks User’s Guide Version 6.5

Page 27: Web Methods Trading Networks Users Guide 65

Familiarizing Yourself with the Trading Networks Console

Trading Partners

Trading Partner: Displays information for a trading partner in your trading network. To select a different partner for which you want to view information, perform a query on the Profiles list. Note that this list also includes your Enterprise partner as well. For more information about your partner’s profile, see Chapter 9, “Partner Profiles”.

In addition, you can access the Profile Fields screen from the Trading Partners profile screen.

Document Types

Define and manage TN document types, specify attributes for Trading Networks to extract from the document, and specify options for pre-processing. In addition, you can access the Document Attribute screen from the Document Types screen.

If you are using an OEM version of the Trading Networks, you cannot create new TN document types in Trading Networks. Trading Networks will gray out this unavailable feature.

For more information about TN document types, see Chapter 12, “TN XML Document Types” and Chapter 13, “TN Flat File Document Types”.

Processing Rules

Define and manage processing rules, which Trading Networks uses to determine how to process the documents sent to your Trading Networks system.

For more information about processing rules, see Chapter 14, “Processing Rules”.

Agreements

Define and manage Trading Partner Agreement (TPA) parameters that will specify how to govern transactions between two trading partners. You can also view and query TPAs.

For more information about TPAs, see Chapter 10, “Trading Partner Agreements (TPAs)”.

This Selector Panel icon...

Performs this function...

webMethods Trading Networks User’s Guide Version 6.5 27

Page 28: Web Methods Trading Networks Users Guide 65

C H A P T E R 2 T r a d i n g N e t w o r k s C o n s o l e

Transaction Analysis

Track and manage documents in your system by querying the Trading Networks database for the documents in which you are interested.

Note: If you are using an OEM version of the Trading Networks, this Trading Networks feature is not available through the Trading Networks Console. To view documents, use Trading Networks Web Manager.

For more information about transaction analysis, see Chapter 18, “Managing and Tracking Documents”.

Tasks

View the status and detail of delivery and service execution tasks. You can also restart or delete tasks.

Note: If you are using an OEM version of the Trading Networks, this Trading Networks feature is not available through the Trading Networks Console. To view tasks, use Trading Networks Web Manager.

For more information about tasks, see Chapter 19, “Delivery Tasks” and Chapter 20, “Service Execution Tasks”.

Activity Log

Access the activity log that records the activity occurring within the Trading Networks system. This includes activity while managing your partners; while documents are being received, processed, and delivered; as well as administrative actions performed for your Trading Networks system.

For more information about the activity log, see Chapter 21, “The Activity Log”.

This Selector Panel icon...

Performs this function...

Note: If you are using an OEM version of Trading Networks, not all Trading Networks’ features are available. Trading Networks grays out these unavailable features.

28 webMethods Trading Networks User’s Guide Version 6.5

Page 29: Web Methods Trading Networks Users Guide 65

Familiarizing Yourself with the Trading Networks Console

Screen NameThe screen name shows the selector panel function you have selected (e.g., Trading Partners).

ToolbarThe buttons on the toolbar are function-specific for each of the Console screens. These toolbar buttons are a quick alternative method to access most of the basic menu functions for that screen.

Display AreaThe display area contains the corresponding Trading Networks Console screen based on the selector panel button or Trading Networks function you have selected. Appropriate window panes, pop-up windows, and tab groups, including the query functions, also appear in this area. See “Basic Operations” on page 31 for a description of these window elements.

The query functions may not initially appear on your Console screen, as shown below.

The Trading Partners screen with no query tabs displayed

Display areashowing only the

query results table(e.g,. Profiles table)

webMethods Trading Networks User’s Guide Version 6.5 29

Page 30: Web Methods Trading Networks Users Guide 65

C H A P T E R 2 T r a d i n g N e t w o r k s C o n s o l e

To view the query tabs on the Console screen as shown below, click Show Query on the toolbar.

Trading Partners screen displayed with query tabs

To return to the table view, click Hide Query on the toolbar.

For more information about the query functions, see Chapter 16, “Queries in Trading Networks”.

Refreshing the Contents of the ConsoleThe Console is not dynamically updated when other users who have open sessions on the same server add, delete, or update documents, profiles, etc. To refresh the contents of the

Console while you are working with Trading Networks, click Refresh on the menu

bar. To update and see the results of the query table, click Run Query on the toolbar.

Display areashowing

query tabs...

... and the queryresults table (e.g,

Profiles table) below

30 webMethods Trading Networks User’s Guide Version 6.5

Page 31: Web Methods Trading Networks Users Guide 65

Basic Operations

Basic Operat ionsThis section describes basic operations you can perform with the Trading Networks Console.

Mult iple Panes and TabsOn some screens, the Trading Networks Console display area is divided into multiple

panes. Click on the split pane controls or symbols to expand the panes.

Multiple pane window displaying a single pane

Single (upper) pane

Click the split panecontrols to expand

the bottom pane

webMethods Trading Networks User’s Guide Version 6.5 31

Page 32: Web Methods Trading Networks Users Guide 65

C H A P T E R 2 T r a d i n g N e t w o r k s C o n s o l e

Multiple pane window displaying both panes

Sometimes, editing controls within a pane are grouped onto tabs. To display the contents of a tab, click the tab’s name.

Resizing PanesYou can resize panes in the Trading Networks screen by dragging borders with your

mouse. Movable borders are typically marked with the split pane controls or symbols.

Upper pane

Lower pane

32 webMethods Trading Networks User’s Guide Version 6.5

Page 33: Web Methods Trading Networks Users Guide 65

Basic Operations

Resizing a Pane

You can also click the symbols to expand a pane to the full height or width of the lower pane.

Working with TablesIn general for most tables (e.g., Profiles table on the Trading Partners screen), use the following buttons to supply information to Trading Networks:

You can reorganize the information displayed in a table in the following ways:

Reposition table columns: Use click-and-drag. Click on the column you want to move, drag it to the appropriate location, and then release the mouse when the column is correctly placed.

Drag this border(where the split pane

controls are located)...

...to resize thelower pane

Use this button To...

Add a row entry

or Edit a row entry

Delete a row entry

webMethods Trading Networks User’s Guide Version 6.5 33

Page 34: Web Methods Trading Networks Users Guide 65

C H A P T E R 2 T r a d i n g N e t w o r k s C o n s o l e

Adjust column width: Place the cursor over the edge of a column and then drag the border until the column is the desired width.

Sort the information in a column: Click the column header for forward ( ) and reverse ( ) alpha-numeric order.

For more information about query result tables, see “About Viewing and Querying Documents” on page 428.

Right-cl ick menusMost Trading Networks screens have a right-click menu that contains the basic menu functions for that screen. The actions you can perform from this menu mimic the functions you can perform using the toolbar.

Select ing Trading Networks ObjectsMany of the screens and query panels on the Trading Networks Console use the same buttons for selecting various Trading Networks objects (e.g., partner profiles and

document types). For example, the Select... button appears on the Trading Partners, Agreements, Processing Rules, and Transaction Analysis screens so you can select the partner profile.

Select ing a Partner

If you need to select a partner profile, you can use Select... ; for example, when you

create processing rule criteria, you can select a Sender or Receiver by clicking Select... .

1 Click Select... . Trading Networks displays the Partner Selection Dialog.

2 Select the profile from the list of partners in the Partner Selection Dialog table. You can select Unknown if you want to select a profile for which the partner is not known.

To select multiple profiles from the partners list, use the following keys:

To select a profile for Sender, Receiver, or Partner

Hold this key... To select...

<Shift> A contiguous block of profiles

<Ctrl> More than one non-contiguous profiles

34 webMethods Trading Networks User’s Guide Version 6.5

Page 35: Web Methods Trading Networks Users Guide 65

Selecting Trading Networks Objects

3 Click OK to select the partner profile(s).

4 If you wish to search for a specific profile, click the Show Query button on the toolbar. Trading Networks expands the Partner Selection dialog to show the Basic Criteria, Custom Criteria, and Detail View tabs.

Use these tabs to specify more detailed search criteria to select a partner profile.

For more information about searching for partner profiles, see “About Querying and Viewing Profiles” on page 166.

5 To run the query, click the Run Query toolbar button.

6 To change the format of the query results in the Profiles table, click the Detail View tab. Fill in the following fields to specify how Trading Networks displays information in the Detail view.

a In the Standard Fields section, check each field that you want Trading Networks to include in the Detail view. Trading Networks displays a column for each checked field. Trading Networks always displays the Corporation Name column for each partner profile.

b In the Extended Fields section, select the extended fields that you want Trading Networks to include in the Detail view. Trading Networks displays a column for each field in the Selected Extended Fields list.

To move items to the Selected Extended Fields list:

To use this tab... Use this procedure... For more information, see...

Basic Criteria Step 4a on page 169 “Basic Search Criteria for Profiles” on page 167

Custom Criteria Step 4b on page 170 “Custom Search Criteria for Profiles” on page 167

Select this... To do this...

To move all extended fields to the Selected Extended Fields list

To move some but not all extended fields to the Selected Extended Fields list, select one or more fields in the Available Extended Fields

list and then click .

webMethods Trading Networks User’s Guide Version 6.5 35

Page 36: Web Methods Trading Networks Users Guide 65

C H A P T E R 2 T r a d i n g N e t w o r k s C o n s o l e

If you decide you do not want Trading Networks to display information for the fields in the Selected Extended Fields list, move the items back to the Available Extended Fields list:

.

For more information about:

Searching for partner profiles, see “About Querying and Viewing Profiles” on page 166

Running queries in Trading Networks, see Chapter 16, “Queries in Trading Networks”

The Detail View tab of the Trading Partners screen, see “Detail View of Profiles” on page 168.

Changing the display table format, see “Working with Tables” on page 33.

Select ing TN Document Types

If you need to select a TN document type, use Select Document Type , which accesses the Document Type Selection Dialog. For example, when you create processing rule criteria, you

can select a Document Type by clicking Select Document Type .

2 To view disabled TN document types, select Types Show All. Trading Networks places a check ( ) next to the Show All menu item to indicate that Trading Networks is currently displaying disabled TN document types.

3 Select the row containing information about the TN XML document type or TN flat file document type that you want.

Select this... To do this...

To remove some but not all extended fields from the Selected Extended Fields list, select the extended fields you do not want

displayed from the Selected Extended Fields list and then click .

To remove all extended fields from the Selected Extended Fields list.

To select a TN document type

1 Click Select Document Type . Trading Networks displays the Document Type Selection Dialog, which lists all of the TN document types (both the TN XML document types and TN flat file document types).

36 webMethods Trading Networks User’s Guide Version 6.5

Page 37: Web Methods Trading Networks Users Guide 65

Coordinating Your Work

To select multiple TN document types from the list by, use the following keys:

Trading Networks displays the Document Type Details dialog for the selected TN document type.

4 Click OK.

For more information about TN document types, see Chapter 12, “TN XML Document Types” and Chapter 13, “TN Flat File Document Types”.

Coordinat ing Your WorkIf you will have more than one Trading Networks administrator, the administrators should coordinate their work. If more than one Trading Networks administrator accesses the Trading Networks Console and edits the same item (e.g., document type, profile, profile field, etc.) simultaneously, the administrators might inadvertently overwrite one another’s work.

Closing the Trading Networks ConsoleTo close the Trading Networks Console, follow the single-step procedure below.

1 Select File Exit.

Hold this key... To select...

<Shift> A contiguous block of TN document types

<Ctrl> More than one non-contiguous TN document types

To close the Trading Networks Console

webMethods Trading Networks User’s Guide Version 6.5 37

Page 38: Web Methods Trading Networks Users Guide 65

C H A P T E R 2 T r a d i n g N e t w o r k s C o n s o l e

38 webMethods Trading Networks User’s Guide Version 6.5

Page 39: Web Methods Trading Networks Users Guide 65

C H A P T E R 3

Trading Networks Web Manager

Web Manager is another user interface to webMethods Trading Networks (Trading Networks). Web Manager is also known as Partner Connect Express.

Web Manager (Partner Connect Express) is a web interface to webMethods Trading Networks. Web Manager provides a limited set of the functionality that is available through the Trading Networks Console. For example, Web Manager users can view profiles, search for documents, and check the status of documents. In addition, you add functionality to Web Manager to allow users to exchange business documents and participate in the trading network through the web. For more information about Web Manager, see the webMethods Trading Networks Web Manager Administrator’s Guide. It is located in the following location:

webMethods6\IntegrationServer\packages\WmTNWeb\pub\doc\wMTN_WebMgrGuide.pdf

webMethods Trading Networks User’s Guide Version 6.5 39

Page 40: Web Methods Trading Networks Users Guide 65

C H A P T E R 3 T r a d i n g N e t w o r k s W e b M a n a g e r

40 webMethods Trading Networks User’s Guide Version 6.5

Page 41: Web Methods Trading Networks Users Guide 65

C H A P T E R 4

Configuring webMethods Trading Networks

Trading Networks Configuration Properties . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 42

Configuring the Database Settings . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 43

Configuring Trading Networks for a Clustered Environment . . . . . . . . . . . . . . . . . . . . . . . . . 48

Configuring Profile Settings . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 50

Configuring E-mail Settings for Document Delivery . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 51

Configuring Tasks Settings . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 52

Configuring Registry Settings . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 55

Configuring Trading Networks for Large Document Handling . . . . . . . . . . . . . . . . . . . . . . . . 56

Other Configuration Settings . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 61

Customizing the Trading Networks Console . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 61

webMethods Trading Networks User’s Guide Version 6.5 41

Page 42: Web Methods Trading Networks Users Guide 65

C H A P T E R 4 C o n f i g u r i n g w e b M e t h o d s Tr a d i n g N e t w o r k s

Trading Networks Conf igurat ion Propert iesYou perform most Trading Networks configuration tasks by updating the Trading Networks properties, which appear in:

webMethods6\IntegrationServer\packages\WmTN\config\properties.cnf

You can update the configuration properties using the TN Properties page of the Server Administrator. The procedures in this chapter describe how to access the TN Properties page.

To see a list of the Trading Networks configuration properties and a description of each, view the online help files that you access from the TN Properties page.

1 Open the Server Administrator if it is not already open.

2 In the Solutions menu of the navigation panel, click Trading Networks. The Server Administrator opens a new browser window to display Trading Networks-specific pages.

3 In the Settings menu of the navigation panel, click TN Properties.

4 In the upper right corner of the TN Properties page, click Help.

Important! When you use the TN Properties page and save your updated properties, Trading Networks updates all properties with the values from the TN Properties page, including those that you might not have altered.

This is important if you are using Trading Networks in a clustered environment and have the tn.cluster.notifyPropertyChange property set to true. Using the TN Properties page to update properties when you are in a clustered environment will cause Trading Networks to synchronize all properties each time you use the TN Properties page. If you want the servers in the cluster to maintain different values for some of the properties, set the tn.cluster.notifyPropertyChange property to false, and maintain the properties for each server individually.

To view online help for the Trading Networks configuration properties

42 webMethods Trading Networks User’s Guide Version 6.5

Page 43: Web Methods Trading Networks Users Guide 65

Configuring the Database Settings

Configur ing the Database Sett ingsWhen you installed Trading Networks, you specified the following database connection parameters:

The JDBC driver—The name of the JDBC driver for database.

The location of the database—A URL to specify the location of the database.

A user name and password—If the database requires a user name and password to connect to it, you identified the user name and password that Trading Networks must supply.

Database properties—If you want Trading Networks to supply any additional database properties when connecting to the database, you identified the database properties.

If you want to change these parameters (for example, to adjust the minimum and maximum connections), see the webMethods Logging Guide for general instructions.

Important! If you change the database after using Trading Networks, Trading Networks does not copy the data in the current database to the new database. However, you can use the Trading Networks export and import facility to export data from your existing database. Then, after you change the database, you can import the exported information into the new database. For more information, see Appendix A, “Exporting and Importing Database Information”.

webMethods Trading Networks User’s Guide Version 6.5 43

Page 44: Web Methods Trading Networks Users Guide 65

C H A P T E R 4 C o n f i g u r i n g w e b M e t h o d s Tr a d i n g N e t w o r k s

Trading Networks in a High Availabil i ty EnvironmentTo meet your high availability requirements, you might need to use multiple instances of Trading Networks. When you use multiple instances of Trading Networks, you must decide whether to share a single Trading Networks database among the Trading Networks instances. The following lists possible scenarios:

If you cluster your Integration Servers, you should share a single Trading Networks database among the Trading Networks instances.

If you do not cluster your Integration Servers (e.g., when one of your adapters does not work in a clustered environment), you can still share a single Trading Networks database among the Trading Networks instances.

You can also use multiple Trading Networks instances that each use their own database.

Shared Database in a Clustered EnvironmentFor this option, Trading Networks is running on two or more Integration Servers that are in a clustered environment, and you configure all Trading Networks systems to use the same database.

Shared Database in a Clustered Environment

Setting up the servers

Set the tn.cluster.sync.remoteAliases server property for each instance of Trading Networks. For more information about this property, see “Cluster Properties” in the Trading Networks properties online help. For instructions about how to access the online help, see “Trading Networks Configuration Properties” on page 42.

Be sure that all Integration Server system properties are identical for all servers in the clusters. The Integration Server system properties are in the webMethods6\IntegrationServer\config\server.cnf file

Be sure that the application code you need Trading Networks to execute (e.g., delivery services, services invoked from processing rules, etc.) is available on all servers in the cluster.

See “Configuring Trading Networks for a Clustered Environment” on page 48 for more information about running Trading Networks in a cluster.

See the webMethods Integration Server Clustering Guide for more information about running servers in a cluster.

44 webMethods Trading Networks User’s Guide Version 6.5

Page 45: Web Methods Trading Networks Users Guide 65

Configuring the Database Settings

Shared Database in a Non-Clustered EnvironmentFor this option, you configure two or more instances of Trading Networks to use the same database. The instances of Trading Networks are not running on servers in a clustered environment.

Behavior of Trading Networks

Changes you make to Trading Networks objects (e.g., profiles, attributes, TN document types, processing rules, etc.), are automatically shared by all servers that share the database.

Changes you make to Trading Networks server properties using the TN Properties page or by invoking the wm.tn.admin:setProperties service are automatically replicated to all servers in the cluster. For more information about the wm.tn.admin:setProperties service, see the webMethods Trading Networks Built-in Services Reference.

Note: If you change the server properties by directly editing the webMethods6\IntegrationServer\packages\WmTN\config\properties.cnf file, you must manually make your changes to the properties.cnf file for each server.

All configuration data and run-time data (e.g., documents received from partners, activity log, etc.) is shared among all instances of Trading Networks in the cluster.

Shared Database in a Non-Clustered Environment

Setting up the servers

Set the tn.cluster.sync.remoteAliases server property for each instance of Trading Networks that will be sharing the database. This is required even though the servers are not clustered. For more information about this property, see “Cluster Properties” in the Trading Networks properties online help. For instructions about how to access the online help, see “Trading Networks Configuration Properties” on page 42.

Define remote aliases for each server sharing the database. You set remote aliases using the Server Administrator. This is required even though the servers are not clustered.

Be sure that all Integration Server system properties are identical for all servers. The Integration Server system properties are in the webMethods6\IntegrationServer\config\server.cnf file.

Be sure that the application code you need Trading Networks to execute (e.g., delivery services, services invoked from processing rules, etc.) is available on all servers.

Shared Database in a Clustered Environment

webMethods Trading Networks User’s Guide Version 6.5 45

Page 46: Web Methods Trading Networks Users Guide 65

C H A P T E R 4 C o n f i g u r i n g w e b M e t h o d s Tr a d i n g N e t w o r k s

If you want each instance of Trading Networks to have the same Web Manager configuration, be sure to configure Web Manager the same for each instance of Trading Networks.

You can use a load balancer to “cluster” Trading Networks only if your application code is stateless and you are not using stateful processes (e.g., long-running conversations).

To use the Console query paging feature (e.g., Next Page, Prev Page, First Page, Last Page), when you start the Console, be sure to connect it to one of the Trading Networks instances. That is, specify the host name and port name of one of the Trading Networks instances that share the database, and do not specify the virtual IP address defined by the load balancer.

This is important because Trading Networks stores the results of the database queries in the repository. If you connect the Console to the load balancer, the load balancer might redirect query paging results to a different server than the one that originally executed the query. This server will not have the query results that the Console is attempting to retrieve.

Behavior of Trading Networks

Changes you make to Trading Networks objects (e.g., profiles, attributes, TN document types, processing rules, etc.), are automatically shared by all servers that share the database.

Changes you make to Trading Networks server properties using the TN Properties page or by invoking the wm.tn.admin:setProperties service are automatically replicated to all servers that share the database. For more information about the wm.tn.admin:setProperties service, see the webMethods Trading Networks Built-in Services Reference.

Note: If you change the server properties by directly editing the webMethods6\IntegrationServer\packages\WmTN\config\properties.cnf file, you must manually make your changes to the properties.cnf file for each server.

All run-time data (e.g., documents received from partners, activity log, etc.) is shared among all instances of Trading Networks that share the database.

Shared Database in a Non-Clustered Environment

46 webMethods Trading Networks User’s Guide Version 6.5

Page 47: Web Methods Trading Networks Users Guide 65

Configuring the Database Settings

Separate Database for Each Instance of Trading NetworksFor this option, you have multiple instance of Trading Networks running, but you configure each to use its own database. Each instance of Trading Networks is unaware of other the other instances of Trading Networks.

Separate Database for Each Instance of Trading Networks

Setting up the servers

If you want each instance of Trading Networks to have identical versions of Trading Networks objects (e.g., profiles, attributes, TN document types, processing rules, etc.), you must use the Trading Networks’ import/export feature to copy the data from one server to the other. For more information, see Appendix A, “Exporting and Importing Database Information”.

If you want all servers to have identical configurations, you must ensure that:

All Integration Server system properties are identical for all servers. The Integration Server system properties are in the webMethods6\IntegrationServer\config\server.cnf file.

All Trading Networks server properties are identical for all servers. The Trading Networks server properties are in the webMethods6\IntegrationServer\packages\WmTN\config\properties.cnf file. You can view and set these properties from the TN Properties page of the Server Administrator.

If you want all instances of Trading Networks to be able to handle all incoming documents, be sure that the application code you need Trading Networks to execute (e.g., delivery services, services invoked from processing rules, etc.) is available on all servers.

You cannot cluster the Integration Servers because the Trading Networks database is not shared.

Behavior of Trading Networks

Changes you make to Trading Networks objects (e.g., profiles, attributes, TN document types, processing rules, etc.), are not shared by all servers. You need to make the changes to each instance of Trading Networks if you want to keep them in sync.

Changes you make to Trading Networks server properties are not replicated to all servers. You need to make the changes to each instance of Trading Networks if you want to keep them in sync.

webMethods Trading Networks User’s Guide Version 6.5 47

Page 48: Web Methods Trading Networks Users Guide 65

C H A P T E R 4 C o n f i g u r i n g w e b M e t h o d s Tr a d i n g N e t w o r k s

Configur ing Trading Networks for a Clustered EnvironmentIf Trading Networks is running on an Integration Server in a cluster of servers, you can configure Trading Networks so that the data cached in memory, user accounts, and Trading Networks properties are synchronized on all servers in the cluster. These synchronizations are controlled by the tn.cluster.notifyCacheChange, tn.cluster.notifyProfileAddUser, and tn.cluster.notifyPropertyChange properties in the properties.cnf file. For information on these properties, see “Cluster Properties” in the Trading Networks properties online help. For instructions about how to access the online help, see “Trading Networks Configuration Properties” on page 42.

1 On each Integration Server in the cluster, create a remote server alias for the other servers in the cluster. For example, if you have two servers (Server1 and Server2) in the cluster, you would create a remote server alias for Server2 on Server1, and a remote server alias for Server1 on Server2. For information on how to create a remote server alias, see webMethods Integration Server Administrator’s Guide.

2 To update the Trading Networks properties.cnf file for each Integration Server in the cluster, perform the following:

a Open the Server Administrator if it is not already open.

b In the Solutions menu of the navigation panel, click Trading Networks. The Server Administrator opens a new browser window to display Trading Networks-specific pages.

c In the Settings menu of the navigation panel, click TN Properties.

An instance of Trading Networks does not share its run-time data (e.g., documents received from partners, activity log, etc.) with the other instances of Trading Networks.

You cannot relate documents sent to and processed by one server to documents sent by and processed by another server. For example, an Acknowledgement document that is sent to server A cannot be related to the Confirmation document if the Confirmation document is sent to server B.

Separate Database for Each Instance of Trading Networks

T

To configure Trading Networks for a clustered environment

Important! If you have already created a remote server alias so the server is part of an Integration Server cluster (without Trading Networks), you need to create an additional remote server alias for the server specifically for the Trading Networks cluster.

48 webMethods Trading Networks User’s Guide Version 6.5

Page 49: Web Methods Trading Networks Users Guide 65

Configuring Trading Networks for a Clustered Environment

d Click Edit TN Properties Settings.

e Add or update the following property:

f Ensure the following properties are set to true:

For a description of the properties used in this procedure, see “Cluster Properties” in the Trading Networks properties online help. To view the online help, click the Help link on the TN Properties page.

After completing the above procedure, the data cached in memory, user accounts, and Trading Networks properties are automatically synchronized on all Integration Servers in the cluster. To turn one of these synchronizations off for a server, modify the respective property in the Trading Networks properties.cnf file. For example, if you wanted to manually control user account creation, you would disable automatic user account creation by turning off the tn.cluster.notifyProfileAddUser property.

For this property... Specify...

tn.cluster.sync.remoteAliases The remote server aliases you created in step 1.

Set this property to true... To notify all servers in the cluster about...

tn.cluster.notifyCacheChange A change to data cached in memory

tn.cluster.notifyProfileAddUser New user accounts

tn.cluster.notifyPropertyChange A change to Trading Networks properties

Important! When you use the TN Properties page and save your updated properties, Trading Networks updates all properties with the values from the TN Properties page, including those that you might not have altered.

This is important if you are using Trading Networks in a clustered environment and have the tn.cluster.notifyPropertyChange property set to true. Using the TN Properties page to update properties when you are in a clustered environment will cause Trading Networks to synchronize all properties each time you use the TN Properties page. If you want the servers in the cluster to maintain different values for some of the properties, set the tn.cluster.notifyPropertyChange property to false, and maintain the properties for each server individually.

webMethods Trading Networks User’s Guide Version 6.5 49

Page 50: Web Methods Trading Networks Users Guide 65

C H A P T E R 4 C o n f i g u r i n g w e b M e t h o d s Tr a d i n g N e t w o r k s

Configur ing Prof i le Sett ingsWhen you add a profile for a partner, Trading Networks creates a webMethods user account for the partner. Trading Networks uses the value of one of the external IDs (e.g., D-U-N-S number) that you specify in the profile for the user name. The external ID Trading Networks uses is the value of the required external ID type. You configure the required external ID type that Trading Networks uses for the user account. When you add a profile, Trading Networks will not allow you to make the profile active if you have not supplied a value for the required external ID type.

To configure profile settings, perform the following procedure:

1 Open the Server Administrator if it is not already open.

2 In the Solutions menu of the navigation panel, click Trading Networks. The Server Administrator opens a new browser window to display Trading Networks-specific pages.

3 In the Settings menu of the navigation panel, click TN Properties.

4 Click Edit TN Properties Settings.

5 Add or update the following property to define the profile setting:

6 Click Save Changes.

To configure profile settings

For this property... Specify...

tn.required.idType The external ID type (e.g., DUNS) that Trading Networks uses for the user name of a webMethods account that it creates for the partner. By default, Trading Networks requires and uses a D-U-N-S number (DUNS external ID type).

50 webMethods Trading Networks User’s Guide Version 6.5

Page 51: Web Methods Trading Networks Users Guide 65

Configuring E-mail Settings for Document Delivery

Configur ing E-mail Sett ings for Document Del iveryYou can configure settings Trading Networks uses when delivering documents via an e-mail message, specifically, the “from” e-mail address and subject line that you want Trading Networks to use in the e-mail messages.

3 In the Settings menu of the navigation panel, click TN Properties.

4 Click Edit TN Properties Settings.

5 Add or update the following properties to configure how Trading Networks performs document delivery:

6 Click Save Changes.

To

To configure e-mail settings for document delivery

1 Open the Server Administrator if it is not already open.

2 In the Solutions menu of the navigation panel, click Trading Networks. The Server Administrator opens a new browser window to display Trading Networks-specific pages.

For this property… Specify…

tn.mail.from The e-mail address you want Trading Networks to use as the “from” e-mail address in the e-mail messages that it sends to deliver a document when instructed to use an e-mail delivery method (Primary E-mail or Secondary E-mail).

Example: If you want the e-mail messages to use the “from” e-mail address [email protected], specify the following: [email protected]

tn.mail.subject The subject line you want Trading Networks to use in the e-mail messages that it sends to deliver a document when instructed to use an e-mail delivery method (Primary E-mail or Secondary E-mail).

Example: If you want the e-mail messages to use the subject line “Document from IFC”, specify the following:tn.mail.subject=Document from IFC

webMethods Trading Networks User’s Guide Version 6.5 51

Page 52: Web Methods Trading Networks Users Guide 65

C H A P T E R 4 C o n f i g u r i n g w e b M e t h o d s Tr a d i n g N e t w o r k s

Configur ing Tasks Sett ingsTrading Networks establishes tasks when it is to deliver a document using reliable delivery or when it is to asynchronously execute a service using reliable execution. You can configure settings that Trading Networks uses when processing these tasks. For more information about these tasks, see “Using Reliable Delivery with Immediate Delivery Method” on page 343 and “Service Execution Tasks and Reliable Execution” on page 333.

1 Open the Server Administrator if it is not already open.

2 In the Solutions menu of the navigation panel, click Trading Networks. The Server Administrator opens a new browser window to display Trading Networks-specific pages.

3 In the Settings menu of the navigation panel, click TN Properties.

4 Click Edit TN Properties Settings.

5 Add or update the following property to configure settings that affect both delivery and service execution tasks:

Note: If you want to be notified when tasks fail, you need to create an Integration Server trigger that subscribes to the wm.tn.rec:TaskFailure IS document type. For more information, see the Publish-Subscribe Developer’s Guide.

To configure tasks settings

For this property... Specify...

tn.task.sweepTime The number of seconds the reliable task manager thread remains idle before checking for tasks it needs to perform (for example, a task to deliver a document or execute a service). The task manager thread becomes idle when all tasks are completed, failed, or in the wait period between attempts.

The task manager thread waits the number of seconds you specify with this property before waking up to check for tasks it needs to process. The tasks that the task manager attempts to process when it wakes up are those tasks that failed on their last attempt and have not yet reached their retry limit

Note: The task manager wakes up immediately if a new task arrives.

52 webMethods Trading Networks User’s Guide Version 6.5

Page 53: Web Methods Trading Networks Users Guide 65

Configuring Tasks Settings

The value you specify for tn.task.sweepTime can affect how long Trading Networks waits between attempts to retry a task. Typically, the wait between retries value is governed by one of the following:

However, Trading Networks could wait as long as the tn.task.sweepTime value. If the task manager thread is idle when the wait between retries value expires, the task manager thread will not wake up to process the task until the tn.task.sweepTime value expires.

6 Add or update the following properties to configure settings that affect only service execution tasks. These settings configure how many times Trading Networks attempts to execute services that use reliable execution and how long Trading Networks waits between attempts to re-execute a service that failed.

Type of task Wait between retries is governed by…

Delivery The Wait between retries value on the Delivery Method tab of the receiving partner’s profile.

Service execution The tn.task.ttw property value.

For this property... Specify...

tn.task.maxRetries The number of times you want Trading Networks to attempt to re-execute a service. Specify a whole number.

tn.task.ttw The number of milliseconds you want Trading Networks to wait before making its first attempt to re-execute a service when the first attempt failed. (Trading Networks uses the tn.task.retryFactor value along with the tn.task.ttw value to calculate how long to wait for subsequent retry attempts.)

tn.task.retryFactor The factor you want Trading Networks to use when determining how long to wait before making the second and subsequent attempts to re-execute the service. Trading Networks calculates the time to wait by multiplying the last wait time by the tn.task.retryFactor value. Specify a whole number greater than zero for tn.task.retryFactor.

Example: The following shows sample values for the these properties and how they affect the wait times between attempts to re-execute a failed service.

webMethods Trading Networks User’s Guide Version 6.5 53

Page 54: Web Methods Trading Networks Users Guide 65

C H A P T E R 4 C o n f i g u r i n g w e b M e t h o d s Tr a d i n g N e t w o r k s

7 Click Save Changes.

Enabling Task Failure Notif icat ionIf you want to be notified when a task fails, make sure the tn.task.notifyFailure property is set to “true”. When this property is true, Trading Networks publishes an IS document with the format defined by the wm.tn.rec:TaskFailure IS document type.

You can create an Integration Server trigger that subscribes to IS documents of this IS document type. For information on creating an Integration Server trigger, see Publish-Subscribe Developer’s Guide. For an example of a trigger, see the WmTNSamples package.

1 Open the Server Administrator if it is not already open.

2 In the Solutions menu of the navigation panel, click Trading Networks. The Server Administrator opens a new browser window to display Trading Networks-specific pages.

3 In the Settings menu of the navigation panel, click TN Properties.

4 Click Edit TN Properties Settings.

tn.task.maxRetries = 3

tn.task.ttw = 10000ms

tn.task.retryFactor = 3

Retry 1 Retry 2 Retry 3

Wait until next attempt 10000 ms 30000 ms 90000 ms

For this property... Specify...

To

To configure Trading Networks to publish an IS document when a task fails

54 webMethods Trading Networks User’s Guide Version 6.5

Page 55: Web Methods Trading Networks Users Guide 65

Configuring Registry Settings

5 Add or update the following property to enable Trading Networks to publish an IS document in the event that a task fails:

6 Click Save Changes.

Configur ing Registry Sett ingsTrading Networks maintains/contains a registry for setting public queues and creating new profile groups. To define these registry settings, use the Tools menu of the Console.

For this property... Specify...

tn.task.notifyFailure Either true or false.

true if you want Trading Networks to publish an IS document

false if you do not want Trading Networks to publish an IS document

Perform this... For the following....

Tools Registry Public Queue To define and register a public queue. For instructions for this procedure, see “Defining Public Queues” on page 380.

Tools Registry Profile Groups To create and register a profile group in Trading Networks. A profile group is a logical user-defined group that you associate a profile with. For example, you can create a group profile named “Buyers” to associate all of your partner profiles who are buyers in your trading network.

Once you create a profile group, you can associate a partner profile (including your Enterprise profile) with any profile group and to more than one group.

To associate profiles to a profile group, use the Profile Group Membership field on the Corporate tab of the Profile screen. For more information, see the “Information on Your Corporate Tab” on page 106 and “Information on the Partner’s Corporate Tab” on page 132.

webMethods Trading Networks User’s Guide Version 6.5 55

Page 56: Web Methods Trading Networks Users Guide 65

C H A P T E R 4 C o n f i g u r i n g w e b M e t h o d s Tr a d i n g N e t w o r k s

Configur ing Trading Networks for Large Document HandlingAs installed, Trading Networks acts on all documents in the same manner regardless of their size. You can configure Trading Networks to handle large documents differently. You also configure the document size that Trading Networks should treat as large. For more information about the areas in Trading Networks that are affected by large document handling, see Appendix C, “Large Document Handling”.

Minimum Hardware Requirements for Large Document HandlingThe following lists the required minimum requirements and the recommended hardware requirements for using the Large Document Handling facility of Trading Networks.

To learn more about large document handling, see the section about large document handling in Chapter 5, "Trading Networks Document Processing" in the webMethods Trading Networks Concepts Guide.

Required Recommended

Hard Disk Space RAM # of CPUs Hard Disk Space RAM # of CPUs

100 MB† 512 MB 1CPU 256 MB† 1 GB 2CPU

†Note that this is only the space required for normal processing. See the Important! note below for more information about additional hard disk drive space required for large document handling.

Important! The hard disk drive space listed above identifies only the amount of hard disk drive space that Trading Networks requires for normal processing. It does not account for the hard disk drive space that is necessary for temporarily saving the large documents during processing. To use large document handling, you need to define hard disk drive space where Trading Networks can temporarily save documents (rather than store them in memory).

The size of the hard disk drive space for temporarily saving documents will vary based on the number of documents that you process concurrently and the size of the documents that you process. For example, if your typical concurrent document load is 10, you would need a hard disk drive space that is 10 to 15 times the combined size of the documents being processed concurrently.

56 webMethods Trading Networks User’s Guide Version 6.5

Page 57: Web Methods Trading Networks Users Guide 65

Configuring Trading Networks for Large Document Handling

Steps for Configuring Large Document HandlingTo use large document handling, you need to set configuration properties in the Trading Networks properties file and perform configuration tasks on the Integration Server.

Setting Properties in the Trading Networks Properties FileTo configure Trading Networks to use large document handling, perform the following procedure.

1 Open the Server Administrator if it is not already open.

2 In the Solutions menu of the navigation panel, click Trading Networks. The Server Administrator opens a new browser window to display Trading Networks-specific pages.

3 In the Settings menu of the navigation panel, click TN Properties.

4 Click Edit TN Properties Settings and add or update the following properties to define the profile setting:

T

To configure Trading Networks for large document handling

For this property... Specify...

tn.BigDocThreshold How many bytes a document must contain for Trading Networks to consider the document to be large. Specify one of the following:

-n: Specify a negative number to have Trading Networks consider no documents as large. Trading Networks processes all documents in the traditional manner, reading the document content into memory during processing. The default is -1.

0: Specify zero to have Trading Networks consider all documents as large. Because all documents that Trading Networks receives contains more than 0 bytes, Trading Networks uses large document handling for all documents.

n: Specify a positive whole number to indicate the number of bytes over which Trading Networks considers a document large. For example, if you specify the following, Trading Networks considers all documents greater than 1,000,000 bytes as large:

tn.BigDocThreshold=1000000

webMethods Trading Networks User’s Guide Version 6.5 57

Page 58: Web Methods Trading Networks Users Guide 65

C H A P T E R 4 C o n f i g u r i n g w e b M e t h o d s Tr a d i n g N e t w o r k s

5 Click Save Changes.

Configuring the Integration ServerIn addition to setting configuration properties for Trading Networks, you also need to configure settings for the webMethods Integration Server. To configure the Integration Server, update the following properties in the Integration Server configuration file:

webMethods6\IntegrationServer\config\server.cnf

Before you edit the configuration file, shut down the Integration Server. After you make the changes, restart the server.

tn.xml.xqlThreshold The number of bytes that Trading Networks reads into memory to perform the XQL queries in a TN XML document type. In your TN XML document types, if you have XQL queries that point to nodes beyond the number of bytes that Trading Networks reads, the queries will fail. For more information, see “Defining TN XML Document Types” on page 232.

Specify a positive whole number. For example, if the XQL queries that you specify reference nodes in the first 50,000 bytes of the document, specify the following:

tn.xml.xqlThreshold=50000

If you do not specify a value for tn.xml.xqlThreshold, Trading Networks uses the number of bytes that you specify for tn.BigDocThreshold. If you do not specify a value for tn.BigDocThreshold, or if the value that you specify is negative, Trading Networks defaults to 1,000 bytes. Trading Networks needs to read at least 1,000 bytes to perform document recognition.

For this property... Specify...

58 webMethods Trading Networks User’s Guide Version 6.5

Page 59: Web Methods Trading Networks Users Guide 65

Configuring Trading Networks for Large Document Handling

For this property... Specify...

watt.server.tspace.location

The absolute directory path of the hard disk drive space where Trading Networks is to temporarily store large documents rather than keep them in memory. Each file that the Integration Server stores in this directory is given the name DocResxxxxx.dat, where xxxxx is a value that can vary in length and character. The directory you specify is on the same machine as the Integration Server. For example:

For Windows:watt.server.tspace.location=D:\\LargeDocTemp

When specifying the directory path, be sure to use a double backslash (\\) in place of a single backslash in the directory path because Trading Networks reads the property as a Java String.

For UNIX:watt.server.tspace.location=D:/opt/webmethods/tspace

If you do not specify a value for watt.server.tspace.location, Trading Networks uses the value defined by the Java system property java.io.tmpDir, which defaults to the value of the environment variable Temp on most platforms.

Note: If you are setting up large document handling for multiple webMethods components (e.g., Trading Networks, webMethods EDI Module, and webMethods RosettaNet Module), use this property to define a single hard disk drive location. All components use the same location and the Integration Server manages allotting space to each component.

watt.server.tspace.max The maximum number of bytes that can be stored at any one time in the hard disk drive space that you defined using the watt.server.tspace.location property. If Trading Networks (or another webMethods component) attempts to write a large document to the hard disk drive space that will cause the number of bytes you specify to be exceeded, an error message is displayed on the server console and the document is not stored. Specify any positive whole number of bytes. The default is 52,428,800 bytes (50 MB). For example:

watt.server.tspace.max=30000000

webMethods Trading Networks User’s Guide Version 6.5 59

Page 60: Web Methods Trading Networks Users Guide 65

C H A P T E R 4 C o n f i g u r i n g w e b M e t h o d s Tr a d i n g N e t w o r k s

Important! The size of the hard disk drive space for temporarily saving documents will vary based on the number of documents that you process concurrently and the size of the documents that you process. For example, if your typical concurrent document load is 10, you would need a hard disk drive space that is 10 to 15 times the combined size of the documents being processed concurrently.

Note: If you are setting up large document handling for multiple webMethods components, all components use this property. The Integration Server ensures that the hard disk drive space use for all components does not exceed the value you specify.

watt.server.keepAliveTimeout

The maximum number of milliseconds that you want the Integration Server to wait for a response after making a request to read from a network InputStream.

When you submit a document using a Java InputStream over a network to the Integration Server, the Integration Server makes a request to read from the InputStream. The Integration Server waits the amount of time you specify with the watt.server.keepAliveTime property for a response. If the Integration Server does not receive a response in the specified amount of time, it times out with the error “Connection reset by peer”.

Specify a whole number greater than zero. It is recommended that you set this property to 180000 (3 minutes), for example:

watt.server.keepAliveTimeout=180000

The default value is 15000 (15 seconds).

Note: The value you specify with watt.server.keepAliveTime does not need to be long enough to accommodate reading the entire document. Rather it is just to accommodate the length of time it takes to receive a response to a read request.

For this property... Specify...

60 webMethods Trading Networks User’s Guide Version 6.5

Page 61: Web Methods Trading Networks Users Guide 65

Other Configuration Settings

Other Conf igurat ion Sett ingsFor instructions on how to perform the following configuration tasks, see the webMethods Integration Server Administrator’s Guide:

Setting or updating the webMethods Integration Server license key

Defining listening ports

Allowing and denying inbound connections to the Integration Server

Specifying a proxy server

Specifying error message recipients

Customizing the Trading Networks ConsoleCustomize the Trading Networks Console by setting preferences. You can set Console preferences to:

Predefine a list of Integration Servers that the Console displays in the Open Session dialog box

Define proxy servers that the Trading Networks Console must use to access an Integration Server

Specify how you want Trading Networks to filter the list of partners in the selector panel and what order to display this sorted filtered partners list

Predefining the List of Servers that You Want to UseWhen you start the Trading Networks Console or when you select File Open Session in the Trading Networks Console to open a session on a different Integration Server, Trading Networks displays the Open Session dialog box. This dialog box contains a list of Integration Servers from which you can select. By default, the Trading Networks Console displays the localhost:5555 and other servers on which you have previously opened a session. (For more information about opening sessions on an Integration Server, see “Opening and Closing Sessions on Servers” on page 24.)

You can customize the list of servers that Trading Networks displays in the list on the Open Session dialog box. For example, if your site runs more than one Integration Server, you might want to predefine the list with the identification of all your servers.

To predefine the list of servers to which you want to open sessions, perform the following procedure.

webMethods Trading Networks User’s Guide Version 6.5 61

Page 62: Web Methods Trading Networks Users Guide 65

C H A P T E R 4 C o n f i g u r i n g w e b M e t h o d s Tr a d i n g N e t w o r k s

2 Select Edit Preferences.

3 Select the Servers tab.

4 To add a new server to the list, click Add Row . Trading Networks displays the Server Information dialog box.

5 Specify the following parameters; then, click OK.

To predefine the list of servers on which you want to open sessions1 Start the Trading Networks Console. If you need procedures for this step, see

“Starting the Trading Networks Console” on page 22.

For this Server Information parameter… Specify…

Host:Port The name of the Integration Server that you want to appear in the Open Session dialog box. Type the name of the server in ServerName:PortNumber format.

Example: rubicon:5555

User Name The user name of the user account on the Integration Server that you want Trading Networks to display in the User Name field of the Open Session dialog box when the server specified by Server is selected. The user name must identify a valid webMethods User account on the associated server. Be sure to use the correct combination of upper- and lowercase letters because user names are case-sensitive

Note: If you add the same server more than one time specifying different user names, Trading Networks displays the server with the user name from the first entry in the list of servers in the Open Session dialog box.

Use secure connection Whether you want the connection to this server to be made through HTTP or HTTPS. To use HTTPS, select this checkbox. If you select this checkbox, Trading Networks automatically selects the Use secure connection checkbox in the Open Session dialog box when the server specified by Server is selected.

62 webMethods Trading Networks User’s Guide Version 6.5

Page 63: Web Methods Trading Networks Users Guide 65

Customizing the Trading Networks Console

6 To edit the information for an existing server in the list, click the row you want to

update; then, click Edit . Type the changes in the appropriate field.

7 To remove a server from the list, click the row you want to delete; then, click Remove

Row .

8 When you have completed making your changes, click OK.

Defining Proxy Servers for the ConsoleThe Trading Networks Console can use a proxy server when opening a session on an Integration Server. To indicate you want to use a proxy server for the connection, check the Use proxy server check box in the Open Session dialog box. When this box is checked, Trading Networks looks up the proxy information to use in the Trading Networks Console preferences. If you have not defined proxy information, you will receive an error and will be unable to open the session on the server using a proxy server. (For more information about opening sessions on an Integration Server from the Console, see “Opening and Closing Sessions on Servers” on page 24.)

You can define a proxy server that you want the Trading Networks Console to use when opening a session on a server via HTTP and/or a proxy server to use when opening a session via HTTPS.

To define proxy servers, perform the following procedure.

2 Select Edit Preferences.

3 Select the Proxies tab.

Use proxy server Whether you want the connection to this server to be made through the default proxy server. Select the checkbox to use a proxy server. If you select this checkbox, Trading Networks automatically selects the Use proxy server checkbox in the Open Session dialog box when the server specified by Server is selected. For information about defining default proxy servers, see “Defining Proxy Servers for the Console” on page 63.

To define proxy servers for the Console to use1 Start the Trading Networks Console. If you need procedures for this step, see

“Starting the Trading Networks Console” on page 22.

webMethods Trading Networks User’s Guide Version 6.5 63

Page 64: Web Methods Trading Networks Users Guide 65

C H A P T E R 4 C o n f i g u r i n g w e b M e t h o d s Tr a d i n g N e t w o r k s

4 To define a proxy server that the Console uses when opening a session on a server via HTTP, specify the following parameters. If you do not want to use a proxy for HTTP requests, leave these fields blank.

5 To define a proxy server that the Console uses when opening a session on a server via HTTPS (secure), specify the following parameters. If you do not want to use a proxy for HTTPS requests, leave these fields blank.

For this Proxies tab parameter… Specify this for HTTP…

Host:Port The address of the HTTP proxy server in ServerName:PortNumber format. Be sure to place a colon between the server name and the port number, and do not leave spaces.

Example: myproxy:8080

User Name The user name that the Trading Networks Console is to use to access the HTTP proxy server. Type a valid user name for the proxy server specified in Host:Port. If you do not know this name, contact your network administrator. If your proxy server does not require a user name, leave this field blank. This entry is case-sensitive.

Password The password that the Trading Networks Console is to use to access the HTTP proxy server. Type the password for the user name specified in User Name. If you do not know the password, contact your network administrator. If your proxy server does not require a password, leave this field blank. This entry is case-sensitive.

For this Proxies tab parameter… Specify this for HTTPS (secure)…

Host:Port The address of the HTTPS proxy server in ServerName:PortNumber format. Be sure to place a colon between the server name and the port number, and do not leave spaces

Example: secureproxy:8080

User Name The user name that the Trading Networks Console is to use to access the HTTPS proxy server. Type a valid user name for the proxy server specified in Host:Port. If you do not know this name, contact your network administrator. If your proxy server does not require a user name, leave this field blank. This entry is case-sensitive.

64 webMethods Trading Networks User’s Guide Version 6.5

Page 65: Web Methods Trading Networks Users Guide 65

Customizing the Trading Networks Console

6 When you have completed making your changes, click OK.

Password The password that the Trading Networks Console is to use to access the HTTPS proxy server. Type the password for the user name specified in User Name. If you do not know the password, contact your network administrator. If your proxy server does not require a password, leave this field blank. This entry is case-sensitive.

webMethods Trading Networks User’s Guide Version 6.5 65

Page 66: Web Methods Trading Networks Users Guide 65

C H A P T E R 4 C o n f i g u r i n g w e b M e t h o d s Tr a d i n g N e t w o r k s

66 webMethods Trading Networks User’s Guide Version 6.5

Page 67: Web Methods Trading Networks Users Guide 65

C H A P T E R 5

Planning Your Network

Introduction . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 68

Task 1: Identify the Types of Transactions to Process . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 69

Task 2: Determine the Important Document Information . . . . . . . . . . . . . . . . . . . . . . . . . . . . 71

Task 3: Define the Types of Documents . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 72

Task 4: Define Information to Maintain about Partners . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 80

Task 5: Create Your Own Profile . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 81

Task 6: Define Actions to Perform Against Documents . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 81

Task 7: Add Partners to Your Network . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 82

webMethods Trading Networks User’s Guide Version 6.5 67

Page 68: Web Methods Trading Networks Users Guide 65

C H A P T E R 5 P l a n n i n g Yo u r N e t w o r k

Introduct ion

Before you begin planning your network, it is helpful if you have a basic understanding of Trading Networks and how the Trading Networks Console is set up. For more information, see the webMethods Trading Networks Concepts Guide.

This chapter describes the tasks to perform to plan for and set up your trading network. The tasks are presented in the proposed order in which you should complete them; however, based on your unique situations, you might want (or need) to perform the tasks in an alternative order. The general order of tasks is:

Tasks 1 through 6 define the behavior of your trading network. After you perform these tasks, you have defined the document attributes, TN document types, profile fields, and processing rules that determine how Trading Networks processes documents that enter your system.

You might want to perform these tasks in a development environment. After Tasks 1 through 6 are completed, you can use your development system to test your trading network to ensure it processes documents as you intended. If problems arise, you can correct them. After you ensure your trading network is defined properly, migrate your information to a production environment.

You can migrate your document attributes, TN document types, profile fields, processing rules, and your profile into your production system using the export and import facility that Trading Networks provides. For more information, see Appendix A, “Exporting and Importing Database Information”.

Task Description See page…

1. Identify the types of transactions that Trading Networks will need to handle.

69

2. Determine the pieces of information within documents that are of interest to you and define this information to Trading Networks.

71

3. Define the types of documents you want Trading Networks to recognize.

72

4. Determine the information that you want to maintain about your partners; use this information to define the profiles you want to keep about partners.

80

5. Create the profile for your own corporation. 81

6. Define the actions that you want Trading Networks to take against the documents it receives.

81

7. Add partners to your network. 82

68 webMethods Trading Networks User’s Guide Version 6.5

Page 69: Web Methods Trading Networks Users Guide 65

Task 1: Identify the Types of Transactions to Process

After you have migrated information to your production system, you can perform Task 7; that is, add partners to your network.

The following sections provide more information about each task required to set up your trading network. The description of each task points to sections of this manual or other manuals that describe more information about the task and how to perform the steps required to complete each task.

Task 1: Ident i fy the Types of Transact ions to ProcessTo exchange documents with trading partners, you need to define the types of documents that your Trading Networks system will receive. This first task is to identify the transaction types that your Trading Networks system will receive, for example, purchase orders, confirmations, etc. In addition, you need to determine the variations of each transaction. For example, you might receive EDI, cXML, and CBL purchase orders.

Task 1: Identify the Types of Transactions to Process

Step Action

1. Determine types of transactions. You should know the types of transactions you will be exchanging with your trading partners (your suppliers, business partners, etc.). For example, you might send documents that represent purchase orders, acknowledgements, available to promise, etc.

2. Determine variations of transaction types. This is applicable for XML documents only. For each type of transactions, determine the variations of that transaction that you receive. For example, you might receive purchase orders in cXML, OAG, and CBL.

3. Obtain sample files. This is applicable for XML documents only. Although it is not necessary, it is helpful if you can obtain a representative sample document for each variation of a transaction type. Place the samples in a directory that you will have available when using the Trading Networks Console.

webMethods Trading Networks User’s Guide Version 6.5 69

Page 70: Web Methods Trading Networks Users Guide 65

C H A P T E R 5 P l a n n i n g Yo u r N e t w o r k

4. Create webMethods schemas. If you want Trading Networks to be able to programmatically validate the structure of the documents it receives, you must create schemas.

For XML documents: For XML documents, you must create IS schemas for each variation of a transaction type. For information about creating IS schemas, see the webMethods Integration Server Schema Reference.

For flat file documents: For flat file documents, you can create a flat file schema that contains a particular TN document type’s structural information, including how to identify records and separate those records into fields. This enables inbound flat file documents to be parsed and validated for use by back-end systems, and outbound documents to be converted to a flat file for delivery to another’s back-end system.You build/create your own flat file schema in webMethods Developer. For more information about the flat file schema and parsing, see the Flat File Schema Developer’s Guide

5. Create webMethods IS document types. This is applicable for XML documents only. To transform the XML documents to an IS document (IData object) to allow you to manipulate the document within a service, set up IS document types for each variation of an XML document. For information about creating IS document types, see the webMethods Developer User’s Guide. For more information about transforming XML documents to IS documents (IData objects), see the wm.tn.doc.xml:bizdocToRecord built-in service that is described in the webMethods Trading Networks Built-in Services Reference.

6. Create a document gateway service. This is applicable for flat file documents only. A document gateway service is the entry point for flat file documents into Trading Networks. Your trading partners send their flat files to the document gateway service so that Trading Networks can process the documents. You need to write a document gateway service to provide information hints for the Trading Networks recognition process. For more information about the document gateway service, see “Defining Document Gateway Services” on page 276.

Task 1: Identify the Types of Transactions to Process

Step Action

70 webMethods Trading Networks User’s Guide Version 6.5

Page 71: Web Methods Trading Networks Users Guide 65

Task 2: Determine the Important Document Information

Task 2: Determine the Important Document Informat ionTo process and analyze the types of information that pass through your network, you can have Trading Networks extract information from documents. The information that Trading Networks extracts is available to determine how to process the document and for you to use for reporting. You can use it to search for specific documents that have been sent through your system or to gather information about the documents that have been sent through your system.

For Trading Networks to extract information, you have to define the pieces of information within documents that are important to you. Trading Networks refers to these pieces of information as document attributes. webMethods defines the following system document attributes:

SenderID—Identification of the partner that sent the document

ReceiverID—Identification of the partner that is to receive the document

DocumentID—Identification of the document

UserStatus—A status that you or a partner has associated with the document

GroupID—Identification within a document that associates this document with other documents in its group

ConversationID—Identification within a document that associates this document with other documents in the same “conversation” of documents

SignedBody and Signature—Portions of the document that contain the data that was digitally signed and the digital signature (available only for TN XML document types; Trading Networks provides a different way to do this for TN flat file document types)

DoctypeID or DoctypeName—The Trading Networks-generated internal identifier or name of the TN flat file document type that you want Trading Networks to use for a TN flat file document type

processingRuleID or processingRuleName—The Trading Networks-generated internal identifier or name of the processing rule that you want Trading Networks to use for a TN flat file document type

The system attributes are available out of the box. You do not need to define them, and you cannot delete them.

To identify other pieces of information within a document that are of interest, you can define custom document attributes. For example, you might be interested in the total amount of purchase orders you receive; in this case, define a custom attribute for total purchase order. Typically, the documents for all variations of a transaction type have the same pieces of information. For example, a cXML purchase order, OAG purchase order, and CBL purchase order all have some piece of information that represents the total purchase amount. You do not define multiple custom attributes, one for each variation of

webMethods Trading Networks User’s Guide Version 6.5 71

Page 72: Web Methods Trading Networks Users Guide 65

C H A P T E R 5 P l a n n i n g Yo u r N e t w o r k

a transaction type—define a single custom attribute that can be used for all variations of the transaction type.

For each piece of information (attribute) that is of interest to you, complete the following tasks:

Task 3: Def ine the Types of DocumentsAfter you identify the types of transactions that your Trading Networks system needs to process and have defined the attributes that are of interest to you, you can define the TN document types for each of the variations of documents that Trading Networks will receive for a transaction.

When documents are first received, Trading Networks uses the TN document types to recognize the type of document and perform actions based on the TN document type. The actions it performs based on the TN document type are to create the attributes from the document and to perform pre-processing actions against the document. The pre-processing actions indicate whether Trading Networks is to verify the document’s digital signature, validate the structure of the document, determine whether the document has been received before, and/or save the document to the Trading Networks database.

For each variation of a transaction, complete the following tasks:

Task 2: Determine the Important Document Information

Step Action

1. Identify the attribute. Select a name for the attribute and the data type (STRING, NUMBER, or DATETIME) for the value of the attribute. Optionally, you might want to give the attribute a description.

2. Define the custom document attribute. Use the Trading Networks Console and the information from Step 1 to define the attribute. For instructions, see “Defining Document Attributes” on page 196.

Note: If you are using an OEM version of the Trading Networks, you cannot create new TN document types in Trading Networks Console. Trading Networks will gray out this unavailable selection.

72 webMethods Trading Networks User’s Guide Version 6.5

Page 73: Web Methods Trading Networks Users Guide 65

Task 3: Define the Types of Documents

Task 3: Define the Types of Documents

Step Action

1. Determine how to recognize documents of this type. Identify the contents of the document that uniquely indicate that a document is this variation of a transaction.

For XML documents: For example, if you are defining a cXML purchase order, identify the parts of the document that uniquely identify a document as a cXML purchase order—it might be that the root tag of the document is cXML and there is “PurchaseOrder” node within the document.

To identify specific nodes within an XML document, you specify an XQL query. If you have a sample document available, when you use the Trading Networks Console to define the TN XML document type, you can have Trading Networks load the sample for your use in creating the XQL queries. When a sample document is loaded, you can select the node in the sample document and Trading Networks creates the query for you. For details about what you can use to identify a TN XML document type, read “Identification Information in TN XML Document Types” on page 206.

For flat file documents: you can specify arbitrary pipeline variables to identify a TN flat file document type. The identification information specifies how Trading Networks is to recognize a flat file document based on variables the document gateway service places in the pipeline. For details, read “Pipeline Matching Criteria Used to Identify the TN Document Type” on page 283.

2. Determine the attributes that you want to create from documents of this type. You can have Trading Networks create any or all of the system and custom attributes from XML and flat file documents.

For XML documents: For each attribute that you want to extract from an XML document, you must provide an XQL query that identifies the location of the attribute within the document. If you have a sample document available, when you use the Trading Networks Console to define the TN document type, you can have Trading Networks load the sample for your use in creating the XQL queries. When a sample document is loaded, you can select the node that contains the attribute information and Trading Networks creates the query for you. For details about specifying XML document attributes, read “Extraction Information In TN XML Document Types” on page 210.

webMethods Trading Networks User’s Guide Version 6.5 73

Page 74: Web Methods Trading Networks Users Guide 65

C H A P T E R 5 P l a n n i n g Yo u r N e t w o r k

2. cont...

For flat file documents: For each attribute that you want to create from a flat file document, specify the system and custom (user-defined) attributes that you want Trading Networks to extract from TN_parms and place in the bizdoc. These are attributes that Trading Networks can save to the database to use later. For details about specifying flat file document attributes, read “Attributes To Extract From Documents” on page 285.

For Trading Networks to perform some pre-processing and processing actions, you must extract certain system attributes. The following lists the system attributes that you should consider extracting along with the Trading Networks pre-processing and processing actions they affect:

System Attribute Function it affects…

SenderID Processing rule search criteria—To process documents based on the sender of the document, you need to extract the SenderID. For example, you might want all documents from a specific sender to be handled in a special way. (For more information, see “Processing Rule Criteria” on page 317.)

The Check for Duplicate Document pre-processing action—If you want Trading Networks to be able to check if it has received the document already by comparing the sender, you must extract the SenderID. (For more information, see “Checking for Duplicate of the XML Document” on page 228 and “Checking for Duplicates of the Flat File Document” on page 296.)

Alert E-mail processing actions—To send an e-mail message to a contact at the sender’s corporation, you need to extract the Sender ID. You set up contacts when you define profiles for a partner, which is handled in a later task. (For more information, see “Action 2—Send an Alert E-mail” on page 338.)

Note: Typically, you should always extract the SenderID system attribute.

Task 3: Define the Types of Documents

Step Action

74 webMethods Trading Networks User’s Guide Version 6.5

Page 75: Web Methods Trading Networks Users Guide 65

Task 3: Define the Types of Documents

2. cont...

System Attribute Function it affects…

ReceiverID Processing rule search criteria—To process a document based on receiver of the document, you need to extract the ReceiverID. For example, you might want all documents that are sent to a specific receiver to be handled in a special way. (For more information, see “Processing Rule Criteria” on page 317.)

The Check for Duplicate Document pre-processing action—If you want Trading Networks to be able to check if it has received the document already by comparing the receiver, you must extract the ReceiverID. (For more information, see “Checking for Duplicate of the XML Document” on page 228 and “Checking for Duplicates of the Flat File Document” on page 296.)

Alert e-mail processing action—To send an e-mail message to a contact at the receiver’s corporation, you need to extract the ReceiverID. You set up contacts when you define profiles for a partner, which is handled in a later task. (For more information, see “Action 2—Send an Alert E-mail” on page 338.)

The Deliver Document By processing action—If you want Trading Networks to deliver the document to the receiver, you need to extract the ReceiverID. (For more information, see “Action 4—Deliver the Document to the Receiver” on page 341.)

Note: Typically, you should always extract the ReceiverID system attribute

Task 3: Define the Types of Documents

Step Action

webMethods Trading Networks User’s Guide Version 6.5 75

Page 76: Web Methods Trading Networks Users Guide 65

C H A P T E R 5 P l a n n i n g Yo u r N e t w o r k

2. cont...

System Attribute Function it affects…

DocumentID The Check for Duplicate Document pre-processing action—If you want Trading Networks to be able to check if it has received the document already by comparing the document ID, you need to extract the DocumentID. (For more information, see “Checking for Duplicate of the XML Document” on page 228 and “Checking for Duplicates of the Flat File Document” on page 296.)

Note: Typically, you should always extract the DocumentID system attribute.

SignedBody and Signature

The Verify Digital Signature pre-processing action—If you want Trading Networks to be able to verify the digital signature of XML documents, you need to extract the SignedBody and Signature. (For more information, see “Verifying the Digital Signature of an XML Document” on page 227. To verify the digital signature of flat file documents, see “Verifying the Digital Signature of Flat File Documents” on page 294.)

ConversationID Process management for a document—If a document is part of a conversation of documents and you want Trading Networks to pass the document along to process management after performing the actions defined by processing rules, you need to extract the conversation ID. (For more information, see “Important Attributes that You Should Extract from an XML Document” on page 210 or “Specifying the Document Gateway Services Outputs” on page 280.)

processingRuleID

Rather than have Trading Networks look up the appropriate rule for a flat file document, use this attribute to explicitly specify the processing rule, thus eliminating the overhead of that lookup. (For more information, see “Specifying the Document Gateway Services Outputs” on page 280.)

Task 3: Define the Types of Documents

Step Action

76 webMethods Trading Networks User’s Guide Version 6.5

Page 77: Web Methods Trading Networks Users Guide 65

Task 3: Define the Types of Documents

2. cont...

DoctypeID Rather than have Trading Networks search for an appropriate TN flat file document type for a flat file document, use this attribute to explicitly specify the document type, thus eliminating the overhead of that search. (For more information, see “Specifying the Document Gateway Services Outputs” on page 280.)

UserStatus Use this attribute if you want to process a flat file document based on the user status. Also, the user status is a criterion that Trading Networks uses to determine the processing rule to use for a document. (For more information, see “Specifying the Document Gateway Services Outputs” on page 280.)

GroupID Use this attribute to easily locate all the flat file documents within the same group. (For more information, see “Specifying the Document Gateway Services Outputs” on page 280.)

3. Determine whether you want to associate an IS document type with the TN XML document type. This is applicable for XML documents only. If you will want to use the wm.tn.doc.xml:bizdocToRecord built-in service to transform the XML document to an IS document (IData object), you must identify a webMethods IS document type with the document. the wm.tn.doc.xml:bizdocToRecord service uses the IS document type that you specify as the blueprint to form the IS document (IData object). For more information about this service, see the webMethods Trading Networks Built-in Services Reference. For more information about associating an IS document type with a TN XML document type, see “Specifying an IS Document Type for TN XML Document Types” on page 226.

4. Determine whether you want to associate a schema with the TN document type.

For XML documents: If you want Trading Networks to perform the Validate Structure pre-processing action to validate the structure of an XML document, you must specify an IS schema that maps the structure of the TN XML document type. For more information, see “Specifying an IS Schema for TN XML Document Types” on page 227.

For flat file documents: If you want Trading Networks to perform the Validate Structure pre-processing action to validate the structure of a flat file document, you must specify a parsing schema that maps the structure of the TN flat file document type. For more information, see “Validating the Structure of Flat File Documents” on page 295.

Task 3: Define the Types of Documents

Step Action

webMethods Trading Networks User’s Guide Version 6.5 77

Page 78: Web Methods Trading Networks Users Guide 65

C H A P T E R 5 P l a n n i n g Yo u r N e t w o r k

5. Determine the pre-processing actions you want Trading Networks to perform. You can specify whether you want Trading Networks to perform any or all of the following pre-processing actions against documents of this type. For more information about specifying the pre-processing actions in a TN document types, see “Specifying Pre-Processing Actions for TN XML Document Type” on page 227 and “Pre-Processing Actions in the TN Flat File Document Type” on page 294.

Verify the digital signature of a document.

For XML documents: To use this action, you must have Trading Networks extract the system attributes SignedBody and Signature. In addition, you must have a certificate on file for each partner whose digital signature you want to verify; this will be addressed in a later step. For more information, see “Verifying the Digital Signature of an XML Document” on page 227.

For flat file documents: To use this action, you must code the verification service for your flat file document. For the inputs and outputs of the service, your verification service should implement the wm.tn.rec:BizDocVerification service. For more information, see “Verifying the Digital Signature of Flat File Documents” on page 294.

Validate the structure of a document.

For XML documents: To use this action, you must specify an IS schema with the TN XML document type. For more information, see “Validating the Structure of an XML Document” on page 228.

For flat file documents: To use this action, you must specify a flat file schema with the TN flat file document type. For more information, see “Validating the Structure of Flat File Documents” on page 295.

Task 3: Define the Types of Documents

Step Action

78 webMethods Trading Networks User’s Guide Version 6.5

Page 79: Web Methods Trading Networks Users Guide 65

Task 3: Define the Types of Documents

5. cont...

Check the for duplicate document of a document; that is, has Trading Networks already received the document—you can have Trading Networks determine whether it has already received a document with either:

the same document ID

the same document ID and sender

the same document ID, sender and receiver

the same document ID, sender and TN document type

To use this action, you must have Trading Networks extract the system attributes DocumentID, SenderID and/or ReceiverID.

Save a copy of the document content, attributes, and/or log information to the database—You can have Trading Networks maintain information about the document in the database. Trading Networks has a reliable delivery feature that it uses only if the document content is saved to the database. The reliable delivery feature allows Trading Networks to attempt to deliver a document to a partner more than one time. For more information, see “Using Reliable Delivery with Immediate Delivery Method” on page 343.

Keep in mind that all pre-processing actions can be overridden by selections you make in the processing rules that process a document. This will be addressed in a later task.

6. Create the TN document type. Use the Trading Networks Console and the information from Steps 1-5 to define the TN document type. You can create TN XML document types and TN flat file document types. For instructions, see “Defining TN XML Document Types” on page 232 and “Defining TN Flat File Document Types” on page 300.

Note: If you are using an OEM version of the Trading Networks, you cannot create new TN document types in Trading Networks. Trading Networks will gray out this unavailable selection.

Task 3: Define the Types of Documents

Step Action

webMethods Trading Networks User’s Guide Version 6.5 79

Page 80: Web Methods Trading Networks Users Guide 65

C H A P T E R 5 P l a n n i n g Yo u r N e t w o r k

Task 4: Def ine Informat ion to Maintain about PartnersTo determine the type of information you want to collect about your partner, consider:

The types of partners you plan to add to your network

The type of information do you need about your partners to perform your business

Information you will need about your partners to process documents from them, for example, information you need access in services that process documents

After you understand the type of information you need about your partners, you are ready to start to define information you need to store in the profiles for your partners. Complete the following tasks to define the information you want to maintain about partners in your network:

Task 4: Define Information to Maintain about Partners

Step Action

1. Review the standard profile fields that webMethods defines. Determine whether the standard fields meet your needs.

To view the standard fields, see the following sections in this manual:

“Information on the Partner’s Corporate Tab” on page 132

“Information on the Partner’s Contact Tab” on page 136

“Information on the Partner’s Delivery Method Tab” on page 137

“Information on the Partner’s Security Tab” on page 144

Note any deficiencies in the fields. For more information, see “Standard Profile Fields” on page 88.

2. Update standard fields as necessary.

If there are standard fields that are not currently required but that you want to require, you can update the fields.

If there are standard fields that are required that you do not require, you might be able to mark them not required. Trading Networks allows you to update a subset of the standard fields.

For information about the standard fields that you can update, see “Standard Profile Fields” on page 88. For instructions on how to update whether fields are required or not, see “Updating Standard Profile Fields” on page 96.

80 webMethods Trading Networks User’s Guide Version 6.5

Page 81: Web Methods Trading Networks Users Guide 65

Task 5: Create Your Own Profile

Task 5: Create Your Own Prof i leAfter you have defined the format of the profiles on your Trading Networks system, you can fill in your own profile. For instructions, see “Creating Your Own Profile” on page 115.

Task 6: Def ine Act ions to Perform Against DocumentsYou can define how Trading Networks handles the documents it processes by setting up processing rules. Use processing rules to perform actions that are stateless, meaning that each application of a processing rule has no knowledge of the actions that happen before it. Examples of uses for process rules are:

Actions that you want to perform against all or several documents that Trading Networks receives, such as saving documents to a specific location or mapping all order documents (regardless of process) to a canonical order

Delivering a document to the receiving partner. (Note that if you want to use queued documents for delivery to partners and have the documents delivered at scheduled intervals, you need to define the queues. See “Other Configuration Settings” on page 61 for more information.)

Sending notifications (for example an e-mail message) when Trading Networks receives specific types of documents

Perform actions in processing rules that are not specific to a single business process.

3. Define extended profile fields. To maintain information about partners that is not covered by the standard fields, you can define extended profile fields. For example, you might want to define extended fields for preferred shipping method, cost centers, or customer codes. Use the Trading Networks Console to define your extended profile fields. For instructions on how to define extended profile fields, see “Extended Profile Fields” on page 97 and “Adding Extended Profile Fields” on page 98.

Task 4: Define Information to Maintain about Partners

Step Action

webMethods Trading Networks User’s Guide Version 6.5 81

Page 82: Web Methods Trading Networks Users Guide 65

C H A P T E R 5 P l a n n i n g Yo u r N e t w o r k

Note: If you want to process documents as part of a complete business interaction (that is, as a series of connected steps), use process management. You define the business process by using webMethods Modeler to create a process model. If you have Trading Networks extract a conversation ID from a document, Trading Networks automatically passes the document to process management after it performs the actions you define in a processing rule. For more information about creating process models, see the webMethods Modeler User’s Guide.

Processing rules and conversation scripts are extremely flexible. To understand all of the capabilities of processing rules and how to set them up, see “Processing Rules” on page 311.

Task 7: Add Partners to Your NetworkAfter you have set up how to recognize and process documents and the information you want to collect about partners, you can now start adding partners to your network.

To add profiles, gather the information required for the partner’s profile. Then use the Profile Assistant or Profile screen to create the profile using the gathered information. For instructions, see “Adding Partner Profiles” on page 145.

After a partner is added to your network, you can start exchanging business documents with the partner.

82 webMethods Trading Networks User’s Guide Version 6.5

Page 83: Web Methods Trading Networks Users Guide 65

C H A P T E R 6

Trading Partners

How to Manage Partners in Your Trading Network . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 84

Steps to Setting up Profiles in Trading Networks . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 85

webMethods Trading Networks User’s Guide Version 6.5 83

Page 84: Web Methods Trading Networks Users Guide 65

C H A P T E R 6 T r a d i n g P a r t n e r s

How to Manage Partners in Your Trading NetworkTo add a partner to your network, you add a profile for the partner.You add profiles for those partners with which you want to exchange documents with. Trading Networks is only aware of partners for which it has a profile. Before you can add profiles, you must do the following:

1 Define the profile information you want to collect about partners

2 Create your own profile

After you perform these tasks, you can start adding profiles for your partners.

Defining the Information You Want to Collect about PartnersTrading Networks saves the information that it collects about partners in profiles. A profile is made up of fields. To define the information that you want to collect about your partners, you set up profile fields. There are two types of profile fields—standard fields and extended fields:

Standard fields are webMethods-defined fields that incorporate the majority of the information that you will want to collect about a partner. You cannot add additional standard fields or disable the standard fields that are provided. However, you can modify the definitions for standard fields to change the description.

Most of the standard fields are for your own use, for example, the name of the corporation and its address. However, Trading Networks requires some of the standard fields to operate normally, for example, the Trading Networks host and port number that a partner uses for HTTP to deliver a document to the partner via HTTP.

Extended fields are fields that you define to extend the standard profile that webMethods provides out-of-the-box. If you want to collect additional information about your partners that is not covered by the standard fields, you can define extended fields. The profiles that reside on your system contain all the extended fields that you define.

Creating Your Own Profi leTrading Networks maintains a profile for your corporation. Your profile contains the standard fields and the extended fields that you define. Your profile must be filled out before you can exchange business documents with partners. Use the Profile Assistant to create your profile.

For more information about trading partners information, see Chapter 2, "Trading Partners" in the webMethods Trading Networks Concepts Guide.

84 webMethods Trading Networks User’s Guide Version 6.5

Page 85: Web Methods Trading Networks Users Guide 65

Steps to Setting up Profiles in Trading Networks

Adding Prof iles for PartnersTo identify a partner with which you want to exchange business documents, you add a profile for the partner. After you create your own profile, you can use the Profile Assistant or the Profile screen to create profiles for your partners.

Steps to Sett ing up Prof i les in Trading NetworksTo set up the information you want Trading Networks to maintain in profiles and add partners to your network, perform the tasks in the following checklist:

Task For more information, see...

1 Set up the profile fields for profiles

“What are Profile Fields?” on page 88

“Standard Profile Fields” on page 88

“Adding Extended Profile Fields” on page 98

2 Create your own profile “What are Profile Fields?” on page 88

3 Add partners by adding their profiles to your system

“Adding Partner Profiles” on page 145

webMethods Trading Networks User’s Guide Version 6.5 85

Page 86: Web Methods Trading Networks Users Guide 65

C H A P T E R 6 T r a d i n g P a r t n e r s

86 webMethods Trading Networks User’s Guide Version 6.5

Page 87: Web Methods Trading Networks Users Guide 65

C H A P T E R 7

Prof i le Fie lds

What are Profile Fields? . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 88

Standard Profile Fields . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 88

Extended Profile Fields . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 97

webMethods Trading Networks User’s Guide Version 6.5 87

Page 88: Web Methods Trading Networks Users Guide 65

C H A P T E R 7 P r o f i l e F i e l d s

What are Prof i le Fields?To define the information that you want to collect about your partners, you set up profile fields. There are two types of profile fields—standard fields and extended fields:

Standard fields are webMethods-defined fields that incorporate the majority of the information that you will want to collect about a partner. You cannot add additional standard fields or disable the standard fields that are provided. However, you can modify the definitions for standard fields to change the description.

Most of the standard fields are for your own use, for example, the name of the corporation and its address. However, Trading Networks requires some of the standard fields to operate normally, for example, the Trading Networks host and port number that a partner uses for HTTP to deliver a document to the partner via HTTP.

Extended fields are fields that you define to extend the standard profile that webMethods provides out-of-the-box. If you want to collect additional information about your partners that is not covered by the standard fields, you can define extended fields. The profiles that reside on your system contain all the extended fields that you define.

Required FieldsA required field is one that you want supplied for all profiles. Several of the standard fields, as defined by webMethods, are required. Those that are not, you can mark as required if you want. When you add extended fields, you can mark them as required. All profiles on your system must have a value for required profile fields.

When you create your own profile or add a profile for a partner, you must supply information for all required fields before Trading Networks will allow you to enable the profile. When you are filling in a profile, Trading Networks displays each required field in blue and places an asterisk (*) next to the required fields, so you can easily determine the fields that are required.

Standard Prof i le Fie ldsThe standard profile fields are fields that webMethods defines and that are available out-of-the-box. Trading Networks uses the standard profile fields on the portion of the Profile screen above the split pane controls. Although Trading Networks has many standard fields, you can view and update only a subset of the fields with the Standard tab on the Profile Fields screen.

For more information about profile fields, see Chapter 2, "Trading Partners" in the webMethods Trading Networks Concepts Guide

88 webMethods Trading Networks User’s Guide Version 6.5

Page 89: Web Methods Trading Networks Users Guide 65

Standard Profile Fields

The following table lists the standard profile fields that you can update. For each field, the table lists a description of what each field is, how Trading Networks uses the field, and any consequences if a field is not included in a partner profile.

Standard Field Description

Corporation Name What it is: This field identifies the name of the corporation, for example, “Industrial Steel Company”.

This field is located on the Corporate tab of the Profile screen and has the label Corporation Name.

How it is used: Trading Networks uses this field (along with the OrgUnitName, if specified) to identify your enterprise or a partner within the network. For example, Trading Networks uses the CorporationName and OrgUnitName as the name of your enterprise on the Enterprise selection in the Selector Panel and as the name of your partner on the Partner selection.

If not specified: Trading Networks will not have a name to use to identify for this partner.

Unit Name What it is: This field identifies a unit name or division name within the corporation, for example, “Sales and Marketing”.

This field is located on the Corporate tab of the Profile screen and has the label Unit Name.

How it is used: Trading Networks uses this field (along with the CorporationName) to identify your enterprise or a partner within the network. For example, Trading Networks uses the CorporationName and OrgUnitName as the name of your enterprise on the Enterprise selection in the Selector Panel and as the name of your partner on the Partner selection.

If not specified: Trading Networks will use only the CorporationName for identification.

Preferred Delivery Method

What it is: This field identifies which delivery method the partner prefers to receive documents with.

This field is located on the Delivery Method tab of the Profile screen and has the label Use as preferred protocol.

How it is used: If a processing rule is configured to deliver a document using the preferred protocol, the partner’s delivery method that is selected as the preferred protocol will be used.

If not specified: The preferred protocol defaults to Queue for polling.

webMethods Trading Networks User’s Guide Version 6.5 89

Page 90: Web Methods Trading Networks Users Guide 65

C H A P T E R 7 P r o f i l e F i e l d s

E-mail What it is: This field identifies an e-mail address for a contact, for example, “[email protected]”.

This field is located on the Contact tab of the Profile screen and has the label E-mail.

How it is used: Trading Networks allows you to select a contact type in a processing rule for the Alert e-mail action. The Alert e-mail action instructs Trading Networks to send an e-mail message to the contacts associated with the selected contact type. If the e-mail address is not specified for a contact of the selected contact type, Trading Networks cannot send the e-mail message to that contact. For more information on the Alert e-mail action in a processing rule, see “Action 2—Send an Alert E-mail” on page 338.

If not specified: If the contact is referenced in the Alert e-mail action of a processing rule, Trading Networks will not be able to send an e-mail message.

Fax What it is: This field identifies the fax number for a contact, for example, “1-888-555-4897”.

This field is located on the Contact tab of the Profile screen and has the label Fax.

How it is used: Trading Networks does not use this information. It is maintained to allow easy access to contact information. You can view it by displaying the partner profile for a partner.

If not specified: The information will not be available in the partner profile.

First Name What it is: This field identifies the contact's first name.

This field is located on the Contact tab of the Profile screen and has the label First Name.

How it is used: Trading Networks does not use this information. It is maintained for your information. You can view it by displaying the partner profile for a partner.

If not specified: The information will not be available in the partner profile.

Standard Field Description

90 webMethods Trading Networks User’s Guide Version 6.5

Page 91: Web Methods Trading Networks Users Guide 65

Standard Profile Fields

Pager What it is: This field identifies the pager number for a contact, for example, “1-330-555-7890”.

This field is located on the Contact tab of the Profile screen and has the label Pager.

How it is used: Trading Networks does not use this information. It is maintained to allow easy access to contact information. You can view it by displaying the partner profile for a partner.

If not specified: The information will not be available in the partner profile.

Role What it is: This field identifies the contact's role. This might be a job title, for example, “Trading Network Administrator”.

This field is located on the Contact tab of the Profile screen and has the label Role.

How it is used: Trading Networks does not use this information. It is maintained to allow easy access to contact information. You can view it by displaying the partner profile for a partner.

If not specified: The information will not be available in the partner profile.

Last Name What it is: This field identifies the contact's last name.

This field is located on the Contact tab of the Profile screen and has the label Last Name.

How it is used: Trading Networks does not use this information. It is maintained to allow easy access to contact information. You can view it by displaying the partner profile for a partner.

If not specified: The information will not be available in the partner profile.

Standard Field Description

webMethods Trading Networks User’s Guide Version 6.5 91

Page 92: Web Methods Trading Networks Users Guide 65

C H A P T E R 7 P r o f i l e F i e l d s

Extension What it is: This field identifies the extension number for a contact. If the telephone number in the Telephone field identifies the main line for the corporation, use the Extension field to identify the contact's extension.

This field is located on the Contact tab of the Profile screen and has the label Extension.

How it is used: Trading Networks does not use this information. It is maintained to allow easy access to contact information. You can view it by displaying the partner profile for a partner.

If not specified: The information will not be available in the partner profile.

Telephone What it is: This field identifies the telephone number for a contact, for example, “1-800-555-1234”.

This field is located on the Contact tab of the Profile screen and has the label Telephone.

How it is used: Trading Networks does not use this information. It is maintained to allow easy access to contact information. You can view it by displaying the partner profile for a partner.

If not specified: The information will not be available in the partner profile.

Address What it is: This field identifies the first line of the street address, for example, “595 Main Street”.

This field is the first line of the Address fields that are located on the Corporate and Contact tabs of the Profile screen.

How it is used: Trading Networks does not use this information. It is maintained to allow easy access to partner information. You can view it by displaying the partner profile for a partner.

If not specified: The information will not be available in the partner profile.

Note: If you require AddressLine1, the AddressLine1 field on both the Corporate and Contact tabs will be required.

Standard Field Description

92 webMethods Trading Networks User’s Guide Version 6.5

Page 93: Web Methods Trading Networks Users Guide 65

Standard Profile Fields

AddressLine2 What it is: This field identifies the second line of the street address, for example, “Suite 556”.

This field is the second line of the Address fields that are located on the Corporate and Contact tabs of the Profile screen.

How it is used: Trading Networks does not use this information. It is maintained to allow easy access to partner information. You can view it by displaying the partner profile for a partner.

If not specified: The information will not be available in the partner profile.

Note: If you require AddressLine2, the AddressLine2 field on both the Corporate and Contact tabs will be required.

AddressLine3 What it is: This field identifies the third line of the street address, for example, “ATTN Billing Department”.

This field is the third line of the Address fields that are located on the Corporate and Contact tabs of the Profile screen.

How it is used: Trading Networks does not use this information. It is maintained to allow easy access to partner information. You can view it by displaying the partner profile for a partner.

If not specified: The information will not be available in the partner profile.

Note: If you require AddressLine3, the AddressLine3 field on both the Corporate and Contact tabs will be required.

Standard Field Description

webMethods Trading Networks User’s Guide Version 6.5 93

Page 94: Web Methods Trading Networks Users Guide 65

C H A P T E R 7 P r o f i l e F i e l d s

City What it is: This field identifies the city in an address, for example, “Los Angeles”.

This field is the City fields that are located on the Corporate and Contact tabs of the Profile screen.

How it is used: Trading Networks does not use this information. It is maintained to allow easy access to partner information. You can view it by displaying the partner profile for a partner.

If not specified: The information will not be available in the partner profile.

Note: If you require City, the City field on both the Corporate and Contact tabs will be required.

Country What it is: This field identifies the country in an address, for example, “USA”.

This field is the Country fields that are located on the Corporate and Contact tabs of the Profile screen.

How it is used: Trading Networks does not use this information. It is maintained to allow easy access to partner information. You can view it by displaying the partner profile for a partner.

If not specified: The information will not be available in the partner profile.

Note: If you require Country, the Country field on both the Corporate and Contact tabs will be required.

Standard Field Description

94 webMethods Trading Networks User’s Guide Version 6.5

Page 95: Web Methods Trading Networks Users Guide 65

Standard Profile Fields

Viewing Standard Profi le FieldsTo view the standard profile fields that Trading Networks allows you to update, perform the following procedure.

1 Start the Trading Networks Console. If you need procedures for this step, see “Starting the Trading Networks Console” on page 22.

2 Select View Enterprise.

3 Select Enterprise Profile Fields.

State/Province What it is: This field identifies the state or province in an address, for example, “California”.

This field is the State/Province fields that are located on the Corporate and Contact tabs of the Profile screen.

How it is used: Trading Networks does not use this information. It is maintained to allow easy access to partner information. You can view it by displaying the partner profile for a partner.

If not specified: The information will not be available in the partner profile.

Note: If you require State/Province, the State/Province field on both the Corporate and Contact tabs will be required.

Postal Code What it is: This field identifies the postal code (for example, ZIP code) for the state or province in an address, for example, “90001”.

This field is the Postal Code fields that are located on the Corporate and Contact tabs of the Profile screen.

How it is used: Trading Networks does not use this information. It is maintained to allow easy access to partner information. You can view it by displaying the partner profile for a partner.

If not specified: The information will not be available in the partner profile.

Note: If you require Postal Code, the Postal Code field on both the Corporate and Contact tabs will be required.

Standard Field Description

To view standard profile fields

webMethods Trading Networks User’s Guide Version 6.5 95

Page 96: Web Methods Trading Networks Users Guide 65

C H A P T E R 7 P r o f i l e F i e l d s

4 Click the Standard tab.

5 Click the row containing the profile field that you want to view.

6 Right click and select Edit. For more information about the fields on this tab, see “Standard Profile Fields” on page 88.

Updating Standard Profi le FieldsPerform the following procedure to update information for standard profile fields:

1 Start the Trading Networks Console. If you need procedures for this step, see “Starting the Trading Networks Console” on page 22.

2 Select View Enterprise.

3 Select Enterprise Profile Fields.

4 Click the Standard tab.

5 Click the row containing the profile field that you want to update.

6 Right click and select Edit.

7 Update the field(s) you want to change:

Note: To sort the columns in the Standard table, select the column to sort and then click on the column heading for forward ( ) and reverse ( ) alpha-numeric order.

To update a standard profile field

Note: To sort the columns in the Standard table, select the column to sort and then click on the column heading for forward ( ) and reverse ( ) alpha-numeric order.

For this Standard tab parameter… Specify…

Description The description you want the profile field to have. You can replace the current description or add more detail to it.

You can specify 1-1024 characters. You can specify any characters; there are no restrictions.

96 webMethods Trading Networks User’s Guide Version 6.5

Page 97: Web Methods Trading Networks Users Guide 65

Extended Profile Fields

8 Click OK.

Extended Prof i le FieldsIf after reviewing the profile that webMethods defines you determine that you want to maintain additional information about partners, you can define extended profile fields by using the Extended tab on the Profile screen. All extended fields appear on this tab.

When you define an extended profile field, you specify the following:

The name you want the extended profile field to have. Trading Networks displays the Name as the field label when displaying a profile on the Profile screen.

The name of the Group that you want Trading Networks to assign to the profile field. webMethods provides the groups—Address, Corporation, Custom, Contact, Delivery, and External ID. You can add additional groups.

A description you want Trading Networks to display for the extended profile field.

The data type of the extended profile field—string or binary.

The default value of the extended profile field. You can supply this information only if the data type is string.

The maximum length of the value that can be supplied for the profile field. You can supply this information only if the data type is string.

The valid values that can be supplied for the profile field. You can supply this information only if the data type is string.

Required Whether the profile field is required or not. Click the checkbox to indicate your choice. To indicate the profile field is required, assure the checkbox has a check. To indicate that the profile field is not required, remove the check from the checkbox.

Important! Use caution when changing fields from required to not required. webMethods uses some standard fields for its processing, so if you change a field so that it is not required and a partner opts to not supply that information, Trading Networks might be prevented from performing a function that you will require.

To determine how Trading Networks uses each standard field and the effect of not specifying a field, see “Standard Profile Fields” on page 88.

For this Standard tab parameter… Specify…

webMethods Trading Networks User’s Guide Version 6.5 97

Page 98: Web Methods Trading Networks Users Guide 65

C H A P T E R 7 P r o f i l e F i e l d s

You can change all information for an extended field, including its name.

The following table describes the tasks you can perform against extended profile fields:

Adding Extended Prof ile FieldsTo add an extended profile field to the profiles you maintain on your system, perform the following procedure.

2 Select View Enterprise.

3 Select Enterprise Profile Fields.

4 Click the Extended tab to view the list of extended profile fields. For more information about how to change the format of the table, see “Working with Tables” on page 33.

Important! Use caution when changing fields from required to not required. If you have services that use the field or if you might create or update services that use the field, the information might not be available if the partner is not required to supply it.

When you already have profiles in your system and then change an extended field from not required to required, you must manually edit the existing profiles for the updated extended profile fields. This is true even when the updated extended profile fields has a default value

Task See page...

“Adding Extended Profile Fields” 98

“Viewing Extended Profile Fields” 101

“Updating Extended Profile Fields” 102

“Disabling Extended Profile Fields” 102

“Enabling Extended Profile Fields” 103

Note: If you already have profiles in your system and then add extended profile fields that are required, you must manually edit the existing profiles for the newly added extended profile fields. This is true even when you define default values for the added extended profile fields.

To add a new extended profile field1 Start the Trading Networks Console. If you need procedures for this step, see

“Starting the Trading Networks Console” on page 22.

98 webMethods Trading Networks User’s Guide Version 6.5

Page 99: Web Methods Trading Networks Users Guide 65

Extended Profile Fields

5 Perform one of the following to start defining a new extended profile field:

4 Fill in the fields on the New Extended Profile Field screen:

To create a new extended field based on... Perform this procedure...

A blank New Extended Profile Field screen 1 Click New .

2 Trading Networks displays a blank New Extended Profile Field screen

An existing extended profile field

1 Click the row containing the profile field that you want to duplicate.

2 Click Duplicate .

3 Trading Networks displays the New Extended Profile Field screen with the information copied from the selected profile field.

You can update any or all fields for the extended profile field

For this Extended tab parameter... Specify...

Name The name you want to assign the new extended profile field. For example, if you send catalogs to clients and you want to maintain the type of catalog the partner is to receive, you might define an extended profile field named “Catalog Type”.

Specify 1-32 characters. You can specify any characters; there are no restrictions.

Group The group you want Trading Networks to assign the extended profile field to. To assign the field to an existing group, select a group from the list. To assign the field to a new group, type the name of the group.

Description Optional. A description of the profile field. It is helpful to include the type of information that you expect for this field because Trading Networks displays this description when requesting a profile be completed.

Specify 1-1024 characters. You can specify any characters; there are no restrictions.

webMethods Trading Networks User’s Guide Version 6.5 99

Page 100: Web Methods Trading Networks Users Guide 65

C H A P T E R 7 P r o f i l e F i e l d s

5 Click OK.

Data Type The data type of the profile field. Select either String or Binary from the list. If you specify String, you can specify a default value, maximum length, and valid values for the profile field.

Default Optional. The default value for a profile field. You can specify Default only when Data Type is String.

Specify 1-128 characters. You can specify any characters; there are no restrictions.

Maximum Length Optional. The maximum number of characters that you want to allow someone to specify for the profile field. If you do not specify a maximum length, there is no limit placed on the profile field. You can specify Maximum Length only when Data Type is String.

Valid Values Optional. These are values that you want Trading Networks to accept for this profile field. Specify the valid values in the table in the Valid Values field. Place one valid value per row.

To add row to the table, click Add New .

To remove a row from the table, select the row and then

click Delete Selected .

If you specify valid values, Trading Networks displays a list of the values that can be selected when filling out a profile. You can specify Valid Values only when Data Type is String.

Enabled Whether the profile field is enabled or disabled. To define the field and assure it is enabled, make sure the Enabled checkbox is selected.

Required Whether the profile field is required or not. Select the checkbox to indicate your choice. To indicate the profile field is required, assure the checkbox has a check. To indicate that the profile field is not required, remove the check from the checkbox.

For this Extended tab parameter... Specify...

100 webMethods Trading Networks User’s Guide Version 6.5

Page 101: Web Methods Trading Networks Users Guide 65

Extended Profile Fields

Viewing Extended Profi le FieldsTo view the extended profile fields that are defined on your system, perform the following procedure:

2 Select View Enterprise.

3 Select Enterprise Profile Fields.

4 Click the Extended tab to view the list of extended profile fields. For more information about how to change the format of the table, see “Working with Tables” on page 33.

5 Select one of the following options to view extended profile fields.

To view extended profile fields1 Start the Trading Networks Console. If you need procedures for this step, see

“Starting the Trading Networks Console” on page 22.

For the following... Perform this procedure...

To see details about a specific extended profile field

Double click the row for that field.

To display disabled extended profile fields

To display disabled extended profile fields, click Show All

to show both enabled (yellow light bulbs) and disabled (darkened light bulbs) items.

To hide disabled extended profile fields

To hide disabled extended profile fields, click Show Enabled

to only show enabled (yellow light bulbs) items. Trading Networks does not display any disabled (darkened light bulbs) items.

webMethods Trading Networks User’s Guide Version 6.5 101

Page 102: Web Methods Trading Networks Users Guide 65

C H A P T E R 7 P r o f i l e F i e l d s

Updating Extended Profi le FieldsYou can change all information for an extended profile field, including its name.

To update extended profile fields, perform the following procedure:

2 Select View Enterprise.

3 Select Enterprise Profile Fields.

4 Click the Extended tab.

5 Click the row containing the profile field you want to update.

6 Select Edit . Update the fields you want to change. For information on what you can specify, see step 4on page 99.

7 Click OK.

Disabling Extended Prof i le FieldsIf you no longer want to use an extended profile field, you can disable it. When you disable an extended profile field, Trading Networks no longer displays it in profiles. Trading Networks does not delete the field definition from the database or any information stored for the field in partner profiles.

Note:

Use caution when changing fields from required to not required. If you have services that use the field or if you might create or update services that use the field, the information might not be available if the partner is not required to supply it.

When you already have profiles in your system and then change an extended field from not required to required, you must manually edit the existing profiles for the updated extended profile fields. This is true even when the updated extended profile fields has a default value

To update an extended profile field

1 Start the Trading Networks Console. If you need procedures for this step, see “Starting the Trading Networks Console” on page 22.

Note: To sort the columns in the Extended table, select the column to sort and then click on the column heading for forward ( ) and reverse ( ) alpha-numeric order.

102 webMethods Trading Networks User’s Guide Version 6.5

Page 103: Web Methods Trading Networks Users Guide 65

Extended Profile Fields

Because the field is no longer displayed in profiles, if you create new profiles after disabling a field, the new profile will not contain information for the disabled field. Use caution when disabling fields. You should not disable a field that is used by services at your site because the information the services use will not be available for profiles that you add after you disable the field.

1 Start the Trading Networks Console. If you need procedures for this step, see “Starting the Trading Networks Console” on page 22.

2 Select View Enterprise.

3 Select Enterprise Profile Fields.

4 Click the Extended tab.

5 Click the row containing the profile field that you want to disable.

6 Right click and select Disable. Trading Networks places No in the Enabled column to indicate that the extended profile field is disabled.

Enabling Extended Profi le FieldsIf you disable an extended profile field and then later determine that you still need it, you can enable it.

If the profile field you are enabling is a required field, you might need to take further action. If you added partner profiles while the profile field was disabled, the profiles that were added in the interim do not contain information for the required field. You will need to manually update the profiles to supply the missing information. For instructions on how to update a partner profile, see “Updating Your Profile” on page 117.

To enable an extended profile field, perform the following procedure.

Note: To permanently remove the extended profile field from the database, your database administrator must remove it. Before you can remove the field, you must first remove all rows from the PartnerProfileField table that reference the profile field you want to delete.

To disable an extended profile field

Important! To perform this procedure, you must first perform the procedure described in “Disabling Extended Profile Fields” on page 102.

webMethods Trading Networks User’s Guide Version 6.5 103

Page 104: Web Methods Trading Networks Users Guide 65

C H A P T E R 7 P r o f i l e F i e l d s

1 Start the Trading Networks Console. If you need procedures for this step, see “Starting the Trading Networks Console” on page 22.

2 Select View Enterprise.

3 Select Enterprise Profile Fields.

4 Click the Extended tab.

5 Click the row containing the profile field that you want to enable.

6 Right click and select Enable. Trading Networks places Yes in the Enabled column to indicate that the extended profile field is enabled.

To enable an extended profile field

Note: To sort the columns in the Extended table, select the column to sort and then click on the column heading for forward ( ) and reverse ( ) alpha-numeric order.

104 webMethods Trading Networks User’s Guide Version 6.5

Page 105: Web Methods Trading Networks Users Guide 65

C H A P T E R 8

Your Prof i le (Your Enterpr ise)

What are Profiles? . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 106

Information Trading Networks Maintains in Your Profile . . . . . . . . . . . . . . . . . . . . . . . . . . . 106

Creating Your Own Profile . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . .115

Managing Your Profile . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . .117

webMethods Trading Networks User’s Guide Version 6.5 105

Page 106: Web Methods Trading Networks Users Guide 65

C H A P T E R 8 Yo u r P r o f i l e ( Yo u r E n t e r p r i s e )

What are Profiles? A profile is a summary of information about a corporation as part of a trading network. Your profile (Enterprise) contains standard profile fields that webMethods defines and extended profile fields that you define about your corporation. webMethods Trading Networks (Trading Networks) maintains your profile, as well as the profile of each of your partners on your network.

You must create your profile using the Profile Assistant before you can create profiles for your partners and exchange documents with partners. The Profile Assistant is a wizard that takes you step-by-step through the process of creating your own profile. In addition, you can use the Profile Assistant to create partner profiles. For more information about creating partner profiles, see Chapter 9, “Partner Profiles”.

Informat ion Trading Networks Maintains in Your Prof i leThe profile is made up of the standard fields that webMethods defines and the extended fields you define. The fields that Trading Networks displays in the Profile Assistant and Profile screen are the same. However, the presentation is different:

Profile Assistant—The Profile Assistant is a wizard that takes you step-by-step through the process of supplying the information for your profile.

Profile screens—Trading Networks groups related information together on the Profile screen on the following tabs: Corporate, Contact, Delivery Method, Extended Fields, and Security.

Information on Your Corporate TabThe Corporate tab contains your company’s address information and profile identifiers. These profile identifiers include the partner’s external ID type and profile group membership information.

Trading Networks displays the following fields on your profile’s Corporate tab.

Corporate Tab Field Description

Corporation Name The name of your corporation, for example, “Industrial Steel Company”.

Unit Name The name of the organizational unit or division within your corporation, for example, “Sales and Marketing”.

106 webMethods Trading Networks User’s Guide Version 6.5

Page 107: Web Methods Trading Networks Users Guide 65

Information Trading Networks Maintains in Your Profile

Trading Networks displays the following fields on your profile’s Address sub-tab.

Partner Type The type of software your corporation uses to interact with the trading network.

Value Meaning

webMethods Trading Networks

You are using webMethods Trading Networks.

webMethods for Partners You are using webMethods for Partners.

Note: You cannot change the Partner Type for your corporation (Enterprise). Trading Networks automatically sets the value of this field based on the license key.

Preferred Language The Preferred Language option is for use only by other webMethods components (e.g., webMethods RosettaNet Module) for localization purposes. Optionally, specify the preferred language of your corporation.Trading Networks does not use this option for its own processing.

Address Sub-Tab Field Description

Country The country where your corporation is located, for example “USA”.

Address The street address of your corporation, for example, “123 Main Street”. You can specify an unlimited number of addresses for a corporation. The order that you add the addresses is the order that they are displayed as tabs.

City The city where your corporation is located, for example, “Los Angeles”.

State/Province The state or province where your corporation is located, for example, “California”.

Postal Code The postal code (for example, a zip code) for the state or province where your corporation is located, for example, “90001”.

Corporate Tab Field Description

webMethods Trading Networks User’s Guide Version 6.5 107

Page 108: Web Methods Trading Networks Users Guide 65

C H A P T E R 8 Yo u r P r o f i l e ( Yo u r E n t e r p r i s e )

Trading Networks displays the following fields in the Profile Identifiers section of your profile’s Corporate tab.

Profile Identifiers Field Description

External ID Type

Value

The External ID Type is the identification that your corporation uses within documents. For example, a corporation might use a D-U-N-S number as an external identification type. The Value is the alpha-numerical value of the corporation’s external ID type. For example, if the corporation uses a D-U-N-S number, the Value is the corporation’s D-U-N-S number.

Trading Networks uses these fields to correlate the identification of a corporation in a document to the corporation defined by the profile. For example, when Trading Networks receives a document with an external ID type that is a D-U-N-S number and it matches the value specified in a profile, Trading Networks can associate the document with the profile and the corporation defined by the profile.

Additionally, on the systems of your partners that use Trading Networks, the value of the required ID types in your profile is used to create a webMethods User account. This required ID type cannot contain any white spaces. Your partner’s Trading Networks system uses the value of the external ID type that is required on its Trading Networks system.

Note: Out-of-the-box, Trading Networks provides pre-defined external ID types. You can add additional external ID types using the built-in service wm.tn.dictionary:addIDType. For more information, see the webMethods Trading Networks Built-in Services Reference.

Trading Networks uses the required external ID defined by the tn.required.idType system property. The tn.required.idType property controls what type of external ID is used as the IS username for Trading Networks partners.This required ID type cannot contain any white spaces and the default value is DUNS. You configure the required ID type by using the tn.required.idtype property on the TN Properties page. For more information about the TN Properties page, see Chapter 4, “Trading Networks Configuration Properties”.

108 webMethods Trading Networks User’s Guide Version 6.5

Page 109: Web Methods Trading Networks Users Guide 65

Information Trading Networks Maintains in Your Profile

The your profile’s Corporate tab also contains the Profile Group Membership table.

Information on Your Contact TabTrading Networks displays the following fields on the Contact tab.

Corporate tab Field Description

Profile Group Membership The name of the profile group that Trading Networks associates your profile to. This column contains the list of profile groups that your profile belongs to.

You can only associate profiles with a profile group if there are profile groups defined in the database. Once you create a profile group, you can associate a partner profile (including your Enterprise profile) with any profile group and to more than one group.

For more information about how to create profile groups, see “Other Configuration Settings” on page 61.

Contact Tab Field Description

Contact Type The type of contact, for example, “Administrative”.

Note: Out-of-the-box, Trading Networks provides the contact types Administrative and Technical. You can add additional contact types by using the built-in service wm.tn.dictionary:addContactType. For more information, see the webMethods Trading Networks Built-in Services Reference.

Role The role the contact has in your corporation. This might be a job title, for example, “Trading Network Administrator”.

Last Name The contact's last name (surname).

Note: To sort the contacts’ last names alphabetically, click on the Name column heading for forward ( ) and reverse ( ) alpha-numeric order.

First Name The contact's first (given) name.

webMethods Trading Networks User’s Guide Version 6.5 109

Page 110: Web Methods Trading Networks Users Guide 65

C H A P T E R 8 Yo u r P r o f i l e ( Yo u r E n t e r p r i s e )

E-mail The contact's e-mail address.

Note: On the Processing Rules screen, Trading Networks allows you to select a contact type for the Alert e-mail processing action. The Alert e-mail processing action instructs Trading Networks to send an e-mail message to the contacts of the selected contact type. If an e-mail address is not specified for a contact of the selected contact type, Trading Networks cannot send the e-mail message. For more information, see “Action 2—Send an Alert E-mail” on page 338.

Telephone The contact's telephone number, for example, “1-800-555-1234”.

Extension The contact's extension number.

Pager The contact's pager number, for example, “1-330-555-7890”.

Fax The contact's fax number, for example, “1-888-555-4897”.

Country The country where the contact is located, for example, “USA”.

Address The street address of the contact, for example, “123 Main Street, Suite 456”.

City The city where the contact is located, for example, “Los Angeles”

State/Province The state or province where the contact is located, for example, “California”.

Postal Code The postal code (for example, a zip code) for the state or province where the contact is located, for example, “90001”.

Contact Tab Field Description

110 webMethods Trading Networks User’s Guide Version 6.5

Page 111: Web Methods Trading Networks Users Guide 65

Information Trading Networks Maintains in Your Profile

Information on Your Delivery Method TabTrading Networks displays the following fields on the Delivery Method tab.

Delivery Method Tab Field Description

Protocol The name of a delivery method that Trading Networks can use when delivering documents.

Note: Trading Networks provides (out-of-the-box) delivery methods for delivering documents via e-mail (SMTP), HTTP, HTTPS, FTP, and FTPS. If you require another method (e.g., delivering into a message queuing system), see Chapter 17, “Delivery Services”. This chapter describes how to add your own delivery methods.

Host The host name or IP address of your system, for example, “IndustrialSteel.com”.

Note: This option is only valid for HTTP, HTTPS, FTP, and FTPS protocols.

Port The port number on which your system listens for incoming requests, for example, “5555”. If you do not supply a port number, Trading Networks uses the default port number for the protocol—for HTTP, it uses 80; for HTTPS, it uses 443; for FTP and FTPS it uses 21.

This option is only valid for HTTP, HTTPS, FTP, and FTPS protocols.

webMethods Trading Networks User’s Guide Version 6.5 111

Page 112: Web Methods Trading Networks Users Guide 65

C H A P T E R 8 Yo u r P r o f i l e ( Yo u r E n t e r p r i s e )

Location The location a partner is to use when sending a document to your system.

For this Protocol… Use this Location…

HTTP or HTTPS The URL that Trading Networks is to use when sending documents. Trading Networks automatically fills in the Location with /invoke/wm.tn/receive, the standard URL for document exchange.

FTP or FTPS The directory path that Trading Networks is to use when sending documents. The file name of the file is the internal ID that Trading Networks generates for the document when Trading Networks receives it.

For XML documents, the file extension is xml, e.g., 0a010154f70ddbf900000203.xml.

For flat file documents, the file extension is dat

E-mail The e-mail address a partner is to use when delivering documents to your system, for example, “[email protected]”.

Use as preferred protocol

The delivery method that you prefer partners to use to deliver documents to your Trading Networks system. The preferred delivery method is the value you select for Protocol. If the Use as preferred protocol is not selected for any delivery method, Trading Networks uses Queue for Polling.

For more information about

Clients that partners can use to send documents to Trading Networks, see Chapter 4, "Sending Documents to Trading Networks for Processing" in the webMethods Trading Networks Concepts Guide.

Delivery methods you can use with Trading Networks, see Chapter 6, "Delivering Documents to Partners" in the webMethods Trading Networks Concepts Guide.

Delivery Method Tab Field Description

112 webMethods Trading Networks User’s Guide Version 6.5

Page 113: Web Methods Trading Networks Users Guide 65

Information Trading Networks Maintains in Your Profile

Information on Your Extended Fields TabTrading Networks displays the extended fields that you define on this tab.

Information on Your Security TabThe Security tab contains the following sub-tabs:

Sign/Verify sub-tab—Use this sub-tab to specify certificate information that Trading Networks uses to digitally sign documents that your Enterprise sends to partners. Trading Networks digitally signs a document when the built-in service wm.tn.doc:sign is invoked. For more information on this service, see the webMethods Trading Networks Built-in Services Reference.

Decrypt/Encrypt sub-tab—Use this sub-tab to specify certificate information that Trading Networks uses to decrypt documents that your Enterprise receives from partners. Trading Networks maintains this information for other webMethods components (e.g., webMethods RosettaNet Module) that take advantage of this feature. Specify this information if you are using another webMethods component that requires it.

When you add certificate information on this sub-tab, Trading Networks does not check to see whether the CA that signed the certificate is included in the list of trusted

Extended Fields Tab Field Description

Group (Name) The name of the field group that Trading Networks associates extended fields with. This column contains the list of groups that have defined profile fields.

Note: Out-of-the-box, Trading Networks provides pre-defined field groups. You can add additional field groups by specifying a new group when you add a new extended field. Alternatively, you can also use the built-in service wm.tn.dictionary:addFieldGroup. For more information about this service, see the webMethods Trading Networks Built-in Services Reference.

If there are no extended profile fields in a specific group, that group is not listed. For example, if you have not defined any extended profile fields for the “Corporate” group, “Corporate” will not appear in the Group column.

Note: To see extended fields, select the name of the group from the Group column, and Trading Networks displays the corresponding extended fields on the right.

webMethods Trading Networks User’s Guide Version 6.5 113

Page 114: Web Methods Trading Networks Users Guide 65

C H A P T E R 8 Yo u r P r o f i l e ( Yo u r E n t e r p r i s e )

CAs that the webMethods Integration Server maintains. For more information, see security information in the webMethods Integration Server Administrator’s Guide.

SSL Client sub-tab—Use this sub-tab to specify a certificate that enables Trading Networks to act as an SSL client to connect to a remote secure server.

Trading Networks displays the following fields on each sub-tab.

Security Tab Field Description

Certificate Chain The digital certificate that you want Trading Networks to use to digitally sign or decrypt documents when a partner’s profile does not contain a signing or decrypting certificate.

A best practice is to specify the certificate that you want to use with most of your partners in the Default profile to establish the default. Then, if you want to use a different certificate with other partners, add that partner to the list of certificate sets and define the alternate set.

If you specify a default certificate set, Trading Networks uses it for all partners for which there are no alternative certificate set defined. If a profile has no signing/decrypting certificate information, Trading Networks uses the default certificate set for your Enterprise to process information for that partner.

All profiles display the default certificate as the first element of the Partner list, whether you set values for a default or not. If you do not set values, the default certificate will have sub-tabs with no certificate information defined. Default certificate sets cannot be deleted.

If you try to save alternative certificate sets for a partner using default certificate sets, Trading Networks cannot save the information that you supplied. This is because the certificate set is the same as the default set. Similarly, if you try to save alternative certificate sets for a partner whose certificates are not set, Trading Networks cannot save the information.

Trading Networks displays the value of the CN (Common Name) field from the Subject defined by the certificate.

Private Key The private key that is associated with the digital certificate that you specified in the Certificate Chain field. Trading Networks uses the private key to process Sign, Decrypt, and Client SSL certificates.

For more information about security in Trading Networks, see Appendix B, "Security within Trading Networks" in the webMethods Trading Networks Concepts Guide.

114 webMethods Trading Networks User’s Guide Version 6.5

Page 115: Web Methods Trading Networks Users Guide 65

Creating Your Own Profile

Creat ing Your Own Prof i leYou create your own profile using the Profile Assistant. The Profile Assistant is a wizard that takes you step-by-step through the process of creating your own profile. To create your own profile, you can either supply all the information, or if you are a webMethods Partner Connect member, you can download your profile information from webMethods Partner Connect.

In addition, you can use the Profile Assistant to create partner profiles. For more details, see Chapter 9, “Partner Profiles”.

Specifying Your Profi le InformationTo create your profile by specifying your profile information, perform the following procedure:

1 Start the Trading Networks Console. If you need procedures for this step, see “Starting the Trading Networks Console” on page 22.

2 Select Tools Profile Assistant .

3 Select Create my profile.

4 Click Next. The Profile Assistant takes you to the appropriate panel based on the action that you are to perform.

5 Follow the directions specified by the Profile Assistant. On the Profile Assistant panels, use the following buttons to supply information to the profile fields:

The information you need to supply in the Profile Assistant is the same as the information you supply on the Profile screen. For descriptions of the fields on the

To learn more about:

What profiles are, see the profiles chapter in the webMethods Trading Networks Concepts Guide.

To create your profile by specifying your profile information

Use this button To...

Add an entry.

or Edit an existing entry.

Delete an entry.

webMethods Trading Networks User’s Guide Version 6.5 115

Page 116: Web Methods Trading Networks Users Guide 65

C H A P T E R 8 Yo u r P r o f i l e ( Yo u r E n t e r p r i s e )

Profile screen, see “Information Trading Networks Maintains in Your Profile” on page 106.

6 When you have completed all the steps, Trading Networks saves the new profile and displays the “Profile Created” message.

After you create your profile and Trading Networks validates the fields, Trading Networks saves your profile and sets the status of your profile on your system to “Inactive”. Note that your profile is saved, even if there are errors.

Summary of Profi le StatusesTrading Networks maintains a status for your profile (Enterprise). The following table shows possible profile statuses and their meanings:

Note: Trading Networks validates the information you enter in each panel and will alert you with an error message for incorrect or incomplete entries. If you receive an error message, you must go back to that panel and complete the required information to proceed with Profile Assistant. Click Back to return to the previous panel in Profile Assistant.

Note: If the profile fields were not completed correctly, Trading Networks:

1) Displays a dialog box listing the error messages that identify the fields that are in error and

2) Saves the profile with the information you specified. You must edit the profile to correct the errors.

For instructions, see “Updating Your Profile” on page 117.

Important! Before you can exchange documents with partners, you must enable your profile to update the status to “Active”. For instruction on how to enable a profile, see “Enabling Your Profile—Changing the Status to Active” on page 129.

Status Meaning

Active You have filled in your profile and Trading Networks has determined that all profile fields (standard and extended) are valid. You have enabled your profile to set the status to “Active”.

Inactive Either you have just added your profile, but not yet enabled it, or you have disabled your profile.

116 webMethods Trading Networks User’s Guide Version 6.5

Page 117: Web Methods Trading Networks Users Guide 65

Managing Your Profile

If you enable your own profile, you will be able to exchange documents with partners. If you enable a partner’s profile, you will be able to exchange documents with that partner. For more information about enabling a partner’s profile, see “Enabling a Partner’s Profile—Changing the Status to Active” on page 176.

Managing Your Prof i leThe following table describes the tasks you can perform on your profile:

Viewing Your Profi lePerform the following procedure to view your profile:

1 Start the Trading Networks Console. If you need procedures for this step, see “Starting the Trading Networks Console” on page 22.

2 Select View Enterprise. The Enterprise toolbar and tabs appear on the screen.

Updating Your Profi leFrom time to time, you might need to update your profile. The following lists some reasons for updating your own partner profile:

Information about your corporation has changed (name, address, etc.).

Information for one of your contacts has changed, for example, the contact's e-mail address has changed or possibly you have a new contact to replace an existing one.

You have changed the port number on which Trading Networks listens for incoming requests.

You have added extended profile fields that you need to fill in for your profile.

You want to change the default certificate that Trading Networks uses to digitally sign documents.

Task See page...

“Viewing Your Profile” 117

“Updating Your Profile” 117

“Enabling Your Profile—Changing the Status to Active” 129

“Disabling Your Profile—Changing the Status to Inactive” 129

To view your profile

webMethods Trading Networks User’s Guide Version 6.5 117

Page 118: Web Methods Trading Networks Users Guide 65

C H A P T E R 8 Yo u r P r o f i l e ( Yo u r E n t e r p r i s e )

Perform the following procedure to update your profile. Fields that you must specify are in blue and are marked with an asterisk (*) on the screen:

1 Start the Trading Networks Console. If you need procedures for this step, see “Starting the Trading Networks Console” on page 22.

2 Select View Enterprise. Trading Networks displays the Profile screen.

3 Click the Corporate tab and make the necessary changes. For more information about these fields, see “Information on Your Corporate Tab” on page 106.

To update your profile

For this Corporate tab parameter... Perform this procedure...

Corporation Name

Unit Name

Partner Type

Preferred Language

To add or edit your corporation information:

1) Click Edit Corporation Name next to the Corporation Name field.

2) In the Corporation Name field, type the name of your corporation, for example, “Industrial Steel Company”.

3) In the Unit Name field, type the name of the organizational unit or division within your corporation, for example, “Sales and Marketing”.

4) In the Partner Type field, specify the type of software your corporation uses to interact with the trading network: webMethods Trading Networks or webMethods for Partners. The partner type is listed with the icon used in the Summary view of the Transaction Analysis screen.

5) In the Preferred Language field, optionally specify the language preference your corporation uses if needed for another webMethods component (e.g., webMethods RosettaNet Module).

6) Click Save.

118 webMethods Trading Networks User’s Guide Version 6.5

Page 119: Web Methods Trading Networks Users Guide 65

Managing Your Profile

Country

Address

City

State/Province

Postal Code

To add or edit an address for your corporation:

1) To add, click Add New Address on the right side of the screen. To edit, select the tab containing the address

you want to edit; then click Edit Address .

2) Specify the following fields for the corporate information:

For this corporate parameter…

Specify…

Country The country where your corporation is located, for example, “USA”.

Address The street address for your corporation, for example, “123 Main Street, Suite 456”.

City The city where your corporation is located, for example, “Los Angeles”.

State/Province The state or province where your corporation is located, for example, “California”.

Postal Code The postal code (for example, a zip code) for the state or province where your corporation is located, for example, “90001”.

3) Click Save.

Note: Repeat this step for each address that you want to add or edit. You can specify an unlimited number of addresses for a corporation. The order that you add the addresses is the order that they are displayed as tabs.

To delete an address:1) Select the tab containing the address you want to

delete.

2) Click Delete Address in the bottom portion of the screen. Trading Networks confirms that you want to delete the address. Click Yes.

For this Corporate tab parameter... Perform this procedure...

webMethods Trading Networks User’s Guide Version 6.5 119

Page 120: Web Methods Trading Networks Users Guide 65

C H A P T E R 8 Yo u r P r o f i l e ( Yo u r E n t e r p r i s e )

External ID Type

Value

Profile Group Membership

To add or edit a profile identifier:

1) To add and external ID, click Add New External ID in the Profile Identifiers section on the bottom portion of the screen. To edit, select the row you want to edit, then

click Edit External ID .

2) In the External ID Type field, select the external ID type. Be sure to include an external ID type for each type of identification that you use in documents. You can specify an unlimited number of external ID types.

3) In the Value field, specify the value of the external ID type. For example, if you selected DUNS and your D-U-N-S number is 987654321, specify 987654321 for Value. The maximum length you can specify for an external ID is 128 characters.

4) Click Save.

5) You can associate your profile with a profile group.

Note: You can only associate profiles with a profile group if there are profile groups defined in the database. To add a new profile group, see “Other Configuration Settings” on page 61.

Click Add New Profile Group next to Profile Group Membership. Select the profile group name from the list of available groups.

Repeat this step if you want to associate your profile with more than one profile group.

To delete a profile group association, select the row containing the profile group you want to delete

and click Delete From Group . Trading Networks confirms that you want to delete the profile group. Click Yes.

6) Click Save.

For this Corporate tab parameter... Perform this procedure...

120 webMethods Trading Networks User’s Guide Version 6.5

Page 121: Web Methods Trading Networks Users Guide 65

Managing Your Profile

4 Click the Contact tab and fill in the fields. Use the Name column on the left-hand side of the screen to add, edit, or delete the contacts listed in this column. For each contact, supply the following information. For more information, see “Information on Your Contact Tab” on page 109.

To delete a profile identifier:1) Select the row containing the external ID you want to

delete and click Delete External ID . Trading Networks confirms that you want to delete the external ID. Click Yes.

For this Contact tab parameter... Perform this procedure...

Contact Type

Role

Last Name

First Name

E-mail

Telephone

Extension

Pager

Fax

Country

Address

City

State/Province

Postal Code

To add or edit a contact:

1) To add, click Add New Contact . To edit, select the

name you want to edit; then click Edit Contact .

2) Specify the following fields for the contact:

For this contact parameter…

Specify…

Contact Type The type of contact, for example, “Administrative”. Select a contact type from the list.

Role The role the contact has in the partner’s corporation. This might be a job title, for example, “Trading Network Administrator”.

Last Name The contact's last (surname) name.

Note: To sort the contacts’ last names alphabetically, click on the Name column heading for forward ( ) and reverse ( ) alphabetization.

For this Corporate tab parameter... Perform this procedure...

webMethods Trading Networks User’s Guide Version 6.5 121

Page 122: Web Methods Trading Networks Users Guide 65

C H A P T E R 8 Yo u r P r o f i l e ( Yo u r E n t e r p r i s e )

First Name The contact's first (given) name.

E-mail The contact's e-mail address, for example, “[email protected]”.

Telephone The contact's telephone number, for example, “1-800-555-1234”.

Extension The contact's extension number. If the telephone number in the Telephone field identifies the main line for the corporation, use the Extension field to identify the contact's extension.

Pager The contact's pager number, for example, “1-330-555-7890”.

Fax The contact's fax number, for example, “1-888-555-4897”.

Country The country where the contact is located, for example, “USA”.

Address The street address for the contact, for example, “123 Main Street, Suite 456”.

City The city where the contact is located, for example, “Los Angeles”.

State/Province The state or province where the contact is located, for example, “California”.

Postal Code The postal code (for example, a zip code) for the state or province where the contact is located, for example, “90001”.

a Click Save. If you added a contact, the new contact’s name now appears in the Name column.

Note: Repeat this step for each contact that you want to add or edit. You can specify an unlimited number of contacts for a corporation.

For this Contact tab parameter... Perform this procedure...

122 webMethods Trading Networks User’s Guide Version 6.5

Page 123: Web Methods Trading Networks Users Guide 65

Managing Your Profile

5 Click the Delivery Method tab and fill in the fields to specify how partners are to deliver documents to your Trading Networks system. The Deliver document processing action uses the settings on the Delivery Method tab. For more information, see “Information on Your Delivery Method Tab” on page 111.

To delete a contact: 1) Select the contact that you want to delete in the Name

column.

2) Click Delete Contact . Trading Networks confirms that you want to delete the contact. Click Yes.

For this Delivery Method tab parameter... Perform this procedure...

Protocol

Host

Port

Location

E-mail

Use as preferred protocol

To add or edit a delivery method:

1) To add a delivery method, click Add New Destination in the upper portion of the screen. To edit a delivery method, select the tab for the delivery method; then,

click Edit Destination .

2) In the Protocol field, select a delivery method from the list.

Trading Networks updates the information on the tab screen to display the fields required for the protocol you selected.

3) For an HTTP, HTTPS, FTP, or FTPS delivery method, specify the host name or IP address of your system in the Host field, for example, “IndustrialSteel.com”.

4) For an HTTP, HTTPS, FTP, or FTPS delivery method, specify the port number on which your system listens for incoming requests in the Port field, for example, “5555”.

Note: If you do not supply a port number, Trading Networks uses the following defaults: HTTP—80; HTTPS—443; FTP or FTPS—21.

For this Contact tab parameter... Perform this procedure...

webMethods Trading Networks User’s Guide Version 6.5 123

Page 124: Web Methods Trading Networks Users Guide 65

C H A P T E R 8 Yo u r P r o f i l e ( Yo u r E n t e r p r i s e )

5) For an HTTP, HTTPS, FTP or FTPS delivery method, specify one of the following in the Location field:

For HTTP or HTTPS, Location is the URL partners should use to send documents to your system via HTTP or HTTPS. By default, Trading Networks displays the default URL: “/invoke/wm.tn/receive” for HTTP and HTTPS.

For FTP or FTPS, Location is a directory path on the machine identified by Host and Port to which your partners should deliver documents when using this FTP or FTPS delivery method.

6) For an E-mail delivery method, specify the e-mail address to which you want a partner to deliver documents in the E-mail field, for example, “[email protected]

7) If you prefer that partners use this delivery method to deliver documents to your Trading Networks system, select the Use as preferred protocol checkbox.

Trading Networks displays the preferred protocol at the top of the Delivery Method tab screen.

Note: If the Use as preferred protocol is not selected for any delivery method, Trading Networks uses Queue for polling.

8) Click Save.

To delete a delivery method:1) Select the tab for the delivery method you want to delete.

2) Click Delete Destination . Trading Networks confirms that you want to delete the delivery method. Click Yes.

Note: You cannot delete a delivery method that is selected as the preferred protocol.

For this Delivery Method tab parameter... Perform this procedure...

124 webMethods Trading Networks User’s Guide Version 6.5

Page 125: Web Methods Trading Networks Users Guide 65

Managing Your Profile

6 Click the Extended Fields tab and fill in the fields. For more information, see “Information on Your Extended Fields Tab” on page 113.

For this Delivery Method tab parameter... Perform this procedure...

Group To view the values of the extended field: 1) From the Group column on the left side of the screen,

select the name of the group that contains the extended profile field you want to edit. Trading Networks displays the corresponding extended fields on the right.

Note: If there are no extended profile fields in a specific group, Trading Networks does not list that group. For example, if you have not defined any extended profile fields for the “Corporate” group, “Corporate” will not appear in the Group column. See “Extended Profile Fields” on page 97 on how to add and define extended fields.

2) Click Edit Field to fill in the fields for the selected group.

Note: If you do not know what to specify for an extended field and the description does not indicate what to specify, contact your Trading Networks administrator to determine what to specify.

3) Click Save.

Note: You must save the changes you make to one group’s extended fields before you can edit another group’s extended fields. Repeat this step for each extended field you want to update.

webMethods Trading Networks User’s Guide Version 6.5 125

Page 126: Web Methods Trading Networks Users Guide 65

C H A P T E R 8 Yo u r P r o f i l e ( Yo u r E n t e r p r i s e )

7 Click the Security tab and fill in the fields. For more information, see “Information on Your Security Tab” on page 113. Perform the following procedure for each sub-tab.

Use this sub-tab… To add/update certificates to use to…

Sign/Verify Digitally sign documents that your Enterprise sends to partners.

Decrypt/Encrypt Decrypt documents that your Enterprise receives from partners.

SSL Client Enable Trading Networks to act as an SSL client to connect to a remote secure server.

For this Security tab parameter… Perform this procedure...

Certificate Chain To view information about a certificate:1) Select the partner from the Partner list on the left.

2) Select the appropriate certificate sub tab: Sign/Verify, Decrypt/Encrypt, or SSL Client. Trading Networks displays the certificate information.

3) Click the appropriate row of the Certificate Chain table. The Console displays the certificate information on the right.

To add a certificate chain:

1) Click Edit Selected .

2) Click Add Certificate(s) .

3) In the Add Certificate dialog box, add one or more certificates as follows:

To add one certificate, browse to and select the file that contains the certificate.

126 webMethods Trading Networks User’s Guide Version 6.5

Page 127: Web Methods Trading Networks Users Guide 65

Managing Your Profile

Note: When you add a certificate, be sure also to add the CA certificate(s) and private key that are associated with the certificate. The certificates, CA certificates, and private keys must reside in your file system. Trading Networks can import files that have a .der, .cer, or .p7b extension. If you import a .der file, Trading Networks appends it to the existing certificate chain list. However, if you import a .cer or .p7b file, Trading Networks replaces the certificate chain list with the .cer or .p7b file.

To add multiple certificates within a directory, browse to and select the files that contain the certificates, using the SHIFT + CONTROL keys. If you select an entire directory, Trading Networks imports all files except duplicate files and private key files.

Note: The order that Trading Networks displays the certificate chain does not reflect how the chain is linked.

To delete certificates:

1) Click Edit Selected .

2) Select the certificate(s) that you want to delete. To select multiple certificates, press CTRL and click on the second and subsequent certificates.

3) Click Delete Certificate(s) . When Trading Networks prompts you to verify that you want to delete the certificate(s), click Yes.

Note: If you delete the certificate, be sure also to delete the CA certificate(s) and private key that are associated with the certificate.

Private Key To view a private key:

The Trading Networks Console will not display private key information. If a key is defined, Defined appears in the text field. If a key is not defined, <Empty> appears in the text field.

For this Security tab parameter… Perform this procedure...

webMethods Trading Networks User’s Guide Version 6.5 127

Page 128: Web Methods Trading Networks Users Guide 65

C H A P T E R 8 Yo u r P r o f i l e ( Yo u r E n t e r p r i s e )

To add a private key:

1) Click Edit Selected .

2) Click Import Private Key in the Private Key field.

3) In the Import Private Key dialog box, browse to and select the file that contains the private key that you want to add. You can only import a .der file that contains a valid private key format. Once you select the file, then click Open.

Note: If you add a private key, be sure also to add the certificate and CA certificate(s) that are associated with the private key.

To delete a private key:

1) Click Edit Selected .

2) Click Delete Private Key . When Trading Networks prompts you to verify that you want to delete the private key, click Yes.

Note: If you delete the private key, be sure also to delete the certificate and CA certificate(s) that are associated with the private key.

For this Security tab parameter… Perform this procedure...

128 webMethods Trading Networks User’s Guide Version 6.5

Page 129: Web Methods Trading Networks Users Guide 65

Managing Your Profile

Enabling Your Profi le—Changing the Status to ActiveAfter you add a profile and Trading Networks validates the fields, Trading Networks saves the profile and sets the status of the profile to “Inactive”. Before you can exchange documents with partners, you must enable your profile by updating your status to “Active”. Enabling your profile allows you to exchange documents with partners. When you enable your profile, Trading Networks changes the status of the profile to “Active”.

For more information about statuses, see “Summary of Profile Statuses” on page 116.

To enable your profile, perform the following procedure:

2 Select View Enterprise.

3 Select Enterprise Enable.

Disabling Your Profi le—Changing the Status to InactiveWhen you disable your profile, Trading Networks changes the status of your profile to “Inactive”. As a result, you will not be able to exchange documents with your partners. For more information about statuses, see “Summary of Profile Statuses” on page 116.

To disable your profile, perform the following procedure:

2 Select View Enterprise.

3 Select Enterprise Disable.

To enable a your profile 1 Start the Trading Networks Console. If you need procedures for this step, see

“Starting the Trading Networks Console” on page 22.

To disable your profile1 Start the Trading Networks Console. If you need procedures for this step, see

“Starting the Trading Networks Console” on page 22.

webMethods Trading Networks User’s Guide Version 6.5 129

Page 130: Web Methods Trading Networks Users Guide 65

C H A P T E R 8 Yo u r P r o f i l e ( Yo u r E n t e r p r i s e )

130 webMethods Trading Networks User’s Guide Version 6.5

Page 131: Web Methods Trading Networks Users Guide 65

C H A P T E R 9

Partner Prof i les

What is a Partner’s Profile? . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 132

Information Trading Networks Maintains in the Partner’s Profile . . . . . . . . . . . . . . . . . . . . . 132

Adding Partner Profiles . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 145

About Querying and Viewing Profiles . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 166

Managing the Partner’s Profile . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 173

webMethods Trading Networks User’s Guide Version 6.5 131

Page 132: Web Methods Trading Networks Users Guide 65

C H A P T E R 9 P a r t n e r P r o f i l e s

What is a Partner ’s Prof i le?A partner’s profile is a summary of information about a partner on a trading network. webMethods Trading Networks (Trading Networks) maintains your profile and the profile of each of your partners on your network. You can use the Trading Networks Console to add, edit, and view profiles.

Informat ion Trading Networks Maintains in the Partner ’s Prof i leThe partner’s profile is made up of the standard fields that webMethods defines and the extended fields you define. You add a partner’s profile by providing partner information on the New Profile screen. You need to supply partner information that Trading Networks groups on the following tabs of the Profile screen: Corporate, Contact, Delivery Method, Extended Fields, and Security. For procedures on how to add a partner’s profile, see “Adding Partner Profiles” on page 145.

Information on the Partner ’s Corporate Tab

The Corporate tab contains the partner’s address information and profile identifiers. These profile identifiers include the partner’s external ID type and profile group membership information.

Trading Networks displays the following fields on the partner’s Corporate tab.

Note: Note that you cannot create partner profiles until after you have created the Enterprise profile for your corporation. For more information about creating your Enterprise profile, see the previous chapter, Chapter 8, “Your Profile (Your Enterprise)”.

Corporate Tab Field Description

Corporation Name The name of the partner’s corporation, for example, “Industrial Steel Company”.

Unit Name The name of the organizational unit or division within the partner’s corporation, for example, “Sales and Marketing”.

Partner Type The type of software the corporation uses to interact with the trading network.

Value Meaning

webMethods Trading Networks

The corporation uses webMethods Trading Networks.

webMethods for Partners

A partner in the network that is using webMethods for Partners.

132 webMethods Trading Networks User’s Guide Version 6.5

Page 133: Web Methods Trading Networks Users Guide 65

Information Trading Networks Maintains in the Partner’s Profile

Trading Networks displays the following fields on the partner’s Address sub-tab.

Web Browser A partner in the network that is using a Web browser.

Other/Unknown A partner in the network that is not using one of the other types of software. For example, this might be a partner that is using a webMethods Integration Server (without Trading Networks) or a marketplace.

Preferred Language The Preferred Language option is for use only by other webMethods components (e.g., webMethods RosettaNet Module) for localization purposes. Optionally, specify the preferred language of the partner. Trading Networks does not use this option for its own processing.

Address Sub-Tab Field Description

Country The country where the partner’s corporation is located, for example “USA”.

Address The street address of the partner’s corporation, for example, “123 Main Street”.

City The city where the partner’s corporation is located, for example, “Los Angeles”.

State/Province The state or province where the partner’s corporation is located, for example, “California”.

Postal Code The postal code (for example, a zip code) for the state or province where the partner’s corporation is located, for example, “90001”.

Corporate Tab Field Description

webMethods Trading Networks User’s Guide Version 6.5 133

Page 134: Web Methods Trading Networks Users Guide 65

C H A P T E R 9 P a r t n e r P r o f i l e s

Trading Networks displays the following fields in the partner’s Profile Identifiers section of the partner’s Corporate tab.

Profile Identifiers Field Description

External ID Type Value The External ID Type is the type of identification that the partner (partner’s corporation) uses within documents. The Value is the alpha-numerical value of the partner’s external ID type. For example, if the partner uses a D-U-N-S number as an external identification type, select DUNS from the External ID Type list and specify the partner’s D-U-N-S number in the Value column.

Trading Networks uses the values of these fields to correlate the identification of a corporation in a document to the corporation defined by the partner’s profile. For example, when Trading Networks receives a document with an external ID type that is a D-U-N-S number and that D-U-N-S number matches the value specified in a partner’s profile, Trading Networks can associate the document with the partner.

Additionally, the value of the required ID type is used for a webMethods user account that Trading Networks automatically creates when you add a partner profile. This required ID type cannot contain any white spaces. You determine the external ID that Trading Networks uses for the user account by identifying a required ID type. You configure the required ID type by using the tn.required.idtype property on the TN Properties page.

Note: The tn.required.idType property controls what type of external ID is used as the IS username for Trading Networks partners. This required ID type cannot contain any white spaces and the default value is DUNS. For more information about the TN Properties page, see Chapter 4, “Trading Networks Configuration Properties”.

134 webMethods Trading Networks User’s Guide Version 6.5

Page 135: Web Methods Trading Networks Users Guide 65

Information Trading Networks Maintains in the Partner’s Profile

The partner’s Corporate tab also contains the Profile Group Membership table.

When your partner delivers a document to your system, your partner must access your system using this user account. The user account has the proper Trading Networks privileges to allow your Trading Networks system to accept documents.

Important! After the valid profile is added, Trading Networks displays the partner’s username and password on your system. Be sure to record the information so that you can send the user name and password to your partner in“Step 3: Informing the Partner of the User Name and Password” on page 165. Otherwise, your partner cannot access or use your Trading Networks system.

Corporate tab Field Description

Profile Group Membership The name of the profile group that Trading Networks associates the partner’s profile to. This column contains the list of profile groups that the partner profile belongs to.

You can only associate profiles with a profile group if there are profile groups defined in the database. Once you create a profile group, you can associate a partner profile (including your Enterprise profile) with any profile group and to more than one group.

For more information about how to create profile groups, see “Other Configuration Settings” on page 61.

Profile Identifiers Field Description

webMethods Trading Networks User’s Guide Version 6.5 135

Page 136: Web Methods Trading Networks Users Guide 65

C H A P T E R 9 P a r t n e r P r o f i l e s

Information on the Partner ’s Contact TabTrading Networks displays the following fields on the partner’s Contact tab.

Contact Tab Field Description

Name This column contains the list of contacts defined for a partner’s corporation.

Contact Type The type of contact, for example, “Administrative”.

Note: Out-of-the-box, Trading Networks provides pre-defined contact types. You can add additional contact types by using the built-in service wm.tn.dictionary:addContactType. For more information, see the webMethods Trading Networks Built-in Services Reference.

Role The role the contact has in the partner’s corporation. This might be a job title, for example, “Trading Network Administrator”.

Last Name The contact's last name (surname).

Note: To sort the contacts’ last names alphabetically, click on the Name column heading for forward ( ) and reverse ( ) alphabetization.

First Name The contact's first (given) name.

E-mail The contact's e-mail address.

Note: On the Processing Rules screen, Trading Networks allows you to select a contact type for the Alert e-mail processing action. The Alert e-mail processing action instructs Trading Networks to send an e-mail message to the contacts of the selected contact type. If an e-mail address is not specified for a contact of the selected contact type, Trading Networks cannot send the e-mail message. For more information, see “Action 2—Send an Alert E-mail” on page 338.

Telephone The contact's telephone number, for example, “1-800-555-1234”.

Extension The contact's extension number.

Pager The contact's pager number, for example, “1-330-555-7890”.

Fax The contact's fax number, for example, “1-888-555-4897”.

Country The country where the contact is located, for example, “USA”.

Address The street address of the contact, for example, “123 Main Street, Suite 456”.

136 webMethods Trading Networks User’s Guide Version 6.5

Page 137: Web Methods Trading Networks Users Guide 65

Information Trading Networks Maintains in the Partner’s Profile

Information on the Partner ’s Delivery Method TabTrading Networks displays the following fields on the partner’s Delivery Method tab.

City The city where the contact is located, for example, “Los Angeles”

State/Province The state or province where the contact is located, for example, “California”.

Postal Code The postal code (for example, a zip code) for the state or province where the contact is located, for example, “90001”.

Delivery Method Tab Field Description

Protocol The name of a delivery method Trading Networks can use when delivering documents.

Note: Trading Networks provides (out-of-the-box) immediate delivery methods for delivering documents via e-mail (SMTP), HTTP, HTTPS, FTP, and FTPS. You can also queue documents for scheduled delivery using the Trading Networks’ out-of -the-box delivery service (wm.tn.transport:batchFTP service), which uses FTP to deliver documents to a single destination. See “Scheduled Delivery Queues” on page 378 for more information. If you require another method, see Chapter 17, “Delivery Services” on how to create custom delivery services.

Host The host name or IP address of the partner’s system, for example, “IndustrialSteel.com”.

Note: This option is only valid for HTTP, HTTPS, FTP, and FTPS protocols.

Port The port number on which the partner’s system listens for incoming requests, for example, “5555”. If no port number is supplied, the following defaults are used: for HTTP, use 80; for HTTPS, use 443; for FTP or FTPS, use 21.

Note: This option is only valid for HTTP, HTTPS, FTP, and FTPS protocols.

Contact Tab Field Description

webMethods Trading Networks User’s Guide Version 6.5 137

Page 138: Web Methods Trading Networks Users Guide 65

C H A P T E R 9 P a r t n e r P r o f i l e s

Location The location Trading Networks is to use when sending a document to a partner’s system.

For this Protocol… Use this Location…

HTTP or HTTPS The URL that Trading Networks is to use when sending documents. Trading Networks automatically fills in the Location with /invoke/wm.tn/receive, the standard URL for document exchange.

FTP or FTPS The directory path that Trading Networks is to use when sending documents. The file name of the file is the internal ID that Trading Networks generates for the document when Trading Networks receives it.

For XML documents, the file extension is xml, e.g., 0a010154f70ddbf900000203.xml.

For flat file documents, the file extension is dat

User Name The user name that your Trading Networks system is to supply when connecting to the partner’s system to deliver documents using the associated protocol (HTTP, HTTPS, FTP, or FTPS).

Important! If you are creating a profile for a partner that uses webMethods Trading Networks or webMethods for Partners, you must specify the user name of a webMethods User account on the partner’s system. The user account must be a member of the TNPartners group on the partner’s Integration Server.

If you do not know what to specify for User Name, contact the partner.

Delivery Method Tab Field Description

138 webMethods Trading Networks User’s Guide Version 6.5

Page 139: Web Methods Trading Networks Users Guide 65

Information Trading Networks Maintains in the Partner’s Profile

Password The password that your Trading Networks system is to supply (along with User Name) when connecting to the partner’s system using the associated protocol (HTTP, HTTPS, FTP, or FTPS).

Note: This option is only valid for HTTP, HTTPS, FTP, and FTPS protocols.

The password appears hidden by asterisks (*) on this screen. You can view the password in clear text (after you save the profile) by selecting Show Password from the Trading Partners menu.

Note: Passwords used in scheduled delivery queues (public and private) are stored in the Trading Networks database in binary-encoded form (not in clear text). It is not possible for Trading Networks to encrypt passwords used in scheduled delivery queues; since trading partners are allowed to create custom scheduled delivery services, Trading Networks cannot anticipate which user-defined input variable might be a password. For more information, see Appendix B, "Security within Trading Networks" in the webMethods Trading Networks Concepts Guide.

E-mail The e-mail address to which the partner wants Trading Networks to deliver documents, for example, “[email protected]”.

Use Public Queue View-only screen of schedules and settings for the selected public queue. A public queue is a queue that can contain documents for multiple receiving partners. Documents bound for several partners can be placed in the same public queue. For more information about public queues, see “Defining Public Queues” on page 380.

Note: You cannot select either the public or private queue as the preferred protocol.

Delivery Method Tab Field Description

webMethods Trading Networks User’s Guide Version 6.5 139

Page 140: Web Methods Trading Networks Users Guide 65

C H A P T E R 9 P a r t n e r P r o f i l e s

Use Private Queue Send documents to a private queue for scheduled delivery. A private queue is a queue that contains only delivery tasks that correspond to documents aimed for a specific receiving partner.

Settings tab–Set the following private queue settings on this tab.

Delivery Service. The delivery service to use for the private queue. Select the delivery service from the list. For more information, see “Adding and Registering New Delivery Services” on page 421

Set Inputs. The inputs for the delivery service you selected.

Queue State. The state of the queue (Enable Queue, Drain Queue, Suspend Delivery, or Disable Queue). The state of the scheduled delivery queue determines: 1) whether Trading Networks can add delivery tasks to the queue and 2) whether Trading Networks can deliver documents associated with the delivery tasks in the queue.

Schedule tab–The schedule of when Trading Networks is to invoke the delivery service that will deliver documents from this queue. For more information about the fields on the Schedule tab, see “Delivery Schedule for Queues” on page 384.

Run Once. Trading Networks executes the delivery service a single time. For more information, see “Using the Run Once Option” on page 385

Simple Interval. Trading Networks executes the delivery service repeatedly at an interval you specify. For more information, see “Using the Simple Interval Option” on page 385.

Complex Interval. Trading Networks runs the delivery service on the day(s) and at the time(s) that you specify either during a specified date range or indefinitely. For more information, see “Using the Complex Interval Option” on page 386.

Delivery Method Tab Field Description

140 webMethods Trading Networks User’s Guide Version 6.5

Page 141: Web Methods Trading Networks Users Guide 65

Information Trading Networks Maintains in the Partner’s Profile

Use as preferred protocol

The delivery method that your partner prefers your system use to deliver documents to the partner’s system. The preferred delivery method is the value you select for Protocol. If the Use as preferred protocol is not selected for any delivery method, Trading Networks uses Queue for Polling.

Note: You cannot select either the public or private queue as the preferred protocol.

Delivery Maximum Retries

The number of times you want Trading Networks to attempt to re-deliver a document to the partner’s system.

Note: The Delivery Maximum Retries, Wait Between Retries, and Retry Factor options are only used when Trading Networks is using reliable delivery (delivery tasks).

The Delivery Maximum Retries option is used for both immediate and scheduled delivery methods.

Wait Between Retries

The number of milliseconds (ms) you want Trading Networks to wait before making its first attempt to redeliver the document to the partner’s system. Trading Networks uses the Retry Factor along with the Wait Between Retries value to calculate how long to wait for subsequent retry attempts.

Note: The Wait Between Retries and Retry Factor options are only used when Trading Networks is using reliable delivery for an immediate delivery method (as opposed to a scheduled delivery method). Trading Networks does not use the Wait Between Retries and Retry Factor settings for reliable delivery with scheduled delivery because the queue’s delivery schedule dictates how often to retry delivery attempts.

Delivery Method Tab Field Description

webMethods Trading Networks User’s Guide Version 6.5 141

Page 142: Web Methods Trading Networks Users Guide 65

C H A P T E R 9 P a r t n e r P r o f i l e s

Retry Factor The factor you want Trading Networks to use when determining how long to wait before making the second and subsequent attempts to redeliver the document when Trading Networks is using reliable delivery. Trading Networks calculates the time to wait by multiplying the last wait time by Retry Factor. Specify a whole number greater than zero for Retry Factor.

Example: The following shows sample values for the reliable delivery settings and how they affect the wait times between attempts to redeliver a document.

Delivery Maximum RetriesWait Between Retries

Retry Factor

= 3= 10000 ms= 2

Retry 1 Retry 2 Retry 3

Wait until next attempt 10000 ms 20000 ms 40000 ms

Note: For more information about reliable delivery, see “Using Reliable Delivery with Immediate Delivery Method” on page 343 and “Using Reliable Delivery with Scheduled Delivery” on page 344.

Polling Method The method (e.g., Primary HTTP) that your Trading Networks system uses to contact the partner’s system to request documents that the partner has queued for your system. Select the method from the list. If you do not want your Trading Networks system to poll for documents, select the blank entry.

Polling Frequency How often Trading Networks is to poll the partner’s system to retrieve documents that the partner has queued for your system. Specify a number of minutes that is zero or greater. If you specify zero, Trading Networks will not poll.

Note: Setting the polling frequency too low can have an adverse effect on Trading Networks performance.

Delivery Method Tab Field Description

142 webMethods Trading Networks User’s Guide Version 6.5

Page 143: Web Methods Trading Networks Users Guide 65

Information Trading Networks Maintains in the Partner’s Profile

Information on the Partner ’s Extended Fields TabTrading Networks displays the extended fields that you define on this tab.

For more information about

Clients that partners can use to send documents to Trading Networks, see Chapter 4, "Sending Documents to Trading Networks for Processing" in the webMethods Trading Networks Concepts Guide.

Delivery methods you can use with Trading Networks, see Chapter 6, "Delivering Documents to Partners" in the webMethods Trading Networks Concepts Guide.

Extended Fields Tab Field Description

Group (Name) The name of the field group that Trading Networks associates extended fields with. This column contains the list of groups that have defined profile fields.

Note: Out-of-the-box, Trading Networks provides pre-defined field groups. You can add additional field groups by specifying a new group when you add a new extended field. Alternatively, you can also use the built-in service wm.tn.dictionary:addFieldGroup. For more information about this service, see the webMethods Trading Networks Built-in Services Reference.

If there are no extended profile fields in a specific group, Trading Networks does not display that group. For example, if you have not defined any extended profile fields for the “Corporate” group, Trading Networks does not display “Corporate” in the Group column.

Note: To see extended fields, select the name of the group from the Group column, and Trading Networks displays the corresponding extended fields on the right.

webMethods Trading Networks User’s Guide Version 6.5 143

Page 144: Web Methods Trading Networks Users Guide 65

C H A P T E R 9 P a r t n e r P r o f i l e s

Information on the Partner ’s Security TabThe Security tab contains the partner’s certificate information that Trading Networks needs to access and interact with any partner in the system. This tab contains the following sub-tabs:

Sign/Verify sub-tab—Use this sub-tab to specify certificate information that Trading Networks uses to verify the digital signature of documents that were digitally signed by this partner.

Trading Networks verifies a digital signature when instructed to do so by the Verify Digital Signature pre-processing action. For more information, see “Verifying the Digital Signature of an XML Document” on page 227 and “Verifying the Digital Signature of Flat File Documents” on page 294.

Decrypt/Encrypt sub-tab—Use this sub-tab to specify certificate information that can be used to encrypt information that is being sent to a partner. Trading Networks maintains this information for other webMethods components (e.g., webMethods RosettaNet Module) that take advantage of this feature. You can also add your own functionality that takes advantage of this certificate information. You can obtain the certification information by using built-in services.

When you specify certificate information on this sub-tab, Trading Networks does not check to see whether the CA that signed the certificate is included in the list of trusted CAs that the Integration Server maintains. For more information, see security information in the webMethods Integration Server Administrator’s Guide.

SSL Client sub-tab—Use this sub-tab to specify a certificate that enables Trading Networks to act an SSL client to connect to a remote secure server.

For more information about security, see the webMethods Trading Networks Concepts Guide.

Note: If you include the private key in this certificate information, Trading Networks can also use this certificate information to digitally sign documents on behalf of the partner. You might have the private key if the profile describes an internal group, for example a department within your corporation.

Note: If you include the private key in this certificate information, this certificate information can also be used to decrypt documents that were encrypted with the partner’s public key. You might have the private key if the profile describes an internal group, for example a department within your corporation.

144 webMethods Trading Networks User’s Guide Version 6.5

Page 145: Web Methods Trading Networks Users Guide 65

Adding Partner Profiles

Trading Networks displays the following fields on the sub-tabs.

Adding Partner Prof i lesIf you are using Trading Networks, you can add as many partners as you want. If you are using webMethods for Partners and do not already have a partner, you can add a single partner; webMethods for Partners allows you to maintain only a single partner.

When you add a profile, you are adding a partner to your network. You must complete the following steps to add a partner to your network:

For more information about

Security in the Integration Server, including trusted CA certificates, see the chapter about security information in the webMethods Integration Server Administrator’s Guide.

Security in Trading Networks, see Appendix B, "Security within Trading Networks" in the webMethods Trading Networks Concepts Guide.

Security Tab Field Description

Certificate Chain The partner’s digital certificate that you want Trading Networks to use to verify digital signatures, encrypt documents, and enable Trading Networks to act as an SSL client to connect to a remote secure server. Trading Networks displays the value of the CN (Common Name) field from the Subject defined by the certificate.

Private Key The private key that is associated with the digital certificate that you specified in the Certificate Chain field. Trading Networks uses the private key to process Verify, Encrypt, and Client SSL certificates.

Step Description

1 Create the profile for the partner.

2 Enable the partner profile.

3 Inform the partner of the user name and password.

webMethods Trading Networks User’s Guide Version 6.5 145

Page 146: Web Methods Trading Networks Users Guide 65

C H A P T E R 9 P a r t n e r P r o f i l e s

Step 1: Defining a Partner Profi leBefore you can create partner profiles, fulfill the following prerequisites:

Perform the following procedure to add a partner profile from the Profile screen:

1 Start the Trading Networks Console. If you need procedures for this step, see “Starting the Trading Networks Console” on page 22.

2 Select View Trading Partners.

3 Perform one of the following procedures to add a profile.

Prerequisite

Create and enable your Enterprise profile.

Review the fields you need to fill out for the partner profile.

Obtain the partner information that you require in the profiles on your system and have this information available when you create the profile.

To add a profile using the Profile screen

Method to add a profile Procedures

New— The profile fields are empty.

Select Trading Partners New Trading Partner. Trading Networks displays the New Profile screen to allow you to fill in the information for the profile.

Duplicate— With the exception of the corporation name and external ID, the profile fields are filled with the values from the profile that you want to duplicate.

You can update any or all fields from the duplicated profile.

1) Select either your enterprise profile

-OR-

Click the row containing the partner profile that you want to duplicate.

Note: You can duplicate both your enterprise profile or an existing partner profile to add another partner profile.

2) Select Trading Partners Duplicate Trading Partner.

146 webMethods Trading Networks User’s Guide Version 6.5

Page 147: Web Methods Trading Networks Users Guide 65

Adding Partner Profiles

4 Click the Corporate tab and fill in the fields. Fields that you must specify are in blue and are marked with an asterisk (*) on the screen. For more information about these fields, see “Information on the Partner’s Corporate Tab” on page 132.

For this Corporate tab parameter... Perform this procedure...

Corporation Name

Unit Name

Partner Type

Preferred Language

To add the partner’s corporation information: 1) In the Corporation Name field, type the name of the

partner’s corporation, for example, “Industrial Steel Company”.

2) In the Unit Name field, type the name of the organizational unit or division within the partner’s corporation, for example, “Sales and Marketing”.

3) In the Partner Type field, specify the type of software that the partner uses to interact with your trading network: webMethods Trading Networks, webMethods for Partners, Web Browser, or Other/Unknown.

4) In the Preferred Language field, optionally specify the language preference the partner uses if needed for another webMethods component (e.g., webMethods RosettaNet Module).

To edit the partner’s corporation information:

1) Click Edit Corporation Name next to the Corporation Name field.

2) Continue with step 1 from above.

webMethods Trading Networks User’s Guide Version 6.5 147

Page 148: Web Methods Trading Networks Users Guide 65

C H A P T E R 9 P a r t n e r P r o f i l e s

Country

Address

City

State/Province

Postal Code

To add an address for your partner: Click Add New Address on the right side of the screen.

To edit an address for your partner: Select the address tab you

want to edit; then, click Edit Address .

1) Specify the following fields for the address:

For this address parameter…

Specify…

Country The country where the partner’s corporation is located, for example, “USA”.

Address The street address of the partner’s corporation, for example, “123 Main Street, Suite 456”.

City The city where the partner’s corporation is located, for example, “Los Angeles”.

State/Province The state or province where the partner’s corporation is located, for example, “California”.

Postal Code The postal code (for example, a zip code) for the state or province where the partner’s corporation is located, for example, “90001”.

2) Click Save.

Note: Repeat this step for each address that you want to add. You can specify an unlimited number of addresses for a corporation. The order that you add the addresses is the order that they are displayed as tabs.

External ID Type

ValueTo add a new external ID type: Click Add New External ID located next to the External ID Type table in the Profile Identifiers section.

To edit an external ID type: Select the row containing the

external ID you want to edit; then, click Edit External ID .

For this Corporate tab parameter... Perform this procedure...

148 webMethods Trading Networks User’s Guide Version 6.5

Page 149: Web Methods Trading Networks Users Guide 65

Adding Partner Profiles

1) In the External ID Type field, specify the type of identification that the partner’s corporation uses within documents. For example, specify DUNS if the partner uses a D-U-N-S number. Be sure to include an external ID type for each type of identification that you use in documents. You can specify an unlimited number of external ID types.

Note: You determine the external ID that Trading Networks uses for the user account by identifying a required ID type. You configure the required ID type by using the tn.required.idtype property on the TN Properties page. The tn.required.idType property controls what type of external ID is used as the IS username for Trading Networks partners. This required ID type cannot contain any white spaces and the default value is DUNS.

To see a list of the tn.required.idType property and a description of it, view the online help files that you access from the TN Properties page. For more information about the TN Properties page, see Chapter 4, “Trading Networks Configuration Properties”.

2) In the Value field, specify the value of the external ID type. For example, if you selected DUNS and the partner D-U-N-S number is 987654321, specify 987654321 for Value. The maximum length you can specify for an external ID is 128 characters.

3) Click Save.

To delete an external ID:

1) Select the row containing the external ID you want to

delete and click Delete External ID .

2) Trading Networks confirms that you want to delete the external ID. Click Yes.

For this Corporate tab parameter... Perform this procedure...

webMethods Trading Networks User’s Guide Version 6.5 149

Page 150: Web Methods Trading Networks Users Guide 65

C H A P T E R 9 P a r t n e r P r o f i l e s

Profile Group Membership

If you want to associate the partner profile with a profile group:

1) Click Add New Profile Group located next to the Profile Group Membership table in the Profile Identifiers section.

Note: You can only associate profiles with a profile group if there are profile groups defined in the database. To add a new profile group, see “Other Configuration Settings” on page 61.

2) Click Save.

3) Repeat this step to associate the partner profile with more than one profile group.

If you want to delete the profile group association:1) Select the row containing the profile group you want to

delete; then, Delete Profile Group .

2) Trading Networks confirms that you want to delete the profile group. Click Yes so that the partner profile is no longer associated with this partner group.

For this Corporate tab parameter... Perform this procedure...

150 webMethods Trading Networks User’s Guide Version 6.5

Page 151: Web Methods Trading Networks Users Guide 65

Adding Partner Profiles

5 Click the Contact tab and fill in the fields. Trading Networks displays fields for you to fill in. Fields that you must specify are in blue and are marked with an asterisk (*) on the screen. You can specify an unlimited number of contacts. For each contact, supply the following information. For more information about these fields, see “Information on the Partner’s Contact Tab” on page 136.

For this Contact tab parameter... Perform this procedure...

Contact Type

Role

Last Name

First Name

E-mail

Telephone

Extension

Pager

Fax

Country

Address

City

State/Province

Postal Code

To add a contact: Click Add New Contact on the right side of the screen.

To edit a contact: Select the row containing the name of the

contact you want to edit; then, click Edit Contact .

1) Specify the following fields for the contact:

For this contact parameter…

Specify…

Contact Type The type of contact, for example, “Administrative”. Select a contact type from the list.

Role The role the contact has in the partner’s corporation. This might be a job title, for example, “Trading Network Administrator”.

Last Name The contact's last (surname) name.

Note: To sort the contacts’ last names alphabetically, click on the Name column heading for forward ( ) and reverse ( ) alphabetization.

First Name The contact's first (given) name.

E-mail The contact's e-mail address, for example, “[email protected]”.

Telephone The contact's telephone number, for example, “1-800-555-1234”.

webMethods Trading Networks User’s Guide Version 6.5 151

Page 152: Web Methods Trading Networks Users Guide 65

C H A P T E R 9 P a r t n e r P r o f i l e s

Extension The contact's extension number. If the telephone number in the Telephone field identifies the main line for the corporation, use the Extension field to identify the contact's extension.

For this contact parameter…

Specify…

Pager The contact's pager number, for example, “1-330-555-7890”.

Fax The contact's fax number, for example, “1-888-555-4897”.

Address The street address for the contact, for example, “123 Main Street, Suite 456”.

City The city where the contact is located, for example, “Los Angeles”.

State/Province The state or province where the contact is located, for example, “California”.

Postal Code The postal code (for example, a zip code) for the state or province where the contact is located, for example, “90001”.

2) Click Save.

Note: Repeat this step for each contact that you want to add or edit. You can specify an unlimited number of contacts for a corporation. To sort the contacts’ last names alphabetically, click on the Name column heading for forward ( ) and reverse ( ) alphabetization

To delete a contact: 1) Select the contact you want to delete from the Name list

and then click Delete Contact .

2) Trading Networks confirms that you want to delete the address. Click Yes.

For this Contact tab parameter... Perform this procedure...

152 webMethods Trading Networks User’s Guide Version 6.5

Page 153: Web Methods Trading Networks Users Guide 65

Adding Partner Profiles

6 Click the Delivery Method tab and fill in the fields to specify how you are to deliver documents to the partner. The Deliver document processing action uses the settings on the Delivery Method tab. For more information about these fields, see “Information on the Partner’s Delivery Method Tab” on page 137. For more information about the Deliver Document By processing action, see “Action 4—Deliver the Document to the Receiver” on page 341.

For this Delivery Method tab parameter... Perform this procedure...

Protocol

Host

Port

Location

User Name

Password

E-mail

Use as preferred protocol

To add a delivery method: Click Add New Destination in the upper portion of the screen.

To edit the delivery method: Select the tab for the delivery

method you want to edit; then, click Edit Destination .

1) In the Protocol field, select a delivery method from the list. Trading Networks updates the information on the tab screen to display the fields required for the protocol you selected.

Note: If you selected Queue for delivery as your delivery method, see step 7 on page 155 for instructions on how to specify information for this delivery method.

2) For an HTTP, HTTPS, FTP, or FTPS delivery method, in the Host field, specify the host name of the partner’s system, for example, “IndustrialSteel.com”.

3) For an HTTP, HTTPS, FTP, or FTPS delivery method, in the Port field, specify the port number on which the partner’s system listens for incoming requests, for example, “5555”

Note: If you do not supply a port number, Trading Networks uses the following defaults: HTTP—80; HTTPS—443; FTP or FTPS—21.

webMethods Trading Networks User’s Guide Version 6.5 153

Page 154: Web Methods Trading Networks Users Guide 65

C H A P T E R 9 P a r t n e r P r o f i l e s

4) For an HTTP, HTTPS, FTP, or FTPS delivery method, specify one of the following in the Location field:

For HTTP and HTTPS delivery methods, specify the URL Trading Networks is to use when sending a document to the partner’s system, for example, “cgi-bin/acceptOrder”. If the partner is using Trading Networks, the URL is typically, “/invoke/wm.tn/receive”.

For FTP and FTPS delivery methods, specify the directory path on the partner’s system identified by Host and Port. Trading Networks delivers the document to this directory.

5) For an HTTP, HTTPS, FTP, or FTPS delivery method, in the User Name field, specify the user name that your Trading Networks system is to supply when connecting to the partner’s system to deliver documents.

If you are creating a profile for a partner that uses webMethods Trading Networks or webMethods for Partners, you must specify the user name for your webMethods User account on the partner’s system. The user account must be a member of the TNPartners group on the partner’s Integration Server.

Note: If you do not know what to specify for User Name, contact the partner.

6) For an HTTP, HTTPS, FTP, or FTPS delivery method, in the Password field, specify the password that your Trading Networks system is to supply (along with User Name) when connecting to the partner’s system.

For this Delivery Method tab parameter... Perform this procedure...

154 webMethods Trading Networks User’s Guide Version 6.5

Page 155: Web Methods Trading Networks Users Guide 65

Adding Partner Profiles

7 If you added Queue for delivery as the delivery method (in the Protocol field), select which type of queue: Use Public Queue or Use Private Queue.

Then set the following parameters on the New Protocol tab screen of the Delivery Method tab.

7) When defining the delivery method that the partner prefers that you use to deliver documents to its system, select the Use as preferred protocol checkbox.

Note: You cannot select the Queue for delivery as the preferred protocol.

Trading Networks displays the preferred protocol at the top of the Delivery Method tab.

8) Click Save.

To delete a delivery method: 1) Select the tab for the delivery method you want to delete;

then, click Delete Contact .

2) Trading Networks confirms that you want to delete the delivery method. Click Yes.

For this Delivery Method tab parameter... Perform this procedure...

Note: You cannot use either the public or private queue as your preferred protocol.

For this Delivery Method tab parameter… Perform this procedure...

Use Public Queue

To use a public queue:1) Select Use Public Queue.

2) Specify which public queue to use to deliver documents from the Public Queues list. The public queues were defined on the Tools menu of the Console. For more information about the public queue fields, see “Defining Public Queues” on page 380.

If you want to review the setting for the public queue, click the View button.

webMethods Trading Networks User’s Guide Version 6.5 155

Page 156: Web Methods Trading Networks Users Guide 65

C H A P T E R 9 P a r t n e r P r o f i l e s

3) Click Save.

Use Private Queue

To use a private queue:1) Select Use Private Queue.

2) Click Edit and fill in the fields on the Settings and Schedule tabs.

3) Set the following Settings tab parameters to specify private queue settings.

For this parameter…

Specify…

Delivery Service Which delivery service to use with the private queue.

Set Inputs The inputs for the delivery service.

Queue State The state of the queue (Enable Queue, Disable Queue, Drain Queue, or Suspend Delivery). The state of the scheduled delivery queue determines: 1) whether Trading Networks can add delivery tasks to the queue and 2) whether Trading Networks can deliver documents associated with the delivery tasks in the queue.

The states for private queues are the same states as for public queues. For a description of each queue state, “Scheduled Delivery Queue States” on page 390

For this Delivery Method tab parameter… Perform this procedure...

156 webMethods Trading Networks User’s Guide Version 6.5

Page 157: Web Methods Trading Networks Users Guide 65

Adding Partner Profiles

4) Set the following Schedule tab parameters for the private queue delivery settings. The scheduling fields for a private queue are the same as for a public queue. See “Delivery Schedule for Queues” on page 384 for more information about the schedule settings.

For this parameter…

Specify…

Run Once In the Date field the date on which you want Trading Networks to execute the delivery service.

In the Time field the time at which you want Trading Networks to execute the delivery service. “Using the Run Once Option” on page 385

Simple Interval The number of seconds that you want Trading Networks to wait between executions of the delivery service in the Interval field.

If you want Trading Networks to wait for a delivery service to complete execution before it starts the next scheduled execution of the service, check Do not overlap task.

When you add or update a simple interval schedule for a queue that is Enabled or Draining, Trading Networks invokes the service immediately. Subsequent invokes are governed by the interval. For more information, see “Using the Simple Interval Option” on page 385

Complex Interval Settings that indicate when and how often you want the delivery service to execute. For descriptions of these fields and examples of setting them, see “Using the Complex Interval Option” on page 386.

For this Delivery Method tab parameter… Perform this procedure...

webMethods Trading Networks User’s Guide Version 6.5 157

Page 158: Web Methods Trading Networks Users Guide 65

C H A P T E R 9 P a r t n e r P r o f i l e s

8 Set the following parameters (located on the bottom of the Delivery Method tab screen) to specify the reliable delivery and polling settings.

5) Click OK.

6) Click Save.

For this Delivery Method tab parameter… Perform this procedure...

Delivery Maximum Retries

Wait Between Retries

Retry Factor

Polling Method

Polling Frequency

To set/supply the values of the reliable delivery and polling settings:

1) Click on Edit Access Information

2) .On the bottom portion of the screen to change the default values for these fields.

3) In the Delivery Maximum Retries field, specify the number of times you want Trading Networks to attempt to re-deliver a document to the partner when Trading Networks is using reliable delivery. Specify a whole number.

Note: The Delivery Maximum Retries, Wait Between Retries, and Retry Factor options are only used when Trading Networks is using reliable delivery (delivery tasks). For more information about reliable delivery, see “Using Reliable Delivery with Immediate Delivery Method” on page 343 and “Using Reliable Delivery with Scheduled Delivery” on page 344

The Delivery Maximum Retries option is used for both immediate and scheduled delivery methods.

4) In the Wait Between Retries field, specify the number of milliseconds you want Trading Networks to wait before making its first attempt to redeliver the document when Trading Networks is using reliable delivery. Trading Networks uses the Retry Factor along with the Wait Between Retries value to calculate how long to wait for subsequent retry attempts.

For this Delivery Method tab parameter… Perform this procedure...

158 webMethods Trading Networks User’s Guide Version 6.5

Page 159: Web Methods Trading Networks Users Guide 65

Adding Partner Profiles

9 Click the Extended Fields tab and fill in the fields. Extended fields that you must specify are in blue and are marked with an asterisk (*) on the screen. For more information, see “Information on the Partner’s Extended Fields Tab” on page 143.

Note: The Wait Between Retries and Retry Factor options are only used when Trading Networks is using reliable delivery for an immediate delivery method (as opposed to a scheduled delivery method). Trading Networks does not use the Wait Between Retries and Retry Factor settings for reliable delivery with scheduled delivery because the queue’s delivery schedule dictates how often to retry delivery attempts.

5) In the Retry Factor field, specify the factor you want Trading Networks to use when determining how long to wait before making the second and subsequent attempts to redeliver the document when Trading Networks is using reliable delivery. Trading Networks calculates the time to wait by multiplying the last wait time by Retry Factor. Specify a whole number greater than zero for Retry Factor.

6) In the Polling Method field, specify the method (e.g., Primary HTTP) that your Trading Networks system uses to contact the partner’s system to request queued documents. Select the method from the list.

Note: If you do not want your Trading Networks system to poll for documents, select the blank entry.

7) Click Save.

For this Extended Fields tab parameter... Perform this procedure...

Group To view the values of the extended field: 1) S

For this Delivery Method tab parameter… Perform this procedure...

webMethods Trading Networks User’s Guide Version 6.5 159

Page 160: Web Methods Trading Networks Users Guide 65

C H A P T E R 9 P a r t n e r P r o f i l e s

10 Click the Security tab and fill in the fields. For more information, see “Information on the Partner’s Security Tab” on page 144.

2) Click Edit Field to fill in the fields for the appropriate group.

Note: If you do not know what to specify for an extended field and the description does not indicate what to specify, contact your Trading Networks administrator to determine what to specify.

3) Click Save.

Note: You must save the changes you make to one group’s extended fields before you can add another group’s extended fields. Repeat this step for each extended field you want to update.

Use this sub-tab… To …

Sign/Verify Specify certificate information that Trading Networks uses to verify the digital signature of documents that were digitally signed by this partner.

Decrypt/Encrypt Specify certificate information that can be used to encrypt information that is being sent to a partner.

SSL Client Enable Trading Networks to act as an SSL client to connect to a remote secure server.

For this Extended Fields tab parameter... Perform this procedure...

160 webMethods Trading Networks User’s Guide Version 6.5

Page 161: Web Methods Trading Networks Users Guide 65

Adding Partner Profiles

For this Security tab parameter… Perform this procedure...

Certificate Chain To view information about a certificate:1) Select the partner from the Partner list on the left.

2) Select the appropriate certificate sub tab: Sign/Verify, Decrypt/Encrypt, or SSL Client. Trading Networks displays the certificate information.

3) Click the appropriate row of the Certificate Chain table. The Console displays the certificate information on the right.

To add a certificate chain:

1) Click Edit Selected .

2) Click Add Certificate(s) .

3) In the Add Certificate dialog box, add one or more certificates as follows:

To add one certificate, browse to and select the file that contains the certificate.

Note: When you add a certificate, be sure also to add the CA certificate(s) and private key that are associated with the certificate. The certificates, CA certificates, and private keys must reside in your file system. Trading Networks can import files that have a .der, .cer, or .p7b extension. If you import a .der file, Trading Networks appends it to the existing certificate chain list. However, if you import a .cer or .p7b file, Trading Networks replaces the certificate chain list with the .cer or .p7b file.

To add multiple certificates within a directory, browse to and select the files that contain the certificates, using the SHIFT + CONTROL keys. If you select an entire directory, Trading Networks imports all files except duplicate files and private key files.

Note: The order that Trading Networks displays the certificate chain does not reflect how the chain is linked.

webMethods Trading Networks User’s Guide Version 6.5 161

Page 162: Web Methods Trading Networks Users Guide 65

C H A P T E R 9 P a r t n e r P r o f i l e s

To delete certificates:

1) Click Edit Selected .

2) Select the certificate(s) that you want to delete. To select multiple certificates, press CTRL and click on the second and subsequent certificates.

3) Click Delete Certificate(s) . When Trading Networks prompts you to verify that you want to delete the certificate(s), click Yes.

Note: If you delete the certificate, be sure also to delete the CA certificate(s) and private key that are associated with the certificate.

Private Key To view a private key:

The Trading Networks Console will not display private key information. If a key is defined, Defined appears in the text field. If a key is not defined, <Empty> appears in the text field.

To add a private key:

1) Click Edit Selected .

2) Click Import Private Key in the Private Key field.

3) In the Import Private Key dialog box, browse to and select the file that contains the private key that you want to add. You can only import a .der file that contains a valid private key format. Once you select the file, then click Open.

Note: If you add a private key, be sure also to add the certificate and CA certificate(s) that are associated with the private key.

For this Security tab parameter… Perform this procedure...

162 webMethods Trading Networks User’s Guide Version 6.5

Page 163: Web Methods Trading Networks Users Guide 65

Adding Partner Profiles

11 After completing all of the partner profile fields:

If you are creating a new profile:

1 Click Create Profile to save your new profile.

2 Once you create the profile and Trading Networks saves it, the Console displays the User Account Information dialog box.

Trading Networks displays the user name and password of the created IS user account in this dialog box and will use this information later on in “Step 3: Informing the Partner of the User Name and Password” on page 165.

To delete a private key:

1) Click Edit Selected .

2) Click Delete Private Key . When Trading Networks prompts you to verify that you want to delete the private key, click Yes.

Note: If you delete the private key, be sure also to delete the certificate and CA certificate(s) that are associated with the private key.

For this Security tab parameter… Perform this procedure...

Note: If the profile fields were not completed correctly, Trading Networks:

1. Displays a dialog box listing the error messages that identify the fields that are in error and2. Saves the profile with the information you specified.

You must edit the profile to correct the errors.

Note: This dialog box will only appear when the profile saved is valid and created successfully.

Important! Be sure to record the information and send the user name and password to your partner. Otherwise, your partner cannot access or use your Trading Networks system.

webMethods Trading Networks User’s Guide Version 6.5 163

Page 164: Web Methods Trading Networks Users Guide 65

C H A P T E R 9 P a r t n e r P r o f i l e s

3 Continue with “Step 2: Enabling the Partner’s Profile” on page 164.

If you are updating an existing profile:

Click Save to save all your changes to the partner profile. For more information about managing profiles, see “About Querying and Viewing Profiles” on page 166.

Step 2: Enabling the Partner ’s Prof ileAfter you add a profile for a partner and Trading Networks validates the fields, Trading Networks saves the profile and sets the status of the profile to “Inactive”. Before you can exchange documents with the partner, you must enable the profile to update the status to “Active”.

The following table shows the possible profile statuses that Trading Networks maintains for each partner profile and the statuses’ meanings:

To enable a partner’s profile, perform the following procedure:

1 Select the partner whose profile you want to update. If you need procedures for this step, see “About Querying and Viewing Profiles” on page 166.

2 Select Trading Partners Enable Trading Partner.

Value Meaning

Active You have filled in the partner's profile and Trading Networks has programmatically determined that all profile fields (standard and extended) are valid. You have enabled the profile to set the status to “Active”.

When the partner's profile is in this status, you can exchange documents with the partner.

Inactive You have disabled the profile.

Either you have just added the profile, but not yet enabled it, or you have disabled the profile.

To enable a partner’s profile

164 webMethods Trading Networks User’s Guide Version 6.5

Page 165: Web Methods Trading Networks Users Guide 65

Adding Partner Profiles

Step 3: Informing the Partner of the User Name and PasswordAfter you create the user account, you should let your partner know the user name and password for the account that Trading Networks created for the partner. This is the user name and password Trading Networks displayed at the end of successfully creating a partner profile in “Step 2: Enabling the Partner’s Profile” on page 164. Your partner will need to supply this user name and password when delivering documents via FTP, FTPS, HTTP, or HTTPS and to access the webMethods Trading Networks Web Manager.

In addition, if the partner uses webMethods Trading Networks or webMethods for Partners, you must make sure the partner enters the user name and password into your profile on their Trading Networks system. If the partner does not, your Trading Networks system will not accept documents that the partner sends via HTTP or HTTPS. The partner should update the Delivery Method tab of the Profile screen. On this screen, the partner should:

Enter the user name you supply for the User Name fields for Primary FTP, Secondary FTP, Primary FTPS Secondary FTPS, Primary HTTP, Secondary HTTP, Primary HTTPS, and Secondary HTTPS

Enter the password you supply for the Password fields for Primary FTP, Secondary FTP, Primary FTPS Secondary FTPS, Primary HTTP, Secondary HTTP, Primary HTTPS, and Secondary HTTPS.

Retrieving the Partner ’s User Name and PasswordThe following is the procedure you need to perform to retrieve the partner’s user account information (user name and password) from your Trading Networks system.

1 Select your partner’s profile. If you need procedures for this step, see “About Querying and Viewing Profiles” on page 166.

2 Select Trading Partners Show Password.

3 Trading Networks displays the user name and password for this partner profile. Record the user name and password.

Important! After the profile is added, Trading Networks displays the user name and password User Account Information dialog box. Be sure to record the information and send the user name and password to your partner. Otherwise, your partner cannot access or use your Trading Networks system.

To retrieve your partner’s user name and password

webMethods Trading Networks User’s Guide Version 6.5 165

Page 166: Web Methods Trading Networks Users Guide 65

C H A P T E R 9 P a r t n e r P r o f i l e s

Supplying the User Account Information to Your PartnerThe following is the procedure your partner needs to perform to update your profile on its system.

1 Your partner should view your profile. For your partner’s procedures to this step, see “About Querying and Viewing Profiles” on page 166.

2 Click the Delivery Method tab.

3 Specify the following fields for Primary HTTP, Secondary HTTP, Primary HTTPS, Secondary HTTPS, Primary FTP, Secondary FTP, Primary FTPS, and Secondary FTPS.

About Querying and Viewing Prof i lesYou can use the query function of the Trading Partners profile screen to find and view information about all of the profiles in Trading Networks, including your own Enterprise profile.

To find a specific profile, query Trading Networks for the profiles in which you are interested. Trading Networks returns information about the profiles that meet the search criteria that you specify and displays the query results in the Profiles table.

If you plan to use the same query many times, you can save the query settings. When you want to use the same query again, you simply select that saved query. For more information about different query functions you can perform, see Chapter 16, “Running Queries in Trading Networks”.

For your partner to update your profile with user name and password on the partner’s system

For this Delivery Method tab parameter... Perform this procedure...

User Name

Password

1 Click the tab for the delivery method.

2 Click Edit Destination .

3 In the User Name field, your partner should specify user name that you supplied. In the Password field, your partner should specify the password that you supplied.

4 Click Save.

166 webMethods Trading Networks User’s Guide Version 6.5

Page 167: Web Methods Trading Networks Users Guide 65

About Querying and Viewing Profiles

To set up a query and display information for viewing profiles, specify some or all of the following:

Basic search criteria

Custom search criteria

How to display detail view information about selected profiles.

Basic Search Criteria for Prof i lesUse the Basic Criteria tab to search for profiles. The basic search criteria includes most of the basic corporate information found on the Corporate tab of the Trading Partners screen. Trading Networks searches for profiles that meet all search criteria that you specify.

You can use basic search criteria to select for profiles with a specific:

Corporation and/or unit name

External ID type and value

Group membership

Partner status (active or inactive)

Basic corporation address elements of: country, city, state/province, and/or postal code.

Custom Search Criteria for Profi lesUse the Custom Criteria tab to search for profiles based on the extended profile fields. For example, if you set up Trading Networks with the extended profile field Encryption Algorithm, you can search for all profiles with the Encryption Algorithm equal to a specified value.

For each extended profile field that you want to use to select profiles, you specify the attribute name, an operator, and the value the attribute should have.

Attribute instructs Trading Networks to look at the value of the specified attribute to determine whether it meets the rest of the criteria for this extended field. You can specify attributes with the STRING data type.

Operator instructs Trading Networks how to match the value, for example, match string values that contain specified characters. The operator you can specify depends on the data type of the attribute.

webMethods Trading Networks User’s Guide Version 6.5 167

Page 168: Web Methods Trading Networks Users Guide 65

C H A P T E R 9 P a r t n e r P r o f i l e s

Detail View of Profi lesAfter Trading Networks selects the profile that matches the basic search criteria that you specify, it displays the results of your query in the Profiles table. You can customize this Profiles table to indicate the columns you want Trading Networks to display using the options on the Detail View tab. Each column corresponds to information that Trading Networks maintains about a partner profile, such as the corporation and unit names, external ID information, group membership, partner status, and basic corporation address information. For more information about customizing the display of your table format, “Working with Tables” on page 33.

Finding and Viewing Profi lesTo view profiles or perform any operations on the profile, you need to first have the profile visible. Perform the following procedure to select the profile.

1 Start the Trading Networks Console. If you need procedures for this step, see “Starting the Trading Networks Console” on page 22.

2 Select View Trading Partners.

Data Type Operator Matches when the attribute extracted from a document…

STRING Is null Has no value. The attribute value has no value if:

XQL query (defined in the TN document type) that Trading Networks used to extract the attribute failed.

The TN document type does not instruct Trading Networks to extract the attribute.

You do not need to specify a value when you specify this operator.

Is not null Has any value. You do not need to specify a value when you specify this operator.

Equals Matches exactly the value that you specify.

Not equals Has a value that does not match the value that you specify.

Contains Contains the character string that you specify for the value.

To find and view a profile

168 webMethods Trading Networks User’s Guide Version 6.5

Page 169: Web Methods Trading Networks Users Guide 65

About Querying and Viewing Profiles

3 Select Show Query on the toolbar.Trading Networks displays the Basic Criteria and Detail View tabs.

4 Perform one of the following to identify and select the profile of one of your partners:

To select from all partners:

Select a partner from the Profiles table on the bottom portion of the screen.

To narrow down the list of partners from which to choose:

a Select the Basic Criteria tab and fill in the fields to specify basic search criteria. To indicate that you want to use one or more of the basic search criteria, select the checkbox next to each criterion you want to use. Then fill out the corresponding information as follows

.

Note: Trading Networks displays the last query run on the Trading Networks Console.

For this Basic Criteria tab parameter… Specify…

Corporation Name

The name of the partner’s corporation, for example, “Industrial Steel Company”. Type a character string contained in the Corporation Name of the partner you want to work with.

You can use the pattern-matching characters “%” in the corporation name search.

Unit Name The name of the organizational unit or division within the partner’s corporation, for example, “Sales and Marketing”. type a character string contained in the Unit Name of the partner you want to work with.

External ID Type Value

The External ID Type is the type of identification that the partner (partner’s corporation) uses within documents. The Value is the alpha-numerical value of the partner’s external ID type.

You must provide both values for the query to work. For example, if the partner uses a D-U-N-S number as an external identification type, select DUNS from the External ID Type list and specify the partner’s D-U-N-S number in the Value column.

webMethods Trading Networks User’s Guide Version 6.5 169

Page 170: Web Methods Trading Networks Users Guide 65

C H A P T E R 9 P a r t n e r P r o f i l e s

For more information about these profile query fields, see “Information on the Partner’s Corporate Tab” on page 132.

b Select the Custom Criteria tab and fill in the fields to specify custom search criteria for the extended profile field(s). For the profile query, specify a STRING extended field to query documents as follows.

Group Membership

The name of the profile group that Trading Networks associates the partner’s profile to. This column contains the complete list of profile groups that have been created in the database. You can only select one profile group from the list for each query. For more information about how to create profile groups, see “Other Configuration Settings” on page 61.

Partner Status The status of the partner’s profile. Select Active to search for an enabled profile or Inactive for a disabled profile. For more information about partner profile statuses, see “Step 2: Enabling the Partner’s Profile” on page 164.

Corporation Country

The country where the partner’s corporation is located, for example “USA”.

Corporation City The city where the partner’s corporation is located, for example, “Los Angeles”.

Corporation State/Province

The state or province where the partner’s corporation is located, for example, “California”.

Corporation Postal Code

The postal code (for example, a zip code) for the state or province where the partner’s corporation is located, for example, “90001”.

For this Custom Criteria tab parameter… Specify…

Extended Field The name of the extended profile fields that you want Trading Networks to use to select documents. Select a STRING data type from the drop-down list.

For this Basic Criteria tab parameter… Specify…

170 webMethods Trading Networks User’s Guide Version 6.5

Page 171: Web Methods Trading Networks Users Guide 65

About Querying and Viewing Profiles

For more information about extended profile fields, see “Information on the Partner’s Extended Fields Tab” on page 143. For more information about how to use custom criteria, see “Custom Search Criteria for Profiles” on page 167.

c Select Run Query on the toolbar. Trading Networks displays the Profiles table with the results from the refined query.

5 To change the format of the query results in the Profiles table, click the Detail View tab. Fill in the following fields to specify how Trading Networks displays information in the Detail view.

a In the Standard Fields panel, check field that you want Trading Networks to include in the Detail view. Trading Networks displays a column for each checked field. Trading Networks always displays the Corporation Name column for each partner profile.

b In the Extended Fields section, select the extended fields that you want Trading Networks to include in the Detail view. Trading Networks displays a column for each field in the Selected Extended Fields list. To move items to the Selected Extended Fields list:

Operator The operator you want Trading Networks to use with the Value you specify. For example, select Equal if you want Trading Networks to match extended fields that have the exact value you specify for Value.

Data Type Operator values

STRING Is null; Is not null; Equals; Not equals; Contains

Value The value you want Trading Networks to use when querying for documents.

To specify a string, type the characters in the string. Be sure to use the exact combination of upper- and lowercase letters because Trading Networks performs a case-sensitive match.

You do not need to specify a value if you select Is null or Is not null for Operator.

For this Custom Criteria tab parameter… Specify…

webMethods Trading Networks User’s Guide Version 6.5 171

Page 172: Web Methods Trading Networks Users Guide 65

C H A P T E R 9 P a r t n e r P r o f i l e s

If you decide you do not want Trading Networks to display information for the fields in the Selected Extended Fields list, move the items back to the Available Extended Fields list:

.

6 To see the new display format, click the Run Query toolbar button.

7 Double click to select the partner you want from query results in the Profiles table on the bottom portion of the screen. Trading Networks displays the Update Profile screen.

For more information about the tabs and fields on this screen, see “Step 1: Defining a Partner Profile” on page 146.

For procedures on how to change the information in your partner’s profile, see “Updating the Profile of Your Partner” on page 173.

For more information about queries in Trading Networks, see “About Viewing and Querying Documents” on page 428.

Select this... To do this...

To move all extended fields to the Selected Extended Fields list

To move some but not all extended fields to the Selected Extended Fields list, select one or more fields in the Available Extended Fields

list and then click .

Select this... To do this...

To remove some but not all extended fields from the Selected Extended Fields list, select the extended fields you do not want

displayed from the Selected Extended Fields list and then click .

To remove all extended fields from the Selected Extended Fields list.

172 webMethods Trading Networks User’s Guide Version 6.5

Page 173: Web Methods Trading Networks Users Guide 65

Managing the Partner’s Profile

Managing the Partner ’s Prof i leThe following table describes the tasks you can perform on the partner’s profile:

Updating the Prof i le of Your PartnerYou can update the partner profiles that you maintain for your partners. Perform the following procedure to update your partner profile.

1 Select the partner whose profile you want to update. If you need procedures for this step, see “About Querying and Viewing Profiles” on page 166.

2 To update an existing partner profile, select the tab you wish to update. Use the table below to find the procedure to update the selected tab.

Follow the procedures to update the partner profile. These procedures are the same ones you initially used to create a partner profile. In general, on the Profile screen, use the following buttons to supply information to the profile fields:

Tasks See page...

“Updating the Profile of Your Partner” 173

“Deleting a Profile” 174

“Disabling a Partner’s Profile—Changing the Status to Inactive” 175

“Enabling a Partner’s Profile—Changing the Status to Active” 176

To update the profile of one of your partners

To update this tab... Use this procedure... For more information, see..

Corporate Step 4 on page 147 “Information on the Partner’s Corporate Tab” on page 132

Contact Step 5 on page 151 “Information on the Partner’s Contact Tab” on page 136

Delivery Method Step 6 on page 153 “Information on the Partner’s Delivery Method Tab” on page 137

Extended Fields Step 9 on page 159 “Information on the Partner’s Extended Fields Tab” on page 143

Security Step 9 on page 160 “Information on the Partner’s Security Tab” on page 144

webMethods Trading Networks User’s Guide Version 6.5 173

Page 174: Web Methods Trading Networks Users Guide 65

C H A P T E R 9 P a r t n e r P r o f i l e s

Fields that you must specify are in blue and are marked with an asterisk (*) on the screen.

3 After updating all of the partner profile fields, make sure to click Save to save all your changes to the profile.

Deleting a Prof i leWhen you delete a profile from the Trading Networks Console, Trading Networks removes most of the profile data from its database, but keeps all documents, entries, and TPAs that are associated with the partner. You are no longer able to view:

the profile using the Profile screen and

any related TPAs.

If you decide to delete a profile, you must also delete all related TPAs before deleting the profile.

Trading Networks does not provide a way to “undelete” a profile. If a partner sends you a document after you delete its profile, Trading Networks treats the document as if it came from an unknown partner.

Use this button To...

Add an entry

or Edit an entry

Delete an entry

Note: You cannot delete your own Enterprise profile.

Important! When you delete a partner’s profile, Trading Networks does not delete the user account it created for the partner. To delete the user account, use the webMethods Administrator. For instructions, see the webMethods Integration Server Administrator’s Guide.

174 webMethods Trading Networks User’s Guide Version 6.5

Page 175: Web Methods Trading Networks Users Guide 65

Managing the Partner’s Profile

To delete a partner’s profile, perform the following procedure:

1 Select the partner whose profile you want to delete. If you need procedures for this step, see “About Querying and Viewing Profiles” on page 166.

2 Select Trading Partners Delete Trading Partner to delete the profile.

3 When Trading Networks prompts you to verify that you want to delete the profile, click Yes.

Disabling a Partner ’s Prof ile—Changing the Status to Inact iveWhen you disable a profile, Trading Networks changes the status of the profile to “Inactive”. When you disable a partner’s profile, you will not be able to exchange documents with that partner. As a result, disabling a profile can be thought of as temporarily removing a partner from your network. If the partner attempts to send you documents while its profile is disabled, Trading Networks:

Logs an error message to the activity log and associates it with the document

Sets the processing status of the document to “ABORTED”

Sends an e-mail message to the webMethods Administrator

Responds to the sender with an HTTP 403 message if the document was sent using HTTP.

For more information about profile statuses, see “Step 2: Enabling the Partner’s Profile” on page 164.

To disable a partner’s profile, perform the following procedure:

1 Select the partner whose profile you want to update. If you need procedures for this step, see “About Querying and Viewing Profiles” on page 166.

2 Select Trading Partners Enable Trading Partner.

To delete a partner’s profile

Important! Before you delete any profile, you must delete any related TPAs. For more information, see “Deleting a TPA” on page 192.

To disable a partner’s profile

webMethods Trading Networks User’s Guide Version 6.5 175

Page 176: Web Methods Trading Networks Users Guide 65

C H A P T E R 9 P a r t n e r P r o f i l e s

Enabling a Partner ’s Prof i le—Changing the Status to ActiveWhen you enable a profile, Trading Networks changes the status of the profile to “Active”. If you enable your own profile, you will be able to exchange documents with partners. If you enable a partner’s profile, you will be able to exchange documents with that partner. As a result, enabling a profile can be thought of as reestablishing a partner into your network. For more information about profile statuses, see “Step 2: Enabling the Partner’s Profile” on page 164.

To enable a partner’s profile, perform the following procedure:

1 Select the partner whose profile you want to update. If you need procedures for this step, see “About Querying and Viewing Profiles” on page 166.

2 Select Trading Partners Enable Trading Partner.

Important! When you disable a partner’s profile, Trading Networks does not disable or delete the webMethods User account for the partner. To delete the user account, use the webMethods Administrator. For more instructions, see the webMethods Integration Server Administrator’s Guide.

To enable a partner’s profile

176 webMethods Trading Networks User’s Guide Version 6.5

Page 177: Web Methods Trading Networks Users Guide 65

C H A P T E R 10

Trading Partner Agreements (TPAs)

What is a Trading Partner Agreement (TPA)? . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 178

Information You Supply to Define a TPA . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 178

Defining a TPA . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 181

Managing TPAs . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 185

webMethods Trading Networks User’s Guide Version 6.5 177

Page 178: Web Methods Trading Networks Users Guide 65

C H A P T E R 1 0 Tr a d i n g P a r t n e r A g r e e m e n t s ( T PA s )

What is a Trading Partner Agreement (TPA)?A Trading Partner Agreement (TPA) in Trading Networks is a set of parameters that you can use to govern how documents are exchanged between two trading partners. To use a TPA, both partners in the agreement must have existing profiles in Trading Networks. Trading Networks uses the profiles to ensure that the partners are valid for that Trading Networks system.

To view TPAs and their data in Trading Networks, first specify a query to identify the TPAs in which you are interested. You can query TPAs by the following fields: Sender, Receiver, Agreement ID, Timestamp, Agreement Status, and IS Document Type. Trading Networks returns information about the TPAs that meet the search criteria that you specified in your query.

Informat ion You Supply to Def ine a TPAWhen you define a TPA, you supply the following information: sender, receiver, agreement ID, IS document type, data status, services (export and initialization), and optionally, a description.

For more information about TPAs, see Chapter 2, "Trading Partners" in the webMethods Trading Networks Concepts Guide.

TPA Information Description

Sender Name of the trading partner that has the sender role in the TPA. You select the sender from the profiles defined on your Trading Networks system, including your own profile (Enterprise).

Note: A TPA is an agreement between two partners in your network; one that fulfills the sender role during document exchange, and the other that fulfills the receiver role. Both the sender and receiver in a TPA must be a partner in your Trading Networks system that has an existing profile.

Receiver Name of the trading partner that has the receiver role in the TPA. You select the receiver from the profiles defined on your Trading Networks system, including your own profile (Enterprise).

Agreement ID An application-specific field that uniquely identifies the type of agreement between two partners.

178 webMethods Trading Networks User’s Guide Version 6.5

Page 179: Web Methods Trading Networks Users Guide 65

Information You Supply to Define a TPA

IS Document Type An IS document type that specifies the data that you define in the TPA. For more information about changing the data, see “Changing the TPA Data Inputs in the IS Document Type” on page 190.

When using the TPA feature for your own custom application, these are the parameters that your custom applications need access to during document exchange. Use the webMethods Developer to create the IS document type that contains the parameters you need for your custom application. For more information on how to create an IS document type, see the webMethods Developer User’s Guide.

webMethods’ components that use the TPA feature come with the IS document type you need to use for the TPA data. For example, the webMethods EDI Module supplies the wm.b2b.editn.TPA:EDITPA IS document type and the webMethods ebXML Module supplies the wm.ip.ebxml.cpa.rec:tpaDataSchema IS document type. For more information about EDI TPAs, see webMethods EDI Module User’s Guide.

Control Number A field that is available for application-specific use. Trading Networks does not update the Control Number field.

When using the TPA feature for your own custom application, you can use the Control Number field in any way you want. Some webMethods’ components that take advantage of the TPA feature use the Control Number field. For example, the webMethods EDI Module uses the control number to ensure documents are processed in order and that no documents have been lost or unprocessed.

TPA Information Description

webMethods Trading Networks User’s Guide Version 6.5 179

Page 180: Web Methods Trading Networks Users Guide 65

C H A P T E R 1 0 Tr a d i n g P a r t n e r A g r e e m e n t s ( T PA s )

Data Status This field applies only when the Agreement Status is Agreed. The data status indicates whether you can update the values for the TPA data defined in the IS document type (located in the panel on the lower portion of the Agreement Details dialog box). The data status can be one of the following:

Modifiable - the TPA data can be changed

Non-modifiable - the TPA data cannot be changed

Note: Trading Networks uses the data status only after the TPA has an Agreed status. For more information about TPA statuses, see “Changing a TPA Agreement Status” on page 188. For more information about changing the TPA data defined in the IS document type, see “Changing the TPA Data Inputs in the IS Document Type” on page 190.

Export Service A service that exports a Trading Networks TPA and converts it to an industry-standard format. After creating a TPA, if you need to obtain the industry-standard format of a TPA, you can execute your export service. Defining an export service is optional.

Note: The format of the industry-standard agreement will not be the same as the format of a Trading Networks TPA. When using the TPA feature for your own custom application, you can create an export service that converts the Trading Networks TPA to the industry-standard format that you require.

TPA Information Description

180 webMethods Trading Networks User’s Guide Version 6.5

Page 181: Web Methods Trading Networks Users Guide 65

Defining a TPA

Defining a TPAYou define TPAs on the Agreement Details screen of the Trading Networks Console. After you set the attributes of your TPA on the top portion of this screen and select the IS document type, Trading Networks displays the corresponding IS document type data tree on the bottom panel of the screen. The right side of this panel displays the input values (TPA data inputs) to variables of the IS document type.

Use the following procedure to define a TPA.

1 Start the Trading Networks Console. If you need procedures for this step, see the webMethods Trading Networks Concepts Guide.

2 Select View Agreements. Trading Networks displays the Agreements screen.

3 Perform one of the following procedures to create a new TPA.

Initialization Service

A service that sets default values for the IS document type data of the TPA. Defining an initialization service is optional. You can set this field to point to an IS service that can provide the initial values for that data.

When using the TPA feature for your own custom application, you can create an initialization service that populates the parameters in the IS document type with default values. Some webMethods’ components that take advantage of the TPA feature supply an initialization service. For example, the webMethods EDI Module supplies the service wm.b2b.editn.TPA:initService that populates the EDITPA with the default values for an EDI TPA. The webMethods ebXML Module supplies the wm.ip.ebxml.cpa:initTPA initialization service.

For more information about EDI TPAs, see the webMethods EDI Module User’s Guide. For more information about ebXML CPAs, see the webMethods ebXML User’s Guide

Description This is an optional field that you can use to specify a description for the TPA. Specify 1-1024 characters. There is no restriction to the characters that you can use.

TPA Information Description

To define a TPA

webMethods Trading Networks User’s Guide Version 6.5 181

Page 182: Web Methods Trading Networks Users Guide 65

C H A P T E R 1 0 Tr a d i n g P a r t n e r A g r e e m e n t s ( T PA s )

4 Fill in the following fields on the Agreement Details screen for the TPA you want to create:

Method to create a TPA Procedures

New—The TPA fields are empty.

Select Agreements New. Trading Networks displays the Agreement Details screen to allow you to fill in the information for the TPA.

Duplicate—The TPA fields are filled with values from the TPA agreements that you duplicate. You can update any or all fields from the duplicated TPA agreement.

You can use this function to create a template TPA.

a Click the row containing the name of the TPA agreement that you want to duplicate.

b Select Agreements Duplicate. Trading Networks displays the Agreement Details screen.

Note: The Sender, Receiver, and Agreement ID fields must be unique for each TPA. After you create a TPA, you cannot change or update these fields of the TPA.

For this TPA field... Specify

Sender Name of the trading partner that has the sender role in the transaction the TPA will govern. Type in the name of the

sender or click the Select... button to select the sender from the Partner Selection Dialog. This list includes your own profile (Enterprise).

For EDI, to create a template that you will duplicate to create other TPAs, you can use the default value of Unknown.

For more information about how to select a sender, see “Selecting a Partner” on page 34.

Receiver Name of the trading partner that has the receiver role in the transaction the TPA will govern. Type in the name of the

receiver or click the Select... button to select the receiver from the Partner Selection Dialog. This list includes your own profile (Enterprise). For EDI, to create a template that you will duplicate to create other TPAs, you can use the default value of Unknown.

For more information about how to select a receiver, see “Selecting a Partner” on page 34.

182 webMethods Trading Networks User’s Guide Version 6.5

Page 183: Web Methods Trading Networks Users Guide 65

Defining a TPA

Agreement ID An identifier that indicates the type of agreement between the two partners. The Sender, Receiver, and Agreement ID values together uniquely identify a TPA.

Note: You will not be able to continue creating a TPA unless you supply the Agreement ID. After you supply the Agreement ID, you can: create the TPA or continue to supply data for the remaining fields.

The value you specify depends on the application that is going to use the TPA. You can use up to 254 characters of any type for this field, including spaces. For more information about the agreement ID, see “Information You Supply to Define a TPA” on page 178.

IS Document Type The IS document type that defines the application-specific TPA data. The TPA data is used to govern the exchange of documents between the two partners.

Type in the name of the IS document type located on the

server or click Find IS Document Type to browse the IS document types and select the one you want to use. Trading Networks displays the data tree input values of the selected IS document type in the bottom panel of the Agreement Details screen.

For more information about the IS document type, see “Information You Supply to Define a TPA” on page 178. If you want to change the data input for the IS document type, see “Changing the TPA Data Inputs in the IS Document Type” on page 190.

Control Number A value that the application using the TPA expects. This value is only needed if the application using the TPA uses the Control Number field.

The value for this field must be an integer. The default value is zero (0).

Data Status Whether you want to be able to modify the values of the TPA data of the IS document type. The data status is only applicable when the agreement status is Agreed.

For more information about statuses, see “Changing a TPA Agreement Status” on page 188.

For this TPA field... Specify

webMethods Trading Networks User’s Guide Version 6.5 183

Page 184: Web Methods Trading Networks Users Guide 65

C H A P T E R 1 0 Tr a d i n g P a r t n e r A g r e e m e n t s ( T PA s )

Export Service A service to convert the data in the Trading Networks TPA to an industry-format trading partner agreement. For more information about the export service, see “Information You Supply to Define a TPA” on page 178.

Type in the name of the export service located on the server or

click Find Service to browse the services and select the one you want to use.

Note: The Export Service is different from the Trading Networks File Export function that exports Trading Networks data (such as profiles, TN document types) out of the Trading Networks database, so data can be exported/imported within the same Trading Networks release from development to production environment.

For more information about exporting Trading Networks data to another Trading Networks system, see Appendix A, “Exporting and Importing Database Information”.

Initialization Service A service to populate the inputs to the variables in the IS document type for the TPA with default values. This is optional. For more information about the initialization service, see “Information You Supply to Define a TPA” on page 178.

Type in the name of the initialization service located on the

server or click Find Service to browse the services and select the one you want to use.

Note: If you create a partner-defined EDITPA from scratch, webMethods recommends that you do not use the wm.b2b.editn.TPA:initService initialization service because it populates the partner-defined EDITPA with hard-coded values other than those in the default EDITPA, which is already tailored to a user’s particular requirements. Instead, webMethods recommends that you manually complete each parameter field in the Input for ‘wm.b2b.edi.tn.TPA:EDITPA’ screen in the Trading Networks Console. For more information about EDI TPAs, see the webMethods EDI Module User’s Guide.

For this TPA field... Specify

184 webMethods Trading Networks User’s Guide Version 6.5

Page 185: Web Methods Trading Networks Users Guide 65

Managing TPAs

5 Click OK to create the TPA.

Managing TPAsThe following table describes the tasks you can perform against TPAs:

Finding and Viewing TPAsYou can use the Agreements screen to find and view TPAs that you have defined.

1 Start the Trading Networks Console. If you need procedures for this step, see “Starting the Trading Networks Console” on page 22.

2 Select View Agreements.

3 To see detailed information about a specific TPA, double click on the row containing the TPA you want more detailed information about. Trading Networks displays the Agreements Details screen.

Description Optionally, specify a description for the TPA in the Description field. Specify 1-1024 characters. There is no restriction to the characters that you can use.

For this TPA field... Specify

Note: Trading Networks disables the OK button until you supply the Sender, Receiver, and Agreement ID fields. If you clear any of the Sender, Receiver, and Agreement ID fields during the creation of the TPA, Trading Networks will disable the OK button, as well as the other TPA fields. You will not be able to save the TPA unless you supply the Sender, Receiver, and Agreement ID fields.

Task See Page...

“Finding and Viewing TPAs” 185

“Updating TPAs” 187

“Changing a TPA Agreement Status” 188

“Changing the TPA Data Inputs in the IS Document Type” 190

“Deleting a TPA” 192

To view TPAs

webMethods Trading Networks User’s Guide Version 6.5 185

Page 186: Web Methods Trading Networks Users Guide 65

C H A P T E R 1 0 Tr a d i n g P a r t n e r A g r e e m e n t s ( T PA s )

4 If you cannot find the TPA you are looking for, you can use the search criteria on the Agreements screen to query for specific TPAs.

a Select Show Query on the toolbar to have Trading Networks display the search criteria.

b To indicate that you want to use one or more of the search criteria, select the checkbox next to each criterion you want to use. Then fill out the corresponding information as follows.

Important! The search-criteria fields are space and character-sensitive; be sure to use the exact combination of upper- and lowercase letters. Do not use pattern-matching characters (such as “*”, “%”, or “_”) in the TPA search.

For this TPA Attribute… Specify…

Sender The name of the trading partner that has the sender role for the

TPA. Type in the name of the sender or click the Select... button to select the sender from the Partner Selection Dialog. For

more information about the Select... button, see “Selecting a Partner” on page 34.

Note: The Sender, Receiver, and Agreement ID fields must be unique for each TPA.

Receiver The name of the trading partner that has the receiver role for the TPA. Type in the name of the receiver or click the Select...

button to select the receiver from the Partner Selection Dialog.

For more information about the Select... button, see “Selecting a Partner” on page 34.

Agreement ID The Agreement ID of the TPA that you want to view.

Agreement Status The status of the agreement that you want to view: Proposed, Disabled, or Agreed. For more information about statuses, see “Changing a TPA Agreement Status” on page 188.

IS Document Type The IS document type for the TPA data you want to use. Type in the name of the IS document type located on the server or

click Find IS Document Type to browse the IS document types and select the one you want to search for.

186 webMethods Trading Networks User’s Guide Version 6.5

Page 187: Web Methods Trading Networks Users Guide 65

Managing TPAs

For more information about the TPA attribute fields, see “Information You Supply to Define a TPA” on page 178.

c Select Run Query on the toolbar. Trading Networks updates the Agreements table on the bottom portion of the screen with the query results.

d Double click to select the partner you want from query results in the Profiles table on the bottom portion of the screen. Trading Networks displays the Agreement Details screen.

For more information about the tabs and fields on this screen, see “Defining a TPA” on page 181.

For procedures on how to change the information in your partner’s profile, see “Updating TPAs” on page 187.

For more information about queries in Trading Networks, see “About Viewing and Querying Documents” on page 428

Updating TPAsUse the following procedure to update a TPA.

1 Select the TPA you want to update. If you need procedures for this step, see “Finding and Viewing TPAs” on page 185.

2 Select Agreements Edit.

3 Update the TPA fields you want to change:

For information on what you can specify for the fields in the Agreement Details screen, see step 4 on page 182.

For instructions on how to change the Agreement Status, see the next section, “Changing a TPA Agreement Status”.

Timestamp The time Trading Networks last updated the TPA either when the TPA was created or last updated. Select an entry from the list. To specify a date range, select Custom from the list. Then specify dates in the Beginning and Ending fields. You can type in

a date value, or click Select Date to open a dialog that allows you to select the date from a calendar.

For this TPA Attribute… Specify…

To update a TPA

webMethods Trading Networks User’s Guide Version 6.5 187

Page 188: Web Methods Trading Networks Users Guide 65

C H A P T E R 1 0 Tr a d i n g P a r t n e r A g r e e m e n t s ( T PA s )

4 For instructions on how to update the inputs for the IS document type, see “Changing the TPA Data Inputs in the IS Document Type” on page 190.

Changing a TPA Agreement StatusThe agreement status determines whether the TPA is a draft (Proposed status), final (Agreed status), or whether the TPA is inactive (Disabled status). You can change the agreement status of the TPA to any other agreement status.

Initially, when you are creating the TPA, assign the TPA the Proposed status so that you can make modifications to the TPA fields, data values in the IS document type, the agreement status, and to delete the agreement. For a production setting, select the Agreed status to prevent the accidental deletion of the TPA, as well as to speed up processing.

Select the Disabled status when you no longer want Trading Networks to use a specific TPA. For example, in a transaction between two partners (e.g., Partner A and Partner B) who sell products to one another, the agreement status of the TPA might change depending upon business conditions. If Partner A is delinquent on payments to Partner B, then Partner B might change Partner A’s agreement status to Disabled - so that no further transactions could occur. After Partner A pays his payments, however, Partner B would change the agreement status to Agreed.

The following table explains what each status is and the changes you can make to the Agreement Status.

Important! You cannot modify or update the Sender, Receiver, or Agreement ID field of a TPA.

Agreement Status Meaning

ProposedThe TPA is in draft status. When the TPA is in the Proposed status, you can delete it. For more information, see “Deleting a TPA” on page 192.

What you can change:

The TPA fields, with the exception of the Sender, Receiver, or Agreement ID fields.

All inputs to TPA data variables in the IS document type. For more information, see “Changing the TPA Data Inputs in the IS Document Type” on page 190.

The agreement status to Disabled or Agreed.

AgreedThe TPA is in final status. When the TPA is in the Agreed status, you cannot delete it. To delete a TPA, you must change the agreement status to Proposed or Disabled. For more information, see “Deleting a TPA” on page 192.

188 webMethods Trading Networks User’s Guide Version 6.5

Page 189: Web Methods Trading Networks Users Guide 65

Managing TPAs

Use the following procedure to change a TPA agreement status.

1 Start the Trading Networks Console. If you need procedures for this step, see “Starting the Trading Networks Console” on page 22.

2 Select View Agreements. Trading Networks displays the Agreements screen.

3 Click the row containing the TPA you want to change the agreement status for.

4 To change the agreement status:

If the Data Status is:

Modifiable, you can change:

The Control Number

All inputs to TPA data variables in the IS document type. For more information, see “Changing the TPA Data Inputs in the IS Document Type” on page 190.

Non-modifiable, you can change:

The Control Number

Note: To modify the data of the TPA, you must change the agreement status from Agreed to Proposed. For more information, see “Changing the TPA Data Inputs in the IS Document Type” on page 190.

DisabledThe TPA should not be used. You can delete a disabled TPA. For more information, see “Deleting a TPA” on page 192.

What you can change:

The Control Number

Note: To modify the data of a TPA, you must change agreement status from Disabled to Proposed. For more information, see “Changing the TPA Data Inputs in the IS Document Type” on page 190

Agreement Status Meaning

To change a TPA agreement status

webMethods Trading Networks User’s Guide Version 6.5 189

Page 190: Web Methods Trading Networks Users Guide 65

C H A P T E R 1 0 Tr a d i n g P a r t n e r A g r e e m e n t s ( T PA s )

Press the appropriate status change button: Proposed , Disabled , or

Agreed

-OR-

Right-click and select from the menu items: Proposed, Disabled, or Agreed.

Trading Networks displays the new status in the Agreement Status column.

Changing the TPA Data Inputs in the IS Document TypeThe TPA data inputs are the inputs to variables of the IS document type. You can change the inputs by using the IS document type data input dialog buttons located on the right side of the IS document type root diagram: Set Inputs or Reset to Initialization Service.

Set Inputs for IS Document Type. Use this method to supply the values you want the TPA data inputs to have.

Reset to Initialization Service. Use this method to have Trading Networks invoke the initialization service (if one was provided) to set the values of the TPA data input to their defaults.

Use the following procedure to change the inputs for the IS document type.

1 Select the TPA you want to update. If you need procedures for this step, see “Finding and Viewing TPAs” on page 185.

2 Update the TPA data input in the IS document type fields you want to change using one of the following three methods:

To change the data inputs in the IS document type

Note: To access the TPA data inputs to change them, you need to have the following values: 1) the Agreement Status is Proposed or 2) the Agreement Status is Agreed and the Data Status is Modifiable. For more information, see “Changing a TPA Agreement Status” on page 188.

190 webMethods Trading Networks User’s Guide Version 6.5

Page 191: Web Methods Trading Networks Users Guide 65

Managing TPAs

3 Click OK to save your changes.

Click this IS document type data input button... To change the data input in the following manner...

Set Inputs

Change the values in the IS document type through the Input for <IS Document Type> dialog. When you click this icon, the dialog displays the parameters of the IS document type with the corresponding TPA data values automatically filled in. You can modify the data values and then save them by selecting OK. For more information about changing IS Document Types, see the webMethods Developer User’s Guide.

Reset to Initialization Service

Trading Networks invokes the initialization service (if specified) to reset the TPA data inputs of the IS document type to their default values. If you choose to reset these values, you will lose any changes that you have made to the IS document type.

Note: The Reset to Initialization Service button is only enabled when an initialization service is supplied. If this field is emptied, Trading Networks disables the Reset to Initialization Service button.

webMethods Trading Networks User’s Guide Version 6.5 191

Page 192: Web Methods Trading Networks Users Guide 65

C H A P T E R 1 0 Tr a d i n g P a r t n e r A g r e e m e n t s ( T PA s )

Deleting a TPAWhen you delete a TPA, Trading Networks deletes all of the TPA data from its database.

You can only delete TPAs with the Proposed or Disabled agreement status. You cannot delete TPAs with an Agreed status. If you want to delete a TPA with an Agreed status, you will need to first change the agreement status to either Proposed or Disabled, and then Trading Networks allows you to delete the TPA.

To delete a TPA, perform the following procedure:

1 Select the TPA you want to delete. If you need procedures for this step, see “Finding and Viewing TPAs” on page 185.

2 Select Agreements Delete to delete the TPA. When Trading Networks prompts you to verify that you want to delete the TPA, click Yes.

Important! Trading Networks does not provide a way to “undelete” the TPA.

Important! Before you delete a profile that is referenced by a TPA, you must first delete any related TPAs. If you accidentally deleted the profile and not the TPA, you can delete the invalid TPA. For more information, see “Deleting a Profile” on page 174.

To delete a TPA

Note: If you are deleting a non-modifiable agreement, you will need to use the wm.tn.tpa:deleteTPA service. For more information, see the Programmer’s Reference Guide.

192 webMethods Trading Networks User’s Guide Version 6.5

Page 193: Web Methods Trading Networks Users Guide 65

C H A P T E R 11

Document Attr ibutes

What are Document Attributes? . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 194

Defining Document Attributes . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 196

Managing Document Attributes . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 198

webMethods Trading Networks User’s Guide Version 6.5 193

Page 194: Web Methods Trading Networks Users Guide 65

C H A P T E R 11 D o c u m e n t A t t r i b u t e s

What are Document Attr ibutes?There are two kinds of document attributes:

Custom attributes, which identify specific pieces of information that you want to extract from the documents that your trading network will receive. For example, if you want to extract the purchase order number from documents, you might define a document attribute named PO_Number.

Predefined attributes, known as system attributes, that identify characteristics of the documents. System attributes are available out of the box. You do not need to define them, and you cannot delete them. They include:

For more information about these system attributes, see “Important Attributes that You Should Extract from an XML Document” on page 210 or “Attributes To Extract From Documents” on page 285.

You should define custom document attributes for all types of documents that you expect to receive; a document attribute is not associated with a specific document type. Later, when you define your TN document types, you will specify which document attributes to include in each document type. Instructions for creating document types appear in Chapter 12, “TN XML Document Types” and Chapter 13, “TN Flat File Document Types”.

To define a document attribute you specify the attribute’s name, description, and data type (DATETIME, DATETIME LIST, NUMBER, NUMBER LIST, STRING, or STRINGLIST). In addition, you can specify whether Trading Networks should save the attribute to the database (the default behavior).

System Attribute Description

SenderID Identification of the trading partner that sent the document

ReceiverID Identification of the trading partner that is to receive the document

DocumentID Identification of the document

UserStatus A status that you or a partner has associated with the document

GroupID Identification within a document that associates this document with other documents in its group

ConversationID Identification within a document that associates this document with other documents in the same conversation of documents

Signature and SignedBody

The portions of the document that contain a digital signature of the document and the signed data

194 webMethods Trading Networks User’s Guide Version 6.5

Page 195: Web Methods Trading Networks Users Guide 65

What are Document Attributes?

Document Attributes and How They Relate to TN document types

When you define a TN document type, you identify the attributes that you want Trading Networks to extract from the type of document. Different kinds of documents have different formats, so the location of attributes within a document is based on the specific kind of document. To identify the attributes, you specify the name of the attribute and how Trading Networks is to locate the attribute in the specific type of document. In addition, you can indicate whether you require the attribute to be extracted. If you mark an attribute as required and Trading Networks is unable to extract the attribute from the document, Trading Networks records the error.

In the TN document type (or in a processing rule), you can specify that you want Trading Networks to save the document to the database. If you do this, Trading Networks saves the custom attributes it extracts. Trading Networks saves a custom attribute only if the TN document type or processing rule indicates to save that attribute.

You can use document attributes to:

Locate specific documents that have passed through your network by using the attributes as search criteria in document queries. For example, if you use an attribute

TN Document TypeName = cXML PO . . .AttributesPO_Number . . .

TN Document TypeName = OAG PO . . .AttributesPO_Number . . .

TN Document TypeName = CBL PO . . .AttributesPO_Number . . .

Document AttributeName = PO_NumberType = NumberDescription = Purchase Order Number

Document #3<!-- CBL -->

<BuyerRefNum> <Reference> <RefNum> 100 </RefNum> </Reference></BuyerRefNum>

Document #1<!-- OAG -->

<POID>A230</POID>

Document #2<!-- cXML -->

<OrderRequestHeader orderID = P01234> . . .

The definition of a document attribute specifies the name, type, and description for a document attribute.

The definition of a TN document type specifies how to locate the attributes in the specific type of document.

Note: Regardless of whether you save custom attributes or not, Trading Networks always saves all system attributes except Signature and SignedBody.

webMethods Trading Networks User’s Guide Version 6.5 195

Page 196: Web Methods Trading Networks Users Guide 65

C H A P T E R 11 D o c u m e n t A t t r i b u t e s

that retrieves the total order amount of a purchase order, you can query documents where the total order amount is over $10,000.

Generate reports about documents in your Trading Network.

Defining Document Attr ibutes

1 Start the Trading Networks Console. If you need procedures for this step, see “Starting the Trading Networks Console” on page 22.

2 Select View Document Types.

3 Select Types Document Attributes.

4 Perform one of the following procedures to begin a document attribute definition.

For more information about document attributes, see Chapter 3, "Setting up Trading Networks to Process Documents" in the webMethods Trading Networks Concepts Guide.

To define a document attribute

Method to begin a definition Procedure

New—The document attribute fields are empty. Click New (yellow highlight). The New

Document Attribute screen appears.

Duplicate—The document attribute fields are filled with values from the document attribute that you duplicate.

You can update any or all fields from the duplicated document attribute.

Click the row containing the document attribute that you want to duplicate.

Click Duplicate . A copy of the document attribute screen appears.

196 webMethods Trading Networks User’s Guide Version 6.5

Page 197: Web Methods Trading Networks Users Guide 65

Defining Document Attributes

5 Fill in the following fields for the custom attribute you want to add:

6 Click OK to add the document attribute.

For this parameter... Specify

Name The name you want to give to the attribute. You can specify 1 to 64 characters. You can use any character except a single quote (').

Example: If you are defining an attribute for the price of an item in a purchase order, you might use the name “LineItemPrice”.

Type The data type of the attribute. Select the data type (DATETIME, DATETIME LIST, NUMBER, NUMBER LIST, STRING, or STRINGLIST) from the list.

Description Optional. A description of the attribute. You can specify 1 to 256 characters. You can use any character except a single quote (').

Example: If you are defining an attribute for the price of an item in a purchase order, you might specify the description “The price of an item in a purchase order”.

Enabled Whether this attribute is enabled or not. If the document attribute is disabled, select this checkbox to enable it. For more information, see “Enabling Document Attributes” on page 200 or “Disabling Document Attributes” on page 199.

Save Whether this attribute is eligible to be saved to the Trading Networks database.

If you select this checkbox and the pre-processing actions indicate to save attributes to the database, Trading Networks saves this attribute to the database.

If you do not select this checkbox and the pre-processing actions indicate to save attributes to the database, Trading Networks does not save this attribute. Deselect this checkbox if the attribute value is needed during document processing, but does not need to be kept in the database.

webMethods Trading Networks User’s Guide Version 6.5 197

Page 198: Web Methods Trading Networks Users Guide 65

C H A P T E R 11 D o c u m e n t A t t r i b u t e s

Managing Document Attr ibutesThe following table describes the tasks you can perform against document attributes:

Viewing Document AttributesYou can view document attributes using the Document Attributes screen. By default, Trading Networks does not display disabled document attributes. However, you can update the display of attributes to include disabled document attributes.

1 Start the Trading Networks Console. If you need procedures for this step, see “Starting the Trading Networks Console” on page 22.

2 Select View Document Types.

3 Select Types Document Attributes.

4 To see the details about a specific document attribute, double click the row for that attribute.

Displaying Disabled Document AttributesTo display disabled document attributes, perform Steps 1 through 4 in the procedure “Viewing Document Attributes” that is described above, then perform the following additional step.

To display disabled document attributes, click Show All to show both enabled (yellow light bulbs) and disabled (darkened light bulbs) items.

Task See Page...

“Viewing Document Attributes” 198

“Updating Document Attributes” 199

“Disabling Document Attributes” 199

“Enabling Document Attributes” 200

“Determining the TN Document Types that Use an Attribute” 201

To view document attributes

To display disabled document attributes

198 webMethods Trading Networks User’s Guide Version 6.5

Page 199: Web Methods Trading Networks Users Guide 65

Managing Document Attributes

Hiding Disabled Document AttributesIf disabled document attributes are currently being displayed on the Document Attributes screen, perform the following step to hide them.

To hide disabled document attributes, click Show Enabled to only show enabled (yellow light bulbs) items. Trading Networks does not display any disabled (darkened light bulbs) items.

Updating Document Attr ibutes

1 Start the Trading Networks Console. If you need procedures for this step, see “Starting the Trading Networks Console” on page 22.

2 Select View Document Types.

3 Select Types Document Attributes.

4 Click the row containing the document attribute that you want to update.

5 Right click and select Edit.

6 Update the fields you want to change. For information on what you can specify, see step 5 on page 197.

7 Click OK to save your changes.

Disabling Document AttributesIf you no longer want to use a document attribute, you can disable it. When you disable a document attribute, Trading Networks prevents you from specifying the document attribute when creating new or updating existing TN document types; that is, it does not allow you to select a disabled attribute as an item to be extracted.

Trading Networks will continue to extract the document attribute information for existing TN document types that reference this attribute. You can use the attribute as search criteria for displaying documents on the Transaction Analysis screen. However, Trading

To hide disabled document attributes

To update a document attribute

Important! If this attribute is referenced by a TN document type that you imported into Business Integrator and is used in Business Integrator process models, do not change the name of the attribute. You can change other settings for the attribute.

webMethods Trading Networks User’s Guide Version 6.5 199

Page 200: Web Methods Trading Networks Users Guide 65

C H A P T E R 11 D o c u m e n t A t t r i b u t e s

Networks no longer displays the value of the attribute on the Transaction Analysis screen or the Document Detail screen.

When you disable a document attribute, the definition for the document attribute is not removed from the database. Later, if you decide that you need the document attribute, you can enable it. See “Enabling Document Attributes” on page 200.

1 Start the Trading Networks Console. If you need procedures for this step, see “Starting the Trading Networks Console” on page 22.

2 Select View Document Types.

3 Select Types Document Attributes.

4 Click the row containing the document attribute you want to disable.

5 Right click and select Disable. Trading Networks places No in the Enabled column to indicate that the document attribute is disabled.

Enabling Document Attr ibutesIf you disable a document attribute and then later determine that you still need it, you can enable it and make it available again.

1 Start the Trading Networks Console. If you need procedures for this step, see “Starting the Trading Networks Console” on page 22.

2 Select View Document Types.

3 Select Types Document Attributes.

4 Click the row containing the document attribute you want to enable.

5 Right click and select Enable. Trading Networks places Yes in the Enabled column to indicate that the document attribute is enabled.

Note: To permanently remove the document attribute from the database, your database administrator must remove it. When you remove a document attribute from the database, you must also remove all TN document types that reference this attribute and all documents that had this attribute extracted from them.

To disable a document attribute

Important! To perform this procedure, you must first perform the procedure described in “Displaying Disabled Document Attributes” on page 198.

To enable document attributes

200 webMethods Trading Networks User’s Guide Version 6.5

Page 201: Web Methods Trading Networks Users Guide 65

Managing Document Attributes

Determining the TN Document Types that Use an Attr ibuteYou can determine the TN document types that are dependent on a custom attribute. That is, you can select a custom attribute and have Trading Networks list the names of all TN document types that are defined to extract the custom attribute that you selected. This is helpful, for example, if you want to disable a document attribute but first want to determine the TN document types that this action will affect.

1 Start the Trading Networks Console. If you need procedures for this step, see “Starting the Trading Networks Console” on page 22.

2 Select View Document Types.

3 Select Types Document Attributes.

4 Click the row containing the document attribute for which you want to view TN document type dependencies.

5 Click Show document type dependencies .

To determine TN document types that are dependent on a custom attribute

webMethods Trading Networks User’s Guide Version 6.5 201

Page 202: Web Methods Trading Networks Users Guide 65

C H A P T E R 11 D o c u m e n t A t t r i b u t e s

202 webMethods Trading Networks User’s Guide Version 6.5

Page 203: Web Methods Trading Networks Users Guide 65

C H A P T E R 12

TN XML Document Types

What Are TN XML Document Types? . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 204

Identification Information in TN XML Document Types . . . . . . . . . . . . . . . . . . . . . . . . . . . . 206

Extraction Information In TN XML Document Types . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 210

Namespace Mappings in TN XML Document Types . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 221

Options in TN XML Document Types . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 226

Defining TN XML Document Types . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 232

Managing TN XML Document Types . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 254

webMethods Trading Networks User’s Guide Version 6.5 203

Page 204: Web Methods Trading Networks Users Guide 65

C H A P T E R 1 2 T N X M L D o c u m e n t Ty p e s

What Are TN XML Document Types?TN XML document types define how Trading Networks recognizes XML documents, where to locate attributes within an XML document, and how to pre-process the XML documents.

To define TN XML document types, you specify the following types of information:

Identification information. Trading Networks checks XML documents against the identification information to determine whether the document matches a defined TN XML document type. When you define the identification information for a TN XML document type, you can specify one or more of the following:

Root tag that the XML document must have to match the TN XML document type.

Identifying queries, which are XQL queries that Trading Networks performs against the XML document to locate specific nodes in the XML document. The nodes must be present for Trading Networks to consider the TN XML document type a match. Optionally, you can specify the value the node must have.

Pipeline variables that must be present when Trading Networks is determining the TN XML document type to use. The pipeline variables that you specify must exist for Trading Networks to consider the TN XML document type a match. Optionally, you can specify the value the pipeline variables must have.

For more information, see “Identification Information in TN XML Document Types” on page 206.

Extraction information. Specifies the attributes (system attributes and custom attributes) that you want Trading Networks to extract from XML documents. You define XQL queries that Trading Networks uses to locate the attributes within the XML documents. For Trading Networks to extract a value, the node that the XQL query identifies must exist in the XML document. Optionally, in the extraction information, you can specify that you want to Trading Networks to use a built-in transformation or invoke a custom transformation service against the attribute value to alter the value of the extracted attribute. For example, you might want Trading Networks to transform a STRING value into all uppercase characters. For more information, see “Extraction Information In TN XML Document Types” on page 210.

Namespace mappings. If the XML documents use namespaces, you should specify namespace mappings to describe the namespaces that XML documents might use. Namespaces are used in an XML document to distinguish between elements that come from different sources. A set of elements (or tags) from a specific source is assigned to a specific namespace. Each namespace is associated with a URI, which is used to

Note: If you are using an OEM version of the Trading Networks, you cannot create new TN document types in Trading Networks. Trading Networks will gray out this unavailable selection.

204 webMethods Trading Networks User’s Guide Version 6.5

Page 205: Web Methods Trading Networks Users Guide 65

What Are TN XML Document Types?

uniquely identify the namespace. Namespace mappings map the prefixes used by namespaces to the URIs used by those namespaces. For more information about XML namespaces, see the XML Namespace specification at http://www.w3.org/.

When you define namespace mappings in a TN XML document type, Trading Networks uses the namespace mappings you specify when applying XQL queries against the XML document. That is, Trading Networks uses the namespace mappings for both the identifying XQL queries and the XQL queries to extract attributes. For more information, see “Namespace Mappings in TN XML Document Types” on page 221.

Options. You can use the options to define items for later processing. When specifying the options for an XML document, you can specify:

An IS document type that defines the structure of the XML document and that can be used to parse the XML document into an IData object. Trading Networks uses the IS document type if you invoke the wm.tn.doc.xml:bizdocToRecord service to convert the document content in the BizDocEnvelope to an IData object.

A webMethods IS schema that defines the structure of the XML document. Trading Networks uses this IS schema if you indicate you want to Trading Networks to perform the pre-processing action to validate the structure of the XML document.

Whether you want Trading Networks to perform any or all of the pre-processing actions. Pre-Processing actions are actions that Trading Networks performs before using the processing rule actions to process the XML document. For more information, see “Specifying Pre-Processing Actions for TN XML Document Type” on page 227.

Note: You specify pre-processing actions in both TN XML document types and processing rules. The pre-processing actions in a processing rule indicate whether Trading Networks is to use the settings from the TN document type or to override the TN document type settings.

For more information about

Recognition and processing of XML documents, see Chapter 5, "Trading Networks Document Processing".

Processing of large document types, see Appendix C, “Large Document Handling”.

webMethods Trading Networks User’s Guide Version 6.5 205

Page 206: Web Methods Trading Networks Users Guide 65

C H A P T E R 1 2 T N X M L D o c u m e n t Ty p e s

Ident i f icat ion Informat ion in TN XML Document TypesTrading Networks checks documents against the identification information to determine whether the document matches a defined TN XML document type. You can specify one or more of the following in the identification information:

XQL queries (called identifying queries) that Trading Networks performs against an XML document to determine whether the document contains the nodes identified by the queries

The value of the root tag within a document

The system identifier or public identifier from the document type (DOCTYPE) declaration within an XML document.

Pipeline matching variables (name and value).

You can define TN XML document types to be very general or very specific. For example, you can set up a TN XML document type that simply recognizes OAG documents. To be more specific, you can set up the TN XML document type to recognize OAG PROCESS_PO_004 documents. To be even more specific, you can set up the TN XML document type to recognize OAG PROCESS_PO_004 documents from a specific sender by specifying that the value of the <LOGICALID> tag within the <SENDER> tag must contain a certain sender's logical ID.

Trading Networks uses the extraction information and the options (which are specified in the TN XML document type) only if the document meets the criteria specified by the identification information.

Each document that passes through your system should match exactly one TN document type. Trading Networks matches documents against all enabled TN document types. If a document matches more than one, Trading Networks cannot determine which of the matching TN document types it should use.

To set up the identification information in a TN XML document type, specify one or more of the following items described in the table below:

Important! If the documents you expect use equivalent namespaces but have different prefixes, you must also define namespace mappings for Trading Networks to correctly locate the nodes identified by the XQL queries. For more information, see “Namespace Mappings in TN XML Document Types” on page 221.

Note: If you are creating identifying queries or extracting information for a large document, see “Defining TN Document Type XQL Queries for Large Documents” on page 544.

206 webMethods Trading Networks User’s Guide Version 6.5

Page 207: Web Methods Trading Networks Users Guide 65

Identification Information in TN XML Document Types

Item Description

Identifying queries

You can specify one or more XQL queries that locate a specific node in the XML document. In addition, for each identifying query, you can optionally specify the value that the node must evaluate to match this TN XML document type.

Example: To identify a cXML order request, you might specify the following XQL query that assures the OrderRequest tag is in the document:

/cXML[0]/Request[0]/OrderRequest[0]

To be more specific, you might set up the TN XML document type to match cXML OrderRequest from a specific sender. To do this, you can add a second identifying query that identifies the Identity tag within the Credential tag that is within the Sender tag. Then, specify the value that it must evaluate to, for example, Industrial Steel Company. The following shows the query:

/cXML[0]/Header[0]/Sender[0]/Credential[0]/Identity[0]

The above query will match if the document contains the following:

<cXML> <Header> <Sender> <Credential> <Identity>Industrial Steel Company</Identity>

. . .

Caution:

The XQL queries are case-sensitive. For example, if the tag you want to match in the document is <cXML> and your query specifies CXML, the query will not find the node and the TN XML document type will not be used for the document. In addition, if you specify a value for the query, the value is also case-sensitive. If you specify the value “Industrial Steel Company” and the actual value in the document is “IndustRIAL Steel COmpany”, the values will not match and the TN XML document type will not be used.

webMethods Trading Networks User’s Guide Version 6.5 207

Page 208: Web Methods Trading Networks Users Guide 65

C H A P T E R 1 2 T N X M L D o c u m e n t Ty p e s

If the documents use namespaces, you must also define namespace mappings for Trading Networks to correctly locate the nodes identified by the XQL queries. For more information, see “Namespace Mappings in TN XML Document Types” on page 221.

Note: For custom attributes that are extracted from an XML document, Trading Networks returns specific values for the different data types (e.g., STRINGLIST, STRING, NUMBERLIST, NUMBER, DATETIMELIST, and DATETIME). For more information, see “Extracting Custom Attributes From XML Documents” on page 536.

Root tag You can optionally specify the value of the root tag within the XML document that you want documents that match this TN XML document type to have.

Example: To identify a document that has a declared root tag value of cXML, you would specify cXML. For example, the document might contain the following document type declaration containing the declared root tag:

<!DOCTYPE cXML SYSTEM "cXML.dtd">

DOCTYPE identifier

You can optionally specify the system identifier or public identifier within the XML document. These identifiers are located in the document type declaration (DOCTYPE) after either the “SYSTEM” or “PUBLIC” literal string.

Example: To identify a document that has the following DOCTYPE declaration, specify cXML.dtd for the value of DOCTYPE identifier:

<!DOCTYPE cXML SYSTEM "cXML.dtd">

Pipeline Matching Variables

You can optionally specify arbitrary pipeline variables for Trading Networks to use to identify the TN XML document type. Specify the Name and optionally, the Value of the pipeline matching variable. If you specify both the Name and the Value of the pipeline matching variable, Trading Networks checks to see that both exist in the pipeline. If you specify only the Name and no Value, then Trading Networks checks to see if the Name exists.

Item Description

Note: If you do not include any identification information in a TN XML document type, Trading Networks does not use the TN XML document type.

208 webMethods Trading Networks User’s Guide Version 6.5

Page 209: Web Methods Trading Networks Users Guide 65

Identification Information in TN XML Document Types

Determining the TN Document Type to Use for an XML DocumentTo determine the TN document type to use for an XML document, Trading Networks looks at all enabled TN XML document type. For each TN XML document type, Trading Networks first matches the Root tag and DOCTYPE identifier values in the TN XML document type to the XML document. If these match, Trading Networks also checks the identifying queries.

For a document to match a TN XML document type, all the identification criteria that you specify must match. For example, to identify a cXML OrderRequest, you might specify the following:

Identifying Query = /cXML[0]/Request[0]/OrderRequest[0]Root tag = cXML

An XML document matches this identification information if the tag identified by the identifying query (<OrderRequest>) exists within the document and evaluates to any value and the root tag contains the value cXML.

When an XML Document Does Not Match Any TN Document TypesIf Trading Networks checks a document against all enabled TN document types and none match, the document is considered to be an unknown type. Because TN document types indicate what information to extract, Trading Networks cannot extract any information from the document because the TN document type is unknown.

Trading Networks will still attempt to process documents with an unknown TN document type by performing the actions identified in the processing rule that the document triggers. You can set up processing rules that act on documents with an unknown TN document type.

When an XML Document Matches More Than One TN Document TypeIf Trading Networks determines that the document matches multiple TN document types, the document is considered to be an unknown type. This is because Trading Networks does not know which of the matching TN document types to use. In this situation, Trading Networks logs a message to the activity log that identifies all the TN document types that the document matched.

Because the TN document type is unknown, Trading Networks does not extract any information from the document. Trading Networks will still attempt to process documents with an unknown TN document type by performing the actions identified in the processing rule that the document triggers. You can set up processing rules that act on documents with an unknown TN document type.

webMethods Trading Networks User’s Guide Version 6.5 209

Page 210: Web Methods Trading Networks Users Guide 65

C H A P T E R 1 2 T N X M L D o c u m e n t Ty p e s

Extract ion Informat ion In TN XML Document TypesWhen Trading Networks matches a document to a TN XML document type, it uses the extraction information in the TN XML document type to determine the attributes that it needs to extract from the document. You need to specify the attributes that identify the pieces of information within the document that you will want to use later. Trading Networks also allows you to perform built-in or custom transformations to extracted attributes. If you are extracting information for a large document, see “Defining TN Document Type XQL Queries for Large Documents” on page 544.

Important Attr ibutes that You Should Extract from an XML DocumentImportant information you need to consider extracting are the system attributes:

SenderID and ReceiverID—Use this information for processing rules, analyzing transactions, and process management.

Processing Rules—Extract these system attributes to process a document based on the sender and receiver of the document. The sender and receiver are two of the criteria that Trading Networks uses to determine the processing rule to use for a document. For more information, see “Processing Rule Criteria” on page 317.

Transactions—If you extract these system attributes, you can refine the list of displayed documents on the Transaction Analysis screen by searching for documents with specific senders and receivers.

Process Management—Extract these system attributes to make the identity of the sender and receiver available during process management. You can then set conditions on links in your process models that use the identity of the sender and receiver of a document.

DocumentID—Extract the document ID from the document if you want Trading Networks to be able to check for a duplicate document. That is, if you want Trading Networks to be able to determine whether it has already received a document. In addition, if you extract the document ID, you can refine the list of displayed documents on the Transaction Analysis screen by searching for documents with a specific document ID.

ConversationID—Extract this system attribute if you want Trading Networks to pass the document to process management after it performs the actions identified by processing rules. You define the actions taken against a document during process management by creating a process model. For more information about creating process models, see the webMethods Modeler User’s Guide. If you do not want Trading Networks to pass the document to process management, add a variable to the pipeline called prtIgnoreDocument with the value of true.

210 webMethods Trading Networks User’s Guide Version 6.5

Page 211: Web Methods Trading Networks Users Guide 65

Extraction Information In TN XML Document Types

UserStatus—Extract the user status if the document contains a user status, and you want the user status to be available so you can process the document based on this user status. The user status is a criterion that Trading Networks uses to determine the processing rule to use for a document. For more information, see “Processing Rule Criteria” on page 317. In addition, if you extract this system attribute, you can refine the list of displayed documents on the Transaction Analysis screen by searching for documents with specific user statuses.

GroupID—Extract this system attribute if it is important for you to easily access the group ID of a document.

SignedBody and Signature—Extract these system attributes if you want Trading Networks to be able to verify the digital signature of a document. For more information, see “Verifying the Digital Signature of an XML Document” on page 227.

In addition to the system attributes, you should extract any custom attribute that you will want to use later. For example, to be able to query documents based on the total order amount of a purchase order, you need to specify that you want the total order amount extracted from the document. If the documents contain a status that you will want to use in reports, you need to specify that you want the status from the document extracted.

To specify an attribute that you want to extract, select an existing attribute (system or custom) from a list. After specifying the attribute, you must specify an XQL query that instructs Trading Networks how to extract the attribute for the particular TN XML document type. To specify the XQL query, you can type the query or you can load a sample document to help you generate the queries. For example, you might have an attribute named ShippingMethod. The following shows an example of an XQL query to identify the ShippingMethod and portions of a CBL document that show what would be selected by the query.

webMethods Trading Networks User’s Guide Version 6.5 211

Page 212: Web Methods Trading Networks Users Guide 65

C H A P T E R 1 2 T N X M L D o c u m e n t Ty p e s

Another attribute that you might want to extract from the above document is the direction of the transport. You can use the following XQL query:/PurchaseOrder[0]/Transport[0]/@Direction

To extract the ShippingMethod attribute specifically when the direction of the transport is “SupplierToBuyer”, use the following query:/PurchaseOrder[0]/Transport[@Direction 'eq' 'SupplierToBuyer']/Carrier[0]

The XQL queries are case-sensitive. For example, if the tag you want to match in the document is <Carrier> and your query specifies <CARRIER>, the query will not find the node and Trading Networks will be unable to extract the information for the attribute. For examples of XQL queries, see Appendix B, “XQL Reference”.

<PurchaseOrder> . . . <Transport Direction = "SupplierToBuyer"> . . . <Carrier>FedEx</Carrier> . . . </Transport> . . .</PurchaseOrder>

XQL Query for ShippingMethod = /PurchaseOrder[0]/Transport[0]/Carrier[0]

The XQL query points to this tag. Trading Networks stores the value “FedEx” for the ShippingMethod attribute.

Important!

If the XML documents you expect use equivalent namespaces but have different prefixes, you must also define namespace mappings for Trading Networks to correctly locate the nodes identified by the XQL queries. For more information, see “Namespace Mappings in TN XML Document Types” on page 221.

If the query does not identify a node in the XML document, Trading Networks cannot extract information for the attribute.

212 webMethods Trading Networks User’s Guide Version 6.5

Page 213: Web Methods Trading Networks Users Guide 65

Extraction Information In TN XML Document Types

For custom attributes that are extracted from an XML document, Trading Networks returns specific values for the different data types (e.g., STRINGLIST, STRING, NUMBERLIST, NUMBER, DATETIMELIST, and DATETIME). For more information, see “Extracting Custom Attributes From XML Documents” on page 536.

Indicating that Attr ibutes are Required in TN XML Document TypesWhen you define a TN XML document type, you can indicate that an attribute is required. You might mark an attribute as required if you require the attribute information when processing the document or if you just want Trading Networks to indicate that it could not extract the attribute.

When you indicate that an attribute is required, Trading Networks flags an error if it is unable to extract the document attribute, and Trading Networks sets the processing status to DONE W/ ERRORS when it has completed processing the document.

You can define your processing rules to use the error information that Trading Networks records when it is unable to extract required attributes:

Use the processing rule’s document errors criterion to trigger a processing rule based on whether it contains errors. For more information, see “Document Recognition Errors Criterion” on page 321.

Use the processing rule’s Execute a service processing action to inspect the bizdoc variable for the errors that Trading Networks encountered. When Trading Networks is unable to extract an attribute that you have marked as required, Trading Networks records the error in the bizdoc variable. This variable is in the pipeline and is available for your use when Trading Networks is processing the document. For more information see “Action 1—Execute a Service” on page 330. For more information about the Execute an Integration Server processing actions, see “Action 1—Execute a Service” on page 330.

Note:

If you do not mark an attribute as required, Trading Networks does not flag an error if it is unable to extract the attribute. If Trading Networks completes processing without encountering any further errors, it sets the processing status to DONE.

You can require the system attributes Signed Body and Signature.

webMethods Trading Networks User’s Guide Version 6.5 213

Page 214: Web Methods Trading Networks Users Guide 65

C H A P T E R 1 2 T N X M L D o c u m e n t Ty p e s

Transformation Information for Extracted Attributes of TN Document TypesBased on an attribute, you might also need to specify transformation information for the attribute, i.e., how Trading Networks is to transform the value of that attribute based on built-in or custom transformations. The following table lists the attributes for which you can supply transform information and a description of the information that you can specify.

Attribute Transformation For more information, see...

SenderID or ReceiverID Specify the external ID type that is associated with the information in the document for the sender or receiver. For example, if the sender is identified in the document using a D-U-N-S number, specify the external ID type DUNS for the detail.

“Specifying Built-in Transformation Information for SenderID and ReceiverID” on page 215

Attributes with the data type DATETIME and DATETIME LIST

Specify the format that is used for the date in the document. For example, if the date is 2000/05/31, you would specify yyyy/MM/dd for the format.

“Specifying Built-In Transformation Information for Attributes with the DATETIME and DATETIME LIST Data Type” on page 215

Attributes with the data type STRING (other than SenderID or ReceiverID) and STRING LIST

Specify whether you want Trading Networks to alter the string value before storing the value.

“Specifying Built-in Transformation Information for Attributes with the STRING or STRING LIST Data Type” on page 216

Attributes that represent an array of numbers

Specify the built-in transformation you want Trading Networks to take on the array of numbers: Average, Minimum, Maximum, or Sum. For example, if you want Trading Networks to average the values in the array and store that for the attribute, specify Average for the detail.

“Specifying Built-in Transformation Information for Attributes with the NUMBER Data Type” on page 218

All attributes You can write your own service to transform attributes.

“Specifying a Custom Transformation Service” on page 220

214 webMethods Trading Networks User’s Guide Version 6.5

Page 215: Web Methods Trading Networks Users Guide 65

Extraction Information In TN XML Document Types

Specifying Built-in Transformation Information for SenderID and ReceiverIDIf you indicate that you want to extract the SenderID or ReceiverID system attributes from a document, you need to specify how the sender or receiver is identified within the document. For example, if you specify you want the ReceiverID extracted from the XML document and the ReceiverID is identified in the document by a D-U-N-S number, specify the XQL query to identify the location of the receiver information and select the external ID type DUNS for the transformation.

The Document Types screen that you use to create TN document types contains a list of the external ID types you can select. If the external ID type used for the sender or receiver information within a document is not in the list or if you have agreed on a non-standard format with a trading partner, select the external ID type Mutually Defined from the list.

Be sure to select an external ID type that your partners specify in their profiles.

Specifying Built-In Transformation Information for Attributes with the DATETIME and DATETIME LIST Data TypeIf you specify an attribute that has the data type DATETIME or DATETIME LIST, Trading Networks requires you to identify the date format. Trading Networks maintains a list of built-in common date/time formats from which you can select. However, if the date/time format you need to use is not in the list, you can type the format you need.

To specify the date/time format, use a pattern string based on the “Time Format Syntax” described for the java.text.SimpleDateFormat class. For example, if you want the requested delivery date extracted from the following sample CBL document, specify the XQL query to identify the location of the RequestedDeliveryDate attribute and specify the date format yyyyMMdd'T'hh:mm:ss.

<PurchaseOrder> <OrderHeader> <CorpName>Industrial Steel Company</CorpName> <DUNS>123456789</DUNS> </OrderHeader> . . .</PurchaseOrder>

XQL Query for ReceiverID = /PurchaseOrder[0]/OrderHeader[0]/DUNS[0]

The XQL query points to this tag. Trading Networks stores the value “123456789” for the ReceiverID attribute and associates it with the external ID type DUNS.

webMethods Trading Networks User’s Guide Version 6.5 215

Page 216: Web Methods Trading Networks Users Guide 65

C H A P T E R 1 2 T N X M L D o c u m e n t Ty p e s

Trading Networks extracts the value of the date and uses it and the pattern that you specify to decode the value and convert it to the format that Trading Networks requires to store the date in the database.

Specifying Built-in Transformation Information for Attributes with the STRING or STRING LIST Data TypeFor attributes (other than SenderID or ReceiverID) with the data type STRING or STRINGLIST, you can specify whether you want Trading Networks to alter the string value before storing. You can have Trading Networks make a simple alteration to change the case of the extracted string values to all upper- or all lowercase. Alternatively, you can have Trading Networks use the extracted values as substitutions in a string that you supply. If you do not specify transformation information for a string attribute, Trading Networks saves the data exactly as it extracted it.

The following table describes each of the built-in transformation options you can use for string attributes.

If you specify this format... Trading Network stores...

Uppercase The extracted string attribute value in all uppercase. For example, if the extracted attribute value is “Purchase Order”, Trading Networks stores “PURCHASE ORDER” for the attribute value.

Lowercase The extracted string attribute in all lowercase. For example, if the attribute value is “Purchase Order”, Trading Networks stores “purchase order” for the attribute value.

<PurchaseOrder> <OrderHeader> <RequestedDeliveryDate>20000829T01:01:01</RequestedDeliveryDate> . . . </OrderHeader> . . .</PurchaseOrder>

XQL Query for RequestedDeliveryDate = /PurchaseOrder[0]/OrderHeader[0]/RequestedDeliveryDate[0]

The XQL query points to this tag. Trading Networks uses the value “20000829T01:01:01” for the RequestedDeliveryDate attribute and uses the date format you specify to convert the date to a java.sql.Timestamp.

216 webMethods Trading Networks User’s Guide Version 6.5

Page 217: Web Methods Trading Networks Users Guide 65

Extraction Information In TN XML Document Types

String Substitution The pattern that you specify using the information that Trading Networks extracts to replace the arguments (e.g., {0}) you specify in the pattern. Trading Networks uses the java.text.MessageFormat class to substitute the extracted values into the pattern that you specify.

For example, you might specify the pattern Items Ordered: {0}, {1}, {2}, and specify an XQL query for the attribute that extracts the following array of values:

0 Cellular phone

1 Belt clip

2 Rapid mobile charger

Trading Networks would store the following for the value of the attribute:

Items Ordered: Cellular phone, Belt clip, Rapid mobile charger

If you place more arguments in the pattern than values that Trading Networks extracts, the string that Trading Networks stores in the database for the attribute will contain the extra arguments (e.g., {2}). If you specify less arguments in the pattern than values that Trading Networks extracts, the string that Trading Networks stores in the database for the attribute will not contain all the extracted values; it will only contain the values for the number of arguments you specify in the pattern.

If you specify this format... Trading Network stores...

webMethods Trading Networks User’s Guide Version 6.5 217

Page 218: Web Methods Trading Networks Users Guide 65

C H A P T E R 1 2 T N X M L D o c u m e n t Ty p e s

Specifying Built-in Transformation Information for Attributes with the NUMBER Data TypeYou can specify an attribute with NUMBER data type with an XQL query that identifies an array of numbers. When the XQL query for an attribute identifies an array of numbers, you can specify one of the following built-in formats to transform the array of numbers to a single value for Trading Networks to store:

If you specify this format… Trading Networks stores…

Average The average value of all the numbers in the array. For example, if the array contains the numbers [2, 3, 4, 5], Trading Networks stores the value 3.5.

Minimum The smallest number in the array. For example, if the array contains the numbers [2, 3, 4, 5], Trading Networks stores the value 2.

Maximum The largest number in the array. For example, if the array contains the numbers [2, 3, 4, 5], Trading Networks stores the value 5.

Sum The sum of all the numbers in the array. For example, if the array contains the numbers [2, 3, 4, 5], Trading Networks stores the value 14.

No format specified

The first value of the array as the value of the attribute. For example, if the array contains the numbers [2, 3, 4, 5], Trading Networks stores the value 2.

Note: When Trading Networks extracts a NUMBER or NUMBER LIST from a document, it uses the number parsing behavior of java.lang.Number. For example, if the NUMBER or NUMBER LIST contains the value “100zzz”, Trading Networks interprets the value as “100”, instead of throwing an error as it would if the value were “zzz100”. If you want to redefine this parsing behavior, you can write a custom attribute transformation. For more information about custom transformations, see below, “Specifying a Custom Transformation Service”.

218 webMethods Trading Networks User’s Guide Version 6.5

Page 219: Web Methods Trading Networks Users Guide 65

Extraction Information In TN XML Document Types

The following sample CBL document shows two line items and the quantity to purchase of each. To store the total number of items ordered in the attribute TotalItems, specify an XQL query that specifies an array of numbers that contains the quantity of each line item, and specify the format SUM.

<PurchaseOrder> . . . <ListOfOrderDetail> <OrderDetail> <BaseItemDetail> <LineItemNum>1</LineItemNum> . . . <Quantity> <Qty>10</Qty> </Quantity> . . . <BaseItemDetail> </OrderDetail> <OrderDetail> <BaseItemDetail> <LineItemNum>2</LineItemNum> . . . <Quantity> <Qty>5</Qty> </Quantity> . . . <BaseItemDetail> </OrderDetail> <ListOfOrderDetail> . . .</PurchaseOrder>

XQL Query for TotalItems = /PurchaseOrder[0]/ListOfOrderDetail[0]/OrderDetail[]/BaseItemDetail[0]/Quantity[0]/Qty[0]

This element of the query indicates to select all occurrences of <OrderDetail> tags.

The XQL query points to these tags. Trading Networks uses the SUM format and stores the value 15 for the TotalItems attribute.

webMethods Trading Networks User’s Guide Version 6.5 219

Page 220: Web Methods Trading Networks Users Guide 65

C H A P T E R 1 2 T N X M L D o c u m e n t Ty p e s

Specifying a Custom Transformation ServiceTrading Networks allows you to create your own service to perform transformations on extracted attributes. The following table describes the specification you should use to create the custom transformation service based on the data type.

For more information about the inputs and outputs, see the section “Setting Input and Output Values for Custom Transformation Services” below.

To view these specifications, use webMethods Developer. The specifications are located in the WmTN package. For more information about these specifications, see the webMethods Trading Networks Built-in Services Reference.

Setting Input and Output Values for Custom Transformation Services

For custom transformation services, Trading Networks passes the following input variables:

Data type Specification you must use…

DATETIME or DATETIME LIST

The service must implement the input and output variables that are defined in the wm.tn.rec:DateAttributeTransformService specification.

STRING or STRING LIST

The service must implement the input and output variables that are defined in the wm.tn.rec:StringAttributeTransformService specification.

NUMBER or NUMBER LIST

The service must implement the input and output variables that are defined in the wm.tn.rec:NumberAttributeTransformService specification.

Input Value Meaning

values One or more values for your service to transform.

Note: The values may be null or an empty (zero length) string. For an array data type (e.g., DATETIME LIST), any element in the values array can be null or an empty string. Make sure that your custom transformation service can handle null values or empty strings.

isArray Whether values contains a single value to transform or multiple values to transform.

arg Optional arguments that you can define

220 webMethods Trading Networks User’s Guide Version 6.5

Page 221: Web Methods Trading Networks Users Guide 65

Namespace Mappings in TN XML Document Types

As output, Trading Networks expects that you return the transforms values in the following output variable:

For information about creating the service, see the webMethods Developer User’s Guide.

Namespace Mappings in TN XML Document TypesIf you receive XML documents that use namespaces, you might want to include namespace mappings in your TN XML document types. This section provides information about namespaces, how namespaces affect XQL queries against XML documents, what namespace mappings are, and how to set up namespace mappings.

XML Documents and NamespacesNamespaces are used in an XML document to distinguish between elements that come from different sources. A set of elements (or tags) from a specific source is assigned to a specific namespace. For example, a document might contain elements that are part of a standard and also custom elements. To distinguish between the standard elements and the custom elements, the XML document might contain a namespace for the standard elements and another for the custom elements.

Output Value Meaning

newValues Transformation values of:

Date List for DATETIME or DATETIME LIST

String List for STRING or STRING LIST

Number List for NUMBER or NUMBER LIST.

If the input variable isArray is false, the input variable values will contain only a single item to transform. Your service should transform the single item and save just a single item in the output variable newValues.

If the input variable isArray is true, meaning multiple values, your service should loop through the items in the values variable and transform each one. It should store each as an item in the output variable newValues. For example, if you are transforming string data, newValues is a Date List of the transformed Strings.

webMethods Trading Networks User’s Guide Version 6.5 221

Page 222: Web Methods Trading Networks Users Guide 65

C H A P T E R 1 2 T N X M L D o c u m e n t Ty p e s

XML documents that use namespaces contain the xmlns attribute, which defines a namespace. Each namespace is associated with a URI. Note that the URI does not have to point to anything. It is used to uniquely identify the namespace.

Elements are considered to be in the same namespace if they are all associated with the same URI. The xmlns attribute specifies the URI for a namespace and optionally, a prefix associated with that namespace. When a namespace is associated with a string, this string is used as a prefix when naming the elements in that namespace, which allows you to easily identify the elements that belong to a specific namespace. For example, if a document contains a namespace that is associated with the prefix string standard and the quantity element is in the standard namespace, the element is represented in the XML document as <standard:quantity>.

The exception for naming elements in a namespace with a prefix is when the elements belong to the default namespace. When an XML document uses a default namespace, the elements in the default namespace do not use a prefix. The documents with a default namespace contain an xmlns attribute that specifies only the URI for a namespace, for example:xmlns=“http://www.standards.org”

<order xmlns:standard="http://www.standards.org" xmlns:custom="http://www.unitedsteel.com/orderDocs">

<standard:buyer> <standard:DUNS>987654321</standard:DUNS> <standard:company>SMK Products</standard:company> <custom:contact>Mr. Smith</custom:contact> <custom:customerNum>01031995</custom:customerNum></standard:buyer>

<standard:seller> <standard:DUNS>123456789</standard:DUNS> <standard:company>United Steel</standard:company> <custom:contact>Mr. Jones</custom:contact></standard:seller>

<standard:LineItem> <standard:LineItemNumber>1</standard:LineItemNumber> <standard:partNumber>C8C8C8</standard:partNumber> <standard:quantity>10</standard:quantity> <custom:description>bar steel</custom:description></standard:LineItem>

</order>

The namespace is associated with a URI that uniquely identifies the

This element is in the standard namespace

The namespace is associated with a string that is used as a prefix in the names of elements

The xmlns attribute defines a namespace

This element is in the custom namespace

222 webMethods Trading Networks User’s Guide Version 6.5

Page 223: Web Methods Trading Networks Users Guide 65

Namespace Mappings in TN XML Document Types

How Namespaces Affect Identifying and Attribute XQL QueriesIf an XML document uses namespaces, the elements in that document might be prefixed with a string. When you create XQL queries to identify elements within the document, for example, identifying queries or queries that locate document attributes, the XQL queries include the prefix. For example, the XQL query to identify the <standard:buyer> element in the XML document shown above is:/Order[0]/standard:buyer

However, not all documents use the same prefix for the same namespace. For example, one document might use standard for a prefix and another might use CBL_standard. Namespaces are the same if they identify the same URI, not the same prefix. As a result, the following xmlns attributes identify the same namespace:xmlns:standard=“http://www.standard.org/”xmlns:CBL_standard=“http://www.standard.org/”

As a result, if the above xmlns attributes are used in two different documents, the XQL queries for elements within those documents are different: For example, the following XQL queries might represent the same elements:/Order[0]/standard:buyer/Order[0]/CBL_standard:buyer

However, if you execute the /Order[0]/standard:buyer XQL query against the document that uses the prefix CBL_standard, the XQL query will fail.

The solution to this problem is namespace mappings. In a TN XML document type, you define namespace mapping to identify all the prefixes that point to the same URI (in other words, identify the same namespace).

Namespace MappingsNamespace mappings map the prefixes used by namespaces to the URIs used by those namespaces. With this information, if Trading Networks receives an XML document that contains a prefix that you have in the namespace mappings, it can make the appropriate substitutions in the XQL queries, if necessary, so that the queries find the elements of the XML document as expected.

For example, you create your TN XML document type using a sample document that uses the following namespace:xmlns:standard=“http://www.standard.org/”

You have a trading partner that sends you documents, but the trading partner uses the following namespace:xmlns:CBL_standard=“http://www.standard.org/”

Note that the URIs are identical meaning it is the same namespace; however, the prefixes are different. To accommodate the different prefixes, the TN XML document type contains the following namespace mappings:

webMethods Trading Networks User’s Guide Version 6.5 223

Page 224: Web Methods Trading Networks Users Guide 65

C H A P T E R 1 2 T N X M L D o c u m e n t Ty p e s

With this namespace mapping, a TN XML document type definition can use the XQL query /Order[0]/standard:buyer, and Trading Networks will make the proper substitution for a document that uses the CBL_standard prefix rather than the standard prefix.

Define namespace mappings for a TN XML document type if the XML documents that your trading partners send to Trading Networks use namespaces that are equivalent but have different prefixes. If you do not define namespace mappings, the identifying XQL queries and the XQL queries that locate document attributes will fail. As a result, if the TN XML document types use identifying queries, Trading Networks will not match the document to the TN XML document type. If the TN XML document type specifies XQL queries to locate and extract attribute information, those queries will fail and Trading Networks will not extract the attribute information.

Prefix URI

standard http://www.standard.org/

CBL_standard http://www.standard.org/

<order xmlns:CBL_standard="http://www.standards.org" xmlns:custom="http://www.unitedsteel.com/orderDocs">

<CBL_standard:buyer> <CBL_standard:DUNS>987654321</CBL_standard:DUNS> <CBL_standard:company>SMK Products</CBL_standard:company> <custom:contact>Mr. Smith</custom:contact> <custom:customerNum>01031995</custom:customerNum></CBL_standard:buyer>

</order>

<order xmlns:standard="http://www.standards.org" xmlns:custom="http://www.unitedsteel.com/orderDocs">

<standard:buyer> <standard:DUNS>987654321</standard:DUNS> <standard:company>SMK Products</standard:company> <custom:contact>Mr. Smith</custom:contact> <custom:customerNum>01031995</custom:customerNum></standard:buyer>

</order>

With the namespace mapping, the following XQL query will locate the "buyer" element in either of the following documents.XQL query = /order[0]/standard:buyer

The XQL query points to this element in this document

The XQL query points to this element in this document

224 webMethods Trading Networks User’s Guide Version 6.5

Page 225: Web Methods Trading Networks Users Guide 65

Namespace Mappings in TN XML Document Types

To define namespace mappings, you can define them manually, or if you are using a sample document, you can have Trading Networks populate the namespace mappings table with the prefix and URIs from the xmlns attributes that define namespaces in the sample document.

When defining namespace mappings, keep the following guidelines in mind:

Additionally, be sure to include a mapping for each prefix/URI combination that you expect to receive in XML documents from your trading partners. If Trading Networks receives a document that uses a prefix not defined in the namespace mappings table, it performs a literal match of the XQL queries against the document.

Guideline Sample

Each prefix in the namespace mappings table for a TN XML document type must be unique.

The URIs you list in the namespace mappings table do not have to be unique. You can define more than one prefix to the same URI.

To define a mapping for the default namespace (which does not use a prefix), use the literal string prefix0 for the prefix.

Note: Because Trading Networks uses the literal prefix0 to identify the default namespace, you should not use prefix0 as the prefix in any document.

Prefix URI

aaa http://www.ww.com

bbb http://www.xx.com

ccc http://www.yy.com

ddd http://www.zz.com

Prefix URI

aaa http://www.xx.com

bbb http://www.xx.com

ccc http://www.xx.com

ddd http://www.xx.com

Prefix URI

prefix0 http://www.yy.com

webMethods Trading Networks User’s Guide Version 6.5 225

Page 226: Web Methods Trading Networks Users Guide 65

C H A P T E R 1 2 T N X M L D o c u m e n t Ty p e s

Options in TN XML Document TypesWhen Trading Networks matches a document to a TN XML document type, it uses the options you specify.

Specifying an IS Document Type for TN XML Document TypesYou can identify an IS document type that Trading Networks can use to format the documents identified by the TN XML document type. You identify the IS document type by specifying its fully qualified name. The Document Types screen allows you to browse webMethods IS document types to locate the one you want to use.

Specify an IS document type if you plan to execute the wm.tn.doc.xml:bizdocToRecord built-in service against the document. This service transforms an XML document into an IS document (IData object) based on the blueprint defined by the specified IS document type. For more information about the wm.tn.doc.xml:bizdocToRecord built-in service, see the webMethods Trading Networks Built-in Services Reference.

Use this option... To...

webMethods IS Document Type

Associate a webMethods IS document type with documents identified by the TN XML document type.

webMethods schema to validate against

Associate a webMethods IS schema with documents identified by the TN XML document type. Trading Networks uses the IS schema to validate documents.

Pre-Processing actions

Specify actions that you want Trading Networks to perform on documents identified by the TN XML document type before Trading Networks uses the processing rule actions to process the document. You can select one or more of the following preferences:

Verify the digital signature of a document.

Validate the structure of a document using the IS schema that you specified for the webMethods schema to validate again option.

Check for duplicate document using built-in or custom services; that is, determine whether Trading Networks has already received the document.

Save a copy of the document content, attributes, and/or log information to the database.

226 webMethods Trading Networks User’s Guide Version 6.5

Page 227: Web Methods Trading Networks Users Guide 65

Options in TN XML Document Types

Specifying an IS Schema for TN XML Document TypesYou can identify an IS schema that maps the structure of the documents identified by the TN XML document type. You identify the IS schema by specifying its fully qualified name. If you do not know the fully qualified name, the Document Types screen allows you to browse IS schemas to locate the one you want to use.

Specify an IS schema if you want Trading Networks to be able to validate the structure of an XML document. For more information, see below, “Specifying Pre-Processing Actions for TN XML Document Type” on page 227.

Specifying Pre-Processing Actions for TN XML Document TypeTrading Networks performs pre-processing actions before performing the processing actions defined by a processing rule. You specify pre-processing actions in both TN document types and processing rules. The pre-processing actions in a processing rule indicate whether Trading Networks is to use the settings from the TN document type or to override the TN document type settings.

You can specify the following pre-processing actions for TN document types. Trading Networks performs the pre-processing actions in the following order.

Verifying the Digital Signature of an XML DocumentUse the Verify Digital Signature pre-processing action to assure that the document Trading Networks receives has arrived unchanged and that the sender is who it claims to be. To use this pre-processing action, the TN document type must instruct Trading Networks to extract the SignedBody and Signature system attributes. The signature that Trading Networks extracts must be a PKCS#7 detached signature of the signed body.

To verify that the document arrived unchanged, Trading Networks assures the signed body has not changed by verifying the digital signature. To verify that the sender is who it claims to be, Trading Networks matches the certificate from the digital signature to the certificate that Trading Networks has in the Trading Networks database. This certificate on file with Trading Networks is the one identified in that partner’s profile on the Security tab, Verify sub-tab. If the partner’s profile does not contain the certificates to use for verification, Trading Networks cannot verify the digital signature.

Regardless of whether Trading Networks determines the digital signature is valid, it continues performing the rest of the pre-processing actions. It also performs the processing actions that are defined in the processing rule. If the digital signature is not valid, the processing actions can access the error information from the pipeline. For more

For more information about how Trading Networks verifies the digital signature, see Appendix B, "Security within Trading Networks" in the webMethods Trading Networks Concepts Guide.

webMethods Trading Networks User’s Guide Version 6.5 227

Page 228: Web Methods Trading Networks Users Guide 65

C H A P T E R 1 2 T N X M L D o c u m e n t Ty p e s

information about the pipeline variables that are available to processing actions, see “Action 1—Execute a Service” on page 330.

If Trading Networks is instructed to use the Save Document to Database pre-processing action to save information about the document to the database, Trading Networks also logs the error to the activity log.

Validating the Structure of an XML DocumentUse the Validate Structure pre-processing action to validate the structure of a document against an IS schema. To use this pre-processing action, you must specify an IS schema in the TN XML document type.

To validate the structure of the document, Trading Networks assures that the XML document matches the structure identified by the IS schema using the pub.schema:validate built-in service. For more information about this service, see the webMethods Integration Server Built-In Services.

Regardless of whether the Trading Networks determines the document structure is valid, it continues performing the rest of the pre-processing actions. It also performs the processing actions that are defined in the processing rule. If the document structure is not valid, the processing actions can access the error information from the pipeline. For more information about the pipeline variables that are available to processing actions, see “Action 1—Execute a Service” on page 330.

If Trading Networks is instructed to use the Save Document to Database pre-processing action to save information about the document to the database, Trading Networks also logs the error to the activity log.

Checking for Duplicate of the XML DocumentUse the Check for Duplicate Document pre-processing action to have Trading Networks determine whether it has already received the document. Trading Networks checks the document being processed against either built-in services or custom services. You can also choose Do not check for duplicate document to have Trading Networks not to check against the documents it has in its database.

Important! If the structure of a document is not valid, the validation service can return many error messages. To limit the number of error messages, set the tn.doc.validate.max_errs property in the Trading Networks properties file. For example, to limit the number of errors to ten, specify the following:

tn.doc.validate.max_errs=10

For more information, see “Trading Networks Configuration Properties” on page 42.

228 webMethods Trading Networks User’s Guide Version 6.5

Page 229: Web Methods Trading Networks Users Guide 65

Options in TN XML Document Types

You can have Trading Networks determine whether the document is a duplicate using a built-in or custom duplicate check service.

Built-in services—Use one of the following built-in duplicate checks:

Document ID only—Trading Networks assures that it does not already have a document with the same document ID in its database. To check for a duplicate document using the document ID, you must instruct Trading Networks to extract the DocumentID system attribute from the document.

Document ID and sender —Trading Networks assures that it does not already have a document with the same document ID and sender in its database. To check for a duplicate document using the document ID and sender, you must instruct Trading Networks to extract the DocumentID and SenderID system attributes from the document.

Document ID, sender and receiver—Trading Networks assures that it does not already have a document with the same document ID, sender, and receiver in its database. To check for a duplicate document using the document ID, sender, and receiver, you must instruct Trading Networks to extract the DocumentID, SenderID, and ReceiverID system attributes from the document.

Document ID, sender and document type—Trading Networks assures that it does not already have a document with the same document ID, sender, and TN document type in its database. To check for a duplicate document using the document ID and sender you must instruct Trading Networks to extract the DocumentID and SenderID system attributes from the document.

Custom services—Use a service that you create to determine whether a document is a duplicate. For more information, see “Creating a Duplicate Document Check Service” on page 329.

The following lists reasons Trading Networks might be unable to correctly determine whether a document is a duplicate:

Trading Networks previously received a document that it did not save to the database and the same document is sent again.

Trading Networks previously received a document and saved it to the database, but did not extract the DocumentID, SenderID, and/or ReceiverID system attributes from the document.

You selected the Document ID, sender and document type option and Trading Networks was unable to match the document to a TN document type.

Note: There could be performance issues if you choose to use custom services for duplicate checking based on the logic in the service you select.

webMethods Trading Networks User’s Guide Version 6.5 229

Page 230: Web Methods Trading Networks Users Guide 65

C H A P T E R 1 2 T N X M L D o c u m e n t Ty p e s

Trading Networks saves the results of the duplicate document check to the pipeline. As a result, it is available for your use in processing actions that you define in the processing rule. For more information about the pipeline variables that are available to processing actions, see “Action 1—Execute a Service” on page 330.

Additionally, Trading Networks uses the results of the duplicate document check in the Save Document to Database pre-processing action.

Saving an XML Document to the DatabaseUse the Save Document to Database pre-processing action to instruct Trading Networks to save a copy of all documents, only unique documents, or do not save the document to the database. In addition, if you want Trading Networks to use reliable delivery or scheduled delivery to deliver XML documents, you must have Trading Networks save the document to the database. For more information, see “Using Reliable Delivery with Immediate Delivery Method” on page 343 or “Using Reliable Delivery with Scheduled Delivery” on page 344.

If you choose to not save the document, Trading Networks maintains no information about this document after it processes the document. Certain delivery options require saving the document content to the database, for example, if you want to deliver a document via a queue. If you do not select to save the document content and Trading Networks is to use a delivery option that requires document content to be saved, Trading Networks will bypass reliable delivery and invoke the specified delivery service once

When you specify this pre-processing action, you select whether Trading Networks is to save all documents (i.e., save the document regardless of whether it is unique, even if there is a duplicate) or only if the document(s) is unique (i.e., there is no duplicate). If you want Trading Networks to save document(s) to the database only if it is unique, you must specify the Check for Duplicate Document pre-processing action.

If you do not have Trading Networks perform the Check for Duplicate Document pre-processing action, it has not determined whether the document has a duplicate. In this situation, Trading Networks considers the document as having no duplicate and will save the unique document to the database. For more information about the Check for Duplicate Document pre-processing action, see the previous section, “Checking for Duplicate of the XML Document”.

You can save a copy of the document(s) content, attributes, and/or log information to the database. The following table displays the consequences of not saving specific options:

230 webMethods Trading Networks User’s Guide Version 6.5

Page 231: Web Methods Trading Networks Users Guide 65

Options in TN XML Document Types

If you do not save this option... Then the consequences of not saving are...

Content If you use the Deliver Document actions, Trading Networks will not use reliable delivery.

You will not be able to view content from the Transaction Analysis screen (i.e., the Content tab will have no data).

You will not be able to resubmit or re-process the document.

Attribute You will not be able to view custom attributes from the Transaction Analysis screen (i.e., attributes will contain only information for system attributes). However, you can still use the processing rules extended criteria for the document.

If you use the Transaction Analysis Custom search criteria, Trading Networks will be unable to locate documents for which you did not save the attributes, because you cannot search on any documents that do not have these custom attributes saved.

You might get different or unexpected results when you reprocess a document. Because the attributes are not saved when you reprocess the document, Trading Networks will not match processing rules that use extended criteria. Instead, Trading Networks will match to another processing rule, for example the default processing rule, and perform the process actions identified in that matching rule. Trading Networks does not perform document recognition again and therefore does not re-extract the attributes.

For example, if you use extended criteria to select a processing rule when the value of the custom attribute Total Amount is greater than 10000, Trading Networks would not select that processing rule when reprocessing a document because the value of the Total Amount attribute would not be available and therefore would not match the extended criteria.

Note that you can still resubmit a document. When Trading Networks resubmits a document, it performs document recognition and therefore extracts the attributes again.

Activity Log You will not be able to view Activity Log entries from the Transaction Analysis screen (i.e., the Activity Log tab will have no data).

You will not be able to view entries from the Activity Log screen.

webMethods Trading Networks User’s Guide Version 6.5 231

Page 232: Web Methods Trading Networks Users Guide 65

C H A P T E R 1 2 T N X M L D o c u m e n t Ty p e s

Defining TN XML Document TypesHow you define TN XML document types depends on whether you have a sample document available when you create the TN document type.

When you create a TN XML document type, you specify XQL queries that locate specific nodes in the document; that is, identifying queries that locate nodes that must be present in the document for the TN XML document type to be considered a match and queries that identify the location of attribute information that you want Trading Networks to extract from the document.

Using a sample document—When you use a sample document, creating the XQL queries is simplified because you highlight the node in the sample document and Trading Networks forms the query for you. You can use a sample document that you have stored in your file system. Alternatively, you can use a document that was sent to Trading Networks for processing and is in the Trading Networks database. For example, Trading Networks might have received a document for which there is no matching TN document type, in other words, a document with an unknown TN document type. To create a TN document type for that document, you can use the document as the sample document when creating the TN document type.

Not using a sample document—When you do not use a sample document, you need to know the required XQL queries and type them in yourself.

Note: Trading Networks always saves documents that it is to pass on to process management regardless of the setting of the Save Document to Database pre-processing action. Trading Networks passes documents on to project management if it extracted a conversation ID from the document. For more information about process management, see the webMethods Modeler User’s Guide.

Note: If you are using an OEM version of the Trading Networks, you cannot create new TN document types in Trading Networks. Trading Networks will gray out this unavailable selection.

232 webMethods Trading Networks User’s Guide Version 6.5

Page 233: Web Methods Trading Networks Users Guide 65

Defining TN XML Document Types

Using a Sample Document to Define a TN XML Document TypeUse this procedure when you have a sample document available for defining a TN XML document type. For a summary of actions you can take against a sample document, see “Working with a Sample Document” on page 243.

2 Perform one of the following procedures to start a new TN XML document type and load a sample document.

To define a TN XML document type using a sample document1 Start the Trading Networks Console. If you need procedures for this step, see

“Starting the Trading Networks Console” on page 22.

Method to start a TN XML document type Procedures when you have a sample document loaded

New— The TN XML document type fields are empty, and you load a sample document from the file system.

1) Select View Document Types.

2) Select Types New XML.

3) In the Create New DocType dialog box, select the XML document type category from the list.

4) In the Document Types Details dialog box, click the Identify tab.

5) Click Select Sample Document .

6) In the Select File dialog box, browse your file system to locate the XML document that you want to use as a sample, and click Open.

Duplicate— The TN XML document type fields are filled with values from the TN XML document type that you duplicate, and you load a sample document from the file system.

You can update any or all fields from the duplicated TN XML document type.

1) Select View Document Types.

2) Click the row containing the TN XML document type that you want to duplicate.

3) Select Types Duplicate.

4) Click the Identify tab.

5) Click Select Sample Document .

6) In the Select File dialog box, browse your file system to locate the XML document that you want to use as a sample, and click Open.

webMethods Trading Networks User’s Guide Version 6.5 233

Page 234: Web Methods Trading Networks Users Guide 65

C H A P T E R 1 2 T N X M L D o c u m e n t Ty p e s

3 Type the name you want to give the TN XML document type in the Name field. This field is required.

4 Optionally, type a description for the TN XML document type in the Description field.

5 Click the Identify tab. Perform one or more of the following procedures to specify information that indicates how Trading Networks is to identify documents. For details about specifying any of this information, see “Identification Information in TN XML Document Types” on page 206.

From Saved Document—The TN XML document type fields are empty and the sample document from the Trading Networks database is loaded for you.

1) Use the Transaction Analysis screen to display the sample document that you want to use. If you need procedures for viewing documents on the Transaction Analysis screen, see Chapter 18, “Managing and Tracking Documents”.

2) Click the row containing the document for which you want to create a TN XML document type.

3) Select Transactions Create/Edit Document Type.

Method to start a TN XML document type Procedures when you have a sample document loaded

Note: Trading Networks displays a tree view of the XML document in the left side on the screen. To view the document source, click Show Source.

234 webMethods Trading Networks User’s Guide Version 6.5

Page 235: Web Methods Trading Networks Users Guide 65

Defining TN XML Document Types

For this Identify tab parameter… Use this procedure when using a sample document

Identifying Queries 1) In the sample document, select the node that you want the identifying query to represent.

When you select a node, Trading Networks fills in the Query field with the XQL query for the selected node and displays the value in the Value field.

Note: This “filled in” query is for a specific node in the XML document. This node is applicable for DATETIME, STRING, or NUMBER data types. But, if you want to use DATETIME LIST, STRING LIST, NUMBER (with Average, Minimum, Maximum, and Sum), or NUMBERLIST data types, you need to update the query so that it identifies an array of values.

For information about XQL queries, see Appendix B, “XQL Reference”.

2) Right click and select Add an identifying query.

Trading Networks displays the Add an identifying query dialog box. Trading Networks fills the Query field with the XQL query for the node that you selected and the Value field with the value of the node.

If you want the TN XML document type to require the identifying query to evaluate to the value in the Value field, continue with Step 4.

If you want the TN XML document type to require the identifying query to evaluate to a different value, replace the current value in the Value field with the value you want the TN XML document type to use.

If you do not want the TN XML document type to require the identifying query to evaluate to a specific value, clear the Value field.

3) Click OK.

Trading Networks adds the identifying query to the list on the right.

webMethods Trading Networks User’s Guide Version 6.5 235

Page 236: Web Methods Trading Networks Users Guide 65

C H A P T E R 1 2 T N X M L D o c u m e n t Ty p e s

4) Repeat this procedure for each identifying query that you want to add.

Note:

If you add an identifying query and then decide you do not need it, you can remove it by clicking on the row containing the identifying query, and then clicking Delete selected

identifying query .

To view (in the sample document) the node that a query represents, click the row containing the identifying query;

then click Show node .

Root Tag Click the Set button next to the Root Tag field. Trading Networks determines the root tag of the sample document and uses its value to populate the Root Tag field.

DOCTYPE Identifier Click the Set button next to the DOCTYPE Identifier field. Trading Networks obtains the value that follows the SYSTEM or PUBLIC literal string in the document type declaration (DOCTYPE) in the sample document. If both literal strings exist, Trading Networks uses the value after the SYSTEM literal string. Trading Networks populates the DOCTYPE Identifier field with the value it obtains from the document type declaration in the sample document.

For this Identify tab parameter… Use this procedure when using a sample document

236 webMethods Trading Networks User’s Guide Version 6.5

Page 237: Web Methods Trading Networks Users Guide 65

Defining TN XML Document Types

6 Click the Extract tab. Perform the following procedure for each attribute that you want Trading Networks to extract from documents identified by this TN XML document type. For details about what to specify for these fields, see “Extraction Information In TN XML Document Types” on page 210.

a In the sample document, select the node that represents the attribute that you want Trading Networks to extract.

b Right click and select Add an attribute.

Trading Networks displays the Add an attribute dialog box. Trading Networks fills the Query field with the XQL query for the node that you selected.

Pipeline Matching1) Click Add New Pipeline Match .

2) Specify the following values in the Add Pipeline Matching dialog box.

Name. Name of the pipeline matching variable.

Value. The value of the pipeline matching variable. This field is optional. If you specify both the Name and the Value of the pipeline matching variable, Trading Networks checks to see that both exist in the pipeline. If you specify only the Name and no Value, then Trading Networks checks to see if the Name exists.

3) Click OK. Trading Networks adds the pipeline matching variable to the list.

4) Repeat this procedure for each pipeline matching variable that you want to add.

For this Identify tab parameter… Use this procedure when using a sample document

Important! You must supply at least one criterion that Trading Networks is to use to recognize an XML document; that is, you must supply at least one identifying query, a value for the Root Tag field, a value for the DOCTYPE Identifier field, or a pipeline matching variable.

Note: If you do not specify any identification information in a TN document type, Trading Networks does not use the TN document type.

webMethods Trading Networks User’s Guide Version 6.5 237

Page 238: Web Methods Trading Networks Users Guide 65

C H A P T E R 1 2 T N X M L D o c u m e n t Ty p e s

c In the Name field, select the name of the attribute from the list. Trading Networks fills in the Description and Type fields based on the document attribute definition.

d If you want Trading Networks to flag an error if it encounters an error attempting to extract this document attribute, select the Required check box. For more information, see “Indicating that Attributes are Required in TN XML Document Types” on page 213.

e Use the Transformation option to specify how Trading Networks is to handle attribute data before storing it in the Trading Networks database. The data type of the attribute (shown in the Type field) determines the Built-in or Custom transformation options available. For more information, see “Transformation Information for Extracted Attributes of TN Document Types” on page 214.

1 Built-in. Select an existing built-in transformation provided by Trading Networks.

Note: This “filled in” query is for a specific node in the XML document. This node is applicable for DATETIME, STRING, or NUMBER data types. But, if you want to use DATETIME LIST, STRING LIST, NUMBER (with Average, Minimum, Maximum, and Sum), or NUMBERLIST data types, you need to update the query so that it identifies an array of values.

If the attribute data type is… For Transformation…

Is SenderID or ReceiverID

You must specify an external ID type. For more information, see “Specifying Built-in Transformation Information for SenderID and ReceiverID” on page 215.

Has DATETIMEor DATETIME LIST data type

You must specify a date format. Select one from the seven different built-in formats or type in your own. For more information, see “Specifying Built-In Transformation Information for Attributes with the DATETIME and DATETIME LIST Data Type” on page 215.

Has STRING or STRING LIST data type (but not SenderID or ReceiverID)

You can specify whether you want Trading Networks to alter the string value before storing it to UPPERCASE or LOWERCASE. For more information, see “Specifying Built-in Transformation Information for Attributes with the STRING or STRING LIST Data Type” on page 216.

238 webMethods Trading Networks User’s Guide Version 6.5

Page 239: Web Methods Trading Networks Users Guide 65

Defining TN XML Document Types

2 Custom. Select or create your own service to perform custom transformations on extracted attributes. For more information, see “Specifying a Custom Transformation Service” on page 220.

f Click OK to close the Add an attribute dialog box

Has NUMBER data type and the XQL query identifies an array of numbers

You should specify the operation that Trading Networks should perform on the numbers in the array. For more information, see “Specifying Built-in Transformation Information for Attributes with the NUMBER Data Type” on page 218.

To do this… Perform this…

Create a new custom transformation Click New Service .

Select an existing custom transformation service Click Find Service to browse the IS namespace

to locate the one you want to use.

Set the inputs of the transformation from the selected service

Click Set Inputs.

Edit an existing service Click on the Edit Service button.

If the attribute data type is… For Transformation…

Important! If you do not extract the system attributes, Trading Networks does not have this information available for processing rules or querying documents.

Note:

If you add an attribute and then decide you do not need it, you can remove it by clicking on the row containing the attribute, and then clicking Delete attribute

.

To view (in the sample document) the node that a query represents, click the

row containing the query; then click Show node .

webMethods Trading Networks User’s Guide Version 6.5 239

Page 240: Web Methods Trading Networks Users Guide 65

C H A P T E R 1 2 T N X M L D o c u m e n t Ty p e s

7 To define namespace mappings, click the Namespaces tab and perform one of the following:

To populate the namespace mapping table replacing any existing namespace information, click Set.

To add the namespace information to the current namespace mappings, click Append.

When you click either Set or Append, Trading Networks populates the namespace table with the namespace information from all xmlns attributes in the sample document.

For more information about namespaces, see “Namespace Mappings in TN XML Document Types” on page 221.

8 Click the Options tab and fill in the fields. For details about these fields, see “Options in TN XML Document Types” on page 226. For information specific to pre-processing actions, see “Specifying Pre-Processing Actions for TN XML Document Type” on page 227.

For this Options tab parameter… Specify…

Format an IS document type

The fully-qualified name of the IS document type.

If you do not know the fully-qualified name, click Find IS

document type to browse webMethods IS document types to locate the one you want to use.

For more information, see “Specifying an IS Document Type for TN XML Document Types” on page 226

webMethods schema to validate against

The fully-qualified name of the IS schema.

If you do not know the fully-qualified name, click Find schema

to browse webMethods IS schemas to locate the one you want to use.

For more information, see “Specifying an IS Schema for TN XML Document Types” on page 227.

Note: When you select a webMethods IS schema, Trading Networks automatically sets the Validate Structure fields to indicate that you want to validate the structure of the document.

240 webMethods Trading Networks User’s Guide Version 6.5

Page 241: Web Methods Trading Networks Users Guide 65

Defining TN XML Document Types

Verify Digital Signature pre-processing action

Whether you want Trading Networks to Verify digital signature or Do not verify digital signature of a document. Trading Networks performs this pre-processing action before it performs the processing actions defined by the processing rule. For more information about this pre-processing action, see “Verifying the Digital Signature of an XML Document” on page 227.

Validate Structure pre-processing action

Whether you want Trading Networks to Validate structure or Do not validate structure of the XML document. If you select to validate, Trading Networks validates the structure of the XML document against the IS schema you specified in the webMethods schema to validate again option. Trading Networks performs this pre-processing action before it performs the processing actions defined by the processing rule. For more information about this pre-processing action, see “Validating the Structure of an XML Document” on page 228.

Check for Duplicate Document pre-processing action

Whether you want Trading Networks to Use built-in service to check for duplicate document, Use custom service to check for duplicate document, or Do not check for duplicate document; that is, determine whether Trading Networks has already received the document. Trading Networks performs this pre-processing action before it performs the processing actions defined by the processing rule.

Note: There could be performance issues if you choose to use custom services for duplicate checking based on the logic in the service you select.

Click New Service to create a new custom duplicate check service. To select an existing duplicate check service, click Find

Service to browse the IS namespace to locate the one you want to use and then click the Edit Service button if you want to modify the service.

For more information about this pre-processing action, see “Checking for Duplicate of the XML Document” on page 228. For more information about how to create a custom duplicate checking service, see, “Creating a Duplicate Document Check Service” on page 329.

For this Options tab parameter… Specify…

webMethods Trading Networks User’s Guide Version 6.5 241

Page 242: Web Methods Trading Networks Users Guide 65

C H A P T E R 1 2 T N X M L D o c u m e n t Ty p e s

9 Click OK to create the TN XML document type.

Save Document to Database preprocessing action

Whether you want Trading Networks to Save all documents, Save only unique documents, or Do not save documents to the database. Trading Networks performs this pre-processing action before it performs the processing actions defined by the processing rule.

If you select to save documents to the database, select from the list whether you want Trading Networks the document’s content, attributes, and/or activity log information to the database.

For more information about this pre-processing action, see “Saving an XML Document to the Database” on page 230

For this Options tab parameter… Specify…

Important! Keep in mind the pre-processing actions specified in the processing rules can override pre-processing actions specified in a TN document type. For more information, see “Specifying Pre-Processing Actions for TN XML Document Type” on page 227.

242 webMethods Trading Networks User’s Guide Version 6.5

Page 243: Web Methods Trading Networks Users Guide 65

Defining TN XML Document Types

Working with a Sample DocumentThe following table provides a summary of the actions you can take against a sample document.

Menu or Button Description

Right-click menu—Identify Tab

Right click in the sample document to display the right-click menu.

Add an identifying query—Select a node in the XML document; then, select this menu item to add a new identifying query to the TN document type. Trading Networks creates a new entry for the identifying query and fills in the Query and Value fields of the Add an identifying query dialog box with the XQL query for the selected node and the XQL query’s value, respectively.

Edit selected identifying query—Use to update the XQL query for an identifying query. Select the identifying query for which you want to update the XQL query. Then, select the node in the sample document that represents the new query you want to use. Right click and select this menu item. Trading Networks opens the Edit selected identifying query dialog box and replaces the XQL query in the Query field with the XQL query for the selected node. Trading Networks also updates the Value field with the value of the selected XQL query.

Set Root Tag—Select this menu item to set the value of the Root Tag field with the value of the root tag in the sample document.

Set DOCTYPE Identifier—Select this menu item to set the DOCTYPE Identifier field with the value from the document type declaration (DOCTYPE) in the sample document. Trading Networks uses the value that follows the SYSTEM or PUBLIC literal string in the document type declaration. If both literal strings exist, Trading Networks uses the value after the SYSTEM literal string.

webMethods Trading Networks User’s Guide Version 6.5 243

Page 244: Web Methods Trading Networks Users Guide 65

C H A P T E R 1 2 T N X M L D o c u m e n t Ty p e s

Right-click menu—Extract Tab

Right click in the sample document to display the right-click menu.

Add an Attribute—Select a node in the XML document; then, select this menu item to add a new attribute that you want Trading Networks to extract. Trading Networks creates a new entry for the attribute and fills in the Query field in the Add an Attribute dialog box with the XQL query for the selected node.

Edit Attribute—Use to update the XQL query that identifies where to locate the attribute information. Select the attribute for which you want to update the XQL query. Then, select the node in the sample document that represents the new query you want to use. Right click and select this menu item. Trading Networks opens the Edit Attribute dialog box and replaces the XQL query in the Query field with the XQL query for the selected node.

Right-click menu—Namespaces Tab

Right click in the sample document to display the right-click menu.

Set Namespace Mapping—Select this menu item to populate the namespace mappings table with the namespace information from all xmlns attributes in the sample document. When you select Set Namespace Mapping, Trading Networks deletes any existing namespace mappings from the table and replaces them with the namespace information that it obtains from the sample document.

Append Namespace Mappings—Select this menu item to populate the namespace mappings table with the namespace information from all xmlns attributes in the sample document. When you select Append Namespace Mappings, Trading Networks appends the namespace information that it obtains from the sample document to the existing namespace mappings in the table.

Append—Namespaces tab

Use the Append button to populate the namespace mappings table with the namespace information from all xmlns attributes in the sample document. Trading Networks appends the namespace information that it obtains from the sample document to the existing namespace mappings in the table.

Menu or Button Description

244 webMethods Trading Networks User’s Guide Version 6.5

Page 245: Web Methods Trading Networks Users Guide 65

Defining TN XML Document Types

Set—Identify Tab Use the Set buttons to set the Root Tag and/or DOCTYPE Identifier fields with values from the sample document.

To set the Root Tag field with the value of the root tag in the sample document, click the Set button next to the Root Tag field

To set the DOCTYPE Identifier field with the value from the document type declaration (DOCTYPE) in the sample document, click the Set button next to the DOCTYPE Identifier field. Trading Networks uses the value that follows the SYSTEM or PUBLIC literal string in the document type declaration. If both literal strings exist, Trading Networks uses the value after the SYSTEM literal string.

Set—Namespaces Tab

Use the Set button to populate the namespace mappings table with the namespace information from all xmlns attributes in the sample document. Trading Networks deletes any existing namespace mappings from the table and replaces them with the namespace information that it obtains from the sample document.

Test Query—all tabs

Use this button to test an XQL query that you have typed in the Query field of the Document Type screen. When you click this button, Trading Networks evaluates the XQL query you typed in the Query field and displays the value of that query (retrieved from the sample document) in the Value field.

Example:

The following sample document is loaded:

Menu or Button Description

... Trading Networks displays it’s valueIf XQL query points to

this node...

webMethods Trading Networks User’s Guide Version 6.5 245

Page 246: Web Methods Trading Networks Users Guide 65

C H A P T E R 1 2 T N X M L D o c u m e n t Ty p e s

Type the following query in the Query field and click Test Query:

Trading Networks updates the Value field to contain the value for TotalLineNum, which is 1.

Show Source—all tabs

Use this button to display the source of the XML document. When you click this button, Trading Networks opens a new window that contains the document source.

(Show Node)—Identify and Extract tabs

Click to have Trading Networks highlight the node in the sample document that an XQL query for an identifying query or attribute represents.

On the Identify tab, select an identifying query; then, click . Trading Networks highlights (in the sample document) the node that the XQL query for the identifying query represents.

When on the Extract tab, select an attribute; then, click . Trading Networks highlights (in the sample document) the node that Trading Networks would extract for the attribute (based on the query defined for the attribute).

Menu or Button Description

246 webMethods Trading Networks User’s Guide Version 6.5

Page 247: Web Methods Trading Networks Users Guide 65

Defining TN XML Document Types

Defining a TN XML Document Type without a Sample DocumentIf you do not have a sample document available, use the following procedure to define a TN XML document type.

1 Start the Trading Networks Console. If you need procedures for this step, see the Getting Started with Trading Networks manual.

2 Perform one of the following procedures to start a new TN XML document type.

3 In the Name field, type the name you want to give the TN XML document type. This field is required.

4 Optionally, type a description for the TN XML document type in the Description field.

5 Click the Identify tab. Perform one or more of the following procedures to specify information that indicates how Trading Networks is to identify documents. For details about specifying any of this information, see “Identification Information in TN XML Document Types” on page 206.

To define a TN XML document type when you do not have a sample document

Method to start a TN XML document type

Procedures when you do not have a sample document loaded

New— The TN XML document type fields are empty, and you load a sample document from the file system.

1) Select View Document Types.

2) Select Types New.

3) In the Create New DocType dialog box, select the XML document type category from the list.

Duplicate— The TN XML document type fields are filled with values from the TN XML document type that you duplicate.

You can update any or all fields from the duplicated TN XML document type.

1) Select View Document Types.

2) Click the row containing the TN XML document type that you want to duplicate.

3) Select Types Duplicate.

webMethods Trading Networks User’s Guide Version 6.5 247

Page 248: Web Methods Trading Networks Users Guide 65

C H A P T E R 1 2 T N X M L D o c u m e n t Ty p e s

For this Identify tab parameter… Use this procedure when not using a sample document

Identifying Queries1) Click Add an identifying query . Trading Networks

displays the Add an identifying query dialog box.

2) In the Query field, type an XQL query that represents a node in a document that must exist for this TN XML document type to be used for a document. For information about XQL queries, see Appendix B, “XQL Reference”.

3) If you want the TN XML document type to require the identifying query to evaluate to a specific value, type that value in the Value field.

4) Click OK.

5) Repeat this procedure for each identifying query that you want to add.

Note: If you add an identifying query and then decide you do not need it, you can remove it by clicking on the row containing the identifying query, and then clicking Deleting an

identifying query .

Root Tag Type the value of the root tag from within the XML documents that this TN XML document type is to match.

DOCTYPE Identifier Type the value of the system identifier or public identifier from the document type declaration (DOCTYPE) within the XML documents that this TN XML document type is to match.

248 webMethods Trading Networks User’s Guide Version 6.5

Page 249: Web Methods Trading Networks Users Guide 65

Defining TN XML Document Types

6 Click the Extract tab. Perform the following procedure for each attribute that you want Trading Networks to extract from documents identified by this TN XML document type. For details about what to specify for these fields, see “Extraction Information In TN XML Document Types” on page 210.

a Click Add an attribute . Trading Networks displays the Add an attribute dialog box.

b In the Name field, select the name of the attribute from the list. Trading Networks fills in the Type and Description fields based on the document attribute definition.

c If you want Trading Networks to flag an error if it encounters an error attempting to extract this document attribute, select the Required check box. For more information, see “Indicating that Attributes are Required in TN XML Document Types” on page 213.

d In the Query field, type an XQL query that identifies the location of the attribute within an XML document. For information about XQL queries, see Appendix B, “XQL Reference”.

Pipeline Matching1) Click Add New Pipeline Match .

2) Specify the following values in the Add Pipeline Matching dialog box.

Name. Name of the pipeline matching variable.

Value. The value of the pipeline matching variable. This field is optional. If you specify both the Name and the Value of the pipeline matching variable, Trading Networks checks to see that both exist in the pipeline. If you specify only the Name and no Value, then Trading Networks checks to see if the Name exists.

3) Click OK. Trading Networks adds the pipeline matching variable to the list.

4) Repeat this procedure for each pipeline matching variable that you want to add.

For this Identify tab parameter… Use this procedure when not using a sample document

Important! You must supply at least one criterion that Trading Networks is to use to recognize an XML document; that is, you must supply at least one identifying query, a value for the Root Tag field, a value for the DOCTYPE Identifier field, or a pipeline matching variable.

webMethods Trading Networks User’s Guide Version 6.5 249

Page 250: Web Methods Trading Networks Users Guide 65

C H A P T E R 1 2 T N X M L D o c u m e n t Ty p e s

e If necessary, use the Transformation option to specify how Trading Networks is to handle attribute data before storing it in the Trading Networks database. The data type of the attribute (shown in the Type field) determines the Built-in or Custom transformation options available. For more information, see “Transformation Information for Extracted Attributes of TN Document Types” on page 214.

1 Built-in. Select an existing built-in transformation provided by Trading Networks.

Important! If you do not extract the system attributes, Trading Networks does not have this information available for processing rules or querying documents.

If the attribute data type is… For Transformation…

Is SenderID or ReceiverID

You must specify an external ID type. For more information, see “Specifying Built-in Transformation Information for SenderID and ReceiverID” on page 215.

Has DATETIMEor DATETIME LIST data type

You must specify a date format. Select one from the seven different built-in formats or type in your own. For more information, see “Specifying Built-In Transformation Information for Attributes with the DATETIME and DATETIME LIST Data Type” on page 215.

Has STRING or STRING LIST data type (but not SenderID or ReceiverID)

You can specify whether you want Trading Networks to alter the string value before storing it to UPPERCASE or LOWERCASE. For more information, see “Specifying Built-in Transformation Information for Attributes with the STRING or STRING LIST Data Type” on page 216.

Has NUMBER data type and the XQL query identifies an array of numbers

You should specify the operation that Trading Networks should perform on the numbers in the array. For more information, see “Specifying Built-in Transformation Information for Attributes with the NUMBER Data Type” on page 218.

250 webMethods Trading Networks User’s Guide Version 6.5

Page 251: Web Methods Trading Networks Users Guide 65

Defining TN XML Document Types

2 Custom. Select or create your own service to perform custom transformations on extracted attributes. For more information, see “Specifying a Custom Transformation Service” on page 220.

.

7 To define namespace mappings, click the Namespaces tab. Perform the following for each namespace mapping you want to add to the table. For more information about namespaces, see “Namespace Mappings in TN XML Document Types” on page 221.

a In the Namespace Mappings section of the screen on the right, click Add a namespace

mapping . Trading Networks adds a row to the namespace mappings table.

b In the Namespace Prefix column, type the prefix for the namespace. If you are adding a mapping for the default namespace, specify prefix0.

c In the URI Mapping column, type the URI for the namespace.

To do this… Perform this…

Create a new custom transformation Click New Service .

Select an existing custom transformation service Click Find Service to browse the IS namespace

to locate the one you want to use.

Set the inputs of the transformation from the selected service

Click Set Inputs.

Edit an existing service Click on the Edit Service button.

Important! If you do not extract the system attributes, Trading Networks does not have this information available for processing rules or querying documents.

Note: If you add an attribute and then decide you do not need it, you can remove it by clicking on the row containing the attribute, and then clicking Delete an

attribute .

webMethods Trading Networks User’s Guide Version 6.5 251

Page 252: Web Methods Trading Networks Users Guide 65

C H A P T E R 1 2 T N X M L D o c u m e n t Ty p e s

8 Click the Options tab and fill in the fields. For details about these fields, see “Options in TN XML Document Types” on page 226. For information about pre-processing actions, see “Specifying Pre-Processing Actions for TN XML Document Type” on page 227.

Note:

If you add a namespace mapping and then decide you do not need it, you can remove it by clicking on the row containing the namespace mapping, and then

clicking Delete selected namespace mapping .

If you need to edit a namespace mapping, simply type over the existing information.

For this Options tab parameter… Specify…

Format an IS document type

The fully-qualified name of the IS document type.

If you do not know the fully-qualified name, click Find IS

document type to browse webMethods IS document types to locate the one you want to use.

For more information, see “Specifying an IS Document Type for TN XML Document Types” on page 226

webMethods schema to validate against

The fully-qualified name of the IS schema.

If you do not know the fully-qualified name, click Find schema

to browse webMethods IS schemas to locate the one you want to use.

For more information, see “Specifying an IS Schema for TN XML Document Types” on page 227.

Note: When you select a webMethods IS schema, Trading Networks automatically sets the Validate Structure fields to indicate that you want to validate the structure of the document.

252 webMethods Trading Networks User’s Guide Version 6.5

Page 253: Web Methods Trading Networks Users Guide 65

Defining TN XML Document Types

Verify Digital Signature pre-processing action

Whether you want Trading Networks to Verify digital signature or Do not verify digital signature of a document. Trading Networks performs this pre-processing action before it performs the processing actions defined by the processing rule. For more information about this pre-processing action, see “Verifying the Digital Signature of an XML Document” on page 227.

Check for Duplicate Document pre-processing action

Whether you want Trading Networks to Use built-in service to check for duplicate document, Use custom service to check for duplicate document, or Do not check for duplicate document; that is, determine whether Trading Networks has already received the document. Trading Networks performs this pre-processing action before it performs the processing actions defined by the processing rule.

Note: There could be performance issues if you choose to use custom services for duplicate checking based on the logic in the service you select.

Click New Service to create a new custom duplicate check service. To select an existing duplicate check service, click Find

Service to browse the IS namespace to locate the one you want to use and then click the Edit Service button if you want to modify the service.

For more information about this pre-processing action, see “Checking for Duplicate of the XML Document” on page 228. For more information about how to create a custom duplicate checking service, see, “Creating a Duplicate Document Check Service” on page 329

Save Document to Database preprocessing action

Whether you want Trading Networks to Save all documents, Save only unique documents, or Do not save documents to the database. Trading Networks performs this pre-processing action before it performs the processing actions defined by the processing rule.

If you select to save documents to the database, select from the list whether you want Trading Networks the document’s content, attributes, and/or activity log information to the database.

For this Options tab parameter… Specify…

webMethods Trading Networks User’s Guide Version 6.5 253

Page 254: Web Methods Trading Networks Users Guide 65

C H A P T E R 1 2 T N X M L D o c u m e n t Ty p e s

9 Click OK to create the TN XML document type.

Managing TN XML Document TypesThe following table describes the tasks you can perform against TN XML document types:

If you do not select to save the document content and Trading Networks is to use a delivery option that requires document content to be saved (e.g., if you want to deliver a document via a queue), Trading Networks will bypass reliable delivery and invoke the specified delivery service once.

For more information about this pre-processing action, see “Saving an XML Document to the Database” on page 230.

For this Options tab parameter… Specify…

Important! Keep in mind the pre-processing actions specified in the processing rules can override pre-processing actions specified in a TN document type. For more information, see “Pre-Processing Actions” on page 327.

Task See page...

“Viewing TN XML Document Types” 255

“Updating TN XML Document Types” 255

“Using a Sample Document when Updating a TN XML Document Type”

255

“Updating a TN XML Document Type without a Sample Document”

261

“Disabling TN XML Document Types” 266

“Enabling TN XML Document Types” 267

“Testing TN XML Document Types” 268

254 webMethods Trading Networks User’s Guide Version 6.5

Page 255: Web Methods Trading Networks Users Guide 65

Managing TN XML Document Types

Viewing TN XML Document TypesYou can view TN XML document types using the Document Types screen. By default, Trading Networks does not display disabled TN document types. However, you can update the display of TN document types to include disabled TN document types.

2 Select View Document Types. Trading Networks displays both the TN XML document types and TN flat file document types.

3 To view disabled TN document types, select Types Show All. Trading Networks places a check ( ) next to the Show All menu item to indicate that Trading Networks is currently displaying disabled TN document types.

4 To hide disabled TN document types, select Types Show All again. Trading Networks removes the check ( ) next to the Show All menu item to indicate that Trading Networks is currently not displaying disabled TN document types.

Updating TN XML Document TypesAs when you define TN XML document types, the procedures you use to update a document differ based on whether you have a sample document available when you create the TN document type.

Using a Sample Document when Updating a TN XML Document TypeTo update a TN XML document type when you have a sample document available, perform the following procedure.

1 Start the Trading Networks Console. If you need procedures for this step, see “Starting the Trading Networks Console” on page 22.

2 Select View Document Types. Trading Networks displays both the TN XML document types and TN flat file document types.

To view TN XML document types1 Start the Trading Networks Console. If you need procedures for this step, see

“Starting the Trading Networks Console” on page 22.

Important! If you imported a TN XML document type into Business Integrator to use in Business Integrator process models, do not change the name of the type. You can change other settings for the attribute.

To update a TN XML document type when a sample document is available

webMethods Trading Networks User’s Guide Version 6.5 255

Page 256: Web Methods Trading Networks Users Guide 65

C H A P T E R 1 2 T N X M L D o c u m e n t Ty p e s

3 Click the row containing information about the TN XML document type that you want to update. Trading Networks displays the Document Type Details dialog for the selected TN XML document type.

4 Select Types Edit.

5 To update the description, type a new description in the Description field.

6 Perform the following to load the sample document:

a Click the Identify tab.

b Click Select Sample Document .

c In the Select File dialog box, browse your file system to locate the XML document that you want to use as a sample, and click Open.

For a summary of actions you can take against a sample document, see “Working with a Sample Document” on page 243.

7 To update an existing partner profile, select the tab you wish to update. Use the table below to find the procedure to update the selected tab.

To update this tab... Use this procedure... For more information, see...

Corporate Go to step 4 on page 147 “Information on the Partner’s Corporate Tab” on page 132

Contact Go to step 5 on page 151 “Information on the Partner’s Contact Tab” on page 136

Delivery Method Go to step 6 on page 153 “Information on the Partner’s Delivery Method Tab” on page 137

Extended Fields Go to step 9 on page 159 “Information on the Partner’s Extended Fields Tab” on page 143

Security Go to step 10 on page 160

“Information on the Partner’s Security Tab” on page 144

256 webMethods Trading Networks User’s Guide Version 6.5

Page 257: Web Methods Trading Networks Users Guide 65

Managing TN XML Document Types

Follow the procedures to update the partner profile. These procedures are the same ones you initially used to create a partner profile. In general, on the Profile screen, use the following buttons to supply information to the profile fields:

8 To update identification information, click the Identify tab. For details about specifying any of this information, see “Identification Information in TN XML Document Types” on page 206.

Use this button To...

Add an entry

or Edit an entry

Delete an entry

To update this Identify tab parameter … Use these procedures when you have a sample document loaded…

Identifying Queries To add an identifying query—In the sample document, select the node that you want the identifying query to represent. Right click and select Add an identifying query. Trading Networks opens the Add an identifying query dialog box and populates the Query field with the XQL query for the selected node.

Note: This “filled in” query is for a specific node in the XML document. This node is applicable for DATETIME, STRING, or NUMBER data types. But, if you want to use DATETIME LIST, STRING LIST, NUMBER (with Average, Minimum, Maximum, and Sum), or NUMBERLIST data types, you need to update the query so that it identifies an array of values.

If you want the TN document type to require the identifying query to evaluate to a specific value, assure that value is in the Value field; otherwise, clear the Value field. Click OK to close the Add an identifying query dialog box.

For information about XQL queries, see Appendix B, “XQL Reference”

webMethods Trading Networks User’s Guide Version 6.5 257

Page 258: Web Methods Trading Networks Users Guide 65

C H A P T E R 1 2 T N X M L D o c u m e n t Ty p e s

To update an identifying query—In the sample document, select the node that you want the identifying query to represent. Right click and select Edit selected identifying query. Trading Networks opens the Edit selected identifying query dialog box and updates the Query field with the XQL query for the selected node and the Value field with the XQL query’s value. Click OK to close the Edit selected identifying query dialog box.

To delete an identifying query from the TN document type—Select the row for the identifying query and click Delete selected

identifying query

Root Tag To update the Root Tag field with the value from the sample document, click the Set button next to the Root Tag field.

To remove the value from the Root Tag field, clear the Root Tag field.

DOCTYPE Identifier To update the DOCTYPE Identifier field with the value from the sample document, click the Set button next to the DOCTYPE Identifier field.

To remove the value from the DOCTYPE Identifier field, clear the DOCTYPE Identifier field.

Pipeline Matching To add a pipeline matching variable—Click Add New Pipeline

Match . In the Add Pipeline Matching dialog box, specify the Name and optionally, the Value for the pipeline matching variable. Click OK to save the variable and close the dialog box.

To update a pipeline matching variable, click the row containing the pipeline matching variable you want to

update and click Edit Selected Pipeline Match . In the Update Pipeline Matching dialog box, update the Name and Value fields for that variable. Click OK to save your updates and close the Update Pipeline Matching dialog box.

To update this Identify tab parameter … Use these procedures when you have a sample document loaded…

258 webMethods Trading Networks User’s Guide Version 6.5

Page 259: Web Methods Trading Networks Users Guide 65

Managing TN XML Document Types

9 To update extraction information, click the Extract tab. For information about how to specify information on this tab, see “Extraction Information In TN XML Document Types” on page 210.

To add an attribute—In the sample document, select the node that represents the attribute that you want Trading Networks to extract. Right click and select Add an attribute. Trading Networks opens the Add an attribute dialog box and populates the Query field with the XQL query for the selected node.

Fill in the rest of the Add an attribute dialog box by performing the following:

a In the Name field, select the name of the attribute from the list.

b If you want Trading Networks to flag an error if it encounters an error attempting to extract this document attribute, select the Required check box. For more information, see “Indicating that Attributes are Required in TN XML Document Types” on page 213.

c If necessary, use the Transformation option to specify how Trading Networks is to handle attribute data before storing it in the Trading Networks database.

d The data type of the attribute (shown in the Type field) determines the Built-in or Custom transformation options available.

To delete a pipeline matching variable, click the row containing the pipeline matching variable you want to delete and

click Remove Selected Pipeline Match .

For more information, see

To update this Identify tab parameter … Use these procedures when you have a sample document loaded…

Important! The TN XML document type must include at least one criterion that Trading Networks can use to recognize a document; that is, at least one identifying query, a value for the Root Tag field, a value for the DOCTYPE Identifier field, or a pipeline matching variable.

Note: This “filled in” query is for a specific node in the XML document. This node is applicable for DATETIME, STRING, or NUMBER data types. But, if you want to use DATETIME LIST, STRING LIST, NUMBER (with Average, Minimum, Maximum, and Sum), or NUMBERLIST data types, you need to update the query so that it identifies an array of values.

webMethods Trading Networks User’s Guide Version 6.5 259

Page 260: Web Methods Trading Networks Users Guide 65

C H A P T E R 1 2 T N X M L D o c u m e n t Ty p e s

Built-in transformation. Select an existing built-in transformation provided by Trading Networks:

Custom transformation. Select or create your own service to perform custom transformations on extracted attributes. For more information, see “Specifying a Custom Transformation Service” on page 220.

Important! If you do not extract the system attributes, Trading Networks does not have this information available for processing rules or querying documents.

If the attribute data type is… For Transformation…

Is SenderID or ReceiverID

You must specify an external ID type. For more information, see “Specifying Built-in Transformation Information for SenderID and ReceiverID” on page 215.

Has DATETIMEor DATETIME LIST data type

You must specify a date format. Select one from the seven different built-in formats or type in your own. For more information, see “Specifying Built-In Transformation Information for Attributes with the DATETIME and DATETIME LIST Data Type” on page 215.

Has STRING or STRING LIST data type (but not SenderID or ReceiverID)

You can specify whether you want Trading Networks to alter the string value before storing it to UPPERCASE or LOWERCASE. For more information, see “Specifying Built-in Transformation Information for Attributes with the STRING or STRING LIST Data Type” on page 216.

Has NUMBER data type and the XQL query identifies an array of numbers

You should specify the operation that Trading Networks should perform on the numbers in the array. For more information, see “Specifying Built-in Transformation Information for Attributes with the NUMBER Data Type” on page 218.

To do this… Perform this…

Create a new custom transformation Click New Service .

Select an existing custom transformation service Click Find Service to browse the IS

namespace to locate the one you want to use.

260 webMethods Trading Networks User’s Guide Version 6.5

Page 261: Web Methods Trading Networks Users Guide 65

Managing TN XML Document Types

e Click OK to close the Add an attribute dialog box.

To update information for an existing attribute—In the sample document, select the node that represents the attribute that you want Trading Networks to extract. Right click and select Edit Attribute. Trading Networks opens the Edit Attribute dialog box and updates the Query field with the XQL query for the selected node. For information about what you can specify, see above for the description for adding an attribute. Click OK to close the Edit Attribute dialog box.

To delete an attribute from the TN document type—Select the row for the attribute and

click Delete selected attribute .

10 To update namespace mappings, click the Namespaces tab. For information about namespaces, see “Namespace Mappings in TN XML Document Types” on page 221.

To replace existing namespace mappings with namespace information from the sample document—Click Set. Trading Networks deletes the existing namespace mappings (if any) and populates the namespace mappings table with the namespace information from all xmlns attributes in the sample document.

To append namespace information from the sample document to the existing namespace mappings—Click Append. Trading Networks adds the namespace information from all xmlns attributes in the sample document to the namespace mappings table.

To update a namespace mapping—Type over the existing information in the namespace mappings table.

To delete a namespace mapping—Select the row for the namespace mapping and

click Delete selected namespace mapping .

11 To update options, click the Options tab. For information about how to specify information on this tab, see step 8 on page 240.

12 After you have made all your changes, click OK. Trading Networks closes the screen.

Updating a TN XML Document Type without a Sample DocumentTo update a TN XML document type when you do not have a sample document available, perform the following procedure.

Set the inputs of the transformation from the selected service

Click Set Inputs.

Edit an existing service Click on the Edit Service button.

To do this… Perform this…

To update a TN XML document type without a sample document

webMethods Trading Networks User’s Guide Version 6.5 261

Page 262: Web Methods Trading Networks Users Guide 65

C H A P T E R 1 2 T N X M L D o c u m e n t Ty p e s

1 Start the Trading Networks Console. If you need procedures for this step, see “Starting the Trading Networks Console” on page 22.

2 Select View Document Types. Trading Networks displays both the TN XML document types and TN flat file document types.

3 Click the row containing information about the TN XML document type that you want to update.

4 Select Types Edit.

5 To update the description, type a new description in the Description field.

6 To update identification information, click the Identify tab. For details about specifying any of this information, see “Identification Information in TN XML Document Types” on page 206.

To update this Identify tab parameter … Use these procedures when you do not have a sample document…

Identifying QueriesTo add an identifying query—Click . Trading Networks displays the Add an identifying query dialog box. In the Query field, type an XQL query that represents a node in a document that must exist for this TN document type to be used for a document.

Note: This “filled in” query is for a specific node in the XML document. This node is applicable for DATETIME, STRING, or NUMBER data types. But, if you want to use DATETIME LIST, STRING LIST, NUMBER (with Average, Minimum, Maximum, and Sum), or NUMBERLIST data types, you need to update the query so that it identifies an array of values.

If you want the TN document type to require that the identifying query evaluate to a specific value, type that value in the Value field. Click OK to close the Add an identifying query dialog box.

262 webMethods Trading Networks User’s Guide Version 6.5

Page 263: Web Methods Trading Networks Users Guide 65

Managing TN XML Document Types

For information about XQL queries, see Appendix B, “XQL Reference”.

To update information for an existing identifying query—Select the row for the identifying query and click Edit selected

identifying query . Trading Networks displays the Edit selected identifying query dialog box. Update the Query and/or Value fields. Click OK to close the Edit selected identifying query dialog box.

To delete an identifying query from the TN document type—Select the row for the identifying query and click Delete selected

identifying query .

Root Tag To update the Root Tag field, type the value of the root tag from within the XML documents that this TN document type is to match.

To remove the value from the Root Tag field, clear the Root Tag field.

DOCTYPE Identifier To update the DOCTYPE Identifier field, click the Set button next to the DOCTYPE identifier field.

To remove the value from the DOCTYPE Identifier field, clear the DOCTYPE Identifier field.

To update this Identify tab parameter … Use these procedures when you do not have a sample document…

webMethods Trading Networks User’s Guide Version 6.5 263

Page 264: Web Methods Trading Networks Users Guide 65

C H A P T E R 1 2 T N X M L D o c u m e n t Ty p e s

7 To update extraction information, click the Extract tab. For information about how to specify information on this tab, see “Extraction Information In TN XML Document Types” on page 210.

To add an attribute—Click . Trading Networks displays the Add an attribute dialog box. Fill in the Add an attribute dialog box by performing the following:

1 In the Name field, select the name of the attribute from the list.

2 To update the description, type a description in the Description field.

3 If you want Trading Networks to flag an error if it encounters an error attempting to extract this document attribute, select the Required check box. For more information, see “Indicating that Attributes are Required in TN XML Document Types” on page 213.

Pipeline Matching To add a pipeline matching variable—Click Add New Pipeline

Match . In the Add Pipeline Matching dialog box, specify the Name and optionally, the Value for the pipeline matching variable. Click OK to save the variable and close the dialog box.

To update a pipeline matching variable—Click the row containing the pipeline matching variable you want to

update and click Edit Selected Pipeline Match . In the Update Pipeline Matching dialog box, update the Name and optionally, the Value fields for that variable. Click OK to save your updates and close the Update Selected Pipeline Match dialog box.

To delete a pipeline matching variable—Click the row containing the pipeline matching variable you want to

delete and click Remove Selected Pipeline Match .

To update this Identify tab parameter … Use these procedures when you do not have a sample document…

Important! The TN document type must include at least one criterion that Trading Networks is to use to recognize an XML document; that is, at least one identifying query, a value for the Root Tag field, a value for the DOCTYPE Identifier field, or a pipeline matching variable.

264 webMethods Trading Networks User’s Guide Version 6.5

Page 265: Web Methods Trading Networks Users Guide 65

Managing TN XML Document Types

4 In the Query field, type an XQL query that identifies the location of the attribute within an XML document. For information about XQL queries, see Appendix B, “XQL Reference”.

5 If necessary, use the Detail field to specify how Trading Networks is to handle attribute data before storing it in the Trading Networks database.

.

6 Click OK to close the Add an attribute dialog box.

To update information for an existing attribute—Select the row for the attribute and

click Edit selected attribute . Trading Networks displays the Edit Attribute dialog box. Update the fields to make the changes you want. For information about what you can specify, see above for the description for adding an attribute. Click OK to close the Edit Attribute dialog box.

To delete an attribute from the TN document type—Select the row for the attribute and

click Delete selected attribute .

If the attribute… For Detail, specify…

Is SenderID or ReceiverID

You must specify an external ID type. For more information, see “Specifying Built-in Transformation Information for SenderID and ReceiverID” on page 215.

Has DATETIME data type

You must specify a date format. Select one from the seven different built-in formats or type in your own. For more information, see “Specifying Built-In Transformation Information for Attributes with the DATETIME and DATETIME LIST Data Type” on page 215.

Has STRING data type (but not SenderID or ReceiverID)

You can specify whether you want Trading Networks to alter the string value before storing it. For more information, see “Specifying Built-in Transformation Information for Attributes with the STRING or STRING LIST Data Type” on page 216.

Has NUMBER and the XQL query identifies an array of numbers

You should specify the operation that Trading Networks should perform on the numbers in the array. For more information, see “Specifying Built-in Transformation Information for Attributes with the NUMBER Data Type” on page 218.

webMethods Trading Networks User’s Guide Version 6.5 265

Page 266: Web Methods Trading Networks Users Guide 65

C H A P T E R 1 2 T N X M L D o c u m e n t Ty p e s

8 To update namespace mappings, click the Namespaces tab. For information about namespaces, see “Namespace Mappings in TN XML Document Types” on page 221.

To add a namespace mapping—Click . Trading Networks adds a row to the namespace mappings table.

To update a namespace mapping—Type over the existing information in the namespace mappings table.

To delete a namespace mapping—Select the row for the namespace mapping and

click Delete selected namespace mapping .

9 To update options, click the Options tab. For information about how to specify information on this tab, see step 8 on page 240.

10 After you have made all your changes, click OK. Trading Networks closes the screen.

Disabling TN XML Document TypesIf you are not using a TN XML document type and no longer want Trading Networks to use it to recognize documents, you can disable it. When you disable a TN XML document type, the definition for the TN document type is not removed from the database. Later, if you decide that you need the TN document type, you can enable it. See “Enabling TN XML Document Types” on page 267.

In this column... Specify

Namespace Prefix The prefix for the namespace. If you are adding a mapping for the default namespace, specify prefix0.

URI Mapping The URI for the namespace.

Note: To permanently remove the TN document type from the database, your database administrator must remove it. When you remove a TN document type from the database, you must also remove all documents that are associated with the TN document type.

266 webMethods Trading Networks User’s Guide Version 6.5

Page 267: Web Methods Trading Networks Users Guide 65

Managing TN XML Document Types

1 Start the Trading Networks Console. If you need procedures for this step, see “Starting the Trading Networks Console” on page 22.

2 Select View Document Types.

3 Click the row containing information about the TN XML document type that you want to update.

4 Select Types Disable. Trading Networks places No in the Enabled column to indicate that the TN XML document type is disabled.

Enabling TN XML Document TypesIf you disable a TN XML document type and then later determine that you still need it, you can enable it and make it available again.

1 Start the Trading Networks Console. If you need procedures for this step, see “Starting the Trading Networks Console” on page 22.

2 Select View Document Types.

3 Click the row containing information about the TN XML document type that you want to update.

4 Select Types Enable. Trading Networks places Yes in the Enabled column to indicate that the TN XML document type is enabled

To disable a TN XML document type

Note: To view the Enabled column (if it is not currently displayed), select Document Types Show All.

Important! To enable TN document types, you must first display inactive TN document types as described in “Viewing TN XML Document Types” on page 255.

To enable a TN XML document type

webMethods Trading Networks User’s Guide Version 6.5 267

Page 268: Web Methods Trading Networks Users Guide 65

C H A P T E R 1 2 T N X M L D o c u m e n t Ty p e s

Testing TN XML Document TypesYou can test your TN XML document types to determine the TN document types that match a specified document. If you have samples of all the types of documents that your Trading Networks system will process, you can test each to determine whether your Trading Networks system will receive:

Documents that match exactly one defined TN XML document type. In this situation, the TN XML document types are set up correctly for this type of document.

Documents that do not match any of your defined XML TN XML document types. This type of document would be an unknown TN document type if processed by your system. If your testing finds a document that does not match any defined TN XML document type, you should add a TN XML document type to identify the document or update an existing TN document type to identify the document.

Documents that match more than one defined TN XML document type. This type of document would be an unknown TN document type because Trading Networks cannot determine which of the matching TN XML document types to use. If your testing finds a document that matches multiple TN document types (also called an ambiguous document), you should update TN document types so that the document matches exactly one TN XML document type.

To test the TN XML document types, you must have sample documents available in your file system. To perform a test, you select the sample document. Trading Networks uses the identification information in all TN XML document types to determine all TN document types that match the specified document. Trading Networks highlights all matching TN XML document types on the Document Types screen.

Note that Trading Networks does not test the sample document against disabled TN document types. This means the Trading Networks does not highlight the disabled TN document types that the document would match.

Important! During the test, Trading Networks does not actually process the document. That is, Trading Networks does not perform any pre-processing or processing actions on the document.

268 webMethods Trading Networks User’s Guide Version 6.5

Page 269: Web Methods Trading Networks Users Guide 65

Managing TN XML Document Types

Perform the following procedure to test your TN XML document types for a specified document.

1 Start the Trading Networks Console. If you need procedures for this step, see “Starting the Trading Networks Console” on page 22.

2 Select View Document Types.

3 Select Types Test. Trading Networks displays the Select Input Document dialog box.

4 From the Select Input Document dialog box, select the sample document you want to use for the test and click Open.

Trading Networks highlights all the TN document types that the sample document matches and displays a message informing you whether the document matched a single TN XML document type, multiple TN document types, or no TN document types.

To test TN XML document types

webMethods Trading Networks User’s Guide Version 6.5 269

Page 270: Web Methods Trading Networks Users Guide 65

C H A P T E R 1 2 T N X M L D o c u m e n t Ty p e s

270 webMethods Trading Networks User’s Guide Version 6.5

Page 271: Web Methods Trading Networks Users Guide 65

C H A P T E R 13

TN Flat Fi le Document Types

Overview . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 272

Defining Document Gateway Services . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 276

TN Flat File Document Types . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 283

Defining TN Flat File Document Types . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 300

Managing TN Flat File Document Types . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 306

webMethods Trading Networks User’s Guide Version 6.5 271

Page 272: Web Methods Trading Networks Users Guide 65

C H A P T E R 1 3 T N F l a t F i l e D o c u m e n t Ty p e s

OverviewFlat file documents present data in a record-based storage format. Unlike XML files, flat files do not have structural information embedded within the data. Trading Networks’ definition of a flat file is any file or document with a format that is non-describing, that is, a document that does not contain metadata. In other words, flat file data is externalized as a set of records (a list of records containing fields and composites) without any structural information.

Because the records are not structured in a flat file document, the application receiving the flat file must have knowledge of the flat file’s structure to read its content. To provide this structural knowledge, you create a document gateway service and a corresponding TN flat file document type for each type of document you expect to receive.

A document gateway service is the entry point for flat files into Trading Networks. It is a Java or flow service that you create to provide information to Trading Networks about a flat file. To provide this information, your service defines values in a pipeline variable named TN_parms. The service should define values for:

System attributes, for example SenderID and ReceiverID in the TN_parms/SenderID and TN_parms/ReceiverID, respectively.

Optional system variables, for example variables that specify the content type and content encoding you want Trading Networks to use for the document.

Custom attributes (the document data).

After supplying the values needed in the TN_parms pipeline variable, the gateway service passes control to Trading Networks for processing. Trading Networks will retrieve the flat file information from the TN_parms pipeline variable.

In addition to creating a document gateway service, you define a corresponding TN flat file document type that Trading Networks will use when it receives the document from the gateway service. In a TN flat file document type you specify:

Values of variables within the TN_parms pipeline variable that Trading Networks uses to match the document type to the incoming flat file document. For example, you might define the document type to match when the TN_parms/Department variable has a value of Billing and the TN_parms/Service_code variable has a value of XYZ.

The system and custom attribute values to extract. You can only extract values for the attributes that the gateway service has placed in the TN_parms pipeline variable. In addition, you can transform certain types of attribute data before Trading Networks stores it in the database, using built-in or custom transformations.

Whether to perform pre-processing actions (such as validating the data structure and checking for duplicate documents) before executing a processing rule.

272 webMethods Trading Networks User’s Guide Version 6.5

Page 273: Web Methods Trading Networks Users Guide 65

Overview

Run-Time Processing of Flat Fi le DocumentsTrading Networks processes a flat file document as follows.

1 Your trading partner’s client application invokes a specific document gateway service, sending the flat file document to the service as an input stream.

2 The document gateway service places information about the flat file into the TN_parms pipeline variable, and then passes control to Trading Networks for further processing.

3 Trading Networks tries to identify the type of the document.

To do this, it examines the contents of the pipeline variable TN_parms, and searches the pipeline matching key/value pairs in all your enabled TN flat file document types, trying to find a matching document type for the document.

For example, suppose you defined a document type named Acme_XYZ_Invoices to receive all documents from Acme’s Billing department with the service code XYZ. You would have defined the following pipeline matching criteria:

A document would match this document type only if it contains both of those pipeline variables (within TN_parms) and the variables have the specified values. (You could have omitted the Service_code value if you wanted to receive Billing department documents with any service code.)

Trading Networks logs a recognition error if any of the following conditions are met:

The data in the TN_parms pipeline variable does not match the pipeline matching criteria in any document type

The data in the TN_parms pipeline variable matches the pipeline matching criteria in multiple document types

The data in the TN_parms pipeline variable explicitly identifies the document type to use, but that document type does not exist

4 After finding a single matching document type, Trading Networks adds the extracted attributes to the BizDocEnvelope, which is placed in the pipeline as a variable named bizdoc. A BizDocEnvelope represents a routable Trading Networks transaction. It

Key Value

Department Billing

Service_code XYZ

Tip! Rather than having Trading Networks search all of your TN flat file document types to find a match, you can explicitly specify in the gateway service the document type to use for processing the document. Doing this eliminates the overhead of that search.

webMethods Trading Networks User’s Guide Version 6.5 273

Page 274: Web Methods Trading Networks Users Guide 65

C H A P T E R 1 3 T N F l a t F i l e D o c u m e n t Ty p e s

contains the flat file document, and Trading Networks adds additional information that it uses for routing and processing.

5 Trading Networks extracts all system and custom attributes that you defined in the TN flat file document type. To extract attribute values, Trading Networks looks for the values within the TN_parms pipeline variable. Trading Networks places the extracted attribute values into the BizDocEnvelope.

In addition, Trading Networks can transform the extracted attribute values before storing them into the BizDocEnvelope, using the optional built-in or custom transformations that you specified.

By default if Trading Networks cannot extract a particular attribute value, it will not log an error; it completes processing (assuming it finds no errors) and sets the processing status to DONE.

If you want Trading Networks to log an error when it cannot extract particular attribute values, you can designate those attributes as being required for extraction. In this case, Trading Networks completes processing, logs the error to the activity log, and sets the processing status to DONE W/ERRORS.

Continuing with the example document type Acme_XYZ_Invoices, suppose your trading network expects to receive a document whose TN_parms will contain the following attributes:

You can extract any of these attributes. SenderID and ReceiverID are system attributes that Trading Networks always requires in TN_parms, and always extracts. Extracting all other system attributes, such as DocumentID, is optional. You extract system attribute values if you want to use them as criteria for determining the processing rule to use for a document, transaction analysis, process management, and more. You can extract document data to perform any processing you want, such as calculations.

6 Trading Networks performs a processing rule lookup to determine the processing rule to use for the incoming flat file document. For details, see Chapter 14, “Processing Rules”.

Attribute Value

TN_parms/SenderID [some value]

TN_parms/ReceiverID [some value]

TN_parms/DocumentID [some value]

TN_parms/Department Billing

TN_parms/Service_code XYZ

TN_parms/Invoice_number 123

TN_parms/Amount 1000.00

274 webMethods Trading Networks User’s Guide Version 6.5

Page 275: Web Methods Trading Networks Users Guide 65

Overview

7 Trading Networks executes the optional pre-processing actions that you might have specified when you defined the TN flat file document type.

Trading Networks executes these pre-processing actions before it executes the processing rule that you associate with the document type. These actions, executed in the following order, include the following:

Verify the digital signature of a document

Validate the structure of a document using a flat file schema that you specified in the document type definition

Check for duplicate documents; that is, determine whether Trading Networks has already received the document

Save a copy of the document content, attributes, and/or log information to the database

You can also specify this same set of pre-processing actions in the processing rule that you associate with the TN flat file document type. In the processing rule, you can specify whether to use the pre-processing actions specified in the processing rule, or to use the ones specified in the document type. For details, see “Pre-Processing Actions” on page 327.

8 Trading Networks executes the processing rule actions. For details, see Chapter 14, “Processing Rules”.

Tip! Trading Networks performs a processing rule lookup for each document, to determine the processing rule to use for it. Alternatively, you can explicitly specify in the gateway service the processing rule to execute for a given document type, thus bypassing the lookup (and its overhead).

webMethods Trading Networks User’s Guide Version 6.5 275

Page 276: Web Methods Trading Networks Users Guide 65

C H A P T E R 1 3 T N F l a t F i l e D o c u m e n t Ty p e s

Defining Document Gateway ServicesYou can create a document gateway service using Java or flow. The WmTNSamples package provides a sample gateway service, wm.tn.samples.gateway:gateway, that you can use as a model.

The wm.tn.rec:GatewayService specification defines the input and output variables for a document gateway service. There is only one input variable: ffdata. The trading partner’s client application invokes a gateway service, passing it the flat file document. The gateway service receives the flat file document as an input stream in the ffdata pipeline variable. You must provide your trading partners with the names of the document gateway services that are appropriate for their particular types of documents.

A document gateway service returns the output variables ffdata (an object) and TN_parms (an IS document). TN_parms can include:

The custom attributes that you specify (the document data)

The Trading Networks system attributes and system variables that you specify.

1 Read the input stream.

For details, see “Reading the Input Stream” on page 278. Optionally, you can parse the input stream and convert it to an IS document. For details, see “Converting a Flat File Document to an IS Document” on page 278.

2 Use the Trading Networks system attributes and variables (described in “Specifying the Document Gateway Services Outputs” on page 280) to:

a Explicitly specify the document type to use for processing the document (optional).

This is an alternative to having Trading Networks search for a matching document type, thus eliminating the overhead of that search. Use the system attribute DoctypeID or DoctypeName for this purpose.

b Specify the external ID values (e.g., D-U-N-S numbers) for the sender and receiver of the documents in the TN_parms/SenderID and TN_parms/ReceiverID pipeline variables.

c Optionally specify values for the system attributes DocumentID, GroupID, ConversationID, and/or UserStatus in the TN_parms/DocumentID, TN_parms/GroupID, TN_parms/ConversationID, and/or TN_parms/UserStatus pipeline variables, respectively.

d Explicitly specify the processing rule to use for processing the document (optional).

Logic to include in a document gateway service

276 webMethods Trading Networks User’s Guide Version 6.5

Page 277: Web Methods Trading Networks Users Guide 65

Defining Document Gateway Services

This is an alternative to havingTrading Networks look up the appropriate processing rule to use, thus eliminating the overhead of that lookup. Use the system variables TN_parms/processingRuleID and TN_parms/processingRuleName for this purpose.

e Place the gateway service’s name into the pipeline to enable documents that invoke this gateway service to be resubmitted if necessary (optional).

Use the system variable TN_parms/$receiveSvc for this purpose.

f Specify the content type and content encoding you want Trading Networks to use for the document (optional).

This is an alternative to having Trading Networks automatically determine the content type and content encoding of the document. Use the system variables TN_parms/$contentType and TN_parms/$contentEncoding for this purpose.

3 Specify all custom attribute values (the document data) that the matching document type is to extract. Make sure that the name and case you use for the TN_parms pipeline variable match exactly to the attribute name that is defined in the TN flat file document type.

4 Invoke either wm.tn:receive or wm.tn.doc.ff:routeFlatFile to pass ffdata and TN_parms to Trading Networks.

webMethods Trading Networks User’s Guide Version 6.5 277

Page 278: Web Methods Trading Networks Users Guide 65

C H A P T E R 1 3 T N F l a t F i l e D o c u m e n t Ty p e s

Reading the Input StreamIf your document gateway service is a Java service, use the methods of the java.io.InputStream class to read bytes from the input stream contained in ffdata. Consult your Java documentation for descriptions of these methods.

If your document gateway service is a flow service, use the services provided in the WmFlatFile package’s pub.io folder. The WmFlatFile package must be enabled to use these services. For examples of how to use the pub.io services, see the wm.tn.samples.gateway:gateway service in the WmTNSamples package. For descriptions of the pub.io services, see the Flat File Schema Developer’s Guide.

Determining the Content Type and Content EncodingIf your partners send documents directly to your document gateway service (rather than through an intervening service) Trading Networks will automatically try to determine the content type and content encoding of the submitted flat file document.

You can provide the content type and content encoding to ensure that Trading Networks uses the accurate values. To do so, explicitly specify the content type and/or content encoding in the TN_parms/$contentType and the TN_parms/$contentEncoding variables, respectively.

For example, if a document with a content type of “text/plain” and an encoding of “SJIS“ is submitted to a service and that service passes the document into the pipeline to your gateway service, the original content type and content encoding will be lost. The pipeline has a content type of “application/x-wmidatabin“ and a content encoding of “UTF8“. In this case, either your gateway service or the service that invoked it, should specify “text/plain“ for TN_parms/$contentType and “SJIS“ for TN_parms/$contentEncoding.

Converting a Flat File Document to an IS DocumentOptionally, you can parse the input stream and convert it to an IS document. Then you can map information from the converted document to the TN_parms variable.

In your document gateway service, invoke pub.flatfile:convertToValues, which is a service in the WmFlatFile package (see the Flat File Schema Developer’s Guide). This service invokes

Important! Remember to use InputStream's mark and reset methods so that Trading Networks will be able to read from the beginning of the stream. Otherwise, Trading Networks will lose the bytes read by the gateway service when attempting to save the document content to the BizDocEnvelope.

Important! Perform this action only if absolutely necessary because parsing can be time-consuming and return very large outputs that consume much memory. In this situation, Trading Networks saves the entire pipeline into the repository, which slows down processing.

278 webMethods Trading Networks User’s Guide Version 6.5

Page 279: Web Methods Trading Networks Users Guide 65

Defining Document Gateway Services

the flat file parser to validate the document’s structure and content, based on the flat file schema that you name as input to the service. Trading Networks can save or throw away the parsed contents. Alternatively, if you decide you do not need to parse the document in your gateway service, you can still indicate that you want to parse the document to validate its structure using the pre-processing option Validate Structure. For details, see “Validating the Structure of Flat File Documents” on page 295.

Note: Do not convert a document in both the gateway service and the TN document type; there is no reason to do that. If you convert a document in the gateway service, it will remain in the pipeline.

webMethods Trading Networks User’s Guide Version 6.5 279

Page 280: Web Methods Trading Networks Users Guide 65

C H A P T E R 1 3 T N F l a t F i l e D o c u m e n t Ty p e s

Specifying the Document Gateway Services OutputsA document gateway service can return the output variables ffdata (an object) and TN_parms (an IS document). TN_parms can return:

The custom attributes that you specify (the document data)

The Trading Networks system attributes and system variables that you specify, which are described below

TN_parms variables Description

DoctypeID or DoctypeName

String (optional) The Trading Networks-generated internal identifier or name of the TN flat file document type that you want Trading Networks to use for the flat file document. This is an alternative to having Trading Networks search for an appropriate document type, thus eliminating the overhead of that search. To determine the document type identifier invoke the wm.tn.doctype:list service from Developer to return the name and ID of all your TN document types.

If you use DoctypeName, and that name is changed later, the gateway service will not function as intended. Since TN document type IDs cannot be changed, your gateway service will be both more stable and more efficient if you use DoctypeID rather than DoctypeName. If you specify both variables, DoctypeID is used.

Examples:/TN_parms/DoctypeID = "5066kt00tttva37r00000009"/TN_parms/DoctypeName = "xCBL_PO"

SenderID String An external ID value specified in the sender’s profile, for example, the sender’s D-U-N-S number. The TN document type uses SenderID to verify the sender’s identity. In the TN document type you must specify the type of the external ID, for example DUNS.

ReceiverID String An external ID value specified in the receiver’s profile, for example, the receiver’s D-U-N-S number. The TN document type uses ReceiverID to verify the receiver’s identity. In the TN document type you must specify the type of the external ID, for example DUNS.

DocumentID String (optional) The identifier of the flat file document. Be sure to specify DocumentID if you want to use the Check for Duplicate Document pre-processing action, and Trading Networks is to use the DocumentID to determine whether documents are duplicates. For details, see “Checking for Duplicates of the Flat File Document” on page 296.

280 webMethods Trading Networks User’s Guide Version 6.5

Page 281: Web Methods Trading Networks Users Guide 65

Defining Document Gateway Services

GroupID String (optional) The identifier in a flat file document that associates this document with other documents in its group. If you expect to receive more documents in the same group, be sure the value you specify for GroupID is reproducible for future documents that will arrive in the same group.

ConversationID String (optional) The identifier in a flat file document that associates this document with other documents in the same conversation of documents. Use ConversationID if you want Trading Networks to pass the document to process management after it executes the document type’s processing rule. You define the actions taken against a document during process management by creating a process model. For more information about creating process models, see the webMethods Modeler User’s Guide. If you do not want Trading Networks to pass the document to process management, add a variable to the pipeline called prtIgnoreDocument with the value of true.

If you expect to receive more documents in the same conversation, be sure the value you specify for ConversationID is reproducible for future documents that will arrive in the same conversation.

UserStatus String (optional) A status that you have associated with the flat file document. Use UserStatus if you want it to be available so you can process the document based on the user status. The user status is a criterion that Trading Networks uses to determine the processing rule to use for a document. For more information, see “Processing Rule Criteria” on page 317. In addition, if you create UserStatus, you can refine the list of displayed documents on the Transaction Analysis screen by searching for documents with specific user statuses.

TN_parms variables Description

webMethods Trading Networks User’s Guide Version 6.5 281

Page 282: Web Methods Trading Networks Users Guide 65

C H A P T E R 1 3 T N F l a t F i l e D o c u m e n t Ty p e s

processingRuleID or processingRuleName

String (optional) The Trading Networks-generated internal identifier or name of the processing rule that you want Trading Networks to use for the flat file document. This is an alternative to having Trading Networks look up the appropriate rule, thus eliminating the overhead of that lookup. To determine the identifier, invoke the wm.tn.route:list service from Developer to return the name and ID of all your processing rules.

If you use processingRuleID and that name is changed, the gateway service will not function as intended. Processing rule IDs cannot be changed, so your gateway service will be both more stable and more efficient if you use processingRuleID rather than processingRuleName.

If you include values for processingRuleID and processingRuleName (which is unnecessary), processingRuleID is used.

Note: An important usage consideration is discussed in “Bypassing Lookups for Processing Rules” on page 326.

$receiveSvc String (optional) The fully qualified name of the document gateway service you are creating. By saving the name of the gateway service, you will be able to resubmit the flat file document if necessary. For example, if your service is named “gateway1”and is located in the “partners.east“ folder, the fully-qualified name of the service would be “partners.east:gateway1“. If $receiveSvc is not set and you resubmit the document, Trading Networks resubmits the document to wm.tn:receive, which will not be able to properly recognize the flat file document. As a result, the sender, receiver, and TN document type will all be unknown, and the resubmission will fail.

$contentType and $contentEncoding

String (optional) The content type and encoding you want Trading Networks to use for the flat file document. You can specify $contentType and/or $contentEncoding. This is an alternative to having Trading Networks automatically determine the content type and content encoding of the submitted flat file document. For more information, see “Determining the Content Type and Content Encoding” on page 278.

TN_parms variables Description

282 webMethods Trading Networks User’s Guide Version 6.5

Page 283: Web Methods Trading Networks Users Guide 65

TN Flat File Document Types

TN Flat Fi le Document TypesAfter you define a document gateway service, you define a corresponding TN flat file document type that Trading Networks will use when it receives the document from the gateway service. In a document type you specify:

“Pipeline Matching Criteria Used to Identify the TN Document Type” on page 283

“Attributes To Extract From Documents” on page 285

“Pre-Processing Actions in the TN Flat File Document Type” on page 294

Pipeline Matching Criteria Used to Identify the TN Document TypeIn your TN flat file document type, you specify pipeline matching criteria that Trading Networks uses to determine whether to use the document type for the incoming flat file document. The pipeline matching criteria is one or more key/value pairs that identify a document. Specifying values for the variables is optional. If you specify both a key and a value, Trading Networks ensures that the variable (key) is in the TN_parms variable and that it has the value that you specified. If you specify a key without a value, Trading Networks ensures that the variable (key) is in the TN_parms regardless of its value.

At run time Trading Networks examines the contents of the TN_parms variable that the gateway service added to the pipeline. Then it searches the key/value pairs specified in the pipeline matching criteria of all your enabled TN flat file document types, trying to find a matching document type for the document.

For example, suppose you defined a document type named Acme_XYZ_Invoices to receive all documents from Acme’s Billing department with the service code XYZ. You would have defined the following criteria:

A document would match this document type only if it contains both of those variables within TN_parms and the variables have those values. (You could have omitted the Service_code value if you wanted to receive Billing department documents with any service code.)

Tip! The gateway service can specify a value for either the TN_parms/DoctypeID or TN_parms/DoctypeName variable to explicitly specify the document type to use for the flat file document. Doing so eliminates the overhead of the search that Trading Networks would have to perform to find the matching TN flat file document type.

Key Value

Department Billing

Service_code XYZ

webMethods Trading Networks User’s Guide Version 6.5 283

Page 284: Web Methods Trading Networks Users Guide 65

C H A P T E R 1 3 T N F l a t F i l e D o c u m e n t Ty p e s

Error Conditions When Matching Documents To TN Document TypesTrading Networks logs an error if any of the following conditions are met:

The data in the TN_parms pipeline variable does not match the pipeline matching criteria in any document type

—OR—

The data in the TN_parms pipeline variable explicitly identifies the document type to use, but that document type does not exist.

In either of these cases, the document is considered to be an unknown type. Because TN document types indicate the system and custom attributes to extract, Trading Networks cannot extract any attribute values from the document because the TN document type is unknown. Trading Networks will still attempt to process documents with an unknown TN document type by performing the actions identified in the processing rule that the document triggers. You can define processing rules that act on documents with an unknown TN document type.

The data in the TN_parms pipeline variable matches the pipeline matching criteria in multiple document types.

When this happens, the document is considered to be an unknown type because Trading Networks does not know which of the matching TN document types to use. In this situation, Trading Networks logs a message to the activity log that identifies all the TN document types that the document matched. Because the TN document type is unknown, Trading Networks does not extract any attribute values. Trading Networks will still attempt to process documents with an unknown TN document type by performing the actions identified in the processing rule that the document triggers. You can define processing rules that act on documents with an unknown TN document type.

284 webMethods Trading Networks User’s Guide Version 6.5

Page 285: Web Methods Trading Networks Users Guide 65

TN Flat File Document Types

Attr ibutes To Extract From DocumentsYou specify the attribute values to extract from the document’s TN_parms variable. You can extract system attributes as well as custom attributes (the document data). In addition, you can transform extracted attribute values before Trading Networks stores them in the BizDocEnvelope, using built-in or custom transformations.

Continuing with the example document type Acme_XYZ_Invoices, suppose your trading network expects to receive a document whose TN_parms will contain the following attributes:

You can extract any of these attributes. Trading Networks always extracts the system attributes SenderID and ReceiverID. Extracting all other system attributes, such as DocumentID, is optional. You extract system attribute values if you want to use them as criteria for determining the processing rule to use for a document, transaction analysis, process management, and more. You can extract document data to perform any processing you want, such as calculations. For more information, see “System Attributes To Extract From Documents” on page 286.

Error Conditions When Extracting AttributesBy default if Trading Networks cannot find a particular attribute for extraction, it will not log an error; it completes processing (assuming it finds no errors) and sets the processing status to DONE.

If you want Trading Networks to log an error when it cannot extract particular attribute values, you can designate those attributes as being required for extraction. In this case, Trading Networks:

Completes processing

Logs an error in the BizDocEnvelope, which is in the bizdoc variable

Puts the error into the activity log

Sets the processing status to DONE W/ERRORS.

Attribute Value

TN_parms/SenderID [some value]

TN_parms/ReceiverID [some value]

TN_parms/DocumentID [some value]

TN_parms/Department Billing

TN_parms/Service_code XYZ

TN_parms/Invoice_number 123

TN_parms/Amount 1000.00

webMethods Trading Networks User’s Guide Version 6.5 285

Page 286: Web Methods Trading Networks Users Guide 65

C H A P T E R 1 3 T N F l a t F i l e D o c u m e n t Ty p e s

In this case, you can configure the document type’s processing rule to handle the error as follows:

Use the processing rule’s Recognition Errors criterion to trigger a processing rule based on whether it contains errors. For more information, see “Document Recognition Errors Criterion” on page 321.

Use the processing rule’s Execute a service processing action to inspect the bizdoc/Errors variable for the errors that Trading Networks encountered. When Trading Networks is unable to extract a required attribute, it records the error in the bizdoc/Errors variable. This variable is in the pipeline and is available for your use when Trading Networks is processing the document. For more information about the Execute a service processing actions, see “Action 1—Execute a Service” on page 330.

System Attributes To Extract From DocumentsYou can extract any system attribute that the TN document type’s gateway service places in a document’s TN_parms variable. Trading Networks always extracts SenderID and ReceiverID from TN_parms. Extracting all other system attributes is optional.

Reasons for extracting system attributes are discussed below. For descriptions of system attributes, see “Specifying the Document Gateway Services Outputs” on page 280.

SenderID and ReceiverID

Trading Networks always extracts both of these attributes; you cannot delete them. Recall that the values of SenderID and ReceiverID are external IDs that should be identical to the external IDs specified in the sender’s and receiver’s profiles. On the Extract panel you must select from the pull-down list the type of the external IDs (for example, DUNS) for both attributes so that Trading Networks can match the externals ID in TN_parms/SenderID and TN_parms/ReceiverID with the external IDs in the profiles. This is how Trading Networks verifies the identities of the sender and receiver. When Trading Networks finds a match, it automatically transforms the externals ID in TN_parms/SenderID and TN_parms/ReceiverID into its internal IDs before storing them in the BizDocEnvelope.

When Trading Networks has a value for the SenderID and ReceiverID, you can perform the following tasks.

Specify the sender and receiver as criteria for determining the processing rule to use for the flat file document. For more information, see “Processing Rule Criteria” on page 317.

Search for the flat file document on the Transaction Analysis screen by searching for documents with specific senders and receivers.

Use the identify of the sender and receiver of the flat file document in the logic of a business process. For example, you can then set conditions on transitions in process model, so the business process performs different logic based on the sender and

286 webMethods Trading Networks User’s Guide Version 6.5

Page 287: Web Methods Trading Networks Users Guide 65

TN Flat File Document Types

receiver of a document. For more information about creating process models, see the webMethods Modeler User’s Guide.

Use the Retrieve SenderID from session option as an alternative way to set the value of the SenderID system attribute. If set, rather than look in TN_parms\SenderID for the value to use, Trading Networks uses the connected user. That means that when the client sent the flat file document to Trading Networks, it had to present credentials—an Integration Server user name and password. That user name/password pair directly correlates to a Trading Networks partner. Recall that when you create a profile, there is a required external ID type (for example, DUNS). When you create a profile, Trading Networks creates a user account on the Integration Server for that partner. The user name is equal to the required external ID. So, if the required external ID is DUNS and a profile is added for a partner whose D-U-N-S number is 123456789, then that partner will have an Integration Server user account with the user name 123456789. So, when that partner’s client wants to send a flat file document to Trading Networks, it must present credentials—it supplies user name 123456789 along with its password. So, if Retrieve SenderID from session is set to true in a TN flat file document type, Trading Networks would determine the sender of the document based on the user account 123456789, find the profile (and therefore the internal ID), and put that value in the BizDocEnvelope.

DocumentID

When Trading Networks has a value for DocumentID, you can perform the following tasks.

Determine whether the incoming flat file document is a duplicate, by checking the value of the document ID; that is, determine whether Trading Networks has already received the document. For details, see “Checking for Duplicates of the Flat File Document” on page 296.

Search for the flat file document on the Transaction Analysis screen by searching for documents with the specific document ID.

Search for the flat file document on the Transaction Analysis screen by searching for documents with the specific document ID.

Important! When you resubmit a flat file document with the Retrieve SenderID from session option selected, the resubmit might fail. If you set up Sender criteria in a processing rule, the first time the document arrives, the criteria matches a processing rule based on the SenderID value 123456789, because that is the value determined via the Retrieve SenderID from session option. However, if you resubmit the document, that same processing rule will not be selected based on the Retrieve SenderID from session option. This is because when you resubmit the document from the Trading Networks Console, the user is the IS user account that you used to log in to the Trading Networks Console (e.g., Administrator), which will not match sender 123456789 in the Sender criteria of the processing rule. It could end up matching another processing rule and then go through completely different processing.

webMethods Trading Networks User’s Guide Version 6.5 287

Page 288: Web Methods Trading Networks Users Guide 65

C H A P T E R 1 3 T N F l a t F i l e D o c u m e n t Ty p e s

ConversationID

You can use ConversationID to pass the document to process management after it performs the actions identified by a processing rule. You define the actions taken against a document during process management by creating a process model. For more information about creating process models, see the webMethods Modeler User’s Guide. If you do not want Trading Networks to pass the document to process management, add a variable to the pipeline called prtIgnoreDocument with the value true.

UserStatus

When Trading Networks has a value for UserStatus, you can perform the following tasks.

Specify the user status as a criterion for determining the processing rule to use for the flat file document. For more information, see “Processing Rule Criteria” on page 317.

Search for the flat file document on the Transaction Analysis screen by searching for documents with the specific user status.

GroupID

When Trading Networks has a value for GroupID, you can search for this flat file and all other flat files that have the same group ID on the Transaction Analysis screen.

Transformation Information for Extracted Attributes of TN Flat File Document TypesYou can use built-in or custom transformations to transform the following types of attribute data before Trading Networks stores it in the BizDocEnvelope:

“Built-in Transformations for SenderID and ReceiverID” on page 288

“Built-In Transformations for DATETIME and DATETIME LIST Data Type Attributes” on page 289

“Built-in Transformations for STRING or STRING LIST Data Type Attributes” on page 289

“Built-in Transformations for NUMBER Data Type Attributes” on page 290

“Custom Transformation Services” on page 292

Built-in Transformations for SenderID and ReceiverID

On the Extract panel you must select from the pull-down list the type of the external IDs (for example, DUNS) for both the SenderID and ReceiverID attributes so that Trading Networks can match the externals ID values in TN_parms/SenderID and TN_parms/ReceiverID with the external IDs in the profiles. This is how Trading Networks verifies the identities of the sender and receiver. When Trading Networks finds a match, it automatically transforms the external IDs in TN_parms/SenderID and TN_parms/ReceiverID into its internal IDs before storing them in the BizDocEnvelope.

288 webMethods Trading Networks User’s Guide Version 6.5

Page 289: Web Methods Trading Networks Users Guide 65

TN Flat File Document Types

Built-In Transformations for DATETIME and DATETIME LIST Data Type Attributes

If you specify an attribute that has the data type DATETIME or DATETIME LIST, Trading Networks requires you to identify the date format. Trading Networks maintains a list of built-in common date/time formats from which you can select. However, if the date/time format you need to use is not in the list, you can type the format you need.

To specify the date/time format, use a pattern string based on the “Time Format Syntax” described for the java.text.SimpleDateFormat class. Trading Networks extracts the value of the date and uses it and the pattern that you specify to decode the value and convert it to the format that Trading Networks requires to store the date in the BizDocEnvelope.

Built-in Transformations for STRING or STRING LIST Data Type Attributes

For attributes with the data type STRING or STRING LIST, you can specify whether you want Trading Networks to alter the string value before storing it. You can have Trading Networks make a simple alteration to change the case of the extracted string values to all upper- or all lowercase. Alternatively, you can have Trading Networks use the extracted values as substitutions in a string that you supply. If you do not specify transformation information for a string attribute, Trading Networks saves the data exactly as it extracted it.

Following are descriptions of the built-in transformation options for string attributes.

Format Description

Uppercase Stores the extracted string attribute value in all uppercase. For example, if the extracted attribute value is “Purchase Order”, Trading Networks stores “PURCHASE ORDER” for the attribute value.

Lowercase Stores the extracted string attribute in all lowercase. For example, if the attribute value is “Purchase Order”, Trading Networks stores “purchase order” for the attribute value.

webMethods Trading Networks User’s Guide Version 6.5 289

Page 290: Web Methods Trading Networks Users Guide 65

C H A P T E R 1 3 T N F l a t F i l e D o c u m e n t Ty p e s

Built-in Transformations for NUMBER Data Type Attributes

You can specify an attribute with the NUMBER data type that contains an array of numbers. You can specify one of the following built-in formats to transform the array of numbers to a single value for Trading Networks to store:

String Substitution Substitutes extracted values with a pattern that you specify. Trading Networks uses the java.text.MessageFormat class to perform this transformation.

For example, suppose your document gateway service extracts the names of three items in a purchase order and places them into an attribute named itemName in your TN_parms variable as follows:

/TN_parms/itemName = {“WidgetA”, “WidgetB”, “WidgetC”}

Your TN document type would have to include the following:

itemName STRING LIST

Suppose you want to replace the three names with a single string that contains the three names. To do this, use this field to specify the following string substitution pattern for itemName:

“Item Name: {0}, {1}, {2}”

Trading Networks would store the following for the value of itemName:

Item Name: WidgetA, WidgetB, WidgetC

If you place more arguments in the pattern than values that Trading Networks extracts, the string that Trading Networks stores for the attribute will contain the extra arguments (e.g., {2}). If you specify less arguments in the pattern than values that Trading Networks extracts, the string that Trading Networks stores for the attribute will not contain all the extracted values; it will only contain the values for the number of arguments you specify in the pattern.

Format Description

Average Stores the average value of all the numbers in the array. For example, if the array contains the numbers [2, 3, 4, 5], Trading Networks stores the value 3.5.

Minimum Stores the smallest number in the array. For example, if the array contains the numbers [2, 3, 4, 5], Trading Networks stores the value 2.

Format Description

290 webMethods Trading Networks User’s Guide Version 6.5

Page 291: Web Methods Trading Networks Users Guide 65

TN Flat File Document Types

For example, suppose your document gateway service extracts the quantity of each item of a purchase order, and you want to sum the quantities of all items. Suppose you defined the following attributes in your TN_parms variable and in your TN document type:

If you select the Sum built-in transformation for totalQuantity, it will sum its value (an of quantities), and produce a single number. For example, if the value of totalQuantity is the following array:

/TN_parms/totalQuantity = {2, 3, 4, 5}

then the value of summedValue will be:

/TN_parms/summedValue = 2 + 3 + 4 + 5

and Trading Networks will store the value 14 for totalQuantity.

Maximum Stores the largest number in the array. For example, if the array contains the numbers [2, 3, 4, 5], Trading Networks stores the value 5.

Sum Stores the sum of all the numbers in the array. For example, if the array contains the numbers [2, 3, 4, 5], Trading Networks stores the value 14.

No format specified

Stores the first value of the array as the value of the attribute. For example, if the array contains the numbers [2, 3, 4, 5], Trading Networks stores the value 2.

Format Description

Note: When Trading Networks extracts a NUMBER or NUMBER LIST from a document, it uses the number parsing behavior of java.lang.Number. For example, if the NUMBER or NUMBER LIST contains the value “100zzz”, Trading Networks interprets the value as “100”, instead of throwing an error as it would if the value were “zzz100”. To redefine this parsing behavior, you can write a custom attribute transformation. For more information, see “Custom Transformation Services” on page 292.

TN_parms attributes TN document type

/TN_parms/itemNumber itemNumber NUMBER

/TN_parms/quantity quantity NUMBER

/TN_parms/totalQuantity totalQuantity NUMBER

summedValue NUMBER LIST

webMethods Trading Networks User’s Guide Version 6.5 291

Page 292: Web Methods Trading Networks Users Guide 65

C H A P T E R 1 3 T N F l a t F i l e D o c u m e n t Ty p e s

Custom Transformation Services

Trading Networks allows you to create your own service to perform transformations on extracted attributes. Base your service on the appropriate specification listed below:

To view these specifications, use webMethods Developer and look in the WmTN package. For more information, see the webMethods Trading Networks Built-in Services Reference.

Trading Networks passes the following input variables:

Data type Specification you must use…

DATETIME or DATETIME LIST

The service must implement the input and output variables defined in the wm.tn.rec:DateAttributeTransformService specification.

STRING or STRING LIST

The service must implement the input and output variables defined in the wm.tn.rec:StringAttributeTransformService specification.

NUMBER or NUMBER LIST

The service must implement the input and output variables defined in the wm.tn.rec:NumberAttributeTransformService specification.

Input Value Meaning

values One or more values for your service to transform.

Note: The values might be null or an empty (zero length) string. For an array data type (e.g., DATETIME LIST), any element in the values array can be null or an empty string. Make sure that your custom transformation service can handle null values or empty strings.

isArray Whether values contains a single value to transform or multiple values to transform. isArray will be false if values contains a single value; otherwise it will be true.

arg Optional arguments that you can define.

292 webMethods Trading Networks User’s Guide Version 6.5

Page 293: Web Methods Trading Networks Users Guide 65

TN Flat File Document Types

Trading Networks expects you to return the transformed values in the following output variable:

For information about creating a service, see the webMethods Developer User’s Guide.

Output Value Meaning

newValues Transformation values of:

Date List for DATETIME or DATETIME LIST

String List for STRING or STRING LIST

Number List for NUMBER or NUMBER LIST.

If the input variable isArray is false, the input variable values will contain only a single item to transform. Your service should transform the single item and save just a single item in the output variable newValues.

If the input variable isArray is true (meaning multiple values), your service should loop through the items in the values variable and transform each one. It should store each as an item in the output variable newValues. For example, if you are transforming string data, newValues is a Date List of the transformed Strings.

webMethods Trading Networks User’s Guide Version 6.5 293

Page 294: Web Methods Trading Networks Users Guide 65

C H A P T E R 1 3 T N F l a t F i l e D o c u m e n t Ty p e s

Pre-Processing Actions in the TN Flat Fi le Document TypeTrading Networks executes pre-processing actions before executing the processing rule that you associate with the TN flat file document type. All actions are optional. Trading Networks executes them in the following order:

“Verifying the Digital Signature of Flat File Documents” on page 294

“Validating the Structure of Flat File Documents” on page 295

“Checking for Duplicates of the Flat File Document” on page 296

“Saving Flat File Documents to the Database” on page 297

These actions are provided as built-in options on the Options tab in the TN document type’s definition.

Verifying the Digital Signature of Flat File DocumentsThis action assures that the document has arrived unchanged and that the sender is who it claims to be. To do this, select the Verify Digital Signature option on the Options tab in the TN document type’s definition and specify the name of your user-defined verification service. Create this service in any user-defined package, using the inputs and outputs specified in wm.tn.rec:BizDocVerificationService (described in the webMethods Trading Networks Built-in Services Reference).

If the digital signature is invalid, Trading Networks:

1 Performs the remainder of the pre-processing actions you specified (if any).

2 Adds the error information to the BizDocEnvelope in the pipeline variable bizdoc/Errors, which your processing rule can access.

3 Logs the error to the activity log, if you selected the Save Document to Database pre-processing option and the Activity Log option.

4 Performs the processing actions specified in the processing rule.

Note: Additionally, you can specify this same set of pre-processing actions in a processing rule. In the processing rule, you can specify whether to use the pre-processing actions specified in the processing rule, or to use the ones specified in the document type. This enables you to overwrite the pre-processing actions. For details, see “Pre-Processing Actions” on page 327.

294 webMethods Trading Networks User’s Guide Version 6.5

Page 295: Web Methods Trading Networks Users Guide 65

TN Flat File Document Types

Validating the Structure of Flat File DocumentsThe Validate Structure action invokes the flat file parser to validate the document’s structure and content against a flat file schema, and converts the flat file document to an IS document. Then you can map information from the converted document to the TN_parms variable.

You specify the name of the document’s flat file schema in the Parsing schema option. You only need to specify a flat file schema if you want to validate the structure of the document. (You create flat file schemas in webMethods Developer, as described in the Flat File Schema Developer’s Guide.)

To implement this action, use the Options tab in the TN document type’s definition to:

Select the Validate Structure option.

Specify the name of the TN document type’s flat file schema in the Parsing schema option. The Input for Flat File Validation dialog prompts you to select the parsing settings. Trading Networks will save the parsed contents if you select the keepResults option. You only need to specify a flat file schema if you want to validate the structure of the document. (You create flat file schemas in webMethods Developer, as described in the Flat File Schema Developer’s Guide.)

At run time, the Validate Structure option invokes pub.flatfile:convertToValues, which is a service in the WmFlatFile package (see the Flat File Schema Developer’s Guide). This service invokes the flat file parser to validate the document’s structure and content, based on the flat file schema that you named in the Parsing schema option, and saves the parsed contents if you selected the keepResults option.

If the document structure is invalid, Trading Networks:

1 Performs the remainder of the pre-processing actions you specified (if any).

2 Adds the error information to the BizDocEnvelope in the pipeline variable bizdoc/Errors, which your processing rule can access.

3 Logs the error to the activity log, if you selected the Save Document to Database pre-processing option and the Activity Log option.

Important! Perform this action only if absolutely necessary because parsing can be time-consuming and return very large outputs that consume much memory. In this situation, Trading Networks saves the entire pipeline into the repository, which slows down processing.

Note: Alternatively, you can perform the same validation and conversion in your document gateway service (see “Converting a Flat File Document to an IS Document” on page 278). Do not convert a document in both locations; there is no reason to do that. If you convert a document in the gateway service, it will remain in the pipeline.

webMethods Trading Networks User’s Guide Version 6.5 295

Page 296: Web Methods Trading Networks Users Guide 65

C H A P T E R 1 3 T N F l a t F i l e D o c u m e n t Ty p e s

4 Performs the processing actions specified in the processing rule.

Checking for Duplicates of the Flat File DocumentThis action searches the Trading Networks database to determine whether the database has already received the document.

Trading Networks provides the following Check for Duplicate Document options on the Options tab in the TN document type’s definition. Alternatively, you can create your own service to be executed in the document type.

Document ID only—Trading Networks assures that it does not already have a document with the same document ID in its database. To check for a duplicate document using the document ID, you must instruct Trading Networks to extract the DocumentID system attribute from the document.

Document ID and sender —Trading Networks assures that it does not already have a document with the same document ID and sender in its database. To check for a duplicate document using the document ID and sender, you must instruct Trading Networks to extract the DocumentID and SenderID system attributes from the document.

Document ID, sender and receiver—Trading Networks assures that it does not already have a document with the same document ID, sender, and receiver in its database. To check for a duplicate document using the document ID, sender, and receiver, you must instruct Trading Networks to extract the DocumentID, SenderID, and ReceiverID system attributes from the document.

Document ID, sender and document type—Trading Networks assures that it does not already have a document with the same document ID, sender, and TN document type in its database. To check for a duplicate document using the document ID and sender you must instruct Trading Networks to extract the DocumentID and SenderID system attributes from the document.

To create a custom duplicate document check service, see “Creating a Duplicate Document Check Service” on page 329.

Important! If the structure of a document is invalid, the validation service can return many error messages. To limit the number of error messages, set the Validate Max Errors option on the Trading Networks Web Manager.

Note: A custom duplicate checking service can affect performance, depending on its logic.

296 webMethods Trading Networks User’s Guide Version 6.5

Page 297: Web Methods Trading Networks Users Guide 65

TN Flat File Document Types

Trading Networks might be unable to correctly determine whether a document is unique if:

Trading Networks previously received a document that it did not save to the database, and the same document is sent again (see “Saving Flat File Documents to the Database” on page 297).

Trading Networks previously received a document and saved it to the database, but the document gateway service did not supply values in the pipeline for DocumentID, SenderID, and/or ReceiverID system attributes.

Trading Networks previously received a document and saved it to the database, but the document type Extract panel information did not indicate to save the DocumentID, SenderID, and/or ReceiverID system attributes.

Trading Networks was unable to match the document to a TN document type.

Trading Networks saves the results of the duplicate check to the pipeline, so you can use it in the processing rule. Additionally, Trading Networks uses the results of the duplicate check in the Save Document to Database pre-processing action.

Saving Flat File Documents to the DatabaseThis action saves a copy of all documents or only unique documents to the database.

You must save documents to the database if you want to use reliable delivery or scheduled delivery to deliver the document. For more information, see “Using Reliable Delivery with Immediate Delivery Method” on page 343 and “Using Reliable Delivery with Scheduled Delivery” on page 344.

You can choose to save:

All documents, regardless of whether they are unique.

Only unique documents. You must also select the Check for Duplicate Document pre-processing option (see “Checking for Duplicates of the Flat File Document”). If you fail to select this option, Trading Networks considers the document as having no duplicate and will save the document to the database.

No documents.

You can save a copy of the document content, attributes, and/or activity log information to the database. The following table displays the consequences of not saving specific parts of documents:

webMethods Trading Networks User’s Guide Version 6.5 297

Page 298: Web Methods Trading Networks Users Guide 65

C H A P T E R 1 3 T N F l a t F i l e D o c u m e n t Ty p e s

If you do not save this... Then the consequences of not saving are...

Content If you use the Deliver Document actions, Trading Networks will not use reliable delivery or scheduled delivery.

If Trading Networks is to use a delivery option that requires document content to be saved, Trading Networks will bypass reliable delivery and invoke the specified delivery service once, but only if the Trading Networks property tn.task.attempt.notPersisted is set to true (the default). For more information, see the TN Properties page of the Server Administrator. For instructions on how to view the online help of the TN Properties page, see“Trading Networks Configuration Properties” on page 42.

You will not be able to view content from the Transaction Analysis screen (i.e., the Content tab will have no data).

You will not be able to resubmit or re-process the document.

Attribute You will not be able to view custom attributes from the Transaction Analysis screen (i.e., attributes will contain only information for system attributes). However, you can still use the processing rules extended criteria for the document.

If you use the Transaction Analysis Custom search criteria, Trading Networks will be unable to locate documents for which you did not save the attributes.

You might get different or unexpected results when you reprocess a document. Because the attributes are not saved when you reprocess the document, Trading Networks will not match processing rules that use extended criteria. Instead, Trading Networks will match to another processing rule, for example the default processing rule, and perform the process actions identified in that matching rule. Trading Networks does not perform document recognition again and therefore does not re-extract the attributes.

For example, if you use extended criteria to select a processing rule when the value of the custom attribute Total Amount is greater than 10000, Trading Networks would not select that processing rule when reprocessing a document because the value of the Total Amount attribute would not be available and therefore would not match the extended criteria.

298 webMethods Trading Networks User’s Guide Version 6.5

Page 299: Web Methods Trading Networks Users Guide 65

TN Flat File Document Types

Note: You can still resubmit a document. When Trading Networks resubmits a document, it performs document recognition and therefore extracts the attributes again.

Activity Log You will not be able to view Activity Log entries from the Transaction Analysis screen (i.e., the Activity Log tab will have no data).

You will not be able to view entries from the Activity Log screen.

If you do not save this... Then the consequences of not saving are...

Note: Trading Networks always saves documents that will be passed on to process management regardless of the setting of the Save Document to Database pre-processing option. Trading Networks passes documents on to process management if it extracted a conversation ID from the document. For more information about process management, see the webMethods Modeler User’s Guide.

webMethods Trading Networks User’s Guide Version 6.5 299

Page 300: Web Methods Trading Networks Users Guide 65

C H A P T E R 1 3 T N F l a t F i l e D o c u m e n t Ty p e s

Defining TN Flat F i le Document Types

1 Start the Trading Networks Console. If you need procedures for this step, see “Starting the Trading Networks Console” on page 22.

2 Perform one of the following procedures to start a new TN flat file document type.

3 In the Name field (required), type the name you want to give the TN flat file document type.

4 Optionally, type a description for the TN document type in the Description field.

5 Click on the Configure tab.

6 Click on the Identify panel to specify the criteria that Trading Networks will use to match flat file documents to the document type. For details about the information you

Note: If you are using an OEM version of the Trading Networks, you cannot create new TN document types in Trading Networks. Trading Networks will gray out this unavailable selection.

To define a TN flat file document type

Method to start a TN document type Procedure to perform

New— The TN flat file document type fields are empty.

1) Select View Document Types.

2) Select Types New.

3) Select Flat file for the TN document type category.

4) Click OK.

Duplicate— The TN flat file document type fields are filled with values from the TN flat file document type that you duplicate.

You can update any or all fields from the duplicated TN flat file document type.

1) Select View Document Types.

2) Click the row containing the TN flat file document type that you want to duplicate.

3) Select Types Duplicate.

300 webMethods Trading Networks User’s Guide Version 6.5

Page 301: Web Methods Trading Networks Users Guide 65

Defining TN Flat File Document Types

specify on this panel, see “Pipeline Matching Criteria Used to Identify the TN Document Type” on page 283.

a In the Pipeline Matching section, click Add New Pipeline Match .

b Specify the following values in the Add Pipeline Matching dialog box.

c Click OK to save the attribute and close the Add Pipeline Matching dialog box.

7 In the Extract panel, specify the system attributes and document attributes (document data) that you want Trading Networks to extract from documents. For details about what to specify for these fields, see “Attributes To Extract From Documents” on page 285.

a Add an attribute to extract by clicking Add New Attribute . Trading Networks displays the Add an attribute dialog box.

b In the Name field, select the name of the attribute from the list. Trading Networks fills in the Type field based on the document attribute definition. To view more

details about all of the document attributes, click Document Attributes to view the Document Attributes screen.

c Select the Required check box if you want Trading Networks to throw an error when it cannot extract the attribute.

Note: You must specify at least one attribute; otherwise Trading Networks will not use the TN document type.

Attribute Specify

Name Name of the TN_parms variable.

Value Optional. The value of the TN_parms variable. If you specify a value, Trading Networks finds a match only if the variable has the specified value.

Important! If you do not extract the system attributes, Trading Networks will not have this information available for processing rules or querying documents.

Note: Trading Networks always lists SenderID and ReceiverID as attributes to be extracted. You cannot delete them.

Note: Trading Networks always designates SenderID and ReceiverID as required.

webMethods Trading Networks User’s Guide Version 6.5 301

Page 302: Web Methods Trading Networks Users Guide 65

C H A P T E R 1 3 T N F l a t F i l e D o c u m e n t Ty p e s

d Use the Retrieve SenderID from session option as an alternative way to set the value of the SenderID system attribute. If set, rather than look in TN_parms\SenderID for the value to use, Trading Networks uses the connected user. For more information, see “System Attributes To Extract From Documents” on page 286.

e Use the Transformation fields to specify how Trading Networks is to handle attribute data before storing it in the Trading Networks database. The data type of the attribute (shown in the Type field) determines the Built-in or Custom transformation options available. For more information, see “Transformation Information for Extracted Attributes of TN Flat File Document Types” on page 288.

Built-in. Select a built-in transformation provided by Trading Networks. Use the Transform and Argument fields to specify how you want to handle attribute data before storing it in the Trading Networks database.

Note: If you do not mark an attribute as required, Trading Networks does not flag an error if it is unable to extract the attribute. If Trading Networks completes processing without encountering any further errors, it sets the processing status to DONE.

If the attribute data type… For Transformation…

Is SenderID or ReceiverID

You must select from the pull-down list the type of the external IDs (for example, DUNS) for both attributes so that Trading Networks can match the externals ID in SenderID and ReceiverID with the external IDs in the profiles. This is how Trading Networks verifies the identities of the sender and receiver.

When Trading Networks finds a match, it automatically transforms the external IDs in TN_parms/SenderID and TN_parms/ReceiverID into its internal IDs before storing them in the BizDocEnvelope.

Has DATETIME or DATETIME LIST data type

You must specify a date format. Select a built-in format or type in your own. For more information, see “Built-In Transformations for DATETIME and DATETIME LIST Data Type Attributes” on page 289.

302 webMethods Trading Networks User’s Guide Version 6.5

Page 303: Web Methods Trading Networks Users Guide 65

Defining TN Flat File Document Types

Custom. Select or create your own service to perform custom transformations on extracted attributes. For more information, see “Custom Transformation Services” on page 292.

f Click OK to save the new attribute and close the Add an attribute dialog box. Trading Networks returns to the Extract panel of the Document Type Details screen. Trading Networks displays the name of the extracted attributes and their built-in or custom transformation services.

.

Has STRING or STRING LIST data type (but not SenderID or ReceiverID)

You can specify whether you want Trading Networks to alter the string value to all uppercase or all lowercase before storing it. Alternatively, you can have Trading Networks use the extracted values as substitutions in a string that you supply. For more information, see “Built-in Transformations for STRING or STRING LIST Data Type Attributes” on page 289.

Has NUMBER or NUMBER LIST data type

You should specify the operation that Trading Networks should perform on the numbers in the array. For more information, see “Built-in Transformations for NUMBER Data Type Attributes” on page 290.

To do this… Perform this…

Create a new custom transformation Click New Service .

Select an existing custom transformation service Click Find Service to browse the IS namespace

to locate the one you want to use.

Set the inputs of the transformation from the selected service

Click Set Inputs.

Edit an existing service Click on the Edit Service button.

If the attribute data type… For Transformation…

Note: If you add an attribute and then decide you do not need it, you can remove it by clicking on the row containing the attribute, and then clicking Delete

attribute .

webMethods Trading Networks User’s Guide Version 6.5 303

Page 304: Web Methods Trading Networks Users Guide 65

C H A P T E R 1 3 T N F l a t F i l e D o c u m e n t Ty p e s

8 Click the Options tab and specify any of the options.

Important! Keep in mind that the pre-processing actions specified in the processing rules can override pre-processing actions specified in a TN document type. For details, see “Pre-Processing Actions” on page 327.

Options tab parameter Description

Parsing schema The fully qualified name of a webMethods flat file (parsing) schema to use to validate the structure of the documents. You only need to specify a flat file schema if you select the Validate Structure pre-processing option.

If you do not know the fully qualified name, click Find schema

to browse webMethods flat file schemas to locate the one you want to use.

For more information, see “Validating the Structure of Flat File Documents” on page 295.

Verify Digital Signature pre-processing action

Executes a user-defined verification service to verify the digital signature of the documents. Trading Networks executes this pre-processing action before executing the processing rule that you associate with the TN document type.

Create the verification service in any user-defined package, using the inputs and outputs specified in wm.tn.rec:BizDocVerificationService (described in the webMethods Trading Networks Built-in Services Reference). For more information, see “Verifying the Digital Signature of Flat File Documents” on page 294.

Validate Structure pre-processing action

Invokes the flat file parser to validate the document’s structure and content against the flat file schema you specify in the Parsing schema option, and converts the flat file document to an IS document. Then you can map information from the converted document to the TN_parms variable. The Input for Flat File Validation dialog box prompts you to select the parsing settings.

Trading Networks executes this pre-processing action before executing the processing rule that you associate with the TN document type. For more information, see “Validating the Structure of Flat File Documents” on page 295.

304 webMethods Trading Networks User’s Guide Version 6.5

Page 305: Web Methods Trading Networks Users Guide 65

Defining TN Flat File Document Types

9 Click OK to create the TN flat file document type.

Check for Duplicate Document pre-processing action

Searches the database to determine whether the database has already received the document. Trading Networks executes this pre-processing action before executing the processing rule that you associate with the TN document type. Select a built-in service or use a custom service. For more information, see “Checking for Duplicates of the Flat File Document” on page 296.

To create a new custom service click New Service .

To select an existing duplicate service, click Find Service to browse the IS namespace to locate one and then click the Edit Service button if you want to modify the service.

Note: A custom duplicate checking service may affect performance, depending on its logic. For details, see, “Creating a Duplicate Document Check Service” on page 329.

Save Document to Database preprocessing action

Specify whether to save all documents, only unique documents, or no documents. Additionally, specify whether to save the document’s content, attributes, and/or activity log information. Trading Networks executes this pre-processing action before executing the processing rule that you associate with the TN document type. For more information, see “Saving Flat File Documents to the Database” on page 297.

Options tab parameter Description

webMethods Trading Networks User’s Guide Version 6.5 305

Page 306: Web Methods Trading Networks Users Guide 65

C H A P T E R 1 3 T N F l a t F i l e D o c u m e n t Ty p e s

Managing TN Flat Fi le Document TypesThe following table lists the tasks you can perform against TN flat file document types:

Viewing TN Flat Fi le Document TypesYou can view all enabled and disabled TN document types.

1 Start the Trading Networks Console. If you need procedures for this step, see “Starting the Trading Networks Console” on page 22.

2 Select View Document Types. Trading Networks displays the TN flat file document types as well as the TN XML document types.

3 To view disabled TN document types, select Types Show All. Trading Networks places a check ( ) next to the Show All menu item to indicate that it is currently displaying disabled TN document types.

4 To hide disabled TN document types, select Types Show All again. Trading Networks removes the check ( ) next to the Show All menu item to indicate that Trading Networks is currently not displaying disabled TN document types.

Updating TN Flat Fi le Document Types

Task See page...

“Viewing TN Flat File Document Types” 306

“Updating TN Flat File Document Types” 306

“Disabling TN Flat File Document Types” 308

“Enabling TN Flat File Document Types” 309

To view TN flat file document types

Important! Do not change the name of the TN document type if you:

Use a TN document type as an input to a step in a process model you created in Modeler

-- OR --

Use the TN_parms/DoctypeName variable in a document gateway service to specify the name of a TN flat file document type to use for a flat file document

You can change other settings for the attribute.

306 webMethods Trading Networks User’s Guide Version 6.5

Page 307: Web Methods Trading Networks Users Guide 65

Managing TN Flat File Document Types

1 Start the Trading Networks Console. If you need procedures for this step, see “Starting the Trading Networks Console” on page 22.

2 Select View Document Types. Trading Networks displays all TN flat file document types as well as the TN XML document types.

3 Click the row containing the TN flat file document type you want to update.

4 Select Types Edit.

5 To update the description, type a new description in the Description field.

6 To update identification information, click on the Identify panel. For details about the what to specify on this panel, see “Pipeline Matching Criteria Used to Identify the TN Document Type” on page 283.

To add a pipeline matching variable, click Add New Pipeline Match . Click OK to save the variable and close the dialog box.

To update a pipeline matching variable, click the row containing the pipeline matching

variable you want to update and click Edit Selected Pipeline Match . In the Update Pipeline Matching dialog box, update the Name and Value fields for that variable. Click OK to save your updates and close the Update Pipeline Matching dialog box.

To delete a pipeline matching variable, click the row containing the pipeline matching

variable you want to delete and click Remove Selected Pipeline Match .

7 To update extraction information, click the Extract panel. For details about what to specify on this panel, see “Attributes To Extract From Documents” on page 285.

8 To update the system attributes, click on the System Attributes tab. For details about what to specify for these fields, see “System Attributes To Extract From Documents” on page 286.

To select a system attribute to extract, select the appropriate check box in front of the attribute name.

Use the Transform and Argument fields to specify detail information for how Trading Networks is to handle attribute data before storing it in the Trading

To update a TN flat file document type

Note: The SenderID and ReceiverID are always selected.

webMethods Trading Networks User’s Guide Version 6.5 307

Page 308: Web Methods Trading Networks Users Guide 65

C H A P T E R 1 3 T N F l a t F i l e D o c u m e n t Ty p e s

Networks database. For a summary of actions you can take for adding a new system attribute, see step 7 on page 301.

To deselect a system attribute, deselect the appropriate check box in front of the attribute name.

9 To update custom attribute information, click on the Custom Attributes tab. Custom attributes are the user-defined ones on the Document Attributes screen. For more information about document attributes, see Chapter 11, “Document Attributes”.

To add a custom attribute, click Add New Attribute . Then, add a new custom attribute. For a summary of actions you can for take for adding a new custom attribute, see step 5 on page 197.

To view more details about all of the document attributes, click Document Attributes

to view the Document Attributes screen.

To update a custom attribute, click Edit Selected Attribute . For a summary of actions you can take for custom attributes, see step 5 on page 197.

To delete a custom attribute from the TN document type—Select the row for the attribute

and click Remove Selected Attribute .

10 To update options, click the Options tab. For details about these fields, see “Pre-Processing Actions in the TN Flat File Document Type” on page 294.

11 After you have made all your changes, click OK. Trading Networks closes the screen.

Disabling TN Flat Fi le Document TypesIf you no longer want Trading Networks to use a TN document type, you can disable it. When you disable a TN document type, the definition for the TN document type is not removed from the database. You can enable it later (see “Enabling TN Flat File Document Types” on page 309).

1 Start the Trading Networks Console. If you need procedures for this step, see “Starting the Trading Networks Console” on page 22.

2 Select View Document Types. Trading Networks displays both the TN XML document types and TN flat file document types.

Note: To permanently remove the TN document type from the database, your database administrator must remove it. When you remove a TN document type from the database, you must also remove all documents that are associated with the TN document type.

To disable a TN flat file document type

308 webMethods Trading Networks User’s Guide Version 6.5

Page 309: Web Methods Trading Networks Users Guide 65

Managing TN Flat File Document Types

3 Click the row containing information about the TN flat file document type that you want to disable.

4 Select Types Disable. Trading Networks places No in the Enabled column to indicate that the TN flat file document type is disabled.

Enabling TN Flat Fi le Document TypesIf you disable a TN document type and then later determine that you still need it, you can enable it and make it available again.

1 Start the Trading Networks Console. If you need procedures for this step, see “Starting the Trading Networks Console” on page 22.

2 Select View Document Types. Trading Networks displays both the TN XML document types and TN flat file document types.

3 Click the row containing information about the TN document type that you want to enable.

4 Select Types Enable. Trading Networks places Yes in the Enabled column to indicate that the TN document type is enabled.

Note: To view the Enabled column (if it is not currently displayed), select Document Types Show All.

Important! To enable TN document types, you must first display inactive TN document types as described in “Viewing TN Flat File Document Types” on page 306.

To enable a TN flat file document type

webMethods Trading Networks User’s Guide Version 6.5 309

Page 310: Web Methods Trading Networks Users Guide 65

C H A P T E R 1 3 T N F l a t F i l e D o c u m e n t Ty p e s

310 webMethods Trading Networks User’s Guide Version 6.5

Page 311: Web Methods Trading Networks Users Guide 65

C H A P T E R 14

Processing Rules

What are Processing Rules? . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 312

Processing Rules Order . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 313

Processing Rule Criteria . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 317

Extended Criteria—Using Custom Attributes . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 322

Pre-Processing Actions . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 327

Processing Rule Actions . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 329

Defining Processing Rules . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 347

About Querying and Viewing Processing Rules . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 366

Managing Processing Rules . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 372

webMethods Trading Networks User’s Guide Version 6.5 311

Page 312: Web Methods Trading Networks Users Guide 65

C H A P T E R 1 4 P r o c e s s i n g R u l e s

What are Processing Rules?Processing rules specify how you want webMethods Trading Networks (Trading Networks) to process documents. For example, you might want Trading Networks to send an alert e-mail message to a contact, and then deliver the document to the receiver that is identified in the document.

For each document that Trading Networks is to process, it performs a processing rule lookup to determine which processing rule to use for a specific document. After Trading Networks locates the appropriate processing rule, it takes the actions that you specify in a processing rule. Alternatively, you can bypass the lookup if you already know which processing rule you want to execute, thus avoiding the overhead of the lookup (see “Bypassing Lookups for Processing Rules” on page 326).

After Trading Networks finds the appropriate processing rule for a document, it performs the pre-processing and processing actions. The pre-processing actions identify actions that Trading Networks performs before performing the processing actions. You can specify pre-processing actions in both the TN document type and the processing rule. The actions you specify in the processing rule can be configured to override the actions that are specified in the TN document type.

Note: If you are working in a clustered environment, all Trading Networks servers must be set up for cluster synchronization. That is, the servers must set the tn.cluster.sync.remoteAliases property correctly. For more information about how to configure Trading Networks for a clustered environment, see “Shared Database in a Clustered Environment”.

For more information about

Processing rules, see Chapter 3, "Setting up Trading Networks to Process Documents"

Delivery methods you can use with Trading Networks, see Chapter 6, "Delivering Documents to Partners" in the webMethods Trading Networks Concepts Guide.

Large document handling, see Chapter 5, "Trading Networks Document Processing" in the webMethods Trading Networks Concepts Guide and Appendix C, “Large Document Handling”.

312 webMethods Trading Networks User’s Guide Version 6.5

Page 313: Web Methods Trading Networks Users Guide 65

Processing Rules Order

Processing Rules OrderIf a document matches more than one processing rule, Trading Networks uses the first processing rule it encounters. As a result, the order in which you list your processing rules on the Processing Rules screen is important. Trading Networks maintains the order of the processing rules by assigning an ordinal to each processing rule.

Adding Processing Rules and the Order of Processing RulesWhen you add a new processing rule, you have three Add options for processing rules: you can add it above or below an existing processing rule or add the new rule to the bottom of the processing rules list.

The table below explains what happens to the order of the processing rules if you add a new processing rule using each of the Add options.

Note: If you are working with a queried list of processing rules, remember that Trading Networks adds the new rule to the full, unfiltered list of processing rules (e.g., all of the processing rules). Adding a new processing rule and causing the processing rule order to change may also affect the ordinals of the rules that are not displayed on your query results table.

If you add a new processing rule using this option.... The processing rules reorder in this way...

Above— Add a new processing rule above the highlighted rule.

The new processing rule is assigned the original ordinal of the highlighted rule.

The highlighted processing rule is assigned its original ordinal + 1.

All existing processing rules below the highlighted processing rule keep their respective order but are also assigned their original ordinal + 1.

Below— Add a new processing rule below the highlighted rule.

The new processing rule is assigned the highlighted rule’s original ordinal + 1.

The highlighted processing rule keeps its original ordinal.

All existing processing rules below the highlighted processing rule keep their respective order, but they are assigned their original ordinal + 1.

webMethods Trading Networks User’s Guide Version 6.5 313

Page 314: Web Methods Trading Networks Users Guide 65

C H A P T E R 1 4 P r o c e s s i n g R u l e s

Example: The following diagrams demonstrate what happens if you highlight Processing Rule B, Ordinal 12 as the rule to add your new processing rule in relation to.

Add Processing Rule ABOVE Processing Rule B, Ordinal 12

Last—Add a new processing rule to the bottom of the processing rules list. If you set up a default processing rule, place it here (last) in the list.

The new processing rule is placed in the last position at the bottom of the full, unfiltered list of processing rules.

All other processing rules keep their original ordinals.

If you add a new processing rule using this option.... The processing rules reorder in this way...

Add new rule ABOVEProcessing Rule B,

Ordinal 12

The new rule is ABOVEProcessing Rule B and is

now Ordinal 12

Processing Rule B isnow Ordinal 13

314 webMethods Trading Networks User’s Guide Version 6.5

Page 315: Web Methods Trading Networks Users Guide 65

Processing Rules Order

Add Processing Rule BELOW Processing Rule B, Ordinal 12

Add new rule BELOWProcessing Rule B,

Ordinal 12

The new rule is BELOWProcessing Rule B and is

now Ordinal 13

Processing Rule Bremains Ordinal 12

webMethods Trading Networks User’s Guide Version 6.5 315

Page 316: Web Methods Trading Networks Users Guide 65

C H A P T E R 1 4 P r o c e s s i n g R u l e s

Add Processing LAST

Reordering Processing RulesYou can reorder the processing rules by moving them up or down. When you reorder a processing rule, Trading Networks reassigns the ordinal number for your selected processing rule and all affected processing rules.

If you are working with a queried list of processing rules, remember that Trading Networks adds the new rule to the full, unfiltered list of processing rules (e.g., all of the processing rules). Adding a new processing rule and causing the processing rule order to change may also affect the ordinals of the rules that are not displayed on your query results table.

Keep rules with specific criteria before rules with general criteria. You should also set up a default processing rule that you want Trading Networks to use when a document does not match any of the other processing rules. Trading Networks ships with a default processing rule that you can use. Place the default processing rule in the last position of the full, unfiltered processing rules list. For more information about the default processing rule, see “Setting Up a Default Processing Rule” on page 362.

Add new rule LAST(below the Default rule,

Ordinal15)

Default rule remainsOrdinal 15

The new rule is LAST,Ordinal 16, and is nowbelow the Default rule

Note: If you reorder processing rules, there is no “undo” function that will return the processing rules to their original order.

316 webMethods Trading Networks User’s Guide Version 6.5

Page 317: Web Methods Trading Networks Users Guide 65

Processing Rule Criteria

Processing Rule Cr i ter iaThe purpose of the criteria in a processing rule is to identify the documents Trading Networks should process using the processing rule. A document has a sender, receiver, TN document type, user status, the possibility of having errors, and the custom attributes that the TN document type instructed Trading Networks to extract. You can set up a processing rule to match one or more of these criteria. For example, you can specify that a processing rule is to apply to documents that have specified senders and receivers, have a specified TN document type, and the extracted custom attribute “Total PO Amount” is greater than 10000.

All processing rule criteria that you specify must match the document information for Trading Networks to use the rule to process the document. As another example, you might set up the following criteria:

Keep rules with specific criteria before rules with general criteria. You should also set up a default processing rule that you want Trading Networks to use when a document does not match any of the other processing rules. Trading Networks ships with a default processing rule that you can use. Place the default processing rule in the last position of the full, unfiltered processing rules list. For more information about ordering processing rules, see “Processing Rules Order” on page 313. For more information about the default processing rule, see “Setting Up a Default Processing Rule” on page 362.

The rest of this section describes the types of criteria you can specify in a processing rule.

Sender and Receiver CriteriaYou can use the sender and/or receiver of a document as criteria in a processing rule.

After Trading Networks recognizes the TN document type, it extracts the document attributes that are specified in the TN document type. To process a document based on sender/receiver, you must specify that you want Trading Networks to extract the SenderID and ReceiverID system attributes from the document. You can select one or more partners and/or one or more partner profile groups to be a sender or receiver.

Criterion Value(s) To match...

Sender “Any” The sender can be any value

Receiver “Industrial Steel Company”“United Steel”

The receiver must be “Industrial Steel Company” or “United Steel”

Document Type “cXML Order Request” The TN document type must be “cXML Order Request”

User Status “Needs approval” The user status must be “Needs approval”

Recognition Errors “has no errors” The document cannot have errors

webMethods Trading Networks User’s Guide Version 6.5 317

Page 318: Web Methods Trading Networks Users Guide 65

C H A P T E R 1 4 P r o c e s s i n g R u l e s

If Trading Networks cannot determine the sender/receiver of a document, it considers the sender/receiver an unknown partner. Trading Networks uses the unknown partner for a document in all the following situations:

The TN document type is unknown. Because it is the TN document type that specifies the attributes to extract, when the TN document type is not recognized, Trading Networks cannot extract any attributes (including SenderID and ReceiverID).

The TN document type does not instruct Trading Networks to extract the SenderID and ReceiverID system attributes.

The XQL query (in the TN document type) that identifies the location of the SenderID/ ReceiverID system attributes is not valid.

The value of the SenderID/ ReceiverID system attributes in the document do not match the value of the external ID type of any defined partner on your Trading Networks system. Trading Networks uses the sender/receiver information from the document and matches it against the ID type information stored in the partner profiles for your partners.

If a document was sent by one of your partners (for example, Industrial Steel Company), but Trading Networks cannot determine the sender for one of the above reasons, Trading Networks uses Unknown for the sender. If you have a processing rule that processes documents that are sent by this partner (for example, Industrial Steel Company), Trading Networks will not select the rule because it is using the unknown partner for the sender.

If Trading Networks successfully extracts the SenderID/ ReceiverID system attributes from a document and can match it to a partner profile on your Trading Networks system, it uses the corporation name and unit name specified in the partner profile as the name of the sender and/or receiver. Trading Networks compares the name of the partner (or unknown) to the partner or partners that you specify in the processing rule.

If you specify this… The rule matches…

Any Senders

—or—

Any Receivers

Regardless of the partner that is identified as the sender/receiver in of the document, even if the partner is unknown

Enterprise Only if the sender/receiver that is identified in the document is the local partner.

Unknown Only if the sender/receiver is unknown

Selected Senders

—or—

Selected Receivers

Only if the sender/receiver that is identified in the document is one of the partners you specify

318 webMethods Trading Networks User’s Guide Version 6.5

Page 319: Web Methods Trading Networks Users Guide 65

Processing Rule Criteria

Document Type CriterionOne of the criteria that you can use in a processing rule is the TN document type of a document.

When Trading Networks has a document that it needs to process, it must first attempt to recognize the type of document. To do this, Trading Networks determines the TN document type that matches the document. Trading Networks sets the TN document type of the document to the name of the matching TN document type. If a document does not match any TN document type or if it matches multiple TN document types, the document is considered an unknown TN document type.

Trading Networks compares the name of the TN document type (or unknown) to the TN document type or types that you specify in the processing rule. You can specify one of the following for the document type criterion in a processing rule:

User Status CriterionYou can use the user status of a document as a criterion in a processing rule.

The user status is a status that you can associate with a document. If you do not extract the User Status system attribute from a document, its initial value will be null. You can set and change the user status using the following:

The following Java methods that are in the Trading Networks Java API:

com.wm.app.tn.doc.BizDocEnvelope.setUserStatus(String)

com.wm.app.tn.db.BizDocStore.changeStatus(BizDocEnvelope,String,String)

The built-in service wm.tn.doc:changeStatus

Processing action that changes the user status

The following shows an example of using user status criteria during processing:

If you specify this… The rule matches…

Any Document Types Regardless of the TN document type of the document, even if the TN document type is unknown

Unknown Only if the TN document type is unknown

Selected Document Types

Only if the name of the TN document type is one of the TN document types you specify

webMethods Trading Networks User’s Guide Version 6.5 319

Page 320: Web Methods Trading Networks Users Guide 65

C H A P T E R 1 4 P r o c e s s i n g R u l e s

User Status and Processing

Step Description

Trading Networks receives a document and recognizes that its TN document type is PO. The user status is originally null because Trading Networks was not instructed to extract the User Status system attribute.

The document matches the processing rule that has the criteria that indicates the TN document type must be PO and the document can have any user status. The processing action in this rule indicates Trading Networks is to send an alert e-mail. The alert e-mail contains a URL for a web page that displays the PO. The processing rule also changes the user status to “pending approval”.

The user clicks the URL to open the web page to view the PO. The web page contains an HTML form that has an Accept button and a Reject button that the user can use to accept or reject the PO.

Processing RuleTN document type = POuser status = accepted

Processing RuleTN document type = POuser status = rejected

Processing RuleTN document type = POuser status = any

Servicehandles POs

Integration Server

PO

TN document type = POuser status = null

PO

PO

Accept Reject

To:From:Subject:

http://tn:5555/PO.dsp

Set user status to “accepted” Set user status to “rejected”

6

5

4

3

2 1

2 1

2

3

320 webMethods Trading Networks User’s Guide Version 6.5

Page 321: Web Methods Trading Networks Users Guide 65

Processing Rule Criteria

You can set the user status processing rule criterion to one of the following:

Document Recognit ion Errors Criter ionAnother criterion you can use in a processing rule is whether Trading Networks encountered errors while recognizing the TN document type and extracting attributes from the document. (This criterion does not allow you to process documents based on errors that occur while performing the pre-processing or processing actions. This is because Trading Networks uses criteria before processing to determine the processing rule to use for processing.)

Trading Networks flags a general error if an identifying XQL query in the TN document type failed. For example, this error occurs when the document is identified as an XML document but contains invalid XML. Another example is if the document is identified as an XML document but is actually another format, for example plain text or EDI.

Trading Networks also flags an attribute error if Trading Networks is unable to extract an attribute that is marked as required in the TN document type.

Trading Networks flags a sender error if the XQL query to locate the SenderID system attribute fails or if the external ID of the sender in the document does not match the value of the external ID information for any defined partner. Similarly, Trading Networks flags a

The user selects either Accept or Reject. When the user selects either button, code executes. If the user selects Accept, the code uses the built-in service wm.tn.doc:changeStatus to set the user status associated with the document to “accepted.” If the user selects Reject, the code uses the built-in service to set the user status associated with the document to “rejected”.

The code for the web form invokes the wm.tn:submit built-in service that sends the document back to the Integration Server for processing. Trading Networks recognizes the TN document type is PO and determines the user status, which is either “accepted” or “rejected.”

The document matches either the processing rule that indicates the TN document type must be PO and the user status is “accepted” or the TN document type is PO and the user status is “rejected.” This processing action in these rules indicates Trading Networks is to invoke a service. This service processes the purchase order appropriately.

If you specify this… The rule matches…

Any User Status Regardless of the user status of the document, even if the user status is null

Specified User Status Only if the user status of the document is one of the user statuses you specify

Step Description

4

5

6

webMethods Trading Networks User’s Guide Version 6.5 321

Page 322: Web Methods Trading Networks Users Guide 65

C H A P T E R 1 4 P r o c e s s i n g R u l e s

receiver error if the XQL query to locate the ReceiverID system attribute fails or if the external ID of the receiver in the document does not match external ID information for any defined partner.

This processing criterion is useful to assure that processing occurs only if no errors were encountered during document recognition. Conversely, you can also use this criterion to set up processing rules that specifically handle error cases.

You can set the error processing rule Content Criteria to one of the following:

Extended Cri ter ia—Using Custom Attr ibutesThe extended criteria of a processing rule allow you to process a document based on the values of one or more custom attributes that were extracted from a document. For example, you might want to process purchase orders for an amount over $10,000 differently from purchase orders with an amount under $10,000. If you extract a custom attribute, for example, Total PO Amount, from a document, you can use extended criteria to indicate that Trading Networks is to use the processing rule only if the value of the custom attribute Total PO Amount is greater than 10000.

After Trading Networks recognizes the TN document type, it extracts the custom attributes that are specified in the TN document type. If the XQL query for the custom attribute is not valid or it identifies a node that is not in the document, the value of the custom attribute will be null. When you use extended criteria, you can match a document based on whether the custom attribute value is null or not null. In addition, if the value is not null, you can match based on the value that Trading Networks extracted for the custom attribute. For example, if you have Trading Networks extract the custom attribute, Shipping Date, you can use the extended criteria to match if Shipping Date is equal to a date you specify.

For each custom attribute that you want to use in the extended criteria, you specify the attribute name, an operator, and the value the attribute should have.

Attribute instructs Trading Networks to look at the value of the specified attribute to determine whether it meets the rest of the criteria for this custom attribute. You can specify any attribute that is defined to your system.

Operator instructs Trading Networks how to match the value, for example, match string values that contain specified characters, match number values that are greater than a specified value, or match date values before a specified date. The operator you can specify depends on the data type of the custom attribute.

If you specify this… The rule matches…

may have errors Regardless of whether Trading Networks encountered errors

has no errors Only if Trading Networks did not encounter any errors

has errors Only if Trading Networks did encounter errors

322 webMethods Trading Networks User’s Guide Version 6.5

Page 323: Web Methods Trading Networks Users Guide 65

Extended Criteria—Using Custom Attributes

Data Type Operator Matches when the attribute extracted from a document…

STRING Is null Has no value. The attribute has no value if the XQL query for the custom attribute (in the TN document type) did not identify a node in the document.

You do not need to specify a value when you specify this operator.

Is not null Has any value. You do not need to specify a value when you specify this operator.

Equals Matches exactly the value that you specify.

Contains Contains the character string that you specify for the value.

Not equals Has a value that does not match the value that you specify.

STRINGLIST Is null Has no value. The attribute has no value if the XQL query (defined in the TN document type) that Trading Networks used to extract the attribute failed.

You do not need to specify a value when you specify this operator.

Is not null Has any value. You do not need to specify a value when you specify this operator.

Includes Includes the value that you specify.

webMethods Trading Networks User’s Guide Version 6.5 323

Page 324: Web Methods Trading Networks Users Guide 65

C H A P T E R 1 4 P r o c e s s i n g R u l e s

NUMBER Is null Has no value. The attribute has no value if the XQL query for the custom attribute (in the TN document type) did not identify a node in the document.

You do not need to specify a value when you specify this operator.

Is not null Has any value. You do not need to specify a value when you specify this operator.

Equals Matches exactly the value that you specify.

Less than Has a value that is less than the value that you specify.

Greater than Has a value that is greater than the value that you specify.

Less than or equals

Has a value that is less than or equal to the value that you specify.

Greater than or equals

Has a value that is greater than or equal to the value that you specify.

Not equals Has a value that does not match the value that you specify.

NUMBERLIST Is null Has no value. The attribute has no value if the XQL query for the custom attribute (in the TN document type) did not identify a node in the document.

You do not need to specify a value when you specify this operator.

Is not null Has any value. You do not need to specify a value when you specify this operator.

Includes Includes the value that you specify.

Data Type Operator Matches when the attribute extracted from a document…

324 webMethods Trading Networks User’s Guide Version 6.5

Page 325: Web Methods Trading Networks Users Guide 65

Extended Criteria—Using Custom Attributes

Value along with the operator, instructs Trading Networks how to match documents based on the value of the attribute extracted from the documents.

Even when a document contains the attribute information that you specify, Trading Networks might still have a null value for the attribute. The following lists reasons this might occur:

The XQL query for the custom attribute (in the TN document type) did not identify a node in the document.

The TN document type of the document is unknown. (Trading Networks does not extract attributes for unknown TN document types.)

DATETIME Is null Has no value. The attribute has no value if the XQL query for the custom attribute (in the TN document type) did not identify a node in the document.

You do not need to specify a value when you specify this operator.

Is not null Has any value. You do not need to specify a value when you specify this operator.

Equals Matches exactly the value that you specify.

Before Is a date that is before the date that you specify.

After Is a date that is after the date that you specify.

DATETIMELIST Is null Has no value. The attribute has no value if the XQL query for the custom attribute (in the TN document type) did not identify a node in the document.

You do not need to specify a value when you specify this operator.

Is not null Has any value. You do not need to specify a value when you specify this date list.

Data Type Operator Matches when the attribute extracted from a document…

Note: For custom attributes that are extracted from an XML document, Trading Networks returns specific values for different attribute data types. For more information about these extraction values, see “Extracting Custom Attributes From XML Documents” on page 536.

webMethods Trading Networks User’s Guide Version 6.5 325

Page 326: Web Methods Trading Networks Users Guide 65

C H A P T E R 1 4 P r o c e s s i n g R u l e s

You can specify multiple custom attributes in the extended criteria. Trading Networks only selects the processing rule if all the criteria you specify match.

Bypassing Lookups for Processing RulesAs previously mentioned, for each document that Trading Networks is to process, it performs a processing rule lookup to determine which processing rule to use for a specific document. Alternatively, you can explicitly specify which processing rule to execute for a given document type, thus bypassing the lookup (and its overhead).

To do this, add one of the following system attributes to the TN_parms output variable in your document gateway service:

processingRuleID— The Trading Networks-generated identifier (a String) of the processing rule you want Trading Networks to execute for the flat file document. To find this identifier, invoke the wm.tn.route:list service.

processingRuleName—The name (a String) of the processing rule you want Trading Networks to execute for the flat file document.

If you include values for both attributes (which is unnecessary), processingRuleID is used.

For more information about these attributes and TN_parms, see “Specifying the Document Gateway Services Outputs” on page 280.

Be careful not to specify a rule that may process your documents inappropriately. For example, assume the following rules are defined to process purchase orders:

Note: If the pre-processing actions do not indicate that Trading Networks is to save the attributes, Trading Networks does not save the custom attributes. However, you can still use extended criteria for the document. For more information about the pre-processing actions, see “Pre-Processing Actions” on page 327.

If you reprocess a document, Trading Networks does not recognize the TN document type again and therefore does not re-extract the attributes. If you reprocess a document for which Trading Networks did not save the attributes, Trading Networks will not match processing rules that use extended criteria. Instead, Trading Networks will match to another processing rule, for example the default processing rule, and perform the process actions identified in that matching rule. For more information about reprocessing a document, see “Processing a Saved Document Again” on page 452.

Rule Action

1: Execute for orders >$10000 Perform special handling

2: Execute for orders <$10 Discard order

3: Execute for all other orders Perform standard handling

326 webMethods Trading Networks User’s Guide Version 6.5

Page 327: Web Methods Trading Networks Users Guide 65

Pre-Processing Actions

If you assign the rule 2 identifier as the value of processingRuleID, and an application submits an order greater than $10, rule 2 will discard the order.

Pre-Processing Act ionsTrading Networks performs pre-processing actions before it processes the document using the processing rule actions. You can specify pre-processing actions in both the TN document type and the processing rule. You specify the pre-processing actions in the processing rule to override the actions that are specified in the TN document type.

Trading Networks performs the pre-processing actions in the following order. Use pre-processing actions to instruct Trading Networks to:

Verify Digital Signature—Trading Networks verifies the digital signature of a document. To verify that the document arrived unchanged, Trading Networks assures the signed body has not changed by verifying the digital signature. To verify that the sender is who it claims to be, Trading Networks matches the certificate from the digital signature to the certificate that Trading Networks has on file for the partner.

Validate Structure—Trading Networks validates the structure of the document against an IS schema. Trading Networks assures that the document matches the structure identified by the IS schema (using the pub.schema:validate built-in service).

Check for Duplicate Document—Trading Networks determines if there is a duplicate of the document; that is, if it has already received the document. Trading Networks checks the document being processed against documents it has in its database. You can have Trading Networks determine whether the document is a duplicate using a built-in or custom duplicate check service or have Trading Networks not check for a duplicate document.

Built-in services—Use one of the following built-in duplicate checks:

Document ID only—Trading Networks assures that it does not already have a document with same document ID in its database.

Document ID and sender—Trading Networks assures that it does not already have a document with same document ID and sender in its database.

Document ID, sender and receiver—Trading Networks assures that it does not already have a document with the same document ID, sender, and receiver in its database.

Document ID, sender and document type—Trading Networks assures that it does not already have a document with the same document ID, sender, and TN document type in its database.

webMethods Trading Networks User’s Guide Version 6.5 327

Page 328: Web Methods Trading Networks Users Guide 65

C H A P T E R 1 4 P r o c e s s i n g R u l e s

Custom services—Use a service that you create to determine whether a document is a duplicate. For more information, see below, “Creating a Duplicate Document Check Service”.

Trading Networks saves the results of the duplicate check to the pipeline. As a result, this information is available for use in the processing actions that you define in the processing rule.

Save Document to Database—Trading Networks saves a copy of the document content, attributes, and/or activity log information to the database. Trading Networks uses the results of the duplicate check in the Save Document to Database pre-processing action.

Certain delivery options require saving the document content to the database, for example, if you want to deliver a document via a queue. If you do not select to save the document content and Trading Networks is to use a delivery option that requires document content to be saved, Trading Networks will bypass reliable delivery and invoke the specified delivery service once.

For more information about pre-processing actions for XML documents, see “Specifying Pre-Processing Actions for TN XML Document Type” on page 227. For more information about pre-processing actions for flat file documents, see “Pre-Processing Actions in the TN Flat File Document Type” on page 294.

For all pre-processing actions, you can indicate in the processing rule that you want Trading Networks to:

Use the setting in the TN document type

Perform the pre-processing action regardless of the setting in the TN document type

Not perform the action regardless of the setting in the TN document type

Note: There could be performance issues if you choose to use custom services for duplicate checking based on the logic in the service you select.

For more information about pre-processing options, see Chapter 3, "Setting up Trading Networks to Process Documents" and Chapter 6, "Delivering Documents to Partners" in the webMethods Trading Networks Concepts Guide.

328 webMethods Trading Networks User’s Guide Version 6.5

Page 329: Web Methods Trading Networks Users Guide 65

Processing Rule Actions

Creating a Duplicate Document Check ServiceThe service must implement the input and output variables that are defined in the wm.tn.rec:DupCheckService specification. Trading Networks passes the following input variables:

For duplicate checking services, Trading Networks passes the following output variables:

The specification is located in the WmTN package. For more information about this specification, see the webMethods Trading Networks Built-in Services Reference.

Processing Rule Act ionsThe purpose of the actions in a processing rule is to specify how Trading Networks is to process a document. When Trading Networks finds the processing rule to use for a document (using the criteria), Trading Networks performs the actions specified in the processing rule to process the document.

You can define the processing rule actions to instruct Trading Networks either to ignore the document (that is, do nothing) or to perform one or more of the following actions in the order listed below:

Execute a service that you specify. You can have Trading Networks invoke the service synchronously or asynchronously.

Send an alert e-mail message to one of the contacts defined for the sender of the document, one of the contacts defined for the receiver of the document, the webMethods system administrator, or another e-mail that you specify.

Change the user status for the document.

Deliver the document to the receiver using a defined delivery method, e.g., Primary HTTP.

Respond to the caller with a message that you specify.

Input Value Meaning

bizdoc The BizDocEnvelope that represents the document to perform the duplicate document check on. The BizDocEnvelope conforms to the wm.tn.rec:BizDocEnvelope IS document type.

Output Value Meaning

duplicate String Whether the service determined the document is a duplicate. The service should return either true or false for duplicate.

webMethods Trading Networks User’s Guide Version 6.5 329

Page 330: Web Methods Trading Networks Users Guide 65

C H A P T E R 1 4 P r o c e s s i n g R u l e s

If you select to have Trading Networks perform more than one of the above actions, Trading Networks performs the actions in the order listed above. For example, if you select to execute a service, send an alert e-mail message, and deliver the document to the receiver, Trading Networks performs the actions in that order.

If Trading Networks encounters an error performing one of the actions, it will continue to attempt the other actions. For example, if the service specified in the rule does not exist, Trading Networks will receive an error attempting to invoke the service. In this situation, Trading Networks logs the error in the activity log and continues, attempting to send the alert e-mail message and deliver the document to the receiver.

Action 1—Execute a ServiceUse the Execute a service action to have Trading Networks invoke a service that you specify. The service can perform any action you want. For example, you can execute a service to send the document to a back-end system for processing or change the content of the document before sending it to the receiver.

The following lists the prerequisite to using the Execute a service action.

When you use the Execute a service action, you specify the service you want Trading Networks to execute and whether you want Trading Networks to invoke the service synchronously or asynchronously. In addition, you can optionally set input values to hardcode input values for the service.

For more information about

Processing rule actions, see Chapter 5, "Trading Networks Document Processing" in the webMethods Trading Networks Concepts Guide.

Delivery methods you can use, see Chapter 6, "Delivering Documents to Partners" in the webMethods Trading Networks Concepts Guide.

Prerequisite

Before you can use the Execute a service action, the service that you want to invoke must exist on the Integration Server. If the service does not exist, you can access the Developer from the Processing Rules screen to create the service.

Note: If you are using large document processing, see “Creating Services that Recognize Large Document Handling” on page 544.

330 webMethods Trading Networks User’s Guide Version 6.5

Page 331: Web Methods Trading Networks Users Guide 65

Processing Rule Actions

Executing the Service Synchronously or AsynchronouslyTo specify that you want Trading Networks to execute a service synchronously or asynchronously, you select one of the following:

Synchronous—Trading Networks attempts to synchronously execute the service a single time.

Asynchronous—Trading Networks attempts to asynchronously execute the service a single time.

Service execution task—Trading Networks sets up a service execution task for the asynchronous execution of the service. Trading Networks uses reliable execution to re-execute the service one or more times if the service fails. For more information about service execution tasks, see “Service Execution Tasks and Reliable Execution” on page 333.

The following table describes the behavior of Trading Networks based on whether you use synchronous, asynchronous, or service execution task:

Trading Networks Behavior for the Execute a service Action

When does Trading Networks process subsequent processing actions?

synchronous Trading Networks waits for the service to complete before it performs the rest of the processing actions. Trading Networks merges the results from the service into the pipeline. This allows you to use the service results in output templates or in other processing actions.

If there are no subsequent processing actions, Trading Networks waits for the service to complete before returning to the caller that sent the document for processing.

asynchronousandservice execution task

Trading Networks processes the actions immediately. The results of the service are not available in the pipeline for the other processing actions.

If there are no subsequent processing actions, Trading Networks immediately returns to the caller that sent the document for processing.

webMethods Trading Networks User’s Guide Version 6.5 331

Page 332: Web Methods Trading Networks Users Guide 65

C H A P T E R 1 4 P r o c e s s i n g R u l e s

What does Trading Networks return to the caller?

synchronous If you do not select the Respond With processing action, the results of the service are returned unmodified to the caller that sent the document for processing.

If you do select the Respond With processing action, Trading Networks does not return the results of the service to the caller. It returns only the message that you specify with the Respond With action. However, because Trading Networks performs the Respond With action after it executes the service all information that the service places in the pipeline is available for use in the message that Trading Networks returns to the caller. This includes the results of the service.

asynchronousandservice execution task

If you do not select the Respond With processing action, Trading Networks returns no additional information to the caller.

If you do select the Respond With processing action, Trading Networks returns the message that you specify with the Respond With action.

Trading Networks cannot return the results of the service because the service might not be complete.

What if the service throws an exception or does not exist at runtime (i.e., it was deleted since you created the processing rule)?

synchronous, asynchronousandservice execution task

Trading Networks logs the error to its activity log and continues with the other actions in the processing rule, if any.

Trading Networks Behavior for the Execute a service Action

332 webMethods Trading Networks User’s Guide Version 6.5

Page 333: Web Methods Trading Networks Users Guide 65

Processing Rule Actions

Service Execution Tasks and Reliable ExecutionWhen you select service execution task, Trading Networks sets up a service execution task to execute your service. A service execution task is a task that Trading Networks performs to asynchronously execute a service using reliable execution. Reliable execution is a feature of Trading Networks that allows Trading Networks to automatically retry failed services.

When you configure Trading Networks, you define the system-wide settings for service execution tasks. Use the Trading Networks tn.transport.user property to indicate the user account to use when invoking the service. By default, Trading Networks uses the Administrator user account to invoke services. For more information about this property, see “Trading Networks Configuration Properties” on page 42.

There are also other settings that indicate the maximum number of times that Trading Networks attempts to re-execute a failed service and how long Trading Networks is to wait between the attempts to retry a service after a failed attempt.

If Trading Networks attempts to execute a service and the service fails, Trading Networks attempts to execute the service subsequent times until the service succeeds or until Trading Networks reaches the maximum retry limit. If Trading Networks has reached the maximum retry limit and the service has not successfully executed, Trading Networks marks the service execution task as failed.

To determine whether a service was successful or failed, Trading Networks evaluates the value of the status output variable. Your service must set the value of the status output variable to “success” if the service executed successfully or set the value to “fail” if the service did not succeed. For more information about the output variables that your service should return, see “Defining a Processing Rule Based on a Saved Document” on page 361.

The following table lists the system-wide settings for service execution tasks that you can configure. When using reliable execution, Trading Networks uses these settings to establish the parameters for the service execution task that governs the execution of the service. For instructions on how to configure these settings, see “Configuring Tasks Settings” on page 52.

Service Execution Task Setting Description

Maximum Retries The number of times you want Trading Networks to attempt to re-execute a service.

Wait Between Retries

The number of milliseconds (ms) you want Trading Networks to wait before making its first attempt to re-execute the service. (Trading Networks uses the Retry Factor along with the Wait Between Retries value to calculate how long to wait for subsequent retry attempts.)

webMethods Trading Networks User’s Guide Version 6.5 333

Page 334: Web Methods Trading Networks Users Guide 65

C H A P T E R 1 4 P r o c e s s i n g R u l e s

Example: The following shows sample values for the settings described in the table above and how they affect the wait times between attempts to re-execute a service.

With the above settings, if the original attempt to execute the service fails, Trading Networks waits 10000 milliseconds before it makes its first retry attempt. If the first retry attempt fails, Trading Networks determines the next retry wait period by multiplying the last wait value (10000 ms) by the Retry Factor (2). This results in 20000 ms; Trading Networks waits 20000 ms between the first failed retry attempt an the second retry attempt. If the second retry attempt fails, Trading Networks multiplies the last wait value (20000 ms) by the Retry Factor (2). This results in 40000 ms; Trading Networks waits 40000 ms between the second retry attempt and the third retry attempt.

Trading Networks keeps track of the progress and status of each service execution task. If the service execution task fails, you can troubleshoot the problem. If you can correct the problem, you can restart the service execution task to have Trading Networks attempt to execute the service again. You can view information about service execution tasks using the Tasks screen of the Trading Networks Console. For more information about managing and tracking service execution tasks, see Chapter 20, “Service Execution Tasks”.

Retry Factor The factor you want Trading Networks to use when determining how long to wait before making the second and subsequent attempts to re-execute the service. Trading Networks calculates the time to wait by multiplying the last wait time by the value you specify for Retry Factor.

Maximum RetriesWait Between Retries

Retry Factor

= 3= 10000 ms= 2

Retry 1 Retry 2 Retry 3

Wait until next attempt 10000 ms 20000 ms 40000 ms

Service Execution Task Setting Description

334 webMethods Trading Networks User’s Guide Version 6.5

Page 335: Web Methods Trading Networks Users Guide 65

Processing Rule Actions

Creating the Service for the Execute a Service Processing ActionYou create the service that Trading Networks invokes for the Execute a Service processing action.

Input and Output Variables for the Service

The following table describes the specification you should use for the service based on whether you select synchronous, asynchronous, or service execution task.

If you use synchronous or asynchronous, Trading Networks does not require the service to have specific output values. However, if you use service execution task, your service must provide values for the serviceOutput output variable. The serviceOutput variable is an IS document (IData object) that contains the following String variables:

Method Specification You Must Use

synchronousandasynchronous

The service must implement, at a minimum, the input variables that are defined in the wm.tn.rec:ProcessingService specification. The input values that are identified in the specification are the IS documents (IData objects) that are in the pipeline during processing. The specification does not identify any outputs.

To view the wm.tn.rec:ProcessingService specification, use the webMethods Developer. The specification is located in the WmTN package.

service execution task

The service must implement, at a minimum, the input and output variables that are defined in the wm.tn.rec:ReliableProcessingService specification. The input values that are identified in the specification are the IS documents (IData objects) that are in the pipeline during processing. Your service must specify output values that indicate the outcome of the service. See below for additional information about setting the output variables.

To view the wm.tn.rec:ReliableProcessingService specification, use the webMethods Developer. The specification is located in the WmTN package.

webMethods Trading Networks User’s Guide Version 6.5 335

Page 336: Web Methods Trading Networks Users Guide 65

C H A P T E R 1 4 P r o c e s s i n g R u l e s

Trading Networks displays the output information described above on the Task Details screen of the Console. In addition, it also displays other task-related information, such as, the number of times Trading Networks has attempted to retry the service. For instructions on how to view tasks, see information about managing tasks in Chapter 20, “Service Execution Tasks”.

Setting Values for the Input Variables

If you create a service that requires input values, in addition to the input values specified in the wm.tn.rec:ProcessingService or wm.tn.rec:ReliableProcessingService specification, you might want to hardcode some of the values. You can do this when you set up the processing rule.

Variable in the serviceOutput Specify…

status Whether the service executed successfully or unsuccessfully. Your service must provide one of the following values for the reliable execution feature of Trading Networks to operate correctly:

Value Meaning

success The service executed successfully.

When your service returns this value, Trading Networks updates the status of the service execution task for this service to DONE. Trading Networks does not attempt to execute the service again.

fail The execution of the service failed.

If the maximum retry limit has been met, Trading Networks updates the status of the service execution task for this service to FAILED. If the maximum retry limit has not yet been reached, the status of the service execution task remains PENDING and Trading Networks will attempt to re-execute the service after the wait period elapses.

statusMessage Optional. A message that contains more information about the outcome of the service. It is recommended that you provide information for statusMessage if the service fails, for example, an error message that explains why the service failed.

transportTime Optional. The number of milliseconds it took for the service to execute. Specify this value if you want to maintain analytical information about how long it took the service to execute.

336 webMethods Trading Networks User’s Guide Version 6.5

Page 337: Web Methods Trading Networks Users Guide 65

Processing Rule Actions

For example, you might create a service that can add, update, or delete an entry for a partner in your back-end system. Input to the service is a flag that indicates the action the service is to take—add, update, or delete. You can create three separate processing rules that all execute this service. However, you set the input values for the flag different for each processing rule. For the processing rule that is triggered by a document for which you want to add an entry, set the input value of the flag to indicate the service should add an entry. For the processing rule that is triggered by a document for which you want to update an entry, set the input value of the flag to indicate the service should update an entry, and so on.

Logic for the Service

This service can perform any logic that you want. You might want to perform different processing based on whether Trading Networks encountered errors during previous processing, e.g., whether a document is a duplicate. Trading Networks provides a sample service wm.tn.sample.docError:errorCheck that demonstrates how to detect for the duplicate document errors in a BizDocEnvelope. The sample service wm.tn.sample.docError:errorCheck resides in the WmTNSamples package, and Trading Networks also provides a sample document, matching TN document type, and processing rule in the WmTnSamples/config directory.

To run the sample, submit the document to Trading Networks two times. The first time, the document will not be a duplicate. The second time, Trading Networks will flag the document as a duplicate.

For more information about creating the service, see the webMethods Developer User’s Guide.

webMethods Trading Networks User’s Guide Version 6.5 337

Page 338: Web Methods Trading Networks Users Guide 65

C H A P T E R 1 4 P r o c e s s i n g R u l e s

Action 2—Send an Alert E-mailUse the Alert e-mail action to send an e-mail message to a specified contact. The following lists the prerequisite to using the Alert e-mail action.

When you use the Alert e-mail action, you specify the recipient that is to receive the e-mail message, the subject line for the e-mail message, and the body (or content) of the e-mail message.

Recipient of the E-mail MessageYou can use one of the following as the recipient of the e-mail message:

Prerequisite

Before you can use the Alert e-mail action, your Trading Networks system must be set up to allow Trading Networks to send e-mail messages. Do this by specifying the address of the Simple Mail Transfer Protocol (SMTP) server through which the Integration Server is to issue e-mail messages.

To specify the address of the SMTP server, use the following procedure:

1 Start the webMethods Administrator. If you need instructions for starting the webMethods Administrator, see the webMethods Integration Server Administrator’s Guide.

2 In the Settings menu of the navigation menu, click Logging.

3 Click Edit logging settings.

4 In the Email Notification section of the screen, set the SMTP Server field to the domain name or IP address of the SMTP server that you want the Integration Server to use.

5 Click Save Changes.

If you select… Specify…

Sender The sender’s contacts that are to receive the e-mail message. For example, if you want Trading Networks to send the e-mail message to the sender's administrative contacts, select “Administrative”. Trading Networks looks in the sender’s profile for the e-mail addresses of all contacts of the type you selected.

If the sender is unknown or if the contact type you specify is not defined in the sender’s profile, Trading Networks will be unable to determine an e-mail address. As a result, Trading Networks will be unable to send the e-mail message. In this situation, Trading Networks logs the error to its activity log and continues with the other actions you specified in the processing rule, if any.

338 webMethods Trading Networks User’s Guide Version 6.5

Page 339: Web Methods Trading Networks Users Guide 65

Processing Rule Actions

Receiver The receiver’s contacts that are to receive the e-mail message. For example, if you want Trading Networks to send the e-mail message to the receiver's technical contact, specify “Technical”. Trading Networks looks in the receiver’s profile for the e-mail addresses of all contacts of the type you selected.

If the receiver is unknown or if the contact type you specify is not defined in the receiver’s profile, Trading Networks will be unable to determine an e-mail address. As a result, Trading Networks will be unable to send the e-mail message. In this situation, Trading Networks logs the error to its activity log and continues with the other actions you specified in the processing rule, if any.

webMethods Administrator

No additional information is required. Trading Networks sends the e-mail message to the webMethods administrator.

Before you select webMethods Administrator, assure the e-mail address for the webMethods administrator is defined. Do this using the webMethods Administrator. Follow the steps specified in the “Prerequisites” section above, on page 338. However, in Step 4, in addition to specifying the SMTP server, assure an e-mail address is specified for Internal Email field. If an e-mail address is not specified, specify it.

If the webMethods administrator is not defined, Trading Networks will be unable to send the e-mail message. In this situation, Trading Networks logs the error to its activity log and continues with the other actions you specified in the processing rule, if any.

E-mail Address The e-mail address of the recipient that is to receive the e-mail message.

If the e-mail address you specify is not valid, Trading Networks will be unable to send the e-mail message. In this situation, Trading Networks logs the error to its activity log and continues with the other actions you specified in the processing rule, if any.

If you select… Specify…

webMethods Trading Networks User’s Guide Version 6.5 339

Page 340: Web Methods Trading Networks Users Guide 65

C H A P T E R 1 4 P r o c e s s i n g R u l e s

Subject of the E-mail MessageYou can type any subject line for the e-mail message. There are no restrictions to the length or characters that you can use.

Body of the E-mail MessageYou can type any message for the body of the e-mail message. There are no restrictions to the length or characters that you can use.

To make the body dynamic, you can include information from the pipeline in the body. To include information from the pipeline, use output template tags.

For example, you might want the e-mail message to specify the type of document that was received and from whom it was received. You might also want to include a hyperlink that allows the recipient of the e-mail message to view the document. The following shows the text you might specify for the body. (For illustrative purposes, bold text is used for the output template tags.)

If the TN document type is “Purchase Order”, the sender's corporation name is “Industrial Steel Company”, and the organizational unit is “Alloys Division”, the following shows how the above sample e-mail message body would be rendered:

340 webMethods Trading Networks User’s Guide Version 6.5

Page 341: Web Methods Trading Networks Users Guide 65

Processing Rule Actions

When Trading Networks executes the Alert E-mail action, the pipeline contains the information described in “Action 1—Execute a Service” on page 330. In addition, if the processing rule specifies the Execute a service action and the service is executed synchronously, the pipeline also contains any information that the service placed in the pipeline.

For details about the output template tags that you can use, see the Dynamic Server Pages and Output Templates Developer’s Guide manual.

Action 3—Change User StatusUse the User Status action to change the user status that is associated with a document. The user status is a status that you can associate with a document. The TN document type can be defined to extract a user status from the document, which gives the user status an initial value. If the TN document type does not instruct Trading Networks to extract the User Status system attribute or if the XQL query for the User Status system attribute (specified in the TN document type) does not identify a node in the document, the initial value of user status is null.

When you use this processing rule action, you specify the status that you want Trading Networks to associate with the document. You can specify 1-255 characters for the user status. There is no restriction to the characters you can use for user status.

The User Status action is useful to assign a status to a document that you will use when performing document queries or generating reports. For example, you might require that purchase orders be approved. In this case, you can send an alert e-mail message to the person responsible for approving the purchase order and set the user status to “pending approval”. To determine the purchase orders that are waiting for approval, you can query documents searching for documents with the user status “pending approval”.

Action 4—Deliver the Document to the ReceiverWhen a processing rule includes the Deliver Document By processing action, webMethods Trading Networks (Trading Networks) attempts to deliver a document to the receiver that is identified in the document. In the processing rule, you can specify one of four ways to deliver a document—immediate delivery, scheduled delivery, queued for polling, or preferred protocol.

If you select preferred protocol, Trading Networks looks up the receiver’s profile and uses the delivery method that is identified as that partner’s preferred delivery method. This preferred delivery method can be an immediate delivery or queued for polling.

Trading Networks received a Purchase Order document from Industrial Steel Company--Alloys Division.

You can view the document at http://wMTN:5555/invoke/wm.tn.doc/view?docId=000233AB907ED1234

webMethods Trading Networks User’s Guide Version 6.5 341

Page 342: Web Methods Trading Networks Users Guide 65

C H A P T E R 1 4 P r o c e s s i n g R u l e s

The following lists the prerequisite to using the Deliver Document By action.

Immediate DeliveryWhen the Deliver Document By processing action indicates Immediate Delivery, Trading Networks attempts to deliver a document directly to the receiving partner. webMethods provides the following immediate delivery methods:

Each immediate delivery method (Primary HTTP, Secondary HTTP, etc.) that Trading Networks provides is associated with a built-in immediate delivery service that Trading Networks provides. An immediate delivery service is a service that acts on a single document to delivery the document to a single partner. Trading Networks invokes the delivery service to deliver a document to a trading partner. In addition to the above delivery methods, you can create immediate delivery services and register them with Trading Networks to define your own custom immediate delivery methods.

Important! Trading Networks uses the receiver that is extracted from the document. If you use the Execute a service action and the executed service updates the receiver identified in the original document, Trading Networks will not deliver the document to the partner that service specified as the receiver – unless that service updates the receiver in the bizdoc in the pipeline. If the service does not update the receiver, Trading Networks delivers the document to the receiver identified when it initially received the document for processing.

Prerequisite

To use the Deliver Document By action, the TN document type must indicate that Trading Networks is to extract the ReceiverID system attribute from the document. Trading Networks uses the receiver information to determine the partner to which to deliver the document.

For more information about

Delivery methods in Trading Networks, see Chapter 6, "Delivering Documents to Partners" in the webMethods Trading Networks Concepts Guide.

Delivery information on the partner’s profile, see “Information on the Partner’s Delivery Method Tab” on page 137.

Primary E-mail

Primary FTP

Primary FTPS

Primary HTTP

Primary HTTPS

Secondary E-mail

Secondary FTP

Secondary FTPS

Secondary HTTP

Secondary HTTPS

342 webMethods Trading Networks User’s Guide Version 6.5

Page 343: Web Methods Trading Networks Users Guide 65

Processing Rule Actions

Using Reliable Delivery with Immediate Delivery Method

If the pre-processing actions specify that Trading Networks is to save the document content to its database, Trading Networks automatically uses reliable delivery to deliver a document to a partner one or more times based on the settings that you define in the profile for each of your partners. To keep track of the attempts to deliver a document, Trading Networks establishes a delivery task.

The following table lists the reliable delivery settings that you define in the Delivery Method tab of the partner’s profile. When using reliable delivery with an immediate delivery method, Trading Networks uses these settings to establish the parameters for the delivery task that governs the delivery of the document.

For more information about

Immediate delivery methods, see Chapter 6, "Delivering Documents to Partners" in the webMethods Trading Networks Concepts Guide.

Immediate delivery services, see “What is an Immediate Delivery Service?” on page 410.

Note: You can also use reliable delivery by invoking the built-in service, wm.tn.delivery:deliver.

Reliable Delivery Setting Description

Delivery Maximum Retries

The number of times you want Trading Networks to attempt to redeliver a document.

Wait Between Retries

The number of milliseconds (ms) you want Trading Networks to wait before making its first attempt to redeliver the document. (Trading Networks uses the Retry Factor along with the Wait Between Retries value to calculate how long to wait for subsequent retry attempts when delivering documents using an immediate delivery method.)

Retry Factor The factor you want Trading Networks to use when determining how long to wait before making the second and subsequent attempts to redeliver the document when using an immediate delivery method. Trading Networks calculates the time to wait by multiplying the last wait time by the value you specify for Retry Factor.

webMethods Trading Networks User’s Guide Version 6.5 343

Page 344: Web Methods Trading Networks Users Guide 65

C H A P T E R 1 4 P r o c e s s i n g R u l e s

Scheduled DeliveryWhen the Deliver Document By processing action indicates scheduled delivery, Trading Networks batches documents that are then delivered at scheduled times. Trading Networks also creates the delivery task for the document and places the delivery task in the queue specified by the processing rule. The queue specified in the processing rule is a scheduled delivery queue that you have previously defined.

For scheduled delivery, Trading Networks supports two types of queues—public queues and private queues. You can select to use a public queue or to use a specific partner’s private queue.

Once you select a queue for the scheduled delivery method, the next time Trading Networks runs a scheduled delivery service and reads documents from that specified queue, all documents in that queue will be delivered.

Using Reliable Delivery with Scheduled Delivery

Trading Networks automatically uses reliable delivery for a scheduled delivery method. Reliable delivery is a feature of Trading Networks where Trading Networks attempts to deliver a document to a partner one or more times based on settings that you define. To specify how many times Trading Networks attempts to re-deliver a document that is

For more information about

Delivery options, see Chapter 6, "Delivering Documents to Partners" in the webMethods Trading Networks Concepts Guide.

Delivery tasks, see Chapter 19, “Delivery Tasks”.

Note: The queue is not a queue in the traditional sense. It is a set of rows in the Trading Networks database. Each queued delivery task that is associated with a document is a row in the same table of the Trading Networks database.

Note: If you select Receiver’s Queue, Trading Networks looks up a queue in the receiver’s profile. If the receiver’s profile does not contain a queued delivery method (i.e., does not define a queue), then Trading Networks will be unable to deliver the document by this method and instead, Trading Networks makes the document pollable (Queue for polling).

For more information about

Scheduled delivery, see Chapter 6, "Delivering Documents to Partners" in the webMethods Trading Networks Concepts Guide.

Public/Private queues and scheduled delivery, see “Scheduled Delivery Queues” on page 378.

344 webMethods Trading Networks User’s Guide Version 6.5

Page 345: Web Methods Trading Networks Users Guide 65

Processing Rule Actions

scheduled for delivery, you define reliable delivery settings in the profile for each of your partners. To keep track of the attempts to deliver a document, Trading Networks establishes a delivery task.

When using reliable delivery with a scheduled delivery method, Trading Networks only uses only the following reliable delivery setting that you define in the Delivery Method tab of the partner’s profile.

Unlike for the immediate delivery method, Trading Networks does not use the Wait Between Retries and Retry Factor settings for reliable delivery with scheduled delivery because the queue’s delivery schedule dictates how often to retry delivery attempts.

Queued for PollingTrading Networks queues a document for polling when the Deliver Document By processing action indicates one of the following:

The Queue for polling selection

The Receiver’s Preferred Protocol selection and the preferred protocol (delivery method) is Queue for polling

The receiving partner’s profile does not specify a delivery method; for example, Secondary HTTPS is specified but the profile does not contain a Secondary HTTPS delivery method. Or, another example is that if the scheduled delivery method is Receiver’s Queue, but the receiving partner’s profile does not contain a queued delivery

Note: You can also use reliable delivery by invoking the built-in service, wm.tn.delivery:deliver.

Reliable Delivery Setting Description

Delivery Maximum Retries The number of times you want Trading Networks to attempt to redeliver a document.

For more information about

Delivery information on the partner’s profile, see “Information on the Partner’s Delivery Method Tab” on page 137.

“Scheduled Delivery Queue States” on page 390

Scheduled delivery services, see “What is a Scheduled Delivery Service?” on page 410.

Customized delivery services, see “Adding and Registering New Delivery Services” on page 421.

Delivery tasks, see Chapter 19, “Delivery Tasks”

webMethods Trading Networks User’s Guide Version 6.5 345

Page 346: Web Methods Trading Networks Users Guide 65

C H A P T E R 1 4 P r o c e s s i n g R u l e s

method (i.e., does not define a queue), then Trading Networks makes the document pollable (Queue for polling).

When Trading Networks queues the document for polling, it places the document in an internally-defined queue. Trading Networks does not deliver the documents that are in this queue. Instead, Trading Networks waits for a partner to poll for the documents. When a specific partner polls for documents, Trading Networks returns all the documents in the queue for which that partner is the receiver.

The receiving partners define the protocol (e.g., HTTP) to use to poll for the document and how frequently to poll for documents.

Preferred ProtocolIf you select Receiver’s Preferred Protocol, Trading Networks looks up the receiver’s profile and uses the delivery method that is identified as that partner’s preferred delivery method. This preferred delivery method can be an immediate delivery or queued for polling.

In addition to the above delivery methods, you can create customized delivery services and register them with Trading Networks to define your own custom delivery methods.

Action 5—Respond With a MessageUse the Respond With action to have Trading Networks return a specified message to the caller that sent the document to be processed.

When you use the Respond With action, you must specify the message you want Trading Networks to return and the content type of the message.

For more information about

Delivery options, see Chapter 6, "Delivering Documents to Partners" in the webMethods Trading Networks Concepts Guide.

Queue for polling, see “Defining Queue for Polling” on page 394.

For more information about

Partner’s preferred delivery method, see “Information on the Partner’s Delivery Method Tab” on page 137.

Customized delivery services, see “Adding and Registering New Delivery Services” on page 421.

346 webMethods Trading Networks User’s Guide Version 6.5

Page 347: Web Methods Trading Networks Users Guide 65

Defining Processing Rules

Specifying the MessageYou can type any message. There are no restrictions to the length or characters that you can use. To make the body dynamic, you can include information from the pipeline in the body. To include information from the pipeline, use output template tags. For details about the output template tags that you can use, see the Dynamic Server Pages and Output Templates Developer’s Guide manual.

The pipeline contains the information described in “Action 1—Execute a Service” on page 330 of this user’s guide. In addition, if the processing rule specifies the Execute a service action and the service is executed synchronously, the pipeline also contains any information that the service placed in the pipeline.

An example of using the Respond With action would be to send an acknowledgement for a purchase order. You can set up a processing rule that uses the Execute a service action and the Respond With action:

The Execute a service action could asynchronously invoke a service that performs the appropriate processing for the purchase order, for example, interfacing with a back-end system. This action returns the confirmation that the purchase order was received and processed.

The Respond With action could return an acknowledgement that just indicates that the purchase order was received. The message you specify is the acknowledgement that is returned.

Specifying the Content TypeIn addition to specifying the message, you must indicate the content type of the message. For example, if the message is an XML document, specify the content type, text/xml, or if the message is in plain text, specify the content-type text/plain.

Defining Processing RulesUse this procedure to define a processing rule on the Processing Rule Details screen.

Note: If you are working in a clustered environment, all Trading Networks servers must be set up for cluster synchronization. That is, the servers must set the tn.cluster.sync.remoteAliases property correctly. For more information about how to configure Trading Networks for a clustered environment, see “Shared Database in a Clustered Environment”.

webMethods Trading Networks User’s Guide Version 6.5 347

Page 348: Web Methods Trading Networks Users Guide 65

C H A P T E R 1 4 P r o c e s s i n g R u l e s

1 Start the Trading Networks Console. If you need procedures for this step, see “Starting the Trading Networks Console” on page 22.

2 Select View Processing Rules. Perform one of the following procedures to add a new processing rule.

To define a processing rule

Method to start a processing rule Procedures

Add — To add a new processing rule in a specific order relative to a selected processing rule.

For more information about adding processing rules, see “Adding Processing Rules and the Order of Processing Rules” on page 313

1) Click the row where you want to add the new processing rule.

2) Select Rules Add and then one of the following:

a Above— Add a new processing rule above the highlighted processing rule.

b Below— Add a new processing rule below the highlighted processing rule.

c Last—Add a new processing rule to the bottom of the full unfiltered processing rules list. All other processing rules keep their original ordinal numbers.

Note: Make sure you place the Default processing rule in the last position in the filter processing rules list. For more information about the default processing rule, see “Setting Up a Default Processing Rule” on page 362

3) Trading Networks displays a blank Processing Rule Details screen for you to complete.

Duplicate— Add a new processing rule that is a duplicate of an existing one. Trading Networks adds the new rule to the bottom of the processing rules list.

1) Click the row containing the processing rule that you want to duplicate.

348 webMethods Trading Networks User’s Guide Version 6.5

Page 349: Web Methods Trading Networks Users Guide 65

Defining Processing Rules

3 On the Processing Rule Details screen, specify the name you want to give the processing rule in the Name field. Specify 1-64 characters. There is no restriction to the characters that you can use.

4 If you do not want this processing rule to be enabled, deselect the default Enabled field.

5 Optionally, specify a description for the processing rule in the Description field. Specify 1-255 characters. There is no restriction to the characters that you can use.

6 Click the Criteria tab and fill in the fields to identify documents that should be processed using this rule. A document must meet all the criteria that you specify on both the Criteria and Extended Criteria tabs for Trading Networks to use the processing rule to process the document. For more information, see “Processing Rule Criteria” on page 317.

You can update any or all fields from the duplicated processing rule.

2) Select Rules Duplicate.

Trading Networks copies the processing rule fields with values from the processing rule that you duplicate.

For this Criteria tab parameter… Specify…

Sender The sender(s) identified in the documents that you want to process with this rule. Select one of the following:

Any to use this rule for documents regardless of the sender.

Enterprise to use this rule for documents that identify the local partner (the partner that is the hub of the trading network) as the sender. Trading Networks lists the name of the Enterprise profile in parentheses.

Unknown to use this rule for documents for which the sending partner is not known.

Method to start a processing rule Procedures

webMethods Trading Networks User’s Guide Version 6.5 349

Page 350: Web Methods Trading Networks Users Guide 65

C H A P T E R 1 4 P r o c e s s i n g R u l e s

Selected to use this rule for documents that identify one or more of the specified partner profiles and/or partner profile groups as the sender.

To specify a partner profile:

a Click the Select Profile(s)... button.

b Select a partner profile from the Partner Selection Dialog. You can select multiple partners using the <Shift> and <Ctrl> keys. For more information about the Select Profile(s)... button, see “Selecting a Partner” on page 34.

c Click OK.

To specify a partner profile group:

a Click the Select Profile Group(s)... button.

b Select a partner profile group from the Partner Groups Dialog. You can select multiple partner profile groups using the <Shift> and <Ctrl> keys. For more information about the Select Profile Group(s)... button, see “Selecting a Partner” on page 34.

c Click OK.

For more information about these processing rules fields, see “Sender and Receiver Criteria” on page 317.

Receiver The receiver(s) identified in the documents that you want to process with this rule. Select one of the following:

Any to use this rule for documents regardless of the receiver.

Enterprise to use this rule for documents that identify the local partner (the partner that is the hub of the trading network) as the receiver. Trading Networks lists the name of the Enterprise profile in parentheses.

Unknown to use this rule for documents for which the receiving partner is not known.

For this Criteria tab parameter… Specify…

350 webMethods Trading Networks User’s Guide Version 6.5

Page 351: Web Methods Trading Networks Users Guide 65

Defining Processing Rules

Selected to use this rule for documents that identify one or more of the specified partner profiles and/or partner profile groups as the receiver.

To specify a partner profile:

a Click the Select Profile(s)... button.

b Select a partner profile from the Partner Selection Dialog.You can select multiple partners using the <Shift> and <Ctrl> keys. For more information about the Select Profile(s)... button, see “Selecting a Partner” on page 34.

c Click OK.

To specify a partner profile group:

a Click the Select Profile Group(s)... button.

b Select a partner profile group from the Partner Groups Dialog. You can select multiple partner profile groups using the <Shift> and <Ctrl> keys. For more information about the Select Profile Group(s)... button, see “Selecting a Partner” on page 34.

c Click OK.

For more information about these processing rules fields, see “Sender and Receiver Criteria” on page 317.

Document Type The TN document type(s) of the documents that you want to process with this rule. Select one of the following:

Any to use this rule for documents regardless of the TN document type.

Unknown to use this rule for documents with unknown TN document types.

For this Criteria tab parameter… Specify…

webMethods Trading Networks User’s Guide Version 6.5 351

Page 352: Web Methods Trading Networks Users Guide 65

C H A P T E R 1 4 P r o c e s s i n g R u l e s

Selected to use this rule for documents with the specified TN document types. To specify TN document types:

a Click the Select Document Type button.

b Select the row containing the TN XML document type or TN flat file document type that you want from the Document Type Selection Dialog. You can select multiple partners using the <Shift> and <Ctrl> keys. For more information about using this button, see “Selecting TN Document Types” on page 36.

c Click OK.

For more information about these fields, see “Document Type Criterion” on page 319

User Status The user status of the documents that you want to process using this rule. Select one of the following:

Any to use this rule for documents regardless of the user status.

Specified to use this rule for documents with the specified user statuses. Type each user status you want to allow on a separate row in the table. To add a user status to the table,

click Add New to add a row; then, type the user status. To remove a user status from the table, delete the row

containing the user status by clicking Delete Selected .

For more information about these fields, see “User Status Criterion” on page 319.

Recognition Errors Whether the documents that you want to process using this rule contain errors. Select one of the following from the list:

May have errors to use this rule for documents regardless of whether the document contains errors.

Has no errors to use this rule for documents that do not contain errors.

Has errors to use this rule for documents that contain errors.

For more information about these fields, see “Document Recognition Errors Criterion” on page 321

For this Criteria tab parameter… Specify…

352 webMethods Trading Networks User’s Guide Version 6.5

Page 353: Web Methods Trading Networks Users Guide 65

Defining Processing Rules

7 Click the Extended Criteria tab to specify custom attributes that you want Trading Networks to use as criteria for matching processing rules. A document must meet all the criteria that you specify on both the Criteria and Extended Criteria tabs for Trading Networks to use the processing rule to process the document.

For each custom attribute that you want to use, specify the following Content Criteria:

8 Click the Pre-Processing tab and fill in the fields to specify the pre-processing actions you want Trading Networks to perform for documents that meet the criteria specified in this processing rule. By default, Trading Networks checks all pre-processing actions.

For more information about pre-processing actions for XML documents, see “Specifying Pre-Processing Actions for TN XML Document Type” on page 227. For

For this Extended Criteria tab parameter… Specify…

Attribute The custom attribute that you want Trading Networks to use to select documents. Select an attribute from the list.

Operator The operator you want Trading Networks to use with the value you specify. For example, select Equal if you want Trading Networks to match documents that have the exact value you specify for Value.

Value Specify the value you want Trading Networks to use when matching documents to the processing rule.

To specify a string, type the characters in the string. Be sure to use the exact combination of upper- and lowercase letters because Trading Networks performs a case-sensitive match.

To specify a number, type the numeric value.

To specify a date and time, either type in the date

and time or click to open a dialog that allows you to select the date from a calendar. (Trading Networks uses the current time.) If you type a date and time, use the format yyyy-mm-dd hh:mm:ss. (Use a 24-hour clock for the hour field, hh.). For example, if you want to specify the date/time August 29, 2001 at 2:30 pm, specify 2001-08-29 14:30:00.

You do not need to specify a value if you select is null or is not null for Operator

webMethods Trading Networks User’s Guide Version 6.5 353

Page 354: Web Methods Trading Networks Users Guide 65

C H A P T E R 1 4 P r o c e s s i n g R u l e s

more information about pre-processing actions for flat file documents, see “Pre-Processing Actions in the TN Flat File Document Type” on page 294.

For this Pre-Processing tab parameter… Specify…

Verify Digital Signature Whether you want Trading Networks to verify the digital signatures of documents. Select one of the following:

Defer to Document Type to use the Verify setting that is specified in the TN document type for the document.

Verify digital signature to always verify digital signatures or digitally sign documents that Trading Networks processes with this processing rule.

Do not verify digital signature to never verify digital signatures or digitally sign documents that Trading Networks processes with this processing rule.

Validate Structure Whether you want Trading Networks to validate the structure of documents. Select one of the following:

Defer to Document Type to use the Validate setting that is specified in the TN document type for the document.

Validate structure to always validate the structure of the documents that Trading Networks processes with this processing rule.

Do not validate structure to never validate the structure of the documents that Trading Networks processes with this processing rule.

Check for Duplicate Document

Whether you want Trading Networks to determine whether it already received the document. Select one of the following:

Defer to Document Type to use the Check for Duplicate Document setting that is specified in the TN document type for the document.

Use built-in services to check for duplicate document of XML or flat file documents against a Trading Networks built-in service.

If you select Use built-in services to check for duplicate document, select whether you Trading Networks should use the: Document ID only; both the Document ID and sender; the Document ID, sender and receiver; or the Document ID, sender and document type.

354 webMethods Trading Networks User’s Guide Version 6.5

Page 355: Web Methods Trading Networks Users Guide 65

Defining Processing Rules

Use custom services to check for duplicate document against a custom duplicate checking service.

To create a new custom duplicate service, click

New service .

To select an existing duplicate service, click Find

Service to browse the IS namespace to locate the one you want to use. Click the Edit Service button if you want to modify the service.

To edit an existing custom duplicate service, click on the Edit Service button.

For more information about creating a duplicate checking service, “Creating a Duplicate Document Check Service” on page 329.

Do not check for duplicate document to never check the uniqueness of the documents that Trading Networks processes with this processing rule.

Note: There could be performance issues if you choose to use custom services for duplicate checking based on the logic in the service you select.

Save Document to Database

Whether you want Trading Networks to save a copy of document content to the database. Select one of the following:

Defer to Document Type to use the Save Document to Database setting that is specified in the TN document type for the document.

For this Pre-Processing tab parameter… Specify…

webMethods Trading Networks User’s Guide Version 6.5 355

Page 356: Web Methods Trading Networks Users Guide 65

C H A P T E R 1 4 P r o c e s s i n g R u l e s

Save to always save a copy of the document contents, attributes, and/or activity log information that Trading Networks processes with this processing rule.

If you select Save, select whether you want to save the document only if it is unique. Select one of the following:

all documents—to save the selected information for all documents regardless of whether they are unique.

only unique documents—to save the selected information for documents only if they are unique.

Select the information you want to save to the database by specifying the following:

Content—to save the content of the document.

Attributes—to save the custom attributes of the document.

Activity Log—to save activity log criteria relative to the document.

When you select the Save option, Trading Networks displays the above three items (Content, Attributes, and Activity Log) by default.

Do not save to never save the document content and attributes of the documents that Trading Networks processes with the processing rule.

Note: If you do not select to save the document content and Trading Networks is to use a delivery option that requires document content to be saved (e.g., if you want to deliver a document via a queue), Trading Networks will bypass reliable delivery and invoke the specified delivery service once.

For this Pre-Processing tab parameter… Specify…

356 webMethods Trading Networks User’s Guide Version 6.5

Page 357: Web Methods Trading Networks Users Guide 65

Defining Processing Rules

9 Click the Action tab and select one or more of the following processing rule actions. The default for a new processing rule is to have all five actions enabled. To disable a processing rule action, deselect the appropriate checkbox in the Enable column on the left.

When you select a processing rule action, Trading Networks displays the corresponding panel for each action on the right side of the screen. Complete your selections for each processing rule action as explained below.

1) Execute a service. Specify the service you want Trading Networks to invoke for the document and how you want Trading Networks to invoke the service. Optionally, you can also hardcode input parameters for the service.

For more information about the Execute a service processing rule action, see“Action 1—Execute a Service” on page 330. If you are using large document processing, see “Creating Services that Recognize Large Document Handling” on page 544.

a Perform one of the following to specify the service you want Trading Networks to invoke for the processing action:

To specify an existing service, click Find Service to browse the services and select the one you want to use.

To create a new service, click New Service (folder with yellow highlight) to open the Developer to create the service. For more information about creating services, see the webMethods Developer User’s Guide.

b Specify how to invoke the service:

To invoke the service synchronously, select synchronous.

To invoke the service asynchronously, select asynchronous.

To invoke the service asynchronously and use a service execution task, select service execution task.

c To set inputs for the service, click Set Inputs. Trading Networks displays the input parameters for the service. Type in values for the parameters you want to hardcode an input value. After specifying inputs, click OK.

d If you need to update the service, click Edit Service. Trading Networks opens the Developer from which you can update the service.

Important! If you select more than one action, Trading Networks performs the actions in the order they are listed on the Processing Rules screen. For example, if you select to execute a service, send an alert e-mail message, and deliver the document to the receiver, Trading Networks performs the actions in that specific order. For more information, see “Processing Rule Actions” on page 329.

webMethods Trading Networks User’s Guide Version 6.5 357

Page 358: Web Methods Trading Networks Users Guide 65

C H A P T E R 1 4 P r o c e s s i n g R u l e s

2) Alert E-mail—Compose an e-mail message to send to a specified contact. Specify the recipient, subject line, and body of the e-mail message in the To, Subject, and Body fields, respectively.

For more information about the Alert E-mail processing rule action, see “Action 2—Send an Alert E-mail” on page 338.

3) Change User Status—Specify the user status you want to associate with the document. In the Change to field, specify a character string containing 1-255 characters. There is no restriction on the characters you can use.

For more information about the User Status processing rule action, see “Defining a Processing Rule Based on a Saved Document” on page 361.

For this Alert e-mail field… Specify...

To One of the following addressees:

webMethods Administrator to send the e-mail to the webMethods administrator.

Sender to send the e-mail to a sender contact. Then, select the contact type from the list.

Receiver to send the e-mail to a receiver contact. Then, select the contact type from the list.

E-mail address to specify a specific address. Then, specify the e-mail address.

For more information on these fields, see “Recipient of the E-mail Message” on page 338.

Subject Type a character string for the subject of your e-mail. There are no limits to the length or the characters you can specify.

Body Type a character string for the body of your e-mail. There are no limits to the length or the characters you can specify. You can include output template tags to create a dynamic message.

To use a larger input window to specify the body, click Expand.

For more information on this field, see “Body of the E-mail Message” on page 340.

358 webMethods Trading Networks User’s Guide Version 6.5

Page 359: Web Methods Trading Networks Users Guide 65

Defining Processing Rules

4) Deliver Document By—Specify the delivery method you want to use to deliver the document.

For more information about the Deliver Document By processing rule action, see “Action 4—Deliver the Document to the Receiver” on page 341

Select this Deliver Document field… For...

Queue for polling Trading Networks queues a document for polling. For more information, see “Defining Queue for Polling” on page 394.

Receiver’s Preferred Protocol

The delivery method that is identified as the receiving partner’s preferred delivery method. This preferred delivery method can be an immediate delivery or queued for polling.

Immediate Delivery Specify an immediate delivery method from the list.

For more information, see “Immediate Delivery” on page 342.

Scheduled Delivery Specify the scheduled delivery queue to use from the list. Scheduled Delivery indicates that documents matching the processing rule will not be delivered immediately, but will be queued and delivered later by scheduled delivery.

The scheduled delivery queue can be a public or private queue (Receiver’s queue). Select the public queue from the list of registered public queues. Select Receiver’s queue to place documents that match this processing rule in the receiving partner’s selected queue. The next time Trading Networks runs a scheduled delivery service and reads documents from the specified queue, all documents in that queue will be delivered.

For more information about queues and scheduled delivery, see “Scheduled Delivery” on page 344 and “Scheduled Delivery Queues” on page 378.

Important! If you select the Scheduled Delivery processing action, you must use the Save Document to Database pre-processing action. If you do not save the document, Trading Networks maintains no information about this document after it processes the document.

webMethods Trading Networks User’s Guide Version 6.5 359

Page 360: Web Methods Trading Networks Users Guide 65

C H A P T E R 1 4 P r o c e s s i n g R u l e s

5) Respond With —Specify the message you want to return to the caller that sent the document and the content type of the message.

For more information about the Respond With processing rule action, see “Action 5—Respond With a Message” on page 346.

10 Click OK. Trading Networks closes the Processing Rule Details screen, and saves all changes you have made to processing rules. This includes saving all new rules you added, rules you changed, rules you disabled or enabled, and all changes you made to the order of the rules.

For this Respond With field… Type…

Content type The content type of the message in the Content type field. For example, if the message is and XML document, type “text/xml”.

Message The message in the Message field. Specify a character string. There are no limits to the length or the characters you can specify. You can include output template tags to create a dynamic message.

To use a larger input window to specify the message, click Expand.

360 webMethods Trading Networks User’s Guide Version 6.5

Page 361: Web Methods Trading Networks Users Guide 65

Defining Processing Rules

Defining a Processing Rule Based on a Saved DocumentYou can have Trading Networks create a processing rule based on a document that you have saved in the Trading Networks database. When Trading Networks creates the processing rule, it sets the criteria, extended criteria, pre-processing actions, and actions as follows:

You can make any changes to the criteria, extended criteria, pre-processing actions, or processing actions.

Processing Rule Tab How Trading Networks Defines the Information on the Tab

Criteria Trading Networks sets the processing rule criteria as follows:

Sender criterion—Set to the sender that is associated with the document; that is, either the sender identified within a document or unknown.

Receiver criterion—Set to the receiver that is associated with the document; that is, either the receiver identified within a document or unknown.

Document type criterion—Set to the TN document type that was used for the document or unknown if it the document did not match a TN document type.

User status criterion—Set to the value of the user status that is associated with the document, if any.

Extended Criteria Trading Networks does not set any extended criteria.

Pre-Processing Trading Networks sets the pre-processing actions as follows:

Verify digital signature—Set to always verify the digital signature of the document.

Validate structure—Set to always validate the structure of the document.

Check for duplicate document—Set to use the setting in the TN document type for the duplicate check pre-processing action.

Save document to database—Set to always save a copy of the document content, attribute, and/or activity log information.

Action Trading Networks sets the processing action to ignore the document.

webMethods Trading Networks User’s Guide Version 6.5 361

Page 362: Web Methods Trading Networks Users Guide 65

C H A P T E R 1 4 P r o c e s s i n g R u l e s

1 Use the Transaction Analysis screen to display the sample document that you want to use. Select View Transaction Analysis.

2 Click the row containing the document that you want to view.

3 Select Transactions Create Processing Rule.

4 To change the criteria, select the Criteria tab; then, update the settings as you want. For information about how to update the settings, see step 6 on page 349.

5 To change the custom attribute (extended) criteria, select the Extended Criteria tab; then, update the settings as you want. For information about how to update the settings, see step 7 on page 353.

6 To change the pre-processing actions, select the Pre-Processing tab; then, update the settings as you want. For information about how to update the settings, see step 8 on page 353.

7 To change the processing actions, select the Action tab; then, update the settings as you want. For information about how to update the settings, see step 9 on page 357.

8 Click OK. Trading Networks saves the processing rule and closes the Processing Rule Details screen.

Sett ing Up a Default Processing RuleTrading Networks is shipped with a default processing rule that has the name Default rule. The criteria of this processing rule matches a document that has any sender, any receiver, any TN document type, any user status, and may have errors. The default rule specifies no extended criteria. In other words, any document that Trading Networks receives will meet the criteria of the default processing rule.

The pre-processing actions in the default processing rule indicate that Trading Networks should use the settings in the TN document type. The processing action is to change the user status of the document to “IGNORED”.

You can update the default processing rule to change any settings. You should not change the criteria. However, you might want to update the pre-processing and processing actions. If you do update the default processing rule, make sure that it remains last in the full, unfiltered processing list. For more information about ordering processing rules, see “Processing Rules Order” on page 313.

To define a processing rule based on a saved document

Note: Trading Networks saves the new rule at the top of the list of processing rules. For instructions on how to move the processing rule to another position in the list, see “Ordering the Processing Rules” on page 363.

362 webMethods Trading Networks User’s Guide Version 6.5

Page 363: Web Methods Trading Networks Users Guide 65

Defining Processing Rules

Use the following procedure to update and set up your default processing rule.

1 Start the Trading Networks Console. If you need procedures for this step, see “Starting the Trading Networks Console” on page 22.

2 Select View Processing Rules.

3 Double-click on the row for the default processing rule that is named Default rule. The default processing rule is listed last (on the bottom of the full unfiltered list).

4 To update the pre-processing actions, click the Pre-Processing tab. Then, update the pre-processing actions. For information about what you can specify, see step 8 on page 353.

5 To update the processing actions, click the Action tab. Then, update the processing actions. For information about what you can specify, see step 9 on page 357.

6 Click OK. Trading Networks closes the Processing Rule Details screen and saves the changes to the processing rule.

Ordering the Processing RulesThe order in which you list your processing rules on the Processing Rules screen is important. For each document, Trading Networks matches document information against the criteria that is specified in a processing rule. Trading Networks matches documents against processing rules in the order the rules are listed on the Processing Rules screen. It uses the first processing rule that matches to process the document.

Because Trading Networks looks for processing rules in this order, you should keep rules with specific criteria before rules with general criteria. The default processing rule should always be last. For more information about how Trading Networks works with the order of processing rules, see “Processing Rules Order” on page 313.

To update the default processing rule

Note: If you do update the Default rule, make sure that it remains last in the full, unfiltered processing list.

Note: If you reorder processing rules, there is no “undo” function that will return the processing rules to their original order.

webMethods Trading Networks User’s Guide Version 6.5 363

Page 364: Web Methods Trading Networks Users Guide 65

C H A P T E R 1 4 P r o c e s s i n g R u l e s

Use the following procedure to order processing rules.

1 Start the Trading Networks Console. If you need procedures for this step, see “Starting the Trading Networks Console” on page 22.

2 Select View Processing Rules.

3 To move a processing rule, click the rule you wish to move. To move more than one contiguous block of rules at a time, you can highlight multiple processing rules using the <Shift> key.

4 Click Rules Move Select to select the processing rule (s) you want to move.

5 Highlight the processing rule you want to move your selected rule in relation to.

6 Once you have highlighted the location, perform the following to move your selected processing rule:

Trading Networks reassigns the ordinal numbers for all affected processing rules.

Repeat this step until the processing rules are listed in the order you want. You can order the processing rules in any direction. The default processing rule should always be listed last. For more information, see “Processing Rules Order” on page 313.

If you want, you can test the order of your processing rules to assure you have them in the correct order. For more information, see “Testing the Order of Processing Rules” below.

To order processing rules

Note: You can only move and reorder processing rules if their ordinals are contiguous.

Note: If you reorder processing rules, there is no “undo” function that will return the processing rules to their original order.

Click this... Inserts the selected processing rule...

Rules Move Above Above the highlighted rule

Rules Move Below Below the highlighted rule

364 webMethods Trading Networks User’s Guide Version 6.5

Page 365: Web Methods Trading Networks Users Guide 65

Defining Processing Rules

Testing the Order of Processing RulesYou can test the order of your processing rules to assure Trading Networks selects the correct processing rules for your documents. If you find that Trading Networks is not using the correct processing rule, you can re-order the rules.

To test the processing rules, you must have sample documents available in your file system. To perform a test, you select the sample document. Trading Networks performs the following actions on the document:

Recognizes the TN document type

Extracts attributes as specified in the TN document type

Determines all the processing rules the document matches

Trading Networks highlights the matching processing rules on the Processing Rules screen. The first highlighted processing rule in the list is the one Trading Networks would use to process the document.

Note that Trading Networks does not test the sample document against disabled processing rules even if the Processing Rules screen is currently displaying disabled processing rules. This means Trading Networks does not highlight the disabled processing rules that the document would match. For more information about disabling processing rules, see “Disabling Processing Rules” on page 373.

Perform the following procedure to test the order of your processing rules.

1 If the Processing Rules screen is not currently displayed, perform the following procedure to display it:

a Start the Trading Networks Console. If you need procedures for this step, see “Starting the Trading Networks Console” on page 22.

b View Processing Rules.

2 Select Rules Test. Trading Networks displays the Select Input Document dialog box.

3 From the Select Input Document dialog box, select the sample document you want to use for the test and click Open.

Trading Networks informs you of the number of matches for which the sample document information meets the processing rule criteria, and highlights the corresponding processing rules.

Important! During the test, Trading Networks does not actually process the document. That is, Trading Networks does not perform any pre-processing or processing actions on the document.

To test the order of processing rules

webMethods Trading Networks User’s Guide Version 6.5 365

Page 366: Web Methods Trading Networks Users Guide 65

C H A P T E R 1 4 P r o c e s s i n g R u l e s

About Querying and Viewing Processing RulesYou can use the query function of the Processing Rules screen to find and view information about all of the processing rules in Trading Networks, including the ones available out-of-the box and the processing rules you have created.

The Processing Rules screen contains a table that displays the processing rules from your query results. You can select to display summary information or detailed information for each processing rule that is listed in the table.

To find a specific processing rule, query Trading Networks for the processing rule(s) in which you are interested. Trading Networks returns the following information in the processing rules table:

Processing rules that meet your search criteria in a filtered table format.

Specific information about a selected processing rule in a summary section below the table.

If you plan to use the same query many times, you can save the query settings. When you want to use the same query again, you simply select that saved query. For more information about different query functions you can perform, see Chapter 16, “Running Queries in Trading Networks”.

To set up a query and display information for viewing processing rules, specify some or all of the following:

Basic search criteria

How to display Detail view information about selected processing rules.

Basic Search Criteria for Processing RulesUse the Basic Criteria tab to search for processing rules. The basic search criteria includes most of the basic processing rule criteria, that is, the information found on the Criteria tab of the Processing Rules Details screen. Trading Networks searches for processing rules that meet all search criteria that you specify.

You can use basic search criteria to select processing rules that:

Have specified senders

Have specified receivers

Are of a specified TN document type

Have a specified user status

Have a specified processing rule name

366 webMethods Trading Networks User’s Guide Version 6.5

Page 367: Web Methods Trading Networks Users Guide 65

About Querying and Viewing Processing Rules

Were modified in a specified time period

Have a specified ordinal number

Detail View of Processing RulesAfter Trading Networks selects the processing rules that match the basic search criteria that you specify, it displays the filtered results of your processing rule query. Trading Networks displays the query results in the processing rules table, which lists the requested processing rules information.

You can customize this filtered processing rules table to indicate the columns you want Trading Networks to display and how you want the rows sorted using the options on the Detail View tab. Each column corresponds to basic information that Trading Networks maintains about a processing rule: ordinal number, processing rule name, sender, receiver, TN document types, user statuses, and if a processing rule is enabled.

Finding and Viewing Processing RulesUse the following procedure to find and view processing rule(s).

1 Start the Trading Networks Console. If you need procedures for this step, see “Starting the Trading Networks Console” on page 22.

2 Select View Processing Rules.

3 Select Run Query on the toolbar. Trading Networks displays the processing rules table.

4 Perform one of the following to view processing rule information from the table:

To see summary information for a processing rule:

a With your cursor, single click on the selected row.

Trading Networks displays corresponding summary information about the highlighted processing rule in a summary section below the processing rules table. The summary information contains: the processing rule name, description, and processing rule criteria for the selected processing rule.

To find and view a specific processing rule

Note: Trading Networks displays the last query run on the Trading Networks Console.

webMethods Trading Networks User’s Guide Version 6.5 367

Page 368: Web Methods Trading Networks Users Guide 65

C H A P T E R 1 4 P r o c e s s i n g R u l e s

To see the detailed information for a specific processing rule:

a With your cursor, double click on the row containing the processing row you want more detailed information about. Trading Networks displays the Processing Rule Details screen for the selected processing rule.

b On the Processing Rule Details screen, you can:

1 View the information. For more information about the tabs and fields on this screen, see “Defining Processing Rules” on page 347.

2 Edit the information. For more information on how to change the information on the Processing Rule Details screen, see “Updating Processing Rules” on page 373.

To change the display format of the processing rules table:

a Select Show Query on the toolbar. Trading Networks displays the Basic Criteria and Detail View tabs.

b Go to step 7 to change the table format using the Detail View tab.

5 If you cannot find the processing rule you are looking for, you can perform a more

detailed query to refine the results on the processing rules table. Select Show Query on the toolbar. Trading Networks displays the Basic Criteria and Detail View tabs.

6 To narrow down the list of processing rules from which to choose, select the Basic Criteria tab and fill in the fields to specify basic search criteria. To indicate that you want to use one or more of the basic search criteria, select the checkbox next to each criterion you want to use. Then fill out the corresponding information as follows.

368 webMethods Trading Networks User’s Guide Version 6.5

Page 369: Web Methods Trading Networks Users Guide 65

About Querying and Viewing Processing Rules

For this Basic Criteria tab parameter… Select the checkbox and specify…

Sender The sender of the processing rule you want to view.

Optionally, select Perform Implicit Matching to implicitly expand the query results to reflect group membership of your selected sender(s).

For example, if you select a sender group (Group A), the query returns all rules where any of the following conditions are met:

The sender is Group A

The sender is a member of Group A

The rule has a sender criteria of Any (that is, where the processing rule sender was set to Any in the Criteria tab). For more information about the Criteria tab, see step 6 on page 349.

If you do not select this option, the query returns only those rules where the sender is Group A.

Similarly, if you select an individual sender (Partner 1), the query returns all rules where any of the following conditions are met:

The sender is Partner 1

The sender is any group that Partner 1 is a member of

The rule has a sender criteria of Any

If you do not select this option, the query returns only those rules where the sender is Partner 1.

To specify one or more senders, click the Select Profile(s)...

button or the Select Profile Group(s)... button. Select the individual sender(s) and/or sender group(s) from the Partner Selection Dialogue or the Profile Group(s) Dialog. For more information about the Select Profile(s)... or the Select Profile Group(s) button, see “Selecting a Partner” on page 34.

webMethods Trading Networks User’s Guide Version 6.5 369

Page 370: Web Methods Trading Networks Users Guide 65

C H A P T E R 1 4 P r o c e s s i n g R u l e s

Receiver The receiver of the processing rule you want to view.

Optionally, select Perform Implicit Matching to implicitly expand the query results to reflect group membership of your selected receiver(s). This option works the same way it works for sender queries.

To specify one or more receivers, click the Select Profile(s)...

button or the Select Profile Group(s)... button. Select the individual receiver(s) and/or receiver group(s) from the Partner Selection Dialogue or the Profile Group(s) Dialog. For more information about the Select Profile(s)... or the Select Profile Group(s) button, see “Selecting a Partner” on page 34.

Document Type The TN document type of the documents processed with this processing rule.

Select Includes rules where document type is “Any” to search for processing rules that were used for any documents regardless of the TN document type. That is, where the processing rule TN document type was set to Any in the Criteria tab. For more information about the Criteria tab, see step 6 on page 349

To specify a TN document type, click the Select Document Type

button. Select the TN document type from the Document Type Selection Dialog.

User Status The user status of the documents that processed by this processing rule.

To specify a user status for the query, click Add New ; then, type the user status in the newly added row.

To remove a user status from a query, select the row containing the user status you want to delete and then click

Delete Selected .

Rule Name The name of the processing rule. Type in a character string contained in the processing rule name.

For this Basic Criteria tab parameter… Select the checkbox and specify…

370 webMethods Trading Networks User’s Guide Version 6.5

Page 371: Web Methods Trading Networks Users Guide 65

About Querying and Viewing Processing Rules

7 Select the Detail View tab and fill in the fields to specify how Trading Networks displays information in the processing rules table.

a In the Display Column panel, check each field that you want Trading Networks to include in the Detail view. Trading Networks displays a column for each checked field. Trading Networks always displays the Ordinals and Rule Name columns. Trading Networks displays the Senders and Receivers columns by default.

b In the Search Order panel, select the search order that you want Trading Networks to follow when performing a query. To change the search order, use the up and down buttons.

You can use the pattern-matching characters “%” in the processing rule name search. For example

Type this: To find:

%str Any string beginning with "str"

str% Any string ending with "str"

str%str Any string beginning and ending with "str"

Last Modified Time

The time Trading Networks last updated the processing rule either when the processing rule was created or last updated. Select an entry from the list.

To specify a date range, select Custom from the list. Then specify dates in the Beginning and Ending fields. You can type in a date

value, or click Select Date to open a dialog that allows you to select the date from a calendar.

Ordinals The ordinal for the processing rule that you are searching for. The ordinal corresponds to the order placement where Trading Networks has assigned the rule you are searching for in the processing rules list.

You can specify an ordinal range by using the From and To fields to indicate the beginning and end of the range.

For this Basic Criteria tab parameter… Select the checkbox and specify…

webMethods Trading Networks User’s Guide Version 6.5 371

Page 372: Web Methods Trading Networks Users Guide 65

C H A P T E R 1 4 P r o c e s s i n g R u l e s

For more information about the Detail view, see “Detail View of Processing Rules” on page 367.

8 Select Run Query on the toolbar. Trading Networks displays the processing rules table with the results from the refined query.

9 Select the processing rule you want from the Processing Rules table on the bottom portion of the screen.

For more information about the tabs and fields on this screen, see “Defining Processing Rules” on page 347.

For more information on how to change the information on the Processing Rule Details screen, see “Updating Processing Rules” on page 373.

For more information about queries in Trading Networks, see “About Viewing and Querying Documents” on page 428.

Managing Processing RulesThe following tables lists the tasks you can perform against processing rules:

Select this... To do this...

Move a search criteria up, select the criteria you want to have

precedence from the Search Order list and then click .

Move a search criteria down, select the criteria you want to have

precedence from the Search Order list and then click .

Task See page...

“Updating Processing Rules” 373

“Disabling Processing Rules” 373

“Enabling Processing Rules” 374

“Deleting Processing Rules” 374

372 webMethods Trading Networks User’s Guide Version 6.5

Page 373: Web Methods Trading Networks Users Guide 65

Managing Processing Rules

Updating Processing RulesTo update a processing rule, perform the following procedure.

1 Start the Trading Networks Console. If you need procedures for this step, see “Starting the Trading Networks Console” on page 22.

2 Select View Processing Rules.

3 Click the row containing the processing rule you want to update.

4 Select Rules Edit.

5 To update the name, type a new name in the Name field. You can specify 1-64 characters. There is no restriction to the characters that you can use.

6 To update the description, type a new description in the Description field. You can specify 1-256 characters. There is no restriction to the characters that you can use.

7 To update the criteria for the processing rule, click the Criteria tab. Then, update the fields. For information about what you can specify, see step 6 on page 349.

8 To update the extended criteria for the processing rule, click the Extended Criteria tab. Then, update the fields. For information about how to update the settings, see step 7 on page 353.

9 To update the pre-processing actions, click the Pre-Processing tab. Then, update the pre-processing actions. For information about how to update the settings, see step 8 on page 353.

10 To update the processing actions, click the Action tab. Then, update the processing actions. For information about how to update the settings, see step 9 on page 357.

11 Click OK. Trading Networks closes the Processing Rule Details screen and saves the changes to the processing rule.

Disabling Processing RulesIf you want Trading Networks to temporarily stop using a processing rule, you can disable it. When determining the processing rule to use for a document, Trading Networks does not match the document against processing rules that are disabled.

When you want Trading Networks to use the processing rule again, you can enable it; see “Enabling Processing Rules” on page 374. If you no longer need the processing rule and want to permanently remove it, you can delete it; see “Deleting Processing Rules” on page 374.

To update a processing rule

webMethods Trading Networks User’s Guide Version 6.5 373

Page 374: Web Methods Trading Networks Users Guide 65

C H A P T E R 1 4 P r o c e s s i n g R u l e s

1 Start the Trading Networks Console. If you need procedures for this step, see “Starting the Trading Networks Console” on page 22.

2 Select View Processing Rules.

3 Click the row containing the processing rule(s) you want to disable. You can select multiple processing rules using the <Shift> (for a contiguous block of rules) and <Ctrl> (for more than one non-contiguous processing rule) keys.

4 Select Rules Disable. Trading Networks places No in the Enabled column to indicate that the processing rule is disabled.

Enabling Processing RulesIf you disable a processing rule and then later determine that you want Trading Networks to use it again, you can enable it.

1 Start the Trading Networks Console. If you need procedures for this step, see “Starting the Trading Networks Console” on page 22.

2 Select View Processing Rules.

3 Click the row containing the processing rule(s) you want to enable. You can select multiple processing rules using the <Shift> (for a contiguous block of rules) and <Ctrl> (for more than one non-contiguous processing rule) keys.

4 Select Rules Enable. Trading Networks places Yes in the Enabled column to indicate that the processing rule is enabled.

Deleting Processing RulesIf you no longer need a processing rule, you can delete it. This is an actual delete of the processing rule. The processing rule is not deactivated; it is removed from the Trading Networks system. You will not be able to recover it later.

1 Start the Trading Networks Console. If you need procedures for this step, see “Starting the Trading Networks Console” on page 22.

2 Select View Processing Rules.

To disable a processing rule

To enable a processing rule

To delete a processing rule

374 webMethods Trading Networks User’s Guide Version 6.5

Page 375: Web Methods Trading Networks Users Guide 65

Managing Processing Rules

3 Select Run Query on the toolbar. Trading Networks displays the processing rules table.

If you want to delete a processing rule that is currently disabled, make sure that disabled processing rules are visible on the processing rules table. To do so:

a Select Show Query on the toolbar. Trading Networks displays the Basic Criteria and Detail View tabs.

b Select the Detail View tab.

c In the Display Column panel, check the Enabled field so that Trading Networks includes it in the Detail view.

d Select Run Query on the toolbar. Trading Networks updates the processing rules table. Now you can see the disabled processing rules (No in the Enabled column).

4 Click the row containing the processing rule(s) you want to delete. You can select multiple processing rules using the <Shift> (for a contiguous block of rules) and <Ctrl> (for more than one non-contiguous processing rule) keys.

5 Select Rules Delete. Trading Networks confirms that you want to delete the selected processing rule(s). Click Yes to delete.

Important! This is an actual delete of the processing rule. The processing rule is not deactivated; it is removed from the Trading Networks system. You will not be able to recover it later.

webMethods Trading Networks User’s Guide Version 6.5 375

Page 376: Web Methods Trading Networks Users Guide 65

C H A P T E R 1 4 P r o c e s s i n g R u l e s

376 webMethods Trading Networks User’s Guide Version 6.5

Page 377: Web Methods Trading Networks Users Guide 65

C H A P T E R 15

Queues in Trading Networks

What is a Queue? . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 378

Scheduled Delivery Queues . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 378

Defining Public Queues . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 380

Delivery Schedule for Queues . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 384

Scheduled Delivery Queue States . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 390

Defining Queue for Polling . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 394

Viewing Documents in a Queue . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 396

webMethods Trading Networks User’s Guide Version 6.5 377

Page 378: Web Methods Trading Networks Users Guide 65

C H A P T E R 1 5 Q u e u e s i n T r a d i n g N e t w o r k s

What is a Queue?A queue in Trading Networks is a grouping of outbound documents that can be delivered in batch. Note that a Trading Networks queue is not a queue in the traditional sense. Instead, it is a set of rows in the Trading Networks database. When documents are placed in a queue, Trading Networks does not deliver them immediately, rather, Trading Networks delivers them based on a schedule defined for the queue.

Trading Networks supports queues for two different purposes— scheduled delivery and polling.

Scheduled Del ivery QueuesA scheduled delivery queue is a queue for batching documents to be sent to the receiving partners at scheduled times. You define one or more queues that Trading Networks uses for scheduled delivery.

A scheduled delivery queue does not contain documents. Instead, it contains delivery tasks that are associated with documents. All scheduled deliveries use reliable delivery. Reliable delivery is a feature of Trading Networks where Trading Networks attempts to deliver a document to a partner one or more times based on settings that you define in the Delivery Method tab of the partner’s profile:

In your partner’s profile, select Queue for delivery on the Protocol field for the Delivery Method tab. For instructions, see step 6 on page 153.

Complete the queue settings on the Delivery Method tab. For instructions, see step 7 on page 155.

You select the scheduled delivery method in the processing rules with the Deliver Document By processing action.

For more information about delivery methods and queues, see Chapter 6, "Delivering Documents to Partners" in the webMethods Trading Networks Concepts Guide.

For more information about

Scheduled delivery and queues, see Chapter 6, "Delivering Documents to Partners" in the webMethods Trading Networks Concepts Guide.

Delivery information on the partner’s profile, see “Information on the Partner’s Delivery Method Tab” on page 137.

Scheduled delivery and the Deliver Document By processing action, see “Scheduled Delivery” on page 344.

378 webMethods Trading Networks User’s Guide Version 6.5

Page 379: Web Methods Trading Networks Users Guide 65

Scheduled Delivery Queues

As a result, when Trading Networks schedules a document for delivery, Trading Networks also creates a delivery task that maintains information about the delivery of the document. It is this delivery task that Trading Networks places in the queue.

When you define a queue for scheduled delivery, you associate a delivery schedule and scheduled delivery service with the queue. The delivery schedule defines the times that Trading Networks is to invoke the scheduled delivery service to deliver the batched documents that correspond to the delivery tasks that are in the queue.

Trading Networks supports two types of scheduled delivery queues—public and private:

For more information about

Scheduled delivery services, see “What is a Scheduled Delivery Service?” on page 410.

Delivery tasks, see Chapter 19, “Delivery Tasks”.

Type of queue For more information, see...

Public Queues—A queue that can contain delivery tasks that correspond to documents that are aimed for multiple receiving partners.

You configure public queues using the Tools menu of the Console.

For more information about how to configure public queues, see below, “Defining Public Queues” on page 380.

Private Queues—A queue that contains only delivery tasks that correspond to documents aimed for a specific receiving partner.

You define private queues in the partner’s profile on the Delivery Method tab. The queue will only contain delivery tasks that correspond to documents that are to be delivered to the partner defined by the profile.

For more information, see “Information on the Partner’s Delivery Method Tab” on page 137 and refer to step 7 on page 155.

webMethods Trading Networks User’s Guide Version 6.5 379

Page 380: Web Methods Trading Networks Users Guide 65

C H A P T E R 1 5 Q u e u e s i n T r a d i n g N e t w o r k s

Defining Publ ic QueuesA public queue is a queue that can contain delivery tasks that correspond to documents that are aimed for multiple receiving partners. This section describes how to define public queues, including adding, copying, editing, and deleting public queues.

Use the following procedure to add a public queue to Trading Networks or to edit or duplicate an existing public queue.

2 Select Tools Registry Public Queues.

3 Perform one of the following procedures to add a new public queue or to edit or duplicate an existing one.

To add, edit, or copy a public queue1 Start the Trading Networks Console. If you need procedures for this step, see

“Starting the Trading Networks Console” on page 22.

Method to select queue Procedures

New— The public queue fields are empty. Click Add New to add a new public queue.

Edit— Edit an existing public queue’s fields.

1 Select the public query for which you want to update and click to select.

2 Click Edit to edit the selected public queue.

Copy— Use this function to rapidly create queues and schedules with roughly the same values.

The public queue fields are filled with values from the public queue that you duplicate, and you can update any or all fields from the duplicated public queue.

1 Select the public query for which you want to update and click to select.

2 Click Copy Selected to copy the selected public queue fields.

380 webMethods Trading Networks User’s Guide Version 6.5

Page 381: Web Methods Trading Networks Users Guide 65

Defining Public Queues

3 Select the Settings tab. Specify the following parameters to add or edit a public queue to Trading Networks:

For this Public Queues Settings parameter… Specify…

Queue Name The name you want the public queue to have. Public queues that you define here are the ones in your partner’s profile. These public queue names appear on the Delivery Method tab of your partner’s profile.

You can specify a string of up to 225 characters and you can specify any alphanumeric character.

Delivery Service Select a scheduled delivery service that will deliver documents from the queue. A scheduled delivery service acts on multiple documents to deliver those documents to one or more partners.

Out-of-the-box, Trading Networks provides a single scheduled delivery service, Batch FTP (wm.tn.transport:batchFtp service), which uses FTP to deliver documents to a single destination. Select the delivery service from Batch FTP or any custom created scheduled delivery services, if they exist.

If you created a custom delivery service and registered them with Trading Networks, then you can associate your custom scheduled delivery services with the queues that you define.

For more information about scheduled delivery services, see “What is a Scheduled Delivery Service?” on page 410. For more information about custom delivery services, see “Adding and Registering New Delivery Services” on page 421.

Set Inputs Click the Set Inputs button to set the inputs for the delivery service you selected.

If you selected Batch FTP for your delivery service, specify the required inputs (host, transfermode, and transfertype) and then click OK to set the inputs.

See the description of the wm.tn.transport:batchFtp service in the webMethods Trading Networks Built-in Services Reference for a description of the inputs into this service.

webMethods Trading Networks User’s Guide Version 6.5 381

Page 382: Web Methods Trading Networks Users Guide 65

C H A P T E R 1 5 Q u e u e s i n T r a d i n g N e t w o r k s

Queue State Set the state of the public queue. The state of a scheduled delivery queue determines: 1) whether Trading Networks can add delivery tasks to the queue and 2) whether Trading Networks can deliver documents associated with the delivery tasks in the public queue.

Select from the following queue states:

Enable Queue

Enable a queue when you want Trading Networks to be able to both add delivery tasks into a queue and invoke the scheduled delivery service that is associated with the queue to deliver the documents that correspond to the delivery tasks.

Disable Queue

Disable a queue when you want Trading Networks to neither add additional delivery tasks into a queue nor act on the delivery tasks in the queue.

All delivery tasks that are in the queue when you disable it remain in the queue. If you enable or drain the queue, Trading Networks will once again invoke the scheduled delivery service that is associated with the queue to deliver the documents that correspond to those delivery tasks.

There are two reasons you might wish to disable a queue. 1) If the delivery service is defective and you need to debug and fix it, or 2) if a processing rule has been placed on the wrong queue and you need to change the rule and/or reassign some tasks to another queue.

For this Public Queues Settings parameter… Specify…

382 webMethods Trading Networks User’s Guide Version 6.5

Page 383: Web Methods Trading Networks Users Guide 65

Defining Public Queues

4 Select the Schedule tab to schedule when Trading Networks is to invoke the scheduled delivery service to deliver the documents in the public queue. Select the scheduling option you would like for the delivery service. See “Delivery Schedule for Queues” on page 384 for more information about the Schedule tab parameters to specify.

If you use the webMethods Administrator to view scheduled user tasks, you will see a scheduled invocation of the wm.tn.queuing:deliverBatch service for each delivery queue you have saved. The wm.tn.queuing:deliverBatch service handles exceptions and logging, and invokes the scheduled delivery service you specified for the delivery queue.

5 Click Save.

Drain Queue

Drain a queue when you do not want Trading Networks to add additional delivery tasks into a queue, but you do want Trading Networks to continue to invoke the scheduled delivery service that is associated with the queue to deliver the documents that correspond to the delivery tasks. Drain a queue if you want to empty it, so you can delete it. You can also drain a queue to perform maintenance changes (e.g., change queue settings, update delivery services).

Suspend Delivery

Suspend a queue when you want Trading Networks to be able to add additional delivery tasks into a queue, but you do not want Trading Networks to invoke the scheduled delivery service that is associated with the queue to deliver the documents that correspond to the delivery tasks. You might suspend a queue if a trading partner indicates that it is temporarily unable to accept documents.

For this Public Queues Settings parameter… Specify…

Important! Do not attempt to use the webMethods Administrator to change the schedule for a delivery service! If you do so, the data passed to the service will be lost and the service will be unable to deliver documents. Always use the Trading Networks Console to change the delivery schedule and other queue settings.

webMethods Trading Networks User’s Guide Version 6.5 383

Page 384: Web Methods Trading Networks Users Guide 65

C H A P T E R 1 5 Q u e u e s i n T r a d i n g N e t w o r k s

Use the following procedure to delete public queues from Trading Networks.

1 Start the Trading Networks Console. If you need procedures for this step, see “Starting the Trading Networks Console” on page 22.

2 Select Tools Registry Public Queues.

3 Select the public query for which you want to update and click to select.

4 Click Delete to delete the selected public queue.

Del ivery Schedule for QueuesThis section describes how often you want Trading Networks to invoke the scheduled delivery service that is associated with a queue. When you define a scheduled delivery queue, you also associate a delivery schedule and a scheduled delivery service with the queue.

The delivery schedule defines the times that Trading Networks invokes the scheduled delivery service, which acts on the delivery tasks in the queue to deliver the corresponding batched documents.

The delivery service acts on the delivery tasks in the queue when and how often you specify on the Schedule tab:

Run Once. Trading Networks executes the delivery service a single time.

Simple Interval. Trading Networks executes the delivery service repeatedly at an interval you specify.

Complex Interval. Trading Networks runs the delivery service on the day(s) and at the time(s) that you specify either during a specified date range or indefinitely

For more information about scheduled delivery services, see “What is a Scheduled Delivery Service?” on page 410.

To delete public queues

Important! Do not attempt to use the webMethods Administrator to change the schedule for a delivery service! If you do so, the data passed to the service will be lost and the service will be unable to deliver documents. Always use the Trading Networks Console to change the delivery schedule and other queue settings

384 webMethods Trading Networks User’s Guide Version 6.5

Page 385: Web Methods Trading Networks Users Guide 65

Delivery Schedule for Queues

Using the Run Once OptionWhen you schedule a queue delivery using the Run Once option, Trading Networks executes the delivery service (specified on the Settings tab) one time on the date and at the time that you specify. At that time, Trading Networks uses the scheduled delivery service to act on all the delivery tasks in the queue.

When using the Run Once option, delivery tasks can get “stuck” in the queue. If the scheduled delivery service fails to deliver documents associated with the delivery tasks in the queue, the delivery tasks remain in the queue. Also, once scheduled delivery service is invoked, Trading Networks does not act on new tasks added to the queue. These tasks will remain in the queue with a QUEUED status. Because the queue is set up to run the scheduled delivery service only one time, Trading Networks will not act on the QUEUED tasks again unless you update the queue schedule.

webMethods includes the Run Once option for use in a development environment.

Using the Simple Interval OptionWhen you schedule a queue delivery using the Simple Interval option, Trading Networks executes the delivery service (specified on the Settings tab) for the first time immediately after you add the delivery task. Trading Networks continues to execute the delivery service at the interval you specify. You specify the interval in seconds. For example, if you want Trading Networks to execute the delivery service every 24 hours, specify 86400 seconds for the interval.

By default, when you schedule a delivery service to repeat, Trading Networks bases the repeat interval on when the task starts. For example, if you specify a repeat interval of 3600 seconds, Trading Networks starts the task and schedules the next execution for 3600 seconds after the previous execution began.

There may be times however when you want Trading Networks to wait for a delivery service to complete execution before it starts the next scheduled execution of the service. For example, suppose your delivery service is scheduled to run every minute, but sometimes takes longer than that to complete. By default, Trading Networks will start the next subsequent execution even though the previous one has not yet completed. To have Trading Networks wait for the service to complete before beginning its next scheduled execution, check the Do not overlap task box.

With the Simple Interval option, there is no end date or time associated with a repeating delivery task. Trading Networks continues to execute the delivery service until you change the queue schedule. If you want to specify an end date or time, use the Complex Interval option, described below.

Note: If the scheduled run-time occurs when the server is not running, when you initialize server, the server throws an exception.

webMethods Trading Networks User’s Guide Version 6.5 385

Page 386: Web Methods Trading Networks Users Guide 65

C H A P T E R 1 5 Q u e u e s i n T r a d i n g N e t w o r k s

Using the Complex Interval OptionThe Complex Interval option offers the greatest flexibility for specifying when you want Trading Networks to execute the delivery service for the queue.

Specify any combination of the following settings to indicate when and how often you want Trading Networks to execute the scheduled delivery service:

Trading Networks combines all your selections to determine when to execute the scheduled delivery service. If you do not select an item in one of the above settings, Trading Networks assumes all items for the selection. For example, if you do not specify a

Complex Interval Setting Indicates…

Start Date The date on which you want Trading Networks to execute the delivery service for the first time. Use the format yyyy/mm/dd to specify the date. If you leave this field blank, Trading Networks executes the task at the first date specified by the remaining settings.

Start Time The time at which you want Trading Networks to begin executing the delivery service. Use the format hh:mm:ss to specify the time (using a 24-hour clock). If you leave this field blank, Trading Networks uses 00:00:00 (midnight).

End Date The date on which you want Trading Networks to execute the delivery service for the last time. Use the format yyyy/mm/dd to specify the date. If you leave this field blank, Trading Networks executes the service for an indefinite period of time.

End Time The time on the last date at which you want Trading Networks to execute the delivery service. Use the format hh:mm:ss to specify the time (using a 24-hour clock). If you leave this field blank, Trading Networks uses 00:00:00 (midnight).

Run Mask Settings

Months The months (January through December) that you want Trading Networks to execute the delivery service.

Days The days of the months (1 through 31) that you want Trading Networks to execute the delivery service.

Weekdays The days of the week (Sunday through Saturday) that you want Trading Networks to execute the delivery service.

Hours The hours of the days that you want Trading Networks to execute the delivery service.

Minutes The minute of the hour that you want Trading Networks to execute the delivery service.

386 webMethods Trading Networks User’s Guide Version 6.5

Page 387: Web Methods Trading Networks Users Guide 65

Delivery Schedule for Queues

month, Trading Networks assumes you want the service to execute every month. If you do not select any items for any of the settings, Trading Networks assumes you want the service to execute every month, every day, all week days, every hour, and every minute; in other words, Trading Networks executes the scheduled delivery service every minute from the time you add the task.

If you use the Start Date and End Date to specify a date range, Trading Networks executes the delivery service at the scheduled times until the end of the time period. All delivery tasks added to the queue after the End Date are “stuck” in the queue. Trading Networks will not act on the queued tasks again unless you update the queue schedule.

If you do not specify an End Date to specify a date range, Trading Networks executes the delivery service for an indefinite period of time.

The following shows examples of how to use the Complex Interval settings:

If you want the delivery service to execute... For this setting: Specify...

The 28th day of every month at midnight for the year 2002.

Start Date 2002/01/01

Start Time 00:10:00

End Date 2002/12/31

End Time 00:00:00 (or leave blank)

Months no selection

Days 28

Weekdays no selection

Hours 0

Minutes 0

Every Monday in the months of January, February, and March at 2:30 p.m. for an indefinite period of time.

Start Date leave blank

Start Time leave blank

End Date leave blank

End Time leave blank

Months January, February, March

Days no selection

Weekdays Monday

Hours 14

Minutes 30

webMethods Trading Networks User’s Guide Version 6.5 387

Page 388: Web Methods Trading Networks Users Guide 65

C H A P T E R 1 5 Q u e u e s i n T r a d i n g N e t w o r k s

1 Start the Trading Networks Console. If you need procedures for this step, see “Starting the Trading Networks Console” on page 22.

2 Select Tools Registry Public Queues.

3 Select a public queue for scheduling a delivery. You can add a new queue, or edit or copy an existing one as follows:

To add a new public queue, click Add New .

To edit an existing public queue, select the queue and click Edit .

Every hour of every Tuesday of the month of June, 2002.

Start Date 2002/06/01

Start Time 00:00:00 (or leave blank)

End Date 2002/06/30

End Time 23:59:59

Months June

Days no selection

Weekdays Tuesday

Hours no selection

Minutes 0

Every minute of every hour of every Tuesday of the month of June, 2002.

Start Date 2002/06/01

Start Time 00:00:00 (or leave blank)

End Date 2002/06/30

End Time 23:59:59

Months June

Days no selection

Weekdays Tuesday

Hours no selection

Minutes no selection

If you want the delivery service to execute... For this setting: Specify...

To schedule the execution of a delivery service for a public queue

388 webMethods Trading Networks User’s Guide Version 6.5

Page 389: Web Methods Trading Networks Users Guide 65

Delivery Schedule for Queues

To copy an existing public queue, select the queue and click Copy Selected .

The fields of the copied queue are filled with values from the queue that you copied. You can update any or all fields from the copied public queue.

4 Select the Schedule tab.

5 Select Run Once, Simple Interval, or Complex Interval to indicate when and how often you want Trading Networks to execute the delivery service for the specified queue.

If you select... Specify...

Run Once The date on which you want Trading Networks to execute the service in the Date field. Use the format yyyy/mm/dd to specify the date. For example, if you want Trading Networks to execute the service on March 11, 2002, specify 2002/03/11.

The time at which you want Trading Networks to execute the service in the Time field. Use the format hh:mm:ss to specify the time (using a 24-hour clock). For example, if you want Trading Networks to execute the service at 1:00:00 a.m., specify 1:00:00; if you want Trading Networks to execute the service at 1:00:00 p.m., specify 13:00:00. If you leave this field blank, Trading Networks uses 00:00:00 (midnight).

For more information about using this option, see “Using the Run Once Option” on page 385“.

Simple Interval The number of seconds that you want Trading Networks to wait between executions of the service in the Interval field.

If you want Trading Networks to wait for a delivery service to complete execution before it starts the next scheduled execution of the service, check Do not overlap task. For example, suppose your delivery service is scheduled to run every minute, but sometimes takes longer than that to complete. By default, Trading Networks will start the next execution even though the previous one has not yet completed. If you check the Do not overlap task box, Trading Networks will wait for the service to complete before beginning its next scheduled execution.

When you add or update a simple interval schedule for a queue that is Enabled or Draining, Trading Networks invokes the service immediately. Subsequent invokes are governed by the interval.

For more information about using this option, see “Using the Simple Interval Option” on page 385.

webMethods Trading Networks User’s Guide Version 6.5 389

Page 390: Web Methods Trading Networks Users Guide 65

C H A P T E R 1 5 Q u e u e s i n T r a d i n g N e t w o r k s

6 Click Save.

Scheduled Del ivery Queue StatesYou can manage your scheduled delivery queues by enabling, disabling, draining, and suspending them. These actions change the state of the queue, which defines whether Trading Networks can add delivery tasks into a queue and whether Trading Networks can deliver the documents that correspond to the delivery tasks in the queues.

Complex Interval When you want the first execution of this service by specifying a beginning date and time in the Start Date and Start Time fields. For Start Date, use the format yyyy/mm/dd. For Start Time, use the format hh:mm:ss (using a 24-hour clock). For example, if you want the time period in which to run this service to begin be on May 3, 2002 at 1:00:00 p.m., specify 2002/05/03 for Start Date and 13:00:00 for Start Time. If you omit the Start Date, the first execution occurs on the first date as indicated by the Run Mask parameters. If you omit Start Time, Trading Networks uses 00:00:00 (midnight).

When you want the last execution of this service to run by specifying an ending date and time in the End Date and End Time fields. For End Date, use the format yyyy/mm/dd. For the End Time, use the format hh:mm:ss (using a 24-hour clock). For example, if you want the time period in which to run this service to end on June 4, 2002 at 2:00:00 a.m., specify 2002/06/04 for End Date and 02:00:00 for End Time. Omitting End Date indicates that you want this service to execute for an indefinite period of time. If you omit End Time, Trading Networks uses 00:00:00 (midnight).

Use the Run Mask parameters to indicate when you want Trading Networks to execute the service. For examples of setting these parameters, see “Using the Complex Interval Option” on page 386.

If you select... Specify...

State Meaning

Enabled Trading Networks can place delivery tasks into the queue and can invoke the scheduled delivery service to deliver the documents that are associated with the delivery tasks in the queue.

Disabled Trading Networks cannot place delivery tasks into the queue or deliver documents that are associated with delivery tasks in the queue.

390 webMethods Trading Networks User’s Guide Version 6.5

Page 391: Web Methods Trading Networks Users Guide 65

Scheduled Delivery Queue States

The procedure you use to enable, disable, drain, or suspend a queue depends on whether the queue is a public queue or a private queue.

Changing the State of a Scheduled Delivery QueueThe following table lists the actions you can take to change the state of a queue along with information about each queue state.

Drained Trading Networks cannot place delivery tasks into the queue, but Trading Networks can invoke the scheduled delivery service to deliver the documents that are associated with the delivery tasks in the queue.

Suspended Trading Networks can place delivery tasks into the queue, but Trading Networks cannot deliver documents that are associated with delivery tasks that are in the queue.

Meaning

Enable Enable a queue when you want Trading Networks to be able to both add delivery tasks into a queue and invoke the scheduled delivery service that is associated with the queue to deliver the documents that correspond to the delivery tasks.

Disabled Disable a queue when you want Trading Networks to neither add additional delivery tasks into a queue nor act on the delivery tasks in the queue.

All delivery tasks that are in the queue when you disable it remain in the queue. If you enable or drain the queue, Trading Networks will once again invoke the scheduled delivery service that is associated with the queue to deliver the documents that correspond to those delivery tasks.

Two reasons that you might want to disable a queue are 1) to debug and correct a delivery service that is used for the queue or 2) correct a processing rule that is assigning documents to the wrong queue.

When the Deliver Document By processing action of a processing rule specifies to use a queue that is disabled, the delivery fails because Trading Networks cannot place the delivery task in the queue. Trading Networks sets the delivery task status to FAILED and logs a message to the activity log.

State Meaning

webMethods Trading Networks User’s Guide Version 6.5 391

Page 392: Web Methods Trading Networks Users Guide 65

C H A P T E R 1 5 Q u e u e s i n T r a d i n g N e t w o r k s

Changing the State of a Public QueueTo state of a public queue, perform the following procedure:

1 Start the Trading Networks Console. If you need procedures for this step, see “Starting the Trading Networks Console” on page 22.

2 Select Tools Registry Public Queues.

3 In the Public Queues screen, select the queue that you want to change from the Queue Name list on the left side of the screen.

4 Click Edit Selected .

Drained Drain a queue when you do not want Trading Networks to add additional delivery tasks into a queue, but you do want Trading Networks to continue to invoke the scheduled delivery service that is associated with the queue to deliver the documents that correspond to the delivery tasks. Drain a queue if you want to empty it, so you can delete it. You can also drain a queue to perform maintenance changes (e.g., change queue settings, update delivery services).

When the Deliver Document By processing action of a processing rule specifies to use a queue that is drained, the delivery fails because Trading Networks cannot place the delivery task in the queue. In this situation, Trading Networks sets the delivery task status to FAILED and logs a message to the activity log.

Suspended Suspend a queue when you want Trading Networks to be able to add additional delivery tasks into a queue, but you do not want Trading Networks to invoke the scheduled delivery service that is associated with the queue to deliver the documents that correspond to the delivery tasks. You might suspend a queue if a trading partner indicates that it is temporarily unable to accept documents.

All delivery tasks that are in the queue when you suspend it remain in the queue. If you enable or drain the queue, Trading Networks will once again invoke the scheduled delivery service that is associated with the queue to deliver the documents that correspond to those delivery tasks.

Meaning

To change the queue state of a public queue

392 webMethods Trading Networks User’s Guide Version 6.5

Page 393: Web Methods Trading Networks Users Guide 65

Scheduled Delivery Queue States

5 Select the Settings tab.

For Queue State, select the queue state you want: Enable Queue, Disable Queue, Drain Queue, or Suspend Delivery.

6 Click Save.

Changing the State of a Private QueueTo state of a private queue, perform the following procedure:

2 Select View Trading Partners.

3 Select Show Query on the toolbar.Trading Networks displays the Basic Criteria and Detail View tabs.

4 Perform one of the following to identify partner with which the private queue is associated:

To select from all partners:

Select a partner from the Profiles table on the bottom portion of the screen.

To narrow down the list of partners from which to choose:

Perform a profile search. For more information, see “Finding and Viewing Profiles” on page 168.

5 Select the Delivery Method tab of the partner profile.

6 Click Edit Destination to update the New Protocol sub-tab.

7 Next to the Use Private Queue option, click the Edit button.

8 Select the Settings tab.

9 For Queue State, select the queue state you want: Enable Queue, Disable Queue, Drain Queue, or Suspend Delivery.

10 Click OK.

11 Click Save.

To enable a private queue1 Start the Trading Networks Console. If you need procedures for this step, see

“Starting the Trading Networks Console” on page 22.

Note: Trading Networks displays the last query run on the Trading Networks Console.

webMethods Trading Networks User’s Guide Version 6.5 393

Page 394: Web Methods Trading Networks Users Guide 65

C H A P T E R 1 5 Q u e u e s i n T r a d i n g N e t w o r k s

Defining Queue for Pol l ingThe queue for polling is an internally-defined queue that contains documents. Trading Networks does not deliver the documents in this queue. Instead, Trading Networks waits for a partner to poll for the documents. When a specific partner polls for documents, Trading Networks returns all documents in the queue for which the polling partner is the receiver. Trading Networks handles the management of the queue for polling. You cannot enable, disable, drain, or suspend this queue. This queue is always enabled.

Your trading partners that poll your system for documents determine the method (e.g., HTTP) to use when requesting documents in your queue and how frequently to poll your system for documents.

You can define the polling method (e.g., HTTP) you want to use when polling for documents that reside in your partners’ systems and how frequently you want your Trading Networks system to poll your partners’ systems for documents. The polling method and polling frequency you use for a specific partner is defined on the Delivery Method tab of the partner’s profile. For more information about the polling information in your partner’s profile, see “Information on the Partner’s Delivery Method Tab” on page 137.

Setting up Queue for Poll ing to Poll on a Partner ’s SystemThis section describes how Trading Networks queues documents for polling and how the receiving partner polls for documents. To set up your Trading Networks system so it polls for documents on a partner’s system, perform the following::

1 Define the polling method and polling frequency.

The polling method specifies how your Trading Networks system accesses a partner’s system to request queued documents.

The polling frequency specifies how often your Trading Networks system polls one of your partner’s system for documents.

These settings are defined on a per partner basis. You specify them on the Delivery Method tab of the partner’s profile. For more information, see “Information on the Partner’s Delivery Method Tab” on page 137.

2 Optionally, indicate that the preferred way you want to receive documents is through polling by setting the Preferred Protocol in your profile to Queue for polling. For more information, see “Information on Your Delivery Method Tab” on page 111.

To set up Queue for polling

394 webMethods Trading Networks User’s Guide Version 6.5

Page 395: Web Methods Trading Networks Users Guide 65

Defining Queue for Polling

Setting up Queue for Poll ing for webMethods for PartnersThis section describes how to set up queue for polling for a server running webMethods for Partners. If you are running webMethods Trading Networks, there is no additional setup.

1 Make sure the partner Integration Server running webMethods for Partners and the hub Integration Server running webMethods Trading Networks have the correct license keys (that is, the partner server uses the partner key and the hub server uses the hub key).

2 Locate the server configuration file at <ServerDirectory>\config\server.cnf, where ServerDirectory is the directory in which you installed the Integration Server running webMethods for Partners.

3 In the server configuration file, ensure that the watt.server.partner property exists and is set properly. The property should be set to the host name for the hub Integration Server. For example, if the host name for the hub Integration Server were “HostName,” the property would be watt.server.partner=HostName

If the watt.server.partner property is missing or incorrect, add or update the property. To do so, you need to first shut down the Integration Server running webMethods for Partners. After you add or update the property, restart the Integration Server.

To set up Queue for polling

Note: Note: If the watt.server.partner property is missing or set incorrectly, the partner server will be unable to request the documents queued for it on the hub server. If the property exists but is set incorrectly, the partner server will throw an exception when attempting to request queued documents.

webMethods Trading Networks User’s Guide Version 6.5 395

Page 396: Web Methods Trading Networks Users Guide 65

C H A P T E R 1 5 Q u e u e s i n T r a d i n g N e t w o r k s

Viewing Documents in a QueueWhen Trading Networks places a document or delivery task associated with a document in a queue, it updates the processing status of the document to indicate that it is in a queue. You can use the Transaction Analysis screen to list documents that are in queues.

Viewing Documents that are Scheduled for DeliveryWhen Trading Networks places a document in the queue for scheduled delivery, it changes the processing status of the document to QUEUED. This indicates the document is in a scheduled delivery queue, but has not yet been successfully delivered to the receiving partner.

After the scheduled delivery service that is associated with the queue delivers the document, Trading Networks updates the status to one of the following:

DONE—if Trading Networks delivered the documents without error

DONE W/ ERRORS—if Trading Networks encountered errors when attempting to deliver the document

To view the documents in your system that are scheduled for delivery, perform the following procedure.

1 Start the Trading Networks Console. If you need procedures for this step, see “Starting the Trading Networks Console” on page 22.

2 Select View Transaction Analysis.

3 Select Show Query on the toolbar to display the query panels if they are not already displayed.

4 Click the Basic Criteria tab and fill in the fields to specify basic search criteria. To specify that you want to view documents that are queued for delivery, select the Processing Status check box, and select QUEUED from the list.

Fill in any other basic criteria to refine your search as you want. For more information on what you can specify see step 4 on page 442.

5 To use custom search criteria to refine your search, click the Custom Criteria tab and fill in the fields. For more information on what you can specify see step 5 on page 445.

6 To specify the columns you want displayed in the detail view, click the Detail View tab and fill in the fields. For more information on how to use this tab see step 6 on page 445.

To view documents that are scheduled for delivery

396 webMethods Trading Networks User’s Guide Version 6.5

Page 397: Web Methods Trading Networks Users Guide 65

Viewing Documents in a Queue

7 Select Run Query on the toolbar. Trading Networks updates the Transactions table in the bottom panel.

Viewing Documents that are Queued for Poll ingWhen Trading Networks places a document in the queue for polling, it changes the processing status of the document to POLLABLE. This indicates the document is available for the receiving partner to poll for it.

After the receiving partner polls and receives the document, Trading Networks updates the status to one of the following:

ACCEPTED—if the receiving partner picked up the document and indicated that it was processed successfully

ACCEPTED W/ ERRORS—if the receiving partner picked up the document, but encountered errors while attempting to process the document

To view the pollable documents in your system that are queued for a partner, perform the following procedure.

1 Start the Trading Networks Console. If you need procedures for this step, see “Starting the Trading Networks Console” on page 22.

2 Select View Transaction Analysis.

3 Select Show Query on the toolbar to display the query panels if they are not already displayed.

4 Click the Basic Criteria tab and fill in the fields to specify basic search criteria. To specify that you want to view pollable documents, select the Processing Status check box, and select POLLABLE from the list.

Fill in any other basic criteria to refine your search as you want. For more information on what you can specify see step 4 on page 442.

5 To use custom search criteria to refine your search, click the Custom Criteria tab and fill in the fields. For more information on what you can specify see step 5 on page 445.

6 To specify the columns you want displayed in the detail view, click the Detail View tab and fill in the fields. For more information on how to use this tab see step 6 on page 445.

7 Select Run Query on the toolbar. Trading Networks updates the Transactions table in the bottom panel.

To view pollable documents

webMethods Trading Networks User’s Guide Version 6.5 397

Page 398: Web Methods Trading Networks Users Guide 65

C H A P T E R 1 5 Q u e u e s i n T r a d i n g N e t w o r k s

398 webMethods Trading Networks User’s Guide Version 6.5

Page 399: Web Methods Trading Networks Users Guide 65

C H A P T E R 16

Queries in Trading Networks

Running Queries in Trading Networks . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 400

Enabling the Query Functions . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 402

Creating and Saving a Query . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 404

Selecting and Running a Query . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 405

Updating the Search Criteria for a Saved Query . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 406

Saving a New Query Based on an Existing Query . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 407

Reverting to a Saved Query . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 407

Deleting Saved Queries . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 408

webMethods Trading Networks User’s Guide Version 6.5 399

Page 400: Web Methods Trading Networks Users Guide 65

C H A P T E R 1 6 Q u e r i e s i n Tr a d i n g N e t w o r k s

Running Queries in Trading NetworksYou can perform queries in most of the Trading Networks Console screens. The query functions that you can access are dependent on the screen view you have selected from the Selector Panel buttons. For example, if you are using the Trading Partners screen, the query functions you can perform for profiles on the Basic Criteria, Custom Criteria, and Detail View query tabs are different than the query functions that you can access on the Basic Criteria and Detail View query tabs on the Processing Rules screen.

However, the basic query functions that you can access on the Trading Networks Console toolbar are the same. To perform queries in Trading Networks, use the query buttons on the Console toolbar, as shown below in the example below.

Location of the query toolbar on the Trading Partners screen

Query toolbar on theTrading Partners

screen

Enlarged view of theQuery toolbar

Queries List

400 webMethods Trading Networks User’s Guide Version 6.5

Page 401: Web Methods Trading Networks Users Guide 65

Running Queries in Trading Networks

The following table lists the query functions that correspond with the Trading Networks Console toolbar, along with a description of each function.

Trading Networks lists all of the saved queries in the Queries List on the toolbar.

This query toolbar item... Represents...

Show Query. Displays the query panels for a screen.

Hide Query. Removes the query panels from a screen.

Run Query. Runs the query using the settings you specified on the query panels.

[Queries List] Queries List. Drop-down list of all saved queries. Trading Networks displays the last query run on the Console

Save Query. Updates the current query by saving the changes you have made to the query criteria

Save Query As. Creates a new saved query by saving the query criteria that you specified.

Revert to Saved Query. Reverts the query information and resets it to the saved query settings in the database.

Delete Query. Deletes the currently selected query.

webMethods Trading Networks User’s Guide Version 6.5 401

Page 402: Web Methods Trading Networks Users Guide 65

C H A P T E R 1 6 Q u e r i e s i n Tr a d i n g N e t w o r k s

Enabl ing the Query Funct ionsTo perform queries in Trading Networks, first enable the query tabs so that you can view and access the query tabs. For example, the query functions may not initially appear on your Console screen, as shown below.

The Trading Partners screen with no query tabs displayed

Use the following buttons on the very left of the toolbar to display the query tabs and panels.

Display areashowing only the

query results table(e.g,. Profiles table)

Can you see query panels? Click this button... To perform this action...

No Show Query

Display the query panels.

Yes Hide Query

Remove/Hide the query panels.

402 webMethods Trading Networks User’s Guide Version 6.5

Page 403: Web Methods Trading Networks Users Guide 65

Enabling the Query Functions

So, to view the above Trading Partners screen with the query tabs, click Show Query on the toolbar.

Trading Partners screen displayed with query tabs

Using the Query panel of the toolbar, you can perform basic search functions: create and save a query, select and run a query, revert back to the original query, and delete a query.

Display areashowing

query tabs...

... and the queryresults table (e.g,

Profiles table) below

webMethods Trading Networks User’s Guide Version 6.5 403

Page 404: Web Methods Trading Networks Users Guide 65

C H A P T E R 1 6 Q u e r i e s i n Tr a d i n g N e t w o r k s

Creat ing and Saving a QueryIf you plan to use the same query multiple times, you can save the query. Trading Networks adds the query to the drop-down list of saved queries located on the Query section of the toolbar. When you want to use the same query again, you simply select that saved query.

a For the Basic Criteria query tab:

b For the Custom Criteria query tab:

To create and save a query1 Enable the query panel. For instructions, see “Enabling the Query Functions” on

page 402.

2 For each of the query tabs, select the checkbox next to each criterion you want to use for your query, then fill out the corresponding information.

Note: The screen information Trading Networks displays for each query tab will vary on what function you have selected. For example, the Basic Criteria tab for the Trading Partners profile screen view will differ from the Basic Criteria tab for the Processing Rules screen.

If it appears on this screen For more information to fill out this tab, see:

Trading Partners Step 4a of “About Querying and Viewing Profiles” on page 166

Processing Rules Step 6a of “Finding and Viewing Processing Rules” on page 367

Transaction Analysis Step 4 of “Transaction Analysis Basic Search Criteria” on page 429

Activity Log Step 4 of “Viewing Entries that Relate to Enterprise or a Partner” on page 498

If it appears on this screen For more information to fill out this tab, see:

Trading Partners Step 4b of “About Querying and Viewing Profiles” on page 166

Transaction Analysis Step 5 of “Transaction Analysis Custom Search Criteria” on page 437

Activity Log Step 5 of “Viewing Entries that Relate to Enterprise or a Partner” on page 498

404 webMethods Trading Networks User’s Guide Version 6.5

Page 405: Web Methods Trading Networks Users Guide 65

Selecting and Running a Query

c For the Detail View query tab:

d A query function is available for the TPAs and tasks.

3 To run the query, select Run Query on the toolbar. Trading Networks displays the query results table in the bottom panel. For more information, see “Navigating Through the Results Table” below.

4 To save the query, select Save As... on the toolbar.

5 In the Save as dialog box, type the name you want to give the query in the Query Name field.

6 Click OK. Trading Networks adds the query to the list of saved queries, which is located on the toolbar.

Select ing and Running a QueryTo run an existing query, perform the following procedure.

2 Select the query from the list of saved queries, which is located on the toolbar.

If it appears on this screen For more information to fill out this tab, see:

Trading Partners Step 4c of “About Querying and Viewing Profiles” on page 166

Processing Rules Step 7 of “Finding and Viewing Processing Rules” on page 367

Transaction Analysis Step 6 of “Transaction Analysis Custom Search Criteria” on page 437

For these elements... For more information about the query pane, see:

Agreements (TPAs) “Finding and Viewing TPAs” on page 185

Delivery Tasks “Finding and Viewing Delivery Tasks” on page 472

Service Execution Tasks “Finding and Viewing Service Execution Tasks” on page 485

To select and run a query1 Enable the query panel. For instructions, see “Enabling the Query Functions” on

page 402. Trading Networks displays the last query that was run in this screen view.

webMethods Trading Networks User’s Guide Version 6.5 405

Page 406: Web Methods Trading Networks Users Guide 65

C H A P T E R 1 6 Q u e r i e s i n Tr a d i n g N e t w o r k s

3 To run the query, select Run Query on the toolbar. Trading Networks displays the query results in the results table in the bottom panel.

Navigating Through the Results TableUse the following buttons (located in the lower right corner of the screen) to help you move through the results table:

Updat ing the Search Cri ter ia for a Saved QueryAfter you save a document query, you can update the search criteria for the saved document query.

1 Enable the query panel. For instructions, see “Enabling the Query Functions” on page 402.

2 Select the query for which you want to update search criteria from the list of saved queries, which is located on the toolbar.

3 Make your changes to the search criteria for the saved query by updating the fields on the query tabs.

4 Re-run the query by selecting Run Query on the toolbar. Trading Networks updates the results table displayed in the bottom panel

5 Select Save Query on the toolbar to re-save the query with your updates.

Button When you click this button, Trading Networks…

Displays the first page of the document query results.

Displays the previous page of document query results.

Displays the next page of document query results.

Displays the last page of document query results.

To update a saved document query

406 webMethods Trading Networks User’s Guide Version 6.5

Page 407: Web Methods Trading Networks Users Guide 65

Saving a New Query Based on an Existing Query

Saving a New Query Based on an Exist ing QueryYou can create a new query based on an existing query.

3 Make your changes to the search criteria for the new query by updating the fields on the query tabs.

4 Re-run the modified query by selecting Run Query on the toolbar. Trading Networks updates the results table displayed in the bottom panel with the information from the newly created query.

5 Select Save Query As to save the new query with your changes.

6 In the Save as dialog box, type the name you want to give the query in the Query Name field. Click OK. Trading Networks adds the query to the list.

Revert ing to a Saved QueryIf after you update the query panels and run a query, you decide that you do not want Trading Networks to save the new query settings and instead want Trading Networks to redisplay results using the original saved query, you can revert the query settings to the those of the saved query.

To revert to a saved query, after running a new query, select Revert to Saved Query . Trading Networks updates the query panels to display the settings for the saved query, runs the saved query, and displays the query results

To save a new query based on an existing query1 Enable the query panel. For instructions, see “Enabling the Query Functions” on

page 402.

2 Select the existing query to base the new query on from the list of saved queries, which is located on the toolbar.

Note: The Revert to Saved Query function is only available after you change query settings and run the query.

webMethods Trading Networks User’s Guide Version 6.5 407

Page 408: Web Methods Trading Networks Users Guide 65

C H A P T E R 1 6 Q u e r i e s i n Tr a d i n g N e t w o r k s

Delet ing Saved QueriesIf you no longer need a saved query you can delete it. Perform the following procedure to delete a saved query.

2 Select the query you want to delete from the list of saved queries, which is located on the toolbar.

3 Select Delete Query . Click Yes to verify that you want to delete the query.

To delete a query1 Enable the query panel. For instructions, see “Enabling the Query Functions” on

page 402.

408 webMethods Trading Networks User’s Guide Version 6.5

Page 409: Web Methods Trading Networks Users Guide 65

C H A P T E R 17

Del ivery Services

What is a Delivery Service? . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 410

Creating an Immediate Delivery Service . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . .411

Creating a Scheduled Delivery Service . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 413

Adding and Registering New Delivery Services . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 421

webMethods Trading Networks User’s Guide Version 6.5 409

Page 410: Web Methods Trading Networks Users Guide 65

C H A P T E R 1 7 D e l i v e r y S e r v i c e s

What is a Del ivery Service? A delivery service is a service that webMethods Trading Networks (Trading Networks) invokes to deliver documents to trading partners. Trading Networks supports two types of delivery services—immediate and scheduled delivery.

What is an Immediate Delivery Service?An immediate delivery service is a service that acts on a single document to deliver the document to a single partner. Trading Networks invokes an immediate delivery service when the Deliver Document By processing action in a processing rule indicates to use an immediate delivery method (e.g., Primary HTTP, Secondary HTTP, etc.)

Each immediate delivery method (Primary HTTP, Secondary HTTP, etc.) that Trading Networks provides is associated with a default immediate delivery service that Trading Networks also provides. You can create immediate delivery services that deliver documents in ways not provided by webMethods. You can:

Add new delivery services—When you add a new immediate delivery service, you, in effect, add new immediate delivery methods. The new delivery methods you add by adding new immediate delivery services are available for you to select when you define processing rules; Trading Networks displays the immediate delivery methods you add on the Processing Rules screen in the Immediate Delivery list of the Deliver Document By processing action.

Replace existing delivery services—If one or more of the default immediate delivery services that webMethods provides does not meet your needs, you can create new delivery services to replace the default services.

What is a Scheduled Delivery Service?A scheduled delivery service is a service that acts on multiple documents to deliver those documents to one or more partners. Trading Networks uses scheduled delivery services during scheduled delivery. Scheduled delivery is a way to batch multiple documents that are acted on (delivered) at scheduled times.

You associate scheduled delivery services with delivery queues. You can associate a single scheduled delivery service with one or more delivery queues. Delivery queues also

Note: Use the Trading Networks tn.transport.user property to indicate the user account to use when invoking a delivery service. By default, Trading Networks uses the Administrator user account to invoke services. For more information about this property, see “Trading Networks Configuration Properties” on page 42.

For more information about immediate and scheduled delivery services, see Chapter 6, "Delivering Documents to Partners" in the webMethods Trading Networks Concepts Guide.

410 webMethods Trading Networks User’s Guide Version 6.5

Page 411: Web Methods Trading Networks Users Guide 65

Creating an Immediate Delivery Service

have delivery schedules associated with them. Trading Networks invokes the scheduled delivery service at the times dictated by the delivery schedule.

Trading Networks places delivery tasks in the queues. When the Deliver Document By processing action indicates to use scheduled delivery (i.e., a queue name or Receiver’s Queue), Trading Networks creates a delivery task for the document that is to be delivered and places the delivery task into the queue. When the schedule associated with the queue indicates, Trading Networks invokes the scheduled delivery service. The scheduled delivery service retrieves the list of delivery tasks that are in the queue. It is the responsibility of the scheduled delivery service to retrieve the document, attempt to deliver the document, and update the status of the delivery task to indicate whether the delivery was successful or not.

webMethods provides a single scheduled delivery service, the wm.tn.transport:batchFtp service, which uses FTP to deliver documents to a single destination. This service opens a connection, delivers all the documents, and then closes the connection. If you want to deliver batches of documents in a different way, you can create custom scheduled delivery services and register them with Trading Networks.

After you add new scheduled delivery services, you can define your delivery queues to use your custom scheduled delivery services; Trading Networks displays the scheduled delivery services in the lists of services that you can associate with a queue. For more information about queues, see Chapter 15, “Queues in Trading Networks”.

Creat ing an Immediate Del ivery ServiceAn immediate delivery service must handle a single document that is passed to the service as input.

Your immediate delivery service must implement, at a minimum, the input and output variables that are defined in the specification wm.tn.rec:DeliveryServiceSignature. To view this specification, use the webMethods Developer. The specification is located in the WmTN package.

The input value defined by the specification is the document to be delivered. The output values specified by the specification indicate the outcome of the service. Your service must provide values for the serviceOutput output variable. The serviceOutput variable is an IS document (IData object) that contains the following String variables:

Note: The queue is not a queue in the traditional sense. It is a set of rows in the Trading Networks database. Each queued delivery task that is associated with a document is a row in the same table of the Trading Networks database.

webMethods Trading Networks User’s Guide Version 6.5 411

Page 412: Web Methods Trading Networks Users Guide 65

C H A P T E R 1 7 D e l i v e r y S e r v i c e s

For information about creating the service, see the webMethods Developer User’s Guide.

Retrieving the Content of a Document for Immediate Del iveryTo obtain the document content that needs to be delivered, use the wm.tn.doc:getDeliveryContent service. You pass this service the BizDocEnvelope that represents the document and the service returns the delivery content.

You can use the wm.tn.doc:getDeliveryContent service regardless of whether Trading Networks considers the document large or not. This service determines whether to handle the document as large. If the document is not considered large, the service returns the delivery content as a byte array. If the document is considered large, the service returns the delivery content as a Java InputStream object.

For more information about handling of large documents, see Appendix C, “Large Document Handling”. For more information about the wm.tn.doc:getDeliveryContent service and the structure of the BizDocEnvelope (wm.tn.rec:BizDocEnvelope), see the webMethods Trading Networks Built-in Services Reference.

Variable in the serviceOutput Specify…

status Whether the service executed successfully or unsuccessfully. Your service must provide one of the following values:

Value Meaningsuccess The delivery of the document was successful.

fail The delivery of the document failed.

statusMessage Optional. A delivery-specific message about the outcome of the delivery.

transportTime Optional. The number of milliseconds it took for the service to deliver the document.

output Optional. Return information from the delivery service, for example, response bytes received from an HTTP post.

Important! Do not save your immediate delivery service in the WmTN package or any other webMethods package that contains webMethods software. If you do, when you upgrade the webMethods software, your service will be lost.

Note: If you are using large document processing, see “Creating Services that Recognize Large Document Handling” on page 544.

412 webMethods Trading Networks User’s Guide Version 6.5

Page 413: Web Methods Trading Networks Users Guide 65

Creating a Scheduled Delivery Service

Creat ing a Scheduled Del ivery ServiceA scheduled delivery service must act on a batch of delivery tasks. Your scheduled delivery service must retrieve each delivery task and act on it individually. It is the responsibility of the scheduled delivery service to retrieve each delivery task, deliver the document associated with the delivery task, and update the status of the delivery task.

To perform these functions, your scheduled delivery service might have to take other actions as well. For example, your scheduled delivery service might need to open a connection to a remote machine before it delivers documents and close the connection after it has delivered all the documents. webMethods provides a single scheduled delivery service, the wm.tn.transport:batchFtp service, which you can use as a reference implementation to write your own scheduled delivery schedule. (The wm.tn.transport:batchFtp service opens a connection, delivers all the documents, and then closes the connection.)

Inputs and Outputs for a Scheduled Delivery ServiceWhen you create your scheduled delivery service, define the inputs and outputs to use for the variables described in this section.

Inputs for Scheduled Delivery ServiceThe following table lists the input variables that your scheduled delivery service should expect:

Important! Do not save your scheduled delivery service in the WmTN package or any other webMethods package that contains webMethods software. If you do, when you upgrade the webMethods software, your service will be lost.

Note: If you are using large document processing, see “Creating Services that Recognize Large Document Handling” on page 544.

Variable Data Type Description

queue String The name of the queue that contains the delivery tasks on which your scheduled delivery service is to act; this is the only required input variable.

Your scheduled delivery service will use this value as input to the wm.tn.queuing:getQueuedTask service to retrieve a delivery task. For more information, see “Required Logic to Include in the Scheduled Delivery Service” on page 415.

webMethods Trading Networks User’s Guide Version 6.5 413

Page 414: Web Methods Trading Networks Users Guide 65

C H A P T E R 1 7 D e l i v e r y S e r v i c e s

Outputs for Scheduled Delivery ServiceThe following table lists the output variables that your scheduled delivery service must return:

Retrieving the Content of a Document for Scheduled DeliveryYou retrieve the document content that needs to be delivered by a scheduled delivery service in the same manner that you retrieve delivery content for an immediate delivery service. For more information, see “Retrieving the Content of a Document for Immediate Delivery” on page 412.

other variables

n/a Define any other input variables that your scheduled delivery service requires. Other variables that you need to define typically depend on the transport protocol your service will use to deliver the documents. For example, for a service that uses FTP, an additional input variable would be the directory in which to place the documents that are being delivered.

When you define a public or private queue, Trading Networks allows you to set these variables. When Trading Networks invokes your delivery service, it will supply the inputs you specify when you defined the queue. For more information about defining public queues, see “Defining Public Queues” on page 380.

Variable Data Type Description

logMsg String Text that describes the result of the scheduled delivery service.

This is not the status of acting on a single delivery task in the queue; it is the result of the scheduled delivery service as a whole.

Variable Data Type Description

414 webMethods Trading Networks User’s Guide Version 6.5

Page 415: Web Methods Trading Networks Users Guide 65

Creating a Scheduled Delivery Service

Required Logic to Include in the Scheduled Delivery ServiceThe following table lists actions that you must include in all scheduled delivery services and the built-in service to use to accomplish each action.

Action Built-in service to use

Retrieve a delivery task from a queue

wm.tn.queuing:getQueuedTask

When you invoke this service, you pass it the name of the queue from which you want a delivery task and the service returns the oldest task in the queue. When you retrieve a task from the queue, the task is not removed from the queue. Instead, the status of the delivery task is updated from QUEUED to DELIVERING.

How the delivery task is represented depends on whether your scheduled delivery service is written as a flow service or a Java service:

For this type of service…

Task represented as...

Flow service IS document (IData object) that has a structure defined by the wm.tn.rec:Task IS document type

Java Service com.wm.app.tn.delivery.GuaranteedJob object

The task that is returned includes the document to be delivered. For more information about the wm.tn.rec:Task IS document type, see the webMethods Trading Networks Built-in Services Reference. For more information about the com.wm.app.tn.delivery.GuaranteedJob object, see the webMethods Trading Networks Java API Reference documentation.

Note: The wm.tn.queuing:getQueuedTask service places the timeDequeued variable in the pipeline. Trading Networks uses this variable to calculate the amount of time it takes to transmit the document. Do not update or drop this variable from the pipeline.

Typically, your scheduled delivery service should invoke the wm.tn.queuing:getQueuedTask service and process delivery tasks until the queue is empty; that is, until you have processed each of the QUEUED delivery tasks in the queue. When the queue is empty, the wm.tn.queuing:getQueuedTask service returns null for the task variable.

webMethods Trading Networks User’s Guide Version 6.5 415

Page 416: Web Methods Trading Networks Users Guide 65

C H A P T E R 1 7 D e l i v e r y S e r v i c e s

Deliver the document

Use one of the built-in services in the pub.client folder or one of your own custom transport services.

After your scheduled delivery service retrieves a delivery task, it should deliver the document that is returned with the task information.

Update the delivery task

wn.tn.queuing:updateQueuedTask

After your scheduled delivery service attempts to deliver the document that is associated with a delivery task, the service must update the task to indicate whether the delivery was successful or not.

To indicate the outcome of the delivery, set the following input variables to the wm.tn.queuing:updateQueuedTask service:

Variable Setting

status If the delivery attempt was successful, set the status variable to success

If the delivery attempt was unsuccessful, set the status variable to fail

statusMsg If the transport protocol that your scheduled delivery service uses returns a text string message, set statusMsg to the value of the returned text string.

The wm.tn.queuing:updateQueuedTask service uses the returned status to update the delivery task status:

If status is success, the service updates the task status to the DONE.

If status is fail, the service updates the task’s retry count.

If the maximum retry count has not been reached, the service updates the task status to QUEUED, which indicates that the next time the queue schedule invokes your delivery service, this delivery task will be available to retrieve and re-attempt to deliver the document.

If the maximum retry count has been reached, the service updates the task status to FAILED.

The wm.tn.queuing:updateQueuedTask service also takes care of logging the results of the delivery to the activity log.

Action Built-in service to use

416 webMethods Trading Networks User’s Guide Version 6.5

Page 417: Web Methods Trading Networks Users Guide 65

Creating a Scheduled Delivery Service

Typical Logic to Include in the Scheduled Delivery ServiceA typical scheduled delivery service might deliver all the batched documents to a single destination. The wm.tn.transport:batchFtp scheduled delivery service, which webMethods provides, behaves in this manner and is a good sample to refer to when creating your own scheduled delivery service. For more information, see “The wm.tn.transport:batchFtp Service” on page 419.

The following shows steps you might want to include in your scheduled delivery service to deliver all documents to the same destination.

The actions in bold are items that all scheduled delivery services should perform. For more information, see “Required Logic to Include in the Scheduled Delivery Service” on page 415.

The above shows only a sample of one way to create the service. You might have different requirements for your service. For example, you might want to combine several documents and transmit them as one large document or might want to limit the number of documents sent to a destination in a single invocation of your service.

As shown above, the scheduled delivery service might need to make a connection to a remote server. The typical approach is to open the connection after you have determined that the queue has delivery tasks in it (that is, the queue is not empty). You can determine whether the queue is empty by invoking the wm.tn.queuing:getQueuedTask service. If this service returns null, the queue is empty. After your scheduled delivery service has acted on the delivery tasks in the queue, your service can then close the connection to the remote server.

Some transport protocols require additional actions after opening a connection and before you begin delivering documents. For example, for the FTP protocol, after performing the LOGIN to connect to the remote server, a cd (change directory) is performed to navigate to the appropriate directory.

Retrieve a delivery task from the queue

If the queue is empty Exit the service

Open a connection to the remote server

While queue is not empty Attempt to deliver the document associated with the delivery task Update the task with the results of the delivery (e.g., success or fail) Retrieve the next delivery task from the queue

Close the connection to the remote server

webMethods Trading Networks User’s Guide Version 6.5 417

Page 418: Web Methods Trading Networks Users Guide 65

C H A P T E R 1 7 D e l i v e r y S e r v i c e s

Handling ExceptionsWhen the queue schedule dictates, the wm.tn.queuing:deliverBatch service is invoked. The wm.tn.queuing:deliverBatch service, in turn, invokes your scheduled delivery service and passes your service information about the queue.

This wm.tn.queuing:deliverBatch service catches any exceptions thrown by your scheduled delivery service or the underlying transport service that your services uses to deliver the document. In response to an exception, the wm.tn.queuing:deliverBatch service increments the retry count for the current delivery task and logs the exception to the activity log.

If your scheduled delivery service needs to take action in response to an exception, use the pub.flow:getLastError built-in service to detect whether an exception was thrown.

If you are creating your scheduled delivery service using the flow language, and you want to exit your scheduled delivery service due to a failure, use the following flow operation:EXIT $flow and signal FAILURE

The above flow operation causes the wm.tn.queuing:deliverBatch service to increment the current delivery task’s retry count and log the exception to the activity log. You provide the information that Trading Networks logs to the activity log. To provide this information, be sure you specify meaningful information in:

failure-message property of the EXIT flow operation

logMsg variable in Pipeline out; map meaningful text to this variable

418 webMethods Trading Networks User’s Guide Version 6.5

Page 419: Web Methods Trading Networks Users Guide 65

Creating a Scheduled Delivery Service

The wm.tn.transport:batchFtp ServicewebMethods provides one scheduled delivery service, wm.tn.transport:batchFtp, which is shown below. This service delivers a batch of documents using the FTP protocol to a single destination. It is written in the flow language. To view more information about the service, use the webMethods Developer to view it. Use this service as a model if you are creating your own custom scheduled delivery service.

The wm.tn.transport:batchFtp Service

1

2

3

4

5

7

8

9

10

11

12

13

6

webMethods Trading Networks User’s Guide Version 6.5 419

Page 420: Web Methods Trading Networks Users Guide 65

C H A P T E R 1 7 D e l i v e r y S e r v i c e s

Flow Operations Description

1 The INVOKE flow operation invokes the wm.tn.queuing:getQueuedTask service to retrieve the first delivery task from the queue. The service returns the task information in the task variable.

2 If the variable, task, is null, the queue is empty. In this case, map text to the output variable, logMsg, and exit the service.

33 If the queue contains delivery tasks, attempt to log in to the remote FTP server.

4 An input to the wm.tn.transport:batchFtp service is the variable, directory. If this variable was specified, cd to the specified directory.

5 If the cd to the specified directory fails, map a message to the output variable, logMsg, and exit the service.

6 The REPEAT flow operation causes the service to loop over the delivery tasks in the queue.

7 The INVOKE flow operation invokes wm.tn.doc:getDeliveryContent to retrieve the document content to be delivered. Note that this service is for all files regardless of whether Trading Networks considers a document large. For more information, see Appendix C, “Large Document Handling”.

8 The operations in the SEQUENCE flow operation form the file name to use for the document being delivered. The file name will be internalID.ext, where internalID is the webMethods generated internal ID for the document and ext is the file extension.

The first INVOKE flow operation in the sequence invokes the pub.string:concat service to append a period to the internal ID. The BRANCH flow operation determines the file extension. An input to the wm.tn.transport:batchFtp service is the variable, fileExtension. If this variable was not specified, the file extension defaults to “xml”. Otherwise, the file extension is the value specified for the fileExtension variable.

9 This INVOKE flow operation invokes the pub.client.ftp:put service that transmits the file using FTP.

10 If the return code from the pub.string:concat service is 226, the file was transmitted successfully. In this case, the MAP flow operation sets the value of the status variable in Pipeline Out to “success”.

For any other return code the other MAP flow operation sets the value of the status variable in Pipeline Out to “fail”.

420 webMethods Trading Networks User’s Guide Version 6.5

Page 421: Web Methods Trading Networks Users Guide 65

Adding and Registering New Delivery Services

Note that the wm.tn.transport:batchFtp service does not do any exception handling. All transport-level exceptions cause the current invocation of the wm.tn.transport:batchFtp service to terminate, and the exception will be handled by its caller, wm.tn.queuing:deliverBatch. The wm.tn.transport:batchFtp service will be invoked again for the delivery queue, according to the queue’s schedule.

Adding and Registering New Del ivery ServicesIf you need to deliver documents via a method that is not provided by one of the default delivery services, you can add or register a new delivery service. For example, you might want to create an immediate delivery service that delivers a message into a message queuing system.

When you register a delivery service, you assign the delivery service a service name. Trading Networks uses the name you supply to identify the delivery service in the Console:

For an immediate delivery service, the name you specify becomes the name of a new immediate delivery method. After you register the new delivery service, the Trading Networks Console lists the corresponding new delivery method on the Processing Rule Detail screen with the Deliver document action.

For a scheduled delivery service, Trading Networks displays the name among the scheduled delivery services that you can associate with a queue.

11 The first INVOKE flow operation invokes the wm.tn.queuing:updateQueuedTask service to update the status of the delivery task. One of the inputs to the service is status that was set to either “success” or “fail”.

The second INVOKE flow operation invokes the wm.tn.queuing:getQueuedTask service to retrieve the next delivery task from the delivery queue.

12 If the wm.tn.queuing:getQueuedTask service returned a delivery task, continue in the REPEAT loop. If the service returned null, the queue is empty; exit the REPEAT loop.

13 After looping through all delivery tasks, log out of the remote FTP server.

Flow Operations Description

Note: If you are using large document processing, see “Creating Services that Recognize Large Document Handling” on page 544.

webMethods Trading Networks User’s Guide Version 6.5 421

Page 422: Web Methods Trading Networks Users Guide 65

C H A P T E R 1 7 D e l i v e r y S e r v i c e s

To add a new delivery service, perform the following procedure:

1 Use the webMethods Developer (or your own Java development environment) to create the delivery service.

For immediate delivery services, see “Creating an Immediate Delivery Service” on page 411

For scheduled delivery services, see “Creating a Scheduled Delivery Service” on page 413

For large document processing, see “Creating Services that Recognize Large Document Handling” on page 544.

For general information about creating services, see the webMethods Developer User’s Guide.

When you create the service, you must place it in a package. Do not place it in the WmTN or WmTNWeb packages because it will be overwritten when you upgrade Trading Networks.

2 Execute the wm.tn.delivery:registerService built-in service to register your new delivery service. For more information about this service, see the webMethods Trading Networks Built-in Services Reference.

One of the input variables of the wm.tn.delivery:registerService built-in service is serviceName. The value you specify for serviceName becomes the name of the delivery method that the Trading Networks Console displays in lists that contain all delivery methods.

You can execute the wm.tn.delivery:registerService built-in service from the webMethods Developer to register your new delivery service. To execute the service from the Developer, perform the following steps:

a Select the wm.tn.delivery:registerService service from the Navigation Panel.

b Select Test Run. The webMethods Developer displays a dialog box for you to enter input:

To add and register a new delivery service

Note: If you use your own Java development environment, you need to use a jcode utility to put the Java code into the webMethods IS namespace; that is, place it in a package and folder. webMethods provides the jcode utility. For more information, see the webMethods Developer User’s Guide.

422 webMethods Trading Networks User’s Guide Version 6.5

Page 423: Web Methods Trading Networks Users Guide 65

Adding and Registering New Delivery Services

c Fill in the input parameters:

For this parameter... Specify...

serviceName The name you want to assign to the delivery service, e.g., Message Queue. This is the name that Trading Networks displays in lists in the Trading Networks Console.

Note: Do not use the same serviceName as any existing immediate or scheduled delivery service.

host The host name of the Integration Server. If you leave host blank, Trading Networks uses “localhost”. If the delivery service resides on the local machine, specify localhost or leave host blank.

When you leave host blank or specify localhost, Trading Networks assumes that the delivery service is on the local server.

webMethods Trading Networks User’s Guide Version 6.5 423

Page 424: Web Methods Trading Networks Users Guide 65

C H A P T E R 1 7 D e l i v e r y S e r v i c e s

d Click OK.

When you specify any other value for host, Trading Networks assumes the delivery service is on a remote server. This is true even if the value you specify is the host name for the local machine.

Important! A host value other than localhost or blank will cause Trading Networks to open an HTTP connection to the host for every document delivered. If the delivery service is on the local machine, this will consume resources unnecessarily.

To invoke a delivery service on a remote server, Trading Networks opens an HTTP connection and posts the document to be delivered.

port The port number for the Integration Server. If you leave host blank, do not specify a value for port.

user A user name of a User account that has the authority to execute the wm.tn.delivery:registerService service. Trading Networks ignores user if host is localhost or left blank.

password The password for the user account identified in user. Trading Networks ignores user if password is localhost or left blank.

Note: The password will be securely managed by the Integration Server’s Password Manager. For details, see Appendix B, "Security within Trading Networks" in the webMethods Trading Networks Concepts Guide.

ifc The fully-qualified folder name of the new delivery service you want to use, e.g., TNCustomize.deliveryServices.

service The service name of the new delivery service you want to use, e.g., messageQueue.

scheduled Whether you are adding an immediate or scheduled delivery service.

For this type… Specify…

Immediate false (default)

Scheduled true

For this parameter... Specify...

424 webMethods Trading Networks User’s Guide Version 6.5

Page 425: Web Methods Trading Networks Users Guide 65

Adding and Registering New Delivery Services

Note: To make changes to the parameters you specified when adding the delivery service (e.g., to specify a different service):

First, remove the service using wm.tn.delivery:removeService

Then, follow this “To add and register a new delivery service” procedure again on to re-register the service specifying your changes.

webMethods Trading Networks User’s Guide Version 6.5 425

Page 426: Web Methods Trading Networks Users Guide 65

C H A P T E R 1 7 D e l i v e r y S e r v i c e s

426 webMethods Trading Networks User’s Guide Version 6.5

Page 427: Web Methods Trading Networks Users Guide 65

C H A P T E R 18

Managing and Tracking Documents

About Viewing and Querying Documents . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 428

Viewing Documents in Your System . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 442

Viewing Documents in a Partner’s System . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 451

Processing a Saved Document Again . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 452

Resubmitting a Saved Document . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 452

Reprocessing a Saved Document . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 454

Archiving and Deleting Documents . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 456

webMethods Trading Networks User’s Guide Version 6.5 427

Page 428: Web Methods Trading Networks Users Guide 65

C H A P T E R 1 8 M a n a g i n g a n d Tr a c k i n g D o c u m e n t s

About Viewing and Querying DocumentsYou can use the Transaction Analysis screen to view information about the documents that Trading Networks has saved to its database. To view large documents, see “Viewing Large Documents that Trading Networks Has Processed” on page 549.

To view documents, first query the database for the documents in which you are interested. Trading Networks returns information about the documents that meet the search criteria that you specify and displays the query results in table view on the Detail View tab.

If you plan to use the same query many times, you can save the query settings. When you want to use the same query again, you simply select that saved query. For more information about different query functions you can perform, see Chapter 16, “Running Queries in Trading Networks”.

To set up a query and display information for viewing documents, specify some or all of the following:

Basic search criteria

Custom search criteria

How to display detail information about selected documents

Note: Trading Networks saves documents when instructed to do so by pre-processing actions that are set in the TN document type definition or the processing rule. For more information about setting your pre-processing preferences see: “Pre-Processing Actions” on page 327.

Additionally, if Trading Networks is to pass the document on to process management, Trading Networks always saves the attributes and activity log information for the document. For more information about process management, see the webMethods Modeler User’s Guide.

Note: If you are using an OEM version of the Trading Networks, the Transaction Analysis feature is not available through the Trading Networks Console. To view documents, use Trading Networks Web Manager.

For more information about transaction analysis, see Chapter 8, "Tracking and Analyzing Run-Time Information in Trading Networks" in the webMethods Trading Networks Concepts Guide.

428 webMethods Trading Networks User’s Guide Version 6.5

Page 429: Web Methods Trading Networks Users Guide 65

About Viewing and Querying Documents

Transaction Analysis Basic Search CriteriaUse the Basic Criteria tab to search for documents based on the system document attributes and other standard information that Trading Networks maintains for documents, such as the date Trading Networks received the document. Trading Networks searches for documents that meet all criteria that you specify.

You can use basic search criteria to select documents that:

Have specified senders

Have specified receivers

Are of a specified TN document type

Have a specified processing status

Have a specified user status

Have a specified document ID

Have a specified group ID

Have a specified conversation ID; that is, a part of a specific conversation

Were received in a specified time period

Note: To search for documents based on custom attributes that Trading Networks extracted from documents, use the custom search criteria. You can specify both basic and custom search criteria. Trading Networks searches for documents that match both criteria. For more information about searching based on custom attributes, see “Transaction Analysis Custom Search Criteria” on page 437.

webMethods Trading Networks User’s Guide Version 6.5 429

Page 430: Web Methods Trading Networks Users Guide 65

C H A P T E R 1 8 M a n a g i n g a n d Tr a c k i n g D o c u m e n t s

Basic Criteria Descriptions

Sender Use to: Select all documents that have a specified sender. You specify a partner in your network (or your own enterprise) as the sender. You can also select all documents that have an unknown sender.

How Trading Networks selects the documents if you specify a partner: Trading Networks matches the partner you specify to the sender of the documents it has stored in the database.

When Trading Networks saves a document to its database, it also maintains information about the partner that is identified as the sender within the document. Trading Networks determines the sender of a document by using the SenderID system attribute that it extracted from the document. Trading Networks matches the value of the SenderID attribute along with its associated ID type (e.g., DUNS) against ID type information stored in partner profiles on your system. For example, if the value of the SenderID attribute is 123456789 and the ID type is DUNS, Trading Networks looks at profiles to find a profile that specifies the ID type DUNS equal to 123456789. When it finds a matching profile, it associates that partner as the sender of the document.

Reasons Trading Networks might not select a document: If Trading Networks did not associate a sender with a document, it cannot select the document in a query even when a document was sent by the sender you specify. The following lists reasons a query might not discover documents that were sent by a specified sender:

Trading Networks could not extract the SenderID system attribute from the document because the TN document type definition did not instruct Trading Networks to do so or because the XQL query specified in the TN document type definition was invalid.

The TN document type of the document is unknown. (Trading Networks does not extract attributes for unknown TN document types.)

The ID type for the SenderID attribute is not specified in the partner profile of the corresponding partner.

The document contains the incorrect external ID, for example, the D-U-N-S number in the document is incorrect.

How Trading Networks selects the documents if you specify an unknown sender: Trading Networks selects documents for which it did not associate a sender (See “Reasons Trading Networks might not select a document” above).

430 webMethods Trading Networks User’s Guide Version 6.5

Page 431: Web Methods Trading Networks Users Guide 65

About Viewing and Querying Documents

Receiver Use to: Select all documents that have a specified receiver. You specify a partner in your network (or your own enterprise) as the receiver. You can also select all documents that have an unknown receiver.

How Trading Networks selects the documents if you specify a partner: Trading Networks matches the partner you specify to the receiver of the documents it has stored in the database.

When Trading Networks saves a document to its database, it also maintains information about the partner that is identified as the receiver within the document. Trading Networks determines the receiver of a document by using the ReceiverID system attribute that it extracted from the document. Trading Networks matches the value of the ReceiverID attribute along with its associated ID type (e.g., DUNS) against ID type information stored in partner profiles on your system. For example, if the value of the ReceiverID attribute is 123456789 and the ID type is DUNS, Trading Networks looks at profiles to find a profile that specifies the ID type DUNS equal to 123456789. When it finds a matching profile, it associates that partner as the receiver of the document.

Reasons Trading Networks might not select a document: If Trading Networks did not associate a receiver with a document, it cannot select the document in a query even when a document has the receiver that you specify. The following lists reasons a query might not discover documents with the specified receiver:

Trading Networks could not extract the ReceiverID system attribute from the document because the TN document type definition did not instruct Trading Networks to do so or because the XQL query specified in the TN document type definition was invalid.

The TN document type of the document is unknown. (Trading Networks does not extract attributes for unknown TN document types.)

The ID type for the receiver attribute is not specified in the partner profile of the corresponding partner.

The document contains the incorrect external ID, for example, the D-U-N-S number in the document is incorrect.

How Trading Networks selects the documents if you specify an unknown receiver: Trading Networks selects documents for which it did not associate a receiver. (See “Reasons Trading Networks might not select a document” above).

Basic Criteria Descriptions

webMethods Trading Networks User’s Guide Version 6.5 431

Page 432: Web Methods Trading Networks Users Guide 65

C H A P T E R 1 8 M a n a g i n g a n d Tr a c k i n g D o c u m e n t s

Type Use to: Select all documents that have a specified TN document type. You specify the name of a TN document type that you have defined for your Trading Networks system. For example, if you have a TN document type that identifies cXML purchase orders, you can search for all documents that Trading Networks determined was the TN document type for cXML purchase orders. You can also search for all documents for which the TN document type is unknown.

How Trading Networks selects documents with the specified TN document type: Trading Networks stores the TN document type with each document it stores in its database. It selects all documents with the TN document type that you specify.

Reasons Trading Networks might not select a document: You might have documents of the specified TN document type that Trading Networks does not have marked as such in its database. The following lists reasons a query might not discover documents with the specified TN document type:

Trading Networks received the document before the TN document type you specified was defined. Because the TN document type did not exist when the document was received, Trading Networks could not identify it as that type of document.

The identifying queries specified in the TN document type definition did not identify the document.

How Trading Networks selects documents with an unknown TN document type: If Trading Networks was unable to determine a TN document type when it received the document, it saved the document and the TN document type as unknown. Trading Networks selects documents that have an unknown TN document type.

Basic Criteria Descriptions

432 webMethods Trading Networks User’s Guide Version 6.5

Page 433: Web Methods Trading Networks Users Guide 65

About Viewing and Querying Documents

Processing Status

Use to: Select all documents that have the specified processing status. Select one of the processing statuses from the list.

NEW Trading Networks has received the document but has not recognized the document yet.

PENDING Trading Networks has recognized the document but has not completed processing the document.

QUEUED Trading Networks has received the document and placed it in a scheduled delivery queue. The document has not yet been successfully delivered.

DONE Trading Networks has completed document recognition and processing. The following processing actions (if specified in the processing rule) might not be completed yet:

Execute a service—If Trading Networks invoked the service asynchronously, the service might not have finished execution yet.

Deliver document—The document might not be delivered to the receiving partner yet.

DONE W/ ERRORS

Trading Networks has completed document recognition and processing. However, errors occurred during document recognition and/or document processing. For example, Trading Networks might have been unable to match the document to a TN document type, or Trading Networks might have been unable to extract a document attribute that was marked as required in a TN document type. The following processing actions (if specified in the processing rule) might not be completed yet:

Execute a service—If Trading Networks invoked the service asynchronously, the service might not have finished execution yet.

Deliver document—The document might not be delivered to the receiving partner yet.

POLLABLE Trading Networks queued the document for the receiving partner. The receiving partner has not picked up the document yet.

Basic Criteria Descriptions

webMethods Trading Networks User’s Guide Version 6.5 433

Page 434: Web Methods Trading Networks Users Guide 65

C H A P T E R 1 8 M a n a g i n g a n d Tr a c k i n g D o c u m e n t s

Processing Status continued...

ACCEPTED Trading Networks queued the document for the receiving partner. The receiving partner has picked up the document and successfully performed document recognition and routing for the document.

ACCEPTED W/ ERRORS

Trading Networks queued the document for the receiving partner. The receiving partner has picked up the document and encountered errors when processing the document.

ABORTED Trading Networks encountered a fatal error before completing the processing specified by the processing rule. Trading Networks typically uses this status in one of the following situations:

Trading Networks detected an infinite loop in the processing rules. That is, a document triggers a processing rule that creates and submits a new document that triggers the same processing rule again. In this situation, Trading Networks completes the processing for the original document, but sets the processing status of the new document to “ABORTED”.

Trading Networks encountered an internal error.

In addition, user-defined services can abort processing by invoking the wm.tn.route:abort built-in service. For more information about this service, see the webMethods Trading Networks Built-in Services Reference.

How Trading Networks selects documents: As Trading Networks processes a document, it updates the processing status that is associated with a document. Trading Networks matches the processing status you specify to the processing statuses that are associated with the documents.

Note: The processing (system) status is not a system attribute. You should not modify it as it is for Trading Networks internal use only.

Basic Criteria Descriptions

434 webMethods Trading Networks User’s Guide Version 6.5

Page 435: Web Methods Trading Networks Users Guide 65

About Viewing and Querying Documents

User Status Use to: Select all documents that have the specified user status. Type the user status in the text box.

How Trading Networks selects documents: You can set a user status for a document by extracting the User Status system attribute from the document, using the change user status action in a processing rule, or by using the wm.tn.doc:changeStatus built-in service. Trading Networks matches the user status you specify to the user statuses associated with the documents.

Internal ID Use to: Select the document that has the specified internal ID. Type the internal ID in the text box.

How Trading Networks selects documents: Trading Networks searches the database for a document that has the Trading Networks internal ID you specified. Trading Networks assigns each document an internal ID when it processes the document.

Document ID Use to: Select all documents that have a specified document ID.

How Trading Networks selects documents: Trading Networks matches the document ID you specify to the value of the DocumentID system attribute that it extracted from the document.

Reasons Trading Networks might not select a document: If Trading Networks cannot determine the document ID of a document, it cannot select the document in a query even when a document has the document ID that you specify. The following lists reasons a query might not discover documents with the specified document ID:

Trading Networks did not extract the DocumentID system attribute from the document.

The TN document type of the document is unknown. (Trading Networks.

Basic Criteria Descriptions

webMethods Trading Networks User’s Guide Version 6.5 435

Page 436: Web Methods Trading Networks Users Guide 65

C H A P T E R 1 8 M a n a g i n g a n d Tr a c k i n g D o c u m e n t s

Group ID Use to: Select all documents that have a specified group ID.

How Trading Networks selects documents: Trading Networks matches the group ID you specify to the value of the GroupID system attribute that it extracted from the document.

Reasons Trading Networks might not select a document: If Trading Networks cannot determine the group ID of a document, it cannot select the document in a query even when a document has the group ID that you specify. The following lists reasons a query might not discover documents with the specified group ID:

Trading Networks did not extract the GroupID system attribute from the document.

The TN document type of the document is unknown. (Trading Networks does not extract attributes for unknown TN document types.)

Conversation ID

Use to: Select all documents that have a specified conversation ID; that is, you can view all documents that Trading Networks has received that are part of the conversation you identify by the conversation ID that you specify.

Note: If you are using an OEM version of the Trading Networks, this Trading Networks’ feature is unavailable. Trading Networks will gray out this selection.

How Trading Networks selects documents: Trading Networks matches the conversation ID you specify to the value of the ConversationID system attribute that it extracted from the document.

Reasons Trading Networks might not select a document: If Trading Networks cannot determine the conversation ID of a document, it cannot select the document in a query even when a document has the conversation ID that you specify. The following lists reasons a query might not discover documents with the specified conversation ID:

Trading Networks did not extract the ConversationID system attribute from the document.

The TN document type of the document is unknown. (Trading Networks does not extract attributes for unknown TN document types.)

Basic Criteria Descriptions

436 webMethods Trading Networks User’s Guide Version 6.5

Page 437: Web Methods Trading Networks Users Guide 65

About Viewing and Querying Documents

Transaction Analysis Custom Search Criter iaUse the Custom Criteria tab to search for documents based on the custom attributes that Trading Networks extracted from documents. For example, if you set up Trading Networks to extract the custom attribute Order Date, which contains the date a purchase order was submitted, you can search for all documents with the Order Date equal to a specified date.

For each custom attribute that you want to use to select documents, you specify the attribute name, an operator, and the value the attribute should have.

Attribute instructs Trading Networks to look at the value of the specified attribute to determine whether it meets the rest of the criteria for this custom attribute. You can specify any attribute that is defined to your system.

Operator instructs Trading Networks how to match the value, for example, match string values that contain specified characters, match number values that are greater than a specified value, or match date values before a specified date. The operator you can specify depends on the data type of the attribute.

Date Received Use to: Select all documents that Trading Networks received on a specific day or during a specified time period. (Date Received is the date Trading Networks processed the document.)

How Trading Networks selects documents: When Trading Networks receives a document, it records the timestamp when the document is received. If the document is saved to the database, Trading Networks stores the timestamp with the document. Trading Networks selects documents that have timestamps from the day or time period that you specify.

Basic Criteria Descriptions

Note: Trading Networks saves information about the document from when the document was first received and processed. This means to find specific transactions, you need to specify information from when the document was first received. For example, if a partner’s D-U-N-S number has changed since the document was received, you need to specify the original D-U-N-S number.

webMethods Trading Networks User’s Guide Version 6.5 437

Page 438: Web Methods Trading Networks Users Guide 65

C H A P T E R 1 8 M a n a g i n g a n d Tr a c k i n g D o c u m e n t s

Data Type Operator Matches when the attribute extracted from a document…

STRING Is null Has no value. The attribute value has no value if:

XQL query (defined in the TN document type) that Trading Networks used to extract the attribute failed.

The TN document type does not instruct Trading Networks to extract the attribute.

You do not need to specify a value when you specify this operator.

Is not null Has any value. You do not need to specify a value when you specify this operator.

Equals Matches exactly the value that you specify.

Not equals Has a value that does not match the value that you specify.

Contains Contains the character string that you specify for the value.

STRINGLIST Is null Has no value. The attribute value has no value if:

XQL query (defined in the TN document type) that Trading Networks used to extract the attribute failed.

The TN document type does not instruct Trading Networks to extract the attribute.

You do not need to specify a value when you specify this operator.

Is not null Has any value. You do not need to specify a value when you specify this operator.

Includes Includes the value that you specify.

438 webMethods Trading Networks User’s Guide Version 6.5

Page 439: Web Methods Trading Networks Users Guide 65

About Viewing and Querying Documents

NUMBER Is null Has no value. The attribute value has no value if:

XQL query (defined in the TN document type) that Trading Networks used to extract the attribute failed.

The TN document type does not instruct Trading Networks to extract the attribute.

You do not need to specify a value when you specify this operator.

Is not null Has any value. You do not need to specify a value when you specify this operator.

Equals Matches exactly the value that you specify.

Not equals Has a value that does not match the value that you specify.

Greater than or equals

Has a value that is greater than or equal to the value that you specify.

Less than or equals

Has a value that is less than or equal to the value that you specify.

Less than Has a value that is less than the value that you specify.

Greater than Has a value that is greater than the value that you specify.

NUMBERLIST Is null Has no value. The attribute value has no value if:

XQL query (defined in the TN document type) that Trading Networks used to extract the attribute failed.

The TN document type does not instruct Trading Networks to extract the attribute.

You do not need to specify a value when you specify this operator.

Is not null Has any value. You do not need to specify a value when you specify this operator.

Includes Includes the value that you specify.

Data Type Operator Matches when the attribute extracted from a document…

webMethods Trading Networks User’s Guide Version 6.5 439

Page 440: Web Methods Trading Networks Users Guide 65

C H A P T E R 1 8 M a n a g i n g a n d Tr a c k i n g D o c u m e n t s

Value, along with the operator, instructs Trading Networks how to select documents based on the value of the attribute stored with documents.

Even when a document contains the attribute information that you specify, Trading Networks might not select the document for the following reasons:

Trading Networks did not extract the attribute from the document.

Trading Networks was not instructed to save the attribute.

The TN document type of the document is unknown. (Trading Networks does not extract attributes for unknown TN document types.)

You can specify you want Trading Networks to search for documents that have specified information for multiple custom attributes. Trading Networks searches for documents

DATETIME Is null Has no value. The attribute value has no value if:

XQL query (defined in the TN document type) that Trading Networks used to extract the attribute failed.

The TN document type does not instruct Trading Networks to extract the attribute.

You do not need to specify a value when you specify this operator.

Is not null Has any value. You do not need to specify a value when you specify this operator.

Equals Matches exactly the value that you specify.

Before Is a date that is before the date that you specify.

After Is a date that is after the date that you specify.

DATETIME LIST Is null Has no value. The attribute value has no value if:

XQL query (defined in the TN document type) that Trading Networks used to extract the attribute failed.

The TN document type does not instruct Trading Networks to extract the attribute.

You do not need to specify a value when you specify this date list.

Is not null Has any value. You do not need to specify a value when you specify this date list.

Data Type Operator Matches when the attribute extracted from a document…

440 webMethods Trading Networks User’s Guide Version 6.5

Page 441: Web Methods Trading Networks Users Guide 65

About Viewing and Querying Documents

that meet all the criteria you specify—all the custom search criteria and basic search criteria, if specified.

Detail View of DocumentsAfter Trading Networks selects the documents that match the basic and custom search criteria that you specify, it displays the requested document information. Trading Networks displays the information in a table format of the documents in the Detail view.

You can customize the display table to indicate the columns you want Trading Networks to display and how you want the rows sorted. Each column corresponds to information that Trading Networks maintains about a document, such as the date received, TN document type, or any of the document attributes (system or custom) that it has extracted from documents. For more information about customizing the display of your table format, “Working with Tables” on page 33.

Using the Detail View tab, you can select to display details for each document that is listed. You can view the extracted attributes along with their values and the document content. However, you cannot view array-type attributes (STRING LIST, NUMBER LIST, or DATETIME LIST) in the Detail view. In addition, if a document is related to others, you can view a list of the related documents.

webMethods Trading Networks User’s Guide Version 6.5 441

Page 442: Web Methods Trading Networks Users Guide 65

C H A P T E R 1 8 M a n a g i n g a n d Tr a c k i n g D o c u m e n t s

Viewing Documents in Your SystemPerform the following procedure to search for view document information that is stored in the Trading Networks database in your system.

1 Start the Trading Networks Console. If you need procedures for this step, see “Starting the Trading Networks Console” on page 22.

2 Select View Transaction Analysis.

3 Click to display the query panels if they are not already displayed.

4 Click the Basic Criteria tab and fill in the fields to specify basic search criteria. To indicate that you want to use one or more of the basic search criteria, select the checkbox next to each criterion you want to use. Then fill out the corresponding information as follows:

Note: If you are using an OEM version of the Trading Networks, the Transaction Analysis feature is not available through the Trading Networks Console. To view documents, use Trading Networks Web Manager.

To view documents in your system

For this Basic Criteria tab parameter… Specify…

Sender The name of the partner who sent the documents you want to view. Select the sender from the list.

Receiver The name of the partner who is the receiver of the documents you want to view. Select the receiver from the list.

Type The name of the TN document type that Trading Networks identified this document as. Select the TN document type from the list.

Processing Status The processing status of the documents that you want to view. Select the status from the list.

442 webMethods Trading Networks User’s Guide Version 6.5

Page 443: Web Methods Trading Networks Users Guide 65

Viewing Documents in Your System

User Status The user status of the documents that you want to view. Type the user status in the text box.

This field is case-sensitive; be sure to use the exact combination of upper- and lowercase letters. You can use the following pattern matching characters:

Character Matches…

% (percent) Zero or more characters

_ (underscore) A single character

Example:

_t_p matches: Stop, stop, stepbut not: sstop, stoop

D%t matches: Document, Document Testbut not: Documents, Polled Document

To search for an entry that contains the % or _ characters, enclose the string you specify in quotes. For example, if you want to search for entries with the user status Pending_Approval, specify ‘Pending_Approval’.

Document ID The document ID that Trading Networks extracted from the document.

This field is case-sensitive; be sure to use the exact combination of upper- and lowercase letters. You can use the following pattern matching characters:

Character Matches…

% (percent) Zero or more characters

_ (underscore) A single character

To search for an entry that contains the % or _ characters, enclose the string you specify in quotes. For example, if you want to search for entries with the document ID 5f_4%32, specify ‘5f_4%32’.

For this Basic Criteria tab parameter… Specify…

webMethods Trading Networks User’s Guide Version 6.5 443

Page 444: Web Methods Trading Networks Users Guide 65

C H A P T E R 1 8 M a n a g i n g a n d Tr a c k i n g D o c u m e n t s

If you decide you do not want to use a criterion that you have filled out, uncheck the check box for that criterion.

For more information, see “Transaction Analysis Basic Search Criteria” on page 429.

Group ID The group ID that Trading Networks extracted from the document.

This field is case-sensitive; be sure to use the exact combination of upper- and lowercase letters. You can use the following pattern matching characters:

Character Matches…

% (percent) Zero or more characters

_ (underscore) A single character

To search for an entry that contains the % or _ characters, enclose the string you specify in quotes. For example, if you want to search for entries with the group ID 5f_4%32, specify ‘5f_4%32’.

Conversation ID The conversation ID that Trading Networks extracted from the document.

This field is case-sensitive; be sure to use the exact combination of upper- and lowercase letters. You can use the following pattern matching characters:

Character Matches…

% (percent) Zero or more characters

_ (underscore) A single character

To search for an entry that contains the % or _ characters, enclose the string you specify in quotes. For example, if you want to search for entries with the conversation ID 5f_4%32, specify ‘5f_4%32’.

Date Received The date Trading Networks received the document. Select an entry from the list.

To specify a date range, select Custom from the list. Then specify dates in the Beginning and Ending fields. You can type in

a date value, or click to open a dialog that allows you to select the date from a calendar.

For this Basic Criteria tab parameter… Specify…

444 webMethods Trading Networks User’s Guide Version 6.5

Page 445: Web Methods Trading Networks Users Guide 65

Viewing Documents in Your System

5 Click the Custom Criteria tab and fill in the fields to specify custom search criteria. For each custom attribute that you want to use to query documents, specify the following:

For more information, see “Transaction Analysis Custom Search Criteria” on page 437.

6 Click the Detail View tab and fill in the fields to specify how Trading Networks displays information in the Detail view.

In the Standard Attributes section, check each standard attribute field that you want Trading Networks to include in the Detail view. Trading Networks displays a column for each checked field.

For this Custom Criteria tab parameter… Specify…

Attribute The custom attribute that you want Trading Networks to use to select documents. Select an attribute from the list.

Operator The operator you want Trading Networks to use with the value you specify. For example, select Equals if you want Trading Networks to select all documents that have the exact value you specify for Value.

Value Specify the value you want Trading Networks to use when querying for documents.

To specify a string, type the characters in the string. Be sure to use the exact combination of upper- and lowercase letters because Trading Networks performs a case-sensitive search.

To specify a number, type the numeric value.

To specify a date, either type in the date or click to open a dialog that allows you to select the date from a calendar. If you type a date, use the format yyyy-mm-dd hh:mm:ss. (Use a 24-hour clock for the hour field, hh.). For example, if you want to specify the date/time August 29, 2000 at 2:30 pm, specify 2000-08-29 14:30:00.

You do not need to specify a value if you select Is null or Is not null for Operator.

webMethods Trading Networks User’s Guide Version 6.5 445

Page 446: Web Methods Trading Networks Users Guide 65

C H A P T E R 1 8 M a n a g i n g a n d Tr a c k i n g D o c u m e n t s

In the Custom Attributes section, select fields that you want Trading Networks to include in the Detail view. Trading Networks displays a column for each field in the Selected Attributes list. To move attributes to the Selected Attributes list:

If you decide you do not want Trading Networks to display information for attributes in the Selected Attributes list, move the attributes back to the Available Attributes list:

For more information about the Detail View tab, see “Detail View of Documents” on page 441. For more information about the attributes, see “Viewing Document Attributes and Document Content” on page 448.

In the Sort By section, indicate how you want Trading Networks to sort the information it displays in the Detail view. Select the Attribute on which Trading Networks is to sort from the list. Then, select Ascending or Descending.

For more information about changing the table format Trading Networks displays, see “Working with Tables” on page 33.

7 Click the Run Query button on the toolbar. Trading Networks updates the Transactions table on the bottom portion of the screen with the query results.

Select this... To do this...

To move all custom attributes to the Selected Attributes list

To move some but not all attributes to the Selected Attributes list, select one or more fields in the Available Attributes list and then

click .

Select this... To do this...

To remove some but not all attributes from the Selected Attributes list, select the attributes you do not want included in the display

from the Selected Attributes list and then click

To remove all custom attributes from the Selected Attributes list.

Note: Trading Networks can only sort attributes if they are selected for the view. Trading Networks cannot view or sort array-type attributes (STRING LIST, NUMBER LIST, or DATETIME LIST) in Transaction Analysis.

446 webMethods Trading Networks User’s Guide Version 6.5

Page 447: Web Methods Trading Networks Users Guide 65

Viewing Documents in Your System

For more information about the different query functions that you can perform for document queries, see the following table:

Viewing Documents Using the Trading Partners SelectionYou can view documents in your system by selecting Trading Partners from the View menu rather than selecting Enterprise. You can perform identical searches from the Trading Partners selection and the Enterprise selections.

The one difference between the two selections is the results of the webMethods-defined Sent and Received saved queries that are shipped with Trading Networks. When you use the Sent query from Enterprise, the query is set up to find documents in which your corporation is identified as the sender; similarly, the Received query is set up to find documents in which your corporation is identified as the receiver. When you use the Sent query from Trading Partners, the query is set up to find documents in which the selected partner’s corporation is identified as the sender; similarly, the Received query is set up to find documents in which the selected partner’s corporation is identified as the receiver.

You might want to create your queries using the Trading Partners selection if you plan to save the query and want to associate the query with a specific partner. If you save queries in this way, the partner can use the queries when accessing your system to view documents in your system. For more about saving queries, see “Processing a Saved Document Again” on page 452.

1 Start the Trading Networks Console. If you need procedures for this step, see “Starting the Trading Networks Console” on page 22.

2 Select View Trading Partners.

3 Use the Select... button to select the partner with which you want to associate the document query. Select the partner from the Partner Selection Dialog. For more

information about the Select... button, see “Selecting a Partner” on page 34.

4 Select the sender from the Partner Selection Dialog.

5 Select View Transaction Analysis.

Query Function See page...

“Updating the Search Criteria for a Saved Query” page 406

“Saving a New Query Based on an Existing Query” page 407

“Reverting to a Saved Query” page 407

“Deleting Saved Queries” page 408

To view documents in your system using the Partner selection in the Selector Panel

webMethods Trading Networks User’s Guide Version 6.5 447

Page 448: Web Methods Trading Networks Users Guide 65

C H A P T E R 1 8 M a n a g i n g a n d Tr a c k i n g D o c u m e n t s

6 If the query panels are not displayed, select Transactions Show/Hide Query to display the query panels.

7 To create the document query and view the documents, perform step 4 through step 7 from the procedure “Viewing Documents in Your System” on page 442.

Viewing Document Attributes and Document ContentFor any document saved to the database, you can view the values of the document attributes that Trading Networks extracted from the document. In addition, you can view the document content.

Trading Networks can display single or multiple part documents. Trading Networks displays the list of parts. If a document is a single-part document, Trading Networks displays the name of one document part and the content of that single part. If a document has multiple parts, Trading Networks lists the names of the parts. You can view each part by selecting the name of the part that you want to view.

The content of the document is typically XML. However, if Trading Networks receives and saves a non-XML document, Trading Networks saves the document as the pipeline it received when the document was sent. In this case, rather than display the content as XML data, it displays the pipeline for the content.

To view the attributes and content for a document, perform the following procedure.

2 Click the row containing the document for which you want to view document attributes and the document content.

3 Select Transactions View Document.

4 To view the document attributes, select the Attributes tab.

Note: Trading Networks only saves a copy of the document content, attributes, and/or activity log information if instructed to do so by either the TN document type and/or the processing rule. If you do not save a copy of the document content, attributes, and/or activity log information, Trading Networks maintains no information about this document after it processes the document.

To view document attributes and document content for a document1 On the Transaction Analysis screen, first perform the procedure in “Viewing Documents

in Your System” on page 442 to display a list of documents that contains the document in which you are interested.

Note: You cannot view array-type attributes (STRING LIST, NUMBER LIST, or DATETIME LIST) in the Detail view of the query panel.

448 webMethods Trading Networks User’s Guide Version 6.5

Page 449: Web Methods Trading Networks Users Guide 65

Viewing Documents in Your System

5 To view the document content, select the Content tab. If the document contains multiple parts, at the top of the screen, select the name of the part that you want to view.

Viewing Related DocumentsRelated documents are documents that are associated with one another in some way. Trading Networks automatically relates documents that are part of a conversation. In addition, you can relate documents to one another.

To relate documents, use the wm.tn.doc:relateDocuments built-in service. This built-in service takes as input:

fromDoc—the document that you want to relate another document to

toDoc—the document you want to relate to fromDoc

relationship—a string that describes the relationship

For example, if you receive a purchase order, you might use the wm.tn.doc:relateDocuments built-in service to relate the purchase order to the acknowledgment that you send in response to the purchase order. In this example, you might set the service input as follows:

fromDoc—the purchase order

toDoc—the purchase order acknowledgement

relationship—POACK

When there are relationships between documents, you can view documents that are related. For example, if a document is part of a conversation, you can easily view all the documents in the same conversation that Trading Networks has received. To view the related documents, first perform the procedure in “Viewing Documents in Your System” on page 442 to display a list of documents that contains the document you are interested in. Then, perform the following procedure.

2 Click the row containing the document for which you want to view related documents.

Note: You can click also the Activity Log tab and Tasks tab to view the activity log entries and tasks that are associated with this document. For more information, see “The Activity Log” on page 495, “Delivery Tasks” on page 465, and “Service Execution Tasks” on page 481.

To view related documents1 On the Transaction Analysis screen, use the Detail view. If you are currently using the

Summary view, select Transactions View Detail/Summary to switch to the Detail view.

webMethods Trading Networks User’s Guide Version 6.5 449

Page 450: Web Methods Trading Networks Users Guide 65

C H A P T E R 1 8 M a n a g i n g a n d Tr a c k i n g D o c u m e n t s

3 Select Transactions View Related Documents.

Viewing Documents that are Scheduled for DeliveryScheduled delivery allows you to batch documents to be delivered at scheduled times. When a document is scheduled for delivery, Trading Networks changes the processing status to QUEUED, creates a delivery task to manage the delivery of the document, and places the delivery task into a queue that you defined. When you define the queue, you associate a delivery schedule that indicates when Trading Networks attempts to deliver the documents. For more information about scheduled delivery and queues, see “Scheduled Delivery Queues” on page 378. For instructions on how to view documents that are scheduled for delivery, see “Viewing Documents that are Scheduled for Delivery” on page 396.

Viewing Pollable DocumentsPollable documents are documents that are queued for a trading partner. The receiving partner’s Trading Networks will periodically poll your system to determine whether any documents are queued for it. For more information about queuing documents for partners, see Chapter 15, “Queues in Trading Networks”.

For instructions on how to view pollable documents, see “Viewing Documents that are Queued for Polling” on page 397.

Export ing Detai l View Information to a Fi leTo print the information that Trading Networks displays in the Detail view of the Transaction Analysis screen or make the information available for other applications, you can export the information to a file.

You can select the type of extension to use for the exported file, e.g., .txt or .csv. After data is exported to the file, you can print the file. You can also open the file in other applications. For example, if you export the data to a .csv file, you can open the file in Microsoft Excel allowing you to create charts and reports based on the data. Another example is that you can open a .csv file in Microsoft Access allowing you to further analyze the data.

450 webMethods Trading Networks User’s Guide Version 6.5

Page 451: Web Methods Trading Networks Users Guide 65

Viewing Documents in a Partner’s System

Perform the following procedure to export the information that Trading Networks displays in the Detail view to a text file.

2 Perform the procedures in either “Viewing Documents in Your System” on page 442 or “Viewing Documents Using the Trading Partners Selection” on page 447 to list the information you want to export.

3 If you are currently using the Summary view, select Transactions View Detail/Summary to switch to the Detail view.

4 Select Transactions Export Query Results.

5 In the Export Query Results as Comma-Separated Values dialog box, specify the file to which you want to save the exported information from the Detail view.

6 Click Save. Trading Networks displays a dialog specifying the amount of data saved. Click OK.

Determining the SQL for a Document QueryTo view the SQL query that Trading Networks is currently using against its database to obtain the document information in the display, select Transactions View SQL.

You might want to use this query in another application, for example, a third-party reporting tool. You can cut-and-paste the query that Trading Networks displays for use in the other application.

Viewing Documents in a Partner ’s SystemYou cannot use the Trading Networks Console to view information in a partner’s system. However, if a partner uses Trading Networks Web Manager, you might be able to access information from a Web browser. Check with your partner to see if you can access their system using Web Manager.

If a partner uses Web Manager, ask them for the URL you must use to access it. To access the HTML pages of Web Manager, you must supply the user name and password that has partner authority.

To export the Detail view information to a file1 Start the Trading Networks Console. If you need procedures for this step, see

“Starting the Trading Networks Console” on page 22.

webMethods Trading Networks User’s Guide Version 6.5 451

Page 452: Web Methods Trading Networks Users Guide 65

C H A P T E R 1 8 M a n a g i n g a n d Tr a c k i n g D o c u m e n t s

Processing a Saved Document AgainIf you save documents to the database, you can have Trading Networks process a document again. You might want to process a document again, for example, if the document did not match any of your TN document type definitions or the document triggered the incorrect processing rule.

The processing that Trading Networks performs depends on whether you select the resubmit function or the reprocess function:

Resubmit: Trading Networks recognizes the document again, extracts the attributes, and processes the document.

Reprocess: Trading Networks simply reprocesses the document.

Resubmitt ing a Saved DocumentWhen you resubmit a document, Trading Networks performs the following processing:

Uses the TN document type definitions to recognize the document

Performs a processing rule lookup to determine the rule to use

Performs the pre-processing and processing actions identified in the matching processing rule

When to use resubmit: Use resubmit if the document was not recognized when it was originally received. Create or modify a TN document type definition to recognize the document before processing the document again. If you are resubmitting a flat file document, see the following section, “Considerations When Resubmitting a Flat File Document” for more information.

Prerequisite for resubmitting: Document content must be saved.

Note: You can still resubmit a document even if you do not save the attributes. When Trading Networks resubmits a document, it performs document recognition and therefore extracts the attributes again.

For more information about the Save Document to Database pre-processing action, see: “Specifying Pre-Processing Actions for TN XML Document Type” on page 227, “Pre-Processing Actions in the TN Flat File Document Type” on page 294, and “Pre-Processing Actions” on page 327.

452 webMethods Trading Networks User’s Guide Version 6.5

Page 453: Web Methods Trading Networks Users Guide 65

Resubmitting a Saved Document

Considerat ions When Resubmitt ing a Flat Fi le DocumentWhen resubmitting flat file documents, consider the following:

Trading Networks needs to know the gateway service to which to submit. This information should have been set by the gateway service when Trading Networks originally received the document. The gateway service must have set the $receiveSvc variable within the TN_parms variable in the pipeline (/Tn_parms/$receiveSvc) to the fully-qualified service name of the gateway service.

When you resubmit the document, if $receiveSvc was set to the gateway service, Trading Networks invokes that gateway service. If $receiveSvc was not set,Trading Networks sends the document to wm.tn:receive, which will not be able to properly recognize the flat file document. As a result, the sender, receiver, and TN document type will all be unknown, and the resubmission of the flat file document will fail.

Use of the Retrieve SenderID from session option in a TN flat file document type might not work as you expect.

If the TN flat file document type uses the Retrieve SenderID from session option, during the resubmit, Trading Networks will retrieve the active user as the sender of the resubmitted flat file document. Because you are resubmitting the document from the Trading Networks Console, the active user is the IS user account that you used to log in to the Trading Networks Console (e.g., Administrator). Typically, the user account you use to log in to the Console is not associated with a partner in your trading network. If the user logged into the Console happens to be associated with a partner on your system, it might not be the original partner that sent the flat file document. In either of these cases, the processing rule that Trading Networks selects might not be the one that you expect.

If the user logged into the Console is not a partner, a processing rule that uses the sender criteria will not match the resubmitted flat file because the sending user is not a partner.

If the user logged into the Console is not the same partner that originally sent the flat file document, Trading Networks might select a different processing rule for the resubmitted flat file document.

For more information about flat file documents, see Chapter 13, “TN Flat File Document Types”.

webMethods Trading Networks User’s Guide Version 6.5 453

Page 454: Web Methods Trading Networks Users Guide 65

C H A P T E R 1 8 M a n a g i n g a n d Tr a c k i n g D o c u m e n t s

Steps to Resubmit a Saved DocumentTo resubmit a document, perform the following procedure.

3 If you are currently using the Summary view, select Transactions View Detail/Summary to switch to the Detail view.

4 Select Transactions Resubmit.

5 Click Yes to verify that you want to resubmit the document.

Reprocessing a Saved DocumentWhen you reprocess a document, Trading Networks performs the following processing:

Performs a processing rule lookup to determine the rule to use

Performs the processing actions identified in the matching processing rule

When you reprocess a document, Trading Networks does not recognize the TN document type again and therefore does not re-extract the attributes. If you reprocess a document for

To resubmit a document1 Start the Trading Networks Console. If you need procedures for this step, see

“Starting the Trading Networks Console” on page 22.

2 Perform the procedures in either “Viewing Documents in Your System” on page 442 or “Viewing Documents Using the Trading Partners Selection” on page 447 to list the document that you want to reprocess.

Note: To find documents that were processed but encountered errors in the recognition process, specify the processing status DONE W/ ERRORS for the processing status in the basic criteria.

Note: If you are resubmitting a flat file document, the document gateway service must have already set the $receiveSvc variable within TN_parms (/Tn_parms/$receiveSvc) to the fully-qualified service name of the gateway service. For example, if your service is named “gateway1“ and is located in the “partners.east“ folder, the fully qualified name of the service would be “partners.east:gateway1“. For more information about setting up a document gateway service, see “Defining Document Gateway Services” on page 276 in Chapter 13, “TN Flat File Document Types”.

Note: When reprocessing a saved document, Trading Networks does not perform pre-processing actions—verify, validate, check uniqueness, or save the document.

454 webMethods Trading Networks User’s Guide Version 6.5

Page 455: Web Methods Trading Networks Users Guide 65

Reprocessing a Saved Document

which Trading Networks saved the document content but not the attributes, Trading Networks will not match processing rules that use extended criteria (route based on custom attributes). Instead, Trading Networks will match to another processing rule, for example the default processing rule, and perform the processing actions identified in that matching rule.

When to use reprocess: Use reprocess if the document did not trigger the appropriate processing rule when it was originally received. Create or modify the processing rules so the document triggers the correct rule. Then, process the document again.

Another situation is if you change the user status of the document and want to advance the document to the next step of processing.

Prerequisite for reprocessing: Document content must be saved.

For more information about the Save Document to Database pre-processing action, see “Specifying Pre-Processing Actions for TN XML Document Type” on page 227, “Pre-Processing Actions in the TN Flat File Document Type” on page 294, and “Pre-Processing Actions” on page 327.

Steps to Reprocess a Saved DocumentTo reprocess a document, perform the following procedure.

1 Start the Trading Networks Console. If you need procedures for this step, see “Starting the Trading Networks Console” on page 22.

2 Perform the procedures in either “Viewing Documents in Your System” on page 442 or “Viewing Documents Using the Trading Partners Selection” on page 447 to list the document that you want to reprocess.

3 If you are currently using the Summary view, select Transactions View Detail/Summary to switch to the Detail view.

Note: If you are using extended criteria in your processing rules, the custom attributes must also be saved. When you reprocess the document, the extended criteria of the processing rule will fail if Trading Networks does not have the custom attributes saved. Trading Networks does not perform document recognition again and therefore does not re-extract the attributes.

To reprocess a document

Note: To find documents that were processed but encountered errors in the recognition process, specify the processing status DONE W/ ERRORS for the processing status in the basic criteria.

webMethods Trading Networks User’s Guide Version 6.5 455

Page 456: Web Methods Trading Networks Users Guide 65

C H A P T E R 1 8 M a n a g i n g a n d Tr a c k i n g D o c u m e n t s

4 Select Transactions Reprocess.

5 Click Yes to verify that you want to reprocess the document.

Archiving and Delet ing DocumentsYou can set up Trading Networks to perform data archival and deletion. Using the “basic” archival and deletion feature, you specify how many days after a document is received that you want Trading Networks to archive and delete the document. You do not have to archive a document before deleting it.

The “configurable” archival and deletion feature provides much greater flexibility than the “basic” deletion feature. Trading Networks provides a built-in service that enables you to selectively archive documents based on additional criteria, such as the document ID, sender, receiver, system status, and more. Additionally, you can choose to archive only selected parts of documents. That is, you can choose to archive documents contained in any or all of the non-archival tables listed below.

Archiving DocumentsWhen Trading Networks archives a document, it moves document information into archival tables. The archival tables mirror the tables that Trading Networks uses for its normal operation:

Data in the archival tables is identical to the data in the normal, non-archival Trading Networks tables except that the archival tables do not contain primary keys, foreign keys or unique column constraints.

When Trading Networks archives a document, it removes the document information and the references to the document from all non-archival tables in the database. After a

Archival TableCorresponding table that Trading Networks uses for normal operation

ARCHIVE_BizDoc BizDoc

ARCHIVE_BizDocContent BizDocContent

ARCHIVE_BizDocAttribute BizDocAttribute

ARCHIVE_BizDocArrayAttribute BizDocArrayAttribute

ARCHIVE_BizDocRelationship BizDocRelationship

ARCHIVE_DeliveryJob DeliveryJob

ARCHIVE_ActivityLog ActivityLog

ARCHIVE_BizDocUniqueKeys BizDocUniqueKeys

ARCHIVE_EDITracking EDITracking

456 webMethods Trading Networks User’s Guide Version 6.5

Page 457: Web Methods Trading Networks Users Guide 65

Archiving and Deleting Documents

document is archived, the archived information is no longer available from the Trading Networks Console or Web Manager. For example, after a document is archived, you will no longer be able to view information about it on the Transaction Analysis, Tasks, or Activity Log screens.

Deleting DocumentsWhen Trading Networks deletes a document, it removes all document information (whether in the archival tables or non-archival tables) from the database.

Setting Up Basic Archival and DeletionTo set up the “basic” document archival and deletion feature, you add Trading Networks system properties to the Trading Networks properties file, and schedule when you want the archive and deletion service to run.

Setting How Many Days to Retain Documents before Archival and DeletionSet the tn.archive.archiveAfterDays system property to specify how many days Trading Networks should keep a document from the time it is received before archiving it. Set the tn.archive.deleteAfterDays system property to specify how many days Trading Networks should keep a document from the time it was received before deleting it. If you want Trading Networks to only delete documents and not archive them, specify only the tn.archive.deleteAfterDays system property.

1 Open the Server Administrator if it is not already open.

2 In the Solutions menu of the navigation panel, click Trading Networks. The Server Administrator opens a new browser window to display Trading Networks-specific pages.

3 In the Settings menu of the navigation panel, click TN Properties.

4 Click Edit TN Properties Settings.

Note: The “configurable” deletion feature will delete all documents from archival tables; you cannot alter this behavior.

To set the archival and deletion system properties

webMethods Trading Networks User’s Guide Version 6.5 457

Page 458: Web Methods Trading Networks Users Guide 65

C H A P T E R 1 8 M a n a g i n g a n d Tr a c k i n g D o c u m e n t s

5 Add or update the following properties:

6 Click Save Changes.

Scheduling When To Archive and Delete DocumentsYou must schedule when you want Trading Networks to periodically run the archival and deletion service to archive and delete files. To schedule the execution of the service, use the Server Administrator to set up a user task that executes the archive and delete service. Trading Networks is shipped with the archive and delete service. Its fully qualified service name is: wm.tn.archive:archive.

1 Open the Server Administrator. If you need instructions, see the webMethods Integration Server Administrator’s Guide.

2 In the Server menu of the navigation area, click Scheduler.

3 Click Create a scheduled task.

For this system property … Specify …

tn.archive.archiveAfterDays How many days after Trading Networks receives the document that Trading Networks should archive it. Specify a value from 0 through 730365. If you do not specify this property or if you specify 0 for this property, Trading Networks does not archive documents.

Example:

If you want Trading Networks to archive documents 30 days after they are received, add the following:

tn.archive.archiveAfterDays=30

tn.archive.deleteAfterDays How many days after Trading Networks receives the document that Trading Networks should delete it. Specify a value from 0 through 730365. If you do not specify this property or if you specify 0 for this property, Trading Networks does not delete documents.

Example:

If you want Trading Networks to delete documents 60 days after they are received, add the following:

tn.archive.deleteAfterDays=60

To schedule when to archive and delete documents

458 webMethods Trading Networks User’s Guide Version 6.5

Page 459: Web Methods Trading Networks Users Guide 65

Archiving and Deleting Documents

4 Set the Service Information parameters as follows:

5 In the Schedule Type and Details section of the screen, specify that you want the service to be executed periodically, by selecting either Repeating or Complex. Then, specify the additional parameters to indicate when and how often you want the archival and deletion service to run.

For this parameter… Specify…

folder:subfolder:service wm.tn.archive:archive

Run As User Administrator

Persistence That you want the server to maintain this user task in the event that the server is restarted by selecting the Persist after restart checkbox.

Clustering Whether you want the task to run anywhere in your cluster of servers. For more information on clusters, see the webMethods Integration Server Clustering Guide.

If you select… Specify…

Repeating The number of seconds that you want the server to wait between executions of the service in the Interval field. For example, if you want the service to run once every 24 hours, specify 86400.

In the Repeating field, select the Repeat from end of invocation checkbox to indicate that if the current occurrence of the task is not complete when the interval elapses, that you want the server to wait until the current occurrence of the task completes before repeating the task.

Note: The service executes for the first time immediately after you schedule the user task.

Complex Repeating The date and time of the first execution of the service in the Start Date and Start Time fields and how often after the initial execution that you want the service to run using the parameters in the Run Mask field.

Example:

To specify that you want the service to execute daily at 10 p.m. starting on March 15, 2001, specify the following parameters:

webMethods Trading Networks User’s Guide Version 6.5 459

Page 460: Web Methods Trading Networks Users Guide 65

C H A P T E R 1 8 M a n a g i n g a n d Tr a c k i n g D o c u m e n t s

6 Click Save Tasks.

Setting Up Configurable Archival and DeletionTo set up the “configurable” document archival and deletion feature, you specify values for the input parameters of the built-in archive and deletion service wm.tn.extendedArchive, and schedule when you want the service to run.

1 Open the Developer if it is not already open.

2 In the WmTN package, open the folders wm tn archive and double-click the built-in service extendedArchive.

3 Specify values for the input parameters of the wm.tn.archive:extendedArchive service, which are described in the webMethods Trading Networks Built-in Services Reference.

4 Save the values.

Start Date

Start Time

End Date

2001/3/15

22:00:00

leave blank

End Time

Months

Days

Weekly Days

Hours

Minutes

leave blank

no selection

no selection

no selection

22

0

Note: Note: Omitting the End Date and End Time indicates that the service is to run indefinitely.

If you select… Specify…

Note: For more information about these parameters, see information about scheduling services in the webMethods Integration Server Administrator’s Guide.

To set the configurable archival and deletion service

460 webMethods Trading Networks User’s Guide Version 6.5

Page 461: Web Methods Trading Networks Users Guide 65

Archiving and Deleting Documents

Scheduling When To Archive and Delete DocumentsYou must schedule when you want Trading Networks to periodically run the archival and deletion service to archive and delete files. To schedule the execution of the service, use the Developer to create a wrapper service that executes the archive and delete service. Then use the Server Administrator to set up a user task that executes the archive and delete service. Trading Networks is shipped with the archive and delete service. Its fully qualified service name is: wm.tn.archive:extendedArchive.

1 Open the Developer if it is not already open.

2 Create a wrapper service that invokes the service wm.tn.archive:extendedArchive.

3 Open the Server Administrator. If you need instructions, see the webMethods Integration Server Administrator’s Guide.

4 In the Server menu of the navigation area, click Scheduler.

5 Click Create a scheduled task.

6 Set the Service Information parameters as follows:

7 In the Schedule Type and Details section of the screen, specify that you want the service to be executed periodically, by selecting either Repeating or Complex. Then, specify the additional parameters to indicate when and how often you want the archival and deletion service to run.

To set the archival and deletion system properties

For this parameter… Specify…

folder:subfolder:service Your wrapper service

Run As User Administrator

Persistence That you want the server to maintain this user task in the event that the server is restarted by selecting the Persist after restart checkbox.

Clustering Whether you want the task to run anywhere in your cluster of servers. For more information on clusters, see the webMethods Integration Server Clustering Guide.

webMethods Trading Networks User’s Guide Version 6.5 461

Page 462: Web Methods Trading Networks Users Guide 65

C H A P T E R 1 8 M a n a g i n g a n d Tr a c k i n g D o c u m e n t s

If you select… Specify…

Repeating The number of seconds that you want the server to wait between executions of the service in the Interval field. For example, if you want the service to run once every 24 hours, specify 86400.

In the Repeating field, select the Repeat from end of invocation checkbox to indicate that if the current occurrence of the task is not complete when the interval elapses, that you want the server to wait until the current occurrence of the task completes before repeating the task.

Note: The service executes for the first time immediately after you schedule the user task.

Complex Repeating The date and time of the first execution of the service in the Start Date and Start Time fields and how often after the initial execution that you want the service to run using the parameters in the Run Mask field.

Example:

To specify that you want the service to execute daily at 10 p.m. starting on March 15, 2001, specify the following parameters:

Start Date

Start Time

End Date

2001/3/15

22:00:00

leave blank

End Time

Months

Days

Weekly Days

Hours

Minutes

leave blank

no selection

no selection

no selection

22

0

Note: Note: Omitting the End Date and End Time indicates that the service is to run indefinitely.

462 webMethods Trading Networks User’s Guide Version 6.5

Page 463: Web Methods Trading Networks Users Guide 65

Archiving and Deleting Documents

8 Click Save Tasks.

Note: For more information about these parameters, see information about scheduling services in the webMethods Integration Server Administrator’s Guide.

webMethods Trading Networks User’s Guide Version 6.5 463

Page 464: Web Methods Trading Networks Users Guide 65

C H A P T E R 1 8 M a n a g i n g a n d Tr a c k i n g D o c u m e n t s

464 webMethods Trading Networks User’s Guide Version 6.5

Page 465: Web Methods Trading Networks Users Guide 65

C H A P T E R 19

Del ivery Tasks

What is a Delivery Task? . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 466

About Viewing Delivery Tasks . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 467

Finding and Viewing Delivery Tasks . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 472

Running Delivery Tasks Queries . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 475

Stopping a Delivery Task for Immediate Delivery . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 476

Restarting an Immediate Delivery Task . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 477

Deleting Delivery Tasks . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 478

Reassigning a Delivery Task to Another Server . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 479

webMethods Trading Networks User’s Guide Version 6.5 465

Page 466: Web Methods Trading Networks Users Guide 65

C H A P T E R 1 9 D e l i v e r y Ta s k s

What is a Del ivery Task? A delivery task is information that webMethods Trading Networks (Trading Networks) maintains for a document that Trading Networks is delivering using reliable delivery. Reliable delivery is a feature of Trading Networks where Trading Networks attempts to deliver a document to a partner one or more times based on settings that you define.

There are two types of delivery tasks—delivery tasks for immediate deliveries and delivery tasks for scheduled deliveries. Trading Networks uses reliable delivery for both immediate and scheduled deliveries.

Immediate deliveries—For an immediate delivery, Trading Networks uses an immediate delivery method (e.g., Primary HTTP or Secondary FTP) to deliver a document directly to the receiving partner.

Trading Networks attempts to deliver a document using an immediate delivery method when a processing rule uses the Deliver Document By processing action and the Immediate Delivery checkbox is selected. Trading Networks uses reliable delivery and creates a delivery task for the immediate delivery only when it is instructed by the Save Document to Database pre-processing action to save the document content.

Scheduled deliveries—For a scheduled delivery, Trading Networks places a document to be delivered in a public or private delivery queue to be batched, and then delivered at scheduled times.

Trading Networks attempts to deliver a document using a scheduled delivery method when a processing rule uses the Deliver Document By processing action and the Scheduled Delivery checkbox is selected. When Trading Networks queues a document for delivery, it always saves the document content to the database. Trading Networks also always uses reliable delivery for a scheduled delivery.

For more information about

Delivery tasks and reliable delivery, see Chapter 6, "Delivering Documents to Partners" in the webMethods Trading Networks Concepts Guide.

Configuring tasks setting, see “Configuring Tasks Settings” on page 52.

466 webMethods Trading Networks User’s Guide Version 6.5

Page 467: Web Methods Trading Networks Users Guide 65

About Viewing Delivery Tasks

About Viewing Del ivery TasksTo view delivery tasks, first specify a query to identify the delivery tasks in which you are interested. Trading Networks returns information about the delivery tasks that meet the search criteria in your query. If you plan to use the same query many times, you can name and save the query. When you want to reuse the query, you simply select it.

The following lists the information that Trading Networks maintains for a delivery task:

Note: If you are using an OEM version of the Trading Networks, the Tasks feature is not available through the Trading Networks Console. To view tasks, use Trading Networks Web Manager.

Information in a delivery task Description

Task ID A unique identifier that Trading Networks assigns to the delivery task.

Task Type The type of task. For a delivery task, Task Type is “Delivery”.

Time Created Timestamp from when Trading Networks created the delivery task.

Time Updated Timestamp from the last time Trading Networks updated the delivery task. This is usually the last time Trading Networks attempted to deliver the document.

Task Status Status of the delivery task. For a description of task statuses, see “Delivery Task Statuses” on page 469.

Delivery Method Delivery method that Trading Networks is to use to deliver the document. For example, for an immediate delivery, Delivery Method might be Primary HTTP or Secondary HTTPS. For a scheduled delivery, Trading Networks displays Scheduled Delivery Service and provides additional information about the scheduled delivery service, including the name of the service.

Retry Limit Maximum number of times Trading Networks is to attempt to re-deliver the document as defined in the partner’s profile.

Retry Factor The factor Trading Networks uses to calculate how long to wait before making the second and subsequent attempts to re-deliver a document when using an immediate delivery method. Trading Networks calculates the time to wait by multiplying the last wait time by Retry Factor.

Trading Networks uses the Time To Wait value along with the Retry Factor to calculate how long to wait for subsequent retry attempts.

webMethods Trading Networks User’s Guide Version 6.5 467

Page 468: Web Methods Trading Networks Users Guide 65

C H A P T E R 1 9 D e l i v e r y Ta s k s

Retries Number of times Trading Networks has already attempted to redeliver the document.

Time To Wait Number of milliseconds Trading Networks is to wait before making its first attempt to redeliver the document when using an immediate delivery method.

Trading Networks uses the Time To Wait value along with the Retry Factor to calculate how long to wait for subsequent retry attempts. For scheduled delivery, Trading Networks does not use Time To Wait and Retry Factor because it does not need to determine how long to wait before the next retry. For scheduled delivery, Trading Networks attempts to deliver as dictated by the schedule that is associated with the queue.

Status Whether the last attempt to deliver the document was successful or not. The value of Status can be:

“success” after Trading Networks has delivered the document successfully

“fail” if Trading Networks has not yet delivered the document successfully

blank if Trading Networks is using a schedule delivery and has not yet made an attempt to deliver the document

Status Message The status message returned with the response from the last attempt Trading Networks made to deliver the document. For example, if the delivery method is HTTP, Status Message might be “200 OK”.

Transport Time On the last attempt to deliver the document, number of milliseconds it took the delivery service to send the document to the receiving partner and wait for a response. For example, if the delivery method is HTTP, Transport Time is the number of milliseconds it took Trading Networks to post the document until it received a response from the post. The response can indicate the document was sent successfully (e.g., 200 OK) or unsuccessfully (e.g., 404 Authorization required).

Server ID Identification of the Integration Server that is processing this delivery task. The Server ID is useful when the Integration Server is in a clustered environment. The Server ID is the host name of the machine on which the Integration Server is installed. For more information on server configuration parameters, see the appendix defining the server configuration parameters in the webMethods Integration Server Administrator’s Guide. For more information on clusters, see the webMethods Integration Server Clustering Guide.

Information in a delivery task Description

468 webMethods Trading Networks User’s Guide Version 6.5

Page 469: Web Methods Trading Networks Users Guide 65

About Viewing Delivery Tasks

Delivery tasks remain in the Trading Networks system until you delete them or until the document with which the delivery task is associated is archived or deleted. For more information about archiving and deleting documents, see ““Archiving and Deleting Documents” on page 456.

Delivery Task StatusesThe tasks statuses for delivery tasks are different based on whether the delivery task is for an immediate delivery or a scheduled delivery.

Task Statuses for Immediate DeliveriesThe following table lists the task statuses associated with a delivery task for an immediate delivery.

Queue Name If Trading Networks queued this document for scheduled delivery, this is the name of the queue in which the document resides. For private queues, Trading Networks displays the internal partner ID.

Task Output The data, if any, returned from a successful delivery of a document. For example, if the delivery method is Primary HTTP, and the post returns output (e.g., an XML document), then Task Output would contain the XML document.

Task Status Meaning Next Status

NEW Trading Networks has just created the delivery task and has not attempted to deliver the document yet.

PENDING—after Trading Networks makes its first attempt to deliver the document

PENDING Trading Networks has attempted to deliver the document one or more times, but the document has not been successfully delivered yet.

DONE—if the delivery completes successfully

PENDING—if the delivery is unsuccessful, but the maximum retry limit has not been reached

FAILED—if the delivery is unsuccessful, and the maximum retry limit has been reached

DONE Trading Networks has successfully delivered the document

n/a

Information in a delivery task Description

webMethods Trading Networks User’s Guide Version 6.5 469

Page 470: Web Methods Trading Networks Users Guide 65

C H A P T E R 1 9 D e l i v e r y Ta s k s

Task Statuses for Scheduled DeliveriesThe following table lists the task statuses associated with a delivery task for a scheduled delivery.

STOPPED Trading Networks has stopped the delivery due to a manual user request.

PENDING—if the delivery task is restarted

FAILED Trading Networks has reached the maximum retry limit for the document and was unable to deliver the document.

Note: If you want to be notified when tasks fail, you need to create an Integration Server trigger that subscribes to the wm.tn.rec:TaskFailure IS document type. For more information, see the Publish-Subscribe Developer’s Guide.

PENDING—if the delivery task is restarted

Task Status Meaning Next Status

QUEUED Trading Networks has added the delivery task to the queue. Trading Networks has invoked the scheduled delivery service to deliver the document zero or more times, but the document has not been successfully delivered yet.

Note: The scheduled delivery service acts on all of the delivery tasks that have a QUEUED status. These delivery tasks include all of the QUEUED delivery tasks already in the queue and any new QUEUED tasks added to the queue before the execution of the delivery service.

DELIVERING—when the scheduled delivery service reads the delivery task from the queue

Task Status Meaning Next Status

470 webMethods Trading Networks User’s Guide Version 6.5

Page 471: Web Methods Trading Networks Users Guide 65

About Viewing Delivery Tasks

DELIVERING The scheduled delivery service is currently working with this delivery task to attempt to deliver the corresponding document.

DONE—if the delivery completes successfully

QUEUED—if the delivery is unsuccessful, but the maximum retry limit has not been exceeded

FAILED—if the delivery is unsuccessful, and the maximum retry limit has been exceeded

DONE The scheduled delivery service successfully delivered the document that is associated with the delivery task.

n/a

FAILED The scheduled delivery service was unable to deliver the document that is associated with the delivery task and the maximum retry limit has been exceeded

Note: If you want to be notified when tasks fail, you need to create an Integration Server trigger that subscribes to the wm.tn.rec:TaskFailure IS document type. For more information, see the Publish-Subscribe Developer’s Guide.

QUEUED—if the delivery task is restarted

Task Status Meaning Next Status

webMethods Trading Networks User’s Guide Version 6.5 471

Page 472: Web Methods Trading Networks Users Guide 65

C H A P T E R 1 9 D e l i v e r y Ta s k s

Finding and Viewing Del ivery TasksUse the Tasks screen to find and view delivery tasks in your Trading Networks system.

You can view all delivery tasks or search for tasks based on the following criteria:

Partner—partner that is to receive the document that is being delivered

Task Status—status of the delivery task

Delivery method—how Trading Networks is to deliver the document to the partner (e.g., Primary HTTP)

Time created—time Trading Networks created the delivery task

1 Start the Trading Networks Console. If you need procedures for this step, see “Starting the Trading Networks Console” on page 22.

2 Select View Tasks.

3 To see detailed information about a specific delivery task, double click on the row containing the task you want more detailed information about. Trading Networks displays the Task Details screen.

4 If you cannot find the delivery task you are looking for, you can use the search criteria on the Tasks screen to query for specific tasks.

a Select Show Query on the toolbar to have Trading Networks display the search criteria.

b .To specify the delivery tasks that you want to view, select the checkbox associated with each criterion that you want to use and fill in the corresponding information as described below:

Note: If you are using an OEM version of the Trading Networks, the Tasks feature is not available through the Trading Networks Console. To view tasks, use Trading Networks Web Manager.

To find and view delivery tasks in your system

For this parameter... Specify

Task Type The type of task. To indicate that you want to view delivery tasks, select: Delivery from the list.

472 webMethods Trading Networks User’s Guide Version 6.5

Page 473: Web Methods Trading Networks Users Guide 65

Finding and Viewing Delivery Tasks

If you decide you do not want to use a criterion that you have filled out, uncheck the checkbox for that criterion.

Partner The partner that is to receive the document that is being delivered by the delivery tasks that you want to view.

Type in the name of the partner or click the Select... button to select a partner from the Partner Selection Dialog. For more information about how to select a partner, see “Selecting a Partner” on page 34.

Task Status The status of the delivery tasks you want to view. Select the status from the list.

To view delivery tasks of all statuses, do not use this criterion.

Delivery Method How Trading Networks is to deliver the document to the partner. Select the delivery method from the list.

Immediate delivery – To view delivery tasks for immediate deliveries that use the same delivery method (e.g., Primary HTTP), select an immediate delivery method from the list.

Scheduled delivery – To view delivery tasks for scheduled delivery that use the same scheduled delivery service, select the name of the schedule delivery service from the list. The list that Trading Networks returns in response to your query might contain delivery tasks in several queues because a single schedule delivery service can be associated with multiple queues.

To view delivery tasks regardless of the delivery method being used, do not use this criterion.

Time Created The date Trading Networks created the delivery task. Select an entry from the list.

To specify a date range, select Custom from the list. Then specify dates in the Beginning and Ending fields. You can

type in a date value, or click to open a dialog that allows you to select the date from a calendar.

To view delivery tasks regardless of the date that Trading Networks created them, do not use this criterion.

For this parameter... Specify

webMethods Trading Networks User’s Guide Version 6.5 473

Page 474: Web Methods Trading Networks Users Guide 65

C H A P T E R 1 9 D e l i v e r y Ta s k s

5 Select Run Query on the toolbar. Trading Networks updates the Tasks table on the bottom portion of the screen with the query results.

6 To view the details for a delivery task, double click the row containing that delivery task. Trading Networks displays the Tasks Details screen.

Viewing the Del ivery Tasks Associated with a DocumentRather than viewing all the delivery tasks in your system, you can view delivery tasks associated with a specific document.

1 Perform the steps described in “Viewing Documents in Your System” on page 442 to have Trading Networks list information about the document in which you are interested.

2 Select the row containing the document for which you want to view delivery tasks.

3 Select Transactions View Document.

4 Select the Tasks tab.

5 To further refine the list of delivery tasks, perform the following steps:

a Select Show Query on the toolbar to display the query panels if they are not already displayed.

b Perform a delivery task query. For instructions how to fill out the fields in the query panel to select the delivery tasks that you want to view, see step 4 on page 472.

c Select Run Query on the toolbar. Trading Networks updates the Tasks table on the bottom portion of the screen with the query results.

d To view the details for a delivery task, double click the row containing that delivery task.

Export ing Delivery Task Information to a Fi leTo print the delivery task information that Trading Networks displays on the Tasks screen or make the information available for other applications, you can export the information to a text file. When you export the information, Trading Networks places the information into the file, separating the values with commas.

You can select the type of extension to use for the exported file, e.g., .txt or .csv. After data is exported to the file, you can print the file. You can also open the file in other

To view delivery tasks associated with a specific document

474 webMethods Trading Networks User’s Guide Version 6.5

Page 475: Web Methods Trading Networks Users Guide 65

Running Delivery Tasks Queries

applications. For example, if you export the data to a .csv file, you can open the file in Microsoft Excel allowing you to create charts and reports based on the data. Another example is that you can open a .csv file in Microsoft Access allowing you to further analyze the data.

Perform the following procedure to export the delivery task information that Trading Networks displays to a text file.

1 Start the Trading Networks Console. If you need procedures for this step, see “Starting the Trading Networks Console” on page 22.

2 Perform the procedures in “Finding and Viewing Delivery Tasks” on page 472 to list the information you want to export.

3 Select Tasks Export Query Results.

4 In the Export Query Results as Comma-Separated Values dialog box, specify the file to which you want to save the exported delivery task information.

5 Click Save. Trading Networks displays a dialog specifying the amount of data saved. Click OK.

Running Del ivery Tasks QueriesIf you plan to use the same delivery task query many times, you can save the query. Trading Networks adds the delivery task query to the list of saved queries on the tool bar. When you want to reuse the query, you simply select it from the queries list.

For more information about the different query functions that you can perform for delivery task queries, see the following table:

To export the delivery task information to a file

Query Function See page...

“Enabling the Query Functions” page 402

“Creating and Saving a Query” page 404

“Selecting and Running a Query” page 405

“Updating the Search Criteria for a Saved Query” page 406

“Saving a New Query Based on an Existing Query” page 407

“Reverting to a Saved Query” page 407

“Deleting Saved Queries” page 408

webMethods Trading Networks User’s Guide Version 6.5 475

Page 476: Web Methods Trading Networks Users Guide 65

C H A P T E R 1 9 D e l i v e r y Ta s k s

Stopping a Del ivery Task for Immediate Del iveryIf you want to stop the delivery of a document, you can stop the delivery task for immediate delivery. You might want to stop a delivery task if the receiver of the document cannot receive the document at the current time. You might also want to stop a delivery task if you are running Trading Networks in a clustered environment and you want to reassign the delivery task to another server in the cluster. For information on running Trading Networks in a clustered environment, see “Trading Networks in a High Availability Environment” on page 44.a

Perform the following procedure to stop a delivery task for immediate delivery:

1 Start the Trading Networks Console. If you need procedures for this step, see “Starting the Trading Networks Console” on page 22.

2 Select View Tasks.

3 Select Show Query on the toolbar to display the query panels if they are not already displayed.

4 To indicate that you want to work with delivery tasks, click the Task Type checkbox, and select Delivery from the list.

5 Select the Partner field and select the partner that is to receive the document you want

to stop. Type in the name of the partner or click the Select... button to select the partner from the Partner Selection Dialog. For more information about how to select a partner, see “Selecting a Partner” on page 34.

6 Select Run Query on the toolbar. Trading Networks updates the Tasks table on the bottom portion of the screen with the query results.

7 Select the task you want to stop by clicking the row for the delivery task.

8 Select Tasks Stop to stop the delivery task.

Note: If you want to stop a scheduled delivery task, disable or suspend the queue where the task resides. When you want to restart the delivery, enable the queue.

To stop a delivery task for immediate delivery

476 webMethods Trading Networks User’s Guide Version 6.5

Page 477: Web Methods Trading Networks Users Guide 65

Restarting an Immediate Delivery Task

Restart ing an Immediate Del ivery TaskIf you previously stopped a delivery task for immediate delivery, you can restart it. If a delivery task has failed and you have resolved the problem that caused the failure, you can restart it. When you restart a delivery task, Trading Networks attempts to deliver the document again. You can only restart delivery tasks that have the task status STOPPED or FAILED.

When a delivery task is restarted and the delivery is an immediate delivery, Trading Networks resets the task status to PENDING and sets the Retries value to 0. Trading Networks then attempts to deliver the document again up to the number of attempts defined by the Maximum Retry Limit setting.

Perform the following procedure to restart an immediate delivery task:

1 Start the Trading Networks Console. If you need procedures for this step, see “Starting the Trading Networks Console” on page 22.

2 Select View Tasks.

3 Select Show Query on the toolbar to display the query panels if they are not already displayed.

4 To indicate that you want to work with delivery tasks, click the Task Type checkbox, and select Delivery from the list.

5 Select the Partner field and select the partner that is to receive the document you want

to restart. Type in the name of the partner or click the Select... button to select a partner from the Partner Selection Dialog. For more information about how to select a partner, see “Selecting a Partner” on page 34.

6 Select the Task Status check box.

To list stopped delivery tasks, set the Task Status field to STOPPED.

To list failed delivery tasks, set the Task Status field to FAILED.

Note: If you want to restart a scheduled delivery task, enable the queue that was previously disabled or suspended.

Note: You can restart only tasks that were started on the Integration Server to which the Trading Networks Console currently has an open session.

To restart an immediate delivery task

webMethods Trading Networks User’s Guide Version 6.5 477

Page 478: Web Methods Trading Networks Users Guide 65

C H A P T E R 1 9 D e l i v e r y Ta s k s

7 Select Run Query on the toolbar. Trading Networks updates the Tasks table on the bottom portion of the screen with the query results.

8 Select the task you want to restart by clicking the row for the delivery task.

9 Select Tasks Restart to restart the delivery task.

Delet ing Del ivery TasksTrading Networks automatically deletes delivery tasks when the document that is associated with a delivery task is either archived or deleted. If you do not use the archival and deletion feature of Trading Networks, you can manually delete delivery tasks.

You might want to delete delivery tasks that have the task status DONE because the documents have already been successfully delivered. You might also want to delete delivery tasks with the tasks status FAILED if you cannot correct the problem or do not want Trading Networks to attempt to deliver the document again.

To delete delivery tasks, you enter a query to display the tasks that you want to delete. Trading Networks deletes all delivery tasks that result from the query.

Perform the following procedure to manually delete a delivery task:

1 Start the Trading Networks Console. If you need procedures for this step, see “Starting the Trading Networks Console” on page 22.

2 Select View Tasks.

3 Select Show Query on the toolbar to display the query panels if they are not already displayed.

4 To indicate that you want to work with delivery tasks, select the Task Type checkbox, and select Delivery from the list.

5 To find the delivery task that you want to delete, perform a delivery task query.

a For instructions how to fill out the fields in the query panel to select the delivery tasks that you want to view, see step 4 on page 472.

b Select Run Query on the toolbar. Trading Networks updates the Tasks table on the bottom portion of the screen with the query results.

Note: You can delete delivery tasks for both immediate and scheduled deliveries.

To manually delete a delivery task

478 webMethods Trading Networks User’s Guide Version 6.5

Page 479: Web Methods Trading Networks Users Guide 65

Reassigning a Delivery Task to Another Server

6 Select Tasks Delete to delete the displayed delivery tasks. When Trading Networks prompts you to verify that you want to remove all displayed delivery tasks; click Yes.

Reassigning a Del ivery Task to Another ServerEach delivery task is associated with the Integration Server on which it was started. If you have a clustered environment (that is, multiple Integration Servers that share a single database), you can reassign a delivery task to another server in the cluster. You might want to reassign a delivery task if for some reason you can no longer use the Integration Server on which a delivery task was started (e.g., the server has failed for some reason). If the server on which the delivery task currently resides is running, you can only reassign delivery tasks that have the status STOPPED or FAILED. If the server is not running, you can reassign delivery tasks that have a NEW, PENDING, STOPPED, or FAILED status. The server to which you are reassigning the task must be running.

When you reassign a delivery task, you need to specify the server ID of the server to which you want to reassign the delivery task. The server ID is the host name of the machine on which the Integration Server is installed.

Perform the following procedure to reassign a delivery task:

1 Start the Trading Networks Console. If you need procedures for this step, see “Starting the Trading Networks Console” on page 22.

2 Select View Tasks.

3 Select Show Query on the toolbar to display the query panels if they are not already displayed.

4 To indicate that you want to work with delivery tasks, click the Task Type checkbox, and select Delivery from the list.

5 To find the delivery task that you want to reassign, perform a delivery task query.

a For instructions how to fill out the fields in the query panel to select the delivery tasks that you want to view, see step 4 on page 472.

b Select Run Query on the toolbar. Trading Networks updates the Tasks table on the bottom portion of the screen with the query results.

Note: When reassigning a task, Trading Networks invokes the wm.server:connect and wm.server:ping services. As installed, these services are protected by the Anonymous ACL. If you update the Anonymous ACL or use a different ACL to protect these services, Trading Networks might be unable to reassign tasks.

To reassign a delivery task to another server

webMethods Trading Networks User’s Guide Version 6.5 479

Page 480: Web Methods Trading Networks Users Guide 65

C H A P T E R 1 9 D e l i v e r y Ta s k s

6 Select the delivery task you want to reassign by clicking the row for the delivery task.

7 Select Tasks Reassign. Trading Networks displays a dialog box.

8 Specify the server ID of the server to which you want to reassign the task in the Server ID to assign the task to field.

9 Click OK.

480 webMethods Trading Networks User’s Guide Version 6.5

Page 481: Web Methods Trading Networks Users Guide 65

C H A P T E R 20

Service Execut ion Tasks

What is a Service Execution Task? . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 482

About Viewing Service Execution Tasks . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 482

Finding and Viewing Service Execution Tasks . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 485

Running Service Execution Tasks Queries . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 489

Stopping a Service Execution Task . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 489

Restarting a Service Execution Task . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 490

Deleting Service Execution Tasks . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 491

Reassigning a Service Execution Task to Another Server . . . . . . . . . . . . . . . . . . . . . . . . . 492

webMethods Trading Networks User’s Guide Version 6.5 481

Page 482: Web Methods Trading Networks Users Guide 65

C H A P T E R 2 0 S e r v i c e E x e c u t i o n Ta s k s

What is a Service Execut ion Task?A service execution task is a task that webMethods Trading Networks (Trading Networks) performs to asynchronously execute a service using reliable execution. Reliable execution is a feature of Trading Networks that allows Trading Networks to automatically retry failed services. If Trading Networks attempts to execute a service and the service fails, Trading Networks attempts to execute the service subsequent times until the service succeeds or until Trading Networks reaches the maximum retry limit. You define the system-wide parameters that Trading Networks uses to determine how many times to attempt to re-execute a service and how often to attempt the retries.

About Viewing Service Execut ion TasksTo view service execution tasks, first specify a query to identify the service execution tasks in which you are interested. Trading Networks returns information about the service execution tasks that meet the search criteria that you specified in your query. If you plan to use the same query many times, you can name and save the query. When you want to reuse the query, you simply select it.

Trading Networks sets up a service execution task to keep track of information about its attempts to execute the service. The following lists the information that Trading Networks maintains for a service execution task:

For more information about

Service execution tasks, see Chapter 5, "Trading Networks Document Processing" in the webMethods Trading Networks Concepts Guide.

Configuring tasks setting, see “Configuring Tasks Settings” on page 52.

Note: If you are using an OEM version of the Trading Networks, the Tasks feature is not available through the Trading Networks Console. To view tasks, use Trading Networks Web Manager.

Information in a service execution task Description

Task ID A unique identifier that Trading Networks assigns to the task.

Task Type The type of task. For a service execution task, Task Type is “Service execution”.

Time Created Timestamp from when Trading Networks created the service execution task.

482 webMethods Trading Networks User’s Guide Version 6.5

Page 483: Web Methods Trading Networks Users Guide 65

About Viewing Service Execution Tasks

Time Updated Timestamp from the last time Trading Networks updated the service execution task. This is usually the last time Trading Networks attempted to re-execute the service.

Task Status Status of the service execution task. It will be one of the following:

NEW—Trading Networks just created the service execution task and has not attempted to execute the service yet.

PENDING—Trading Networks has attempted to execute the service one or more times, but the service has not been completed successfully.

DONE—Trading Networks has successfully executed the service. Trading Networks considers a service execution successful when the service return values include Status set to “success”.

FAILED—Trading Networks has reached the maximum retry limit for the task and was unable to successfully execute the service. In other words, Trading Networks executed the service the maximum times and each time the service was executed, the return values indicated that the service failed. Trading Networks considers an attempt to execute a service failed when the service return values include Status set to “fail”.

STOPPED—Trading Networks has stopped the task due to a manual user request.

Note: The QUEUED and DELIVERY task statuses are not applicable for service execution tasks. These task statuses are only applicable to delivery tasks.

Delivery Method Delivery Method is not applicable for service execution tasks. Internally, Trading Networks sets the Delivery Method to wm.tn.route:invokeWrapper for service execution tasks.

Retry Limit Maximum number of times Trading Networks is to attempt to re-execute the service as defined in the reliable execution configuration settings.

Information in a service execution task Description

webMethods Trading Networks User’s Guide Version 6.5 483

Page 484: Web Methods Trading Networks Users Guide 65

C H A P T E R 2 0 S e r v i c e E x e c u t i o n Ta s k s

Service execution tasks remain in the Trading Networks system until you delete them or until the document with which the service execution task is associated is archived or deleted. For more information about archiving and deleting documents, see ““Archiving and Deleting Documents” on page 456.

Retry Factor The factor Trading Networks uses to calculate how long to wait before making the second and subsequent attempts to re-execute the service. Trading Networks calculates the time to wait by multiplying the last wait time by Retry Factor.

Retries Number of times Trading Networks has already attempted to re-execute the service.

Time To Wait Number of milliseconds Trading Networks is to wait before making its first attempt to re-execute the service. (Trading Networks uses the Time To Wait value along with the Retry Factor to calculate how long to wait for subsequent retry attempts.)

Status Whether the last attempt to execute the service was successful or not. Status is “success” if service executed successfully. Status is “fail” if service failed.

Status Message The value the service returned for Status Message. If the service does not return a value for this field, it will be blank.

Transport Time The time it took to execute the service on its last attempt to execute the service. The service must provide this value.

Server ID Identification of the Integration Server that is processing this service execution task. The Server ID is useful when the Integration Server is in a clustered environment. The Server ID is the host name of the machine on which the Integration Server is installed. For more information on server configuration parameters, see the appendix defining the server configuration parameters in the webMethods Integration Server Administrator’s Guide. For more information on clusters, see the webMethods Integration Server Clustering Guide.

Queue Name Queue Name is not applicable for service execution tasks.

Task Output The service output from the last attempt to execute the service.

Information in a service execution task Description

484 webMethods Trading Networks User’s Guide Version 6.5

Page 485: Web Methods Trading Networks Users Guide 65

Finding and Viewing Service Execution Tasks

Finding and Viewing Service Execut ion TasksUse the Tasks screen to find and view service execution tasks in your Trading Networks system.

You can view all service execution tasks or search for tasks based on the following criteria:

Partner—partner identified as the receiver in the document that caused the service execution

Task status—status of the service execution task

Time created—time Trading Networks created the service execution task

1 Start the Trading Networks Console. If you need procedures for this step, see “Starting the Trading Networks Console” on page 22.

2 Select View Tasks.

3 To see detailed information about a specific service execution task, double click on the row containing the task you want more detailed information about. Trading Networks displays the Task Details screen.

4 If you cannot find the service execution task you are looking for, you can use the search criteria on the Tasks screen to query for specific tasks.

a Select Show Query on the toolbar to have Trading Networks display the search criteria.

b .To specify the service execution tasks that you want to view, select the checkbox associated with each criterion that you want to use and fill in the corresponding information as described below:

Note: If you are using an OEM version of the Trading Networks, the Tasks feature is not available through the Trading Networks Console. To view tasks, use Trading Networks Web Manager.

To view service execution tasks in your system

For this parameter... Specify

Task Type The type of task. To indicate that you want to view delivery tasks, select: Execution service from the list.

webMethods Trading Networks User’s Guide Version 6.5 485

Page 486: Web Methods Trading Networks Users Guide 65

C H A P T E R 2 0 S e r v i c e E x e c u t i o n Ta s k s

If you decide you do not want to use a criterion that you have filled out, uncheck the checkbox for that criterion.

5 Select Run Query on the toolbar. Trading Networks updates the Tasks table on the bottom portion of the screen with the query results.

6 To view the details for a service execution task, double click the row containing that service execution task. Trading Networks displays the Tasks Details screen.

Partner The partner that is to receive the document that triggered the execution of this service. Type in the name of the

partner or click the Select... button to select a partner from the Partner Selection Dialog. For more information about how to select a partner, see “Selecting a Partner” on page 34.

Task Status The status of the service execution tasks you want to view. Select the status (NEW, PENDING, DONE, STOPPED, or FAILED) from the list.

To view service execution tasks of all statuses, do not use this criterion.

Note: If you select QUEUED or DELIVERING, the query will not return any service execution tasks because these task statuses do not apply to service execution tasks. (These task statuses only apply to delivery tasks.)

Delivery Method Nothing. This field is not applicable to service execution tasks; do not select the checkbox for Delivery Method.

Time Created The date Trading Networks created the service execution task. Select an entry from the list.

To specify a date range, select Custom from the list. Then specify dates in the Beginning and Ending fields. You can

type in a date value, or click to open a dialog that allows you to select the date from a calendar.

To view service execution tasks regardless of the date that Trading Networks created them, do not use this criterion.

For this parameter... Specify

486 webMethods Trading Networks User’s Guide Version 6.5

Page 487: Web Methods Trading Networks Users Guide 65

Finding and Viewing Service Execution Tasks

Viewing the Service Execution Tasks Associated with a DocumentWhen Trading Networks receives a document, it determines the processing rule it is to use to process that document. If the processing rule indicates that Trading Networks is to execute a service by creating an asynchronous task, Trading Networks uses reliable execution to execute the service and creates a service execution task to govern and keep track of its attempts to execute the service.

You can view the service execution tasks that are associated with documents that you have saved in the Trading Networks system.

1 Perform the steps described in “Viewing Documents in Your System” on page 442 to have Trading Networks list information about the document in which you are interested.

2 If you are not currently using the Detail view on the Transaction Analysis screen, select Transactions View Detail/Summary to change the display.

3 Click the row containing the document for which you want to view service execution tasks.

4 Select Transactions View Document.

5 Select the Tasks tab.

6 To further refine the list of service execution tasks, perform the following steps:

a Select Show Query on the toolbar to display the query panels if they are not already displayed.

b Perform a service execution task query. For instructions how to fill out the fields in the query panel to select the service execution tasks that you want to view, see step 4 on page 485.

c Select Run Query on the toolbar. Trading Networks updates the Tasks table on the bottom portion of the screen with the query results.

d To view the details for a service execution task, double click the row containing that service execution task.

To view service tasks associated with a document

webMethods Trading Networks User’s Guide Version 6.5 487

Page 488: Web Methods Trading Networks Users Guide 65

C H A P T E R 2 0 S e r v i c e E x e c u t i o n Ta s k s

Exporting Service Execution Task Information to a Fi leTo print the service execution task information that Trading Networks displays on the Tasks screen or make the information available for other applications, you can export the information to a text file. When you export the information, Trading Networks places the information into the file, separating the values with commas.

You can select the type of extension to use for the exported file, e.g., .txt or .csv. After data is exported to the file, you can print the file. You can also open the file in other applications. For example, if you export the data to a .csv file, you can open the file in Microsoft Excel allowing you to create charts and reports based on the data. Another example is that you can open a .csv file in Microsoft Access allowing you to further analyze the data.

Perform the following procedure to export the service execution task information that Trading Networks displays to a text file.

1 Start the Trading Networks Console. If you need procedures for this step, see “Starting the Trading Networks Console” on page 22.

2 Perform the procedures in “Finding and Viewing Service Execution Tasks” on page 485 to list the information you want to export.

3 Select Tasks Export Query Results.

4 In the Export Query Results as Comma-Separated Values dialog box, specify the file to which you want to save the exported service execution task information.

5 Click Save. Trading Networks displays a dialog specifying the amount of data saved. Click OK.

To export the service execution task information to a file

488 webMethods Trading Networks User’s Guide Version 6.5

Page 489: Web Methods Trading Networks Users Guide 65

Running Service Execution Tasks Queries

Running Service Execut ion Tasks QueriesIf you plan to use the same service execution task query many times, you can save the query. Trading Networks adds the service execution task query to the list of saved queries on the tool bar. When you want to reuse the query, you simply select it from the queries list.

For more information about the different query functions that you can perform for service execution task queries, see the following table:

Stopping a Service Execut ion TaskIf you want to stop the execution of a service, you can stop the service execution task. You might want to stop a service execution task if you are running Trading Networks in a clustered environment and you want to reassign the service execution task to another server in the cluster. For information on running Trading Networks in a clustered environment, see “Trading Networks in a High Availability Environment” on page 44.

Perform the following procedure to stop a service execution task:

1 Start the Trading Networks Console. If you need procedures for this step, see “Starting the Trading Networks Console” on page 22.

2 Select View Tasks.

3 Select Show Query on the toolbar to display the query panels if they are not already displayed.

4 To indicate that you want to work with service execution tasks, select the Task Type checkbox, and select Service execution from the list.

Query Function See page...

“Enabling the Query Functions” page 402

“Creating and Saving a Query” page 404

“Selecting and Running a Query” page 405

“Updating the Search Criteria for a Saved Query” page 406

“Saving a New Query Based on an Existing Query” page 407

“Reverting to a Saved Query” page 407

“Deleting Saved Queries” page 408

To stop a service execution task

webMethods Trading Networks User’s Guide Version 6.5 489

Page 490: Web Methods Trading Networks Users Guide 65

C H A P T E R 2 0 S e r v i c e E x e c u t i o n Ta s k s

5 Select Run Query on the toolbar. Trading Networks updates the Tasks table on the bottom portion of the screen with the query results.

6 Select the task you want to stop by clicking the row for the service execution task.

7 Select Tasks Stop to stop the service execution task.

Restart ing a Service Execut ion TaskIf you previously stopped a service execution task, you can restart it. If a service execution task has failed and you have resolved the problem that caused the failure, you can restart it. When you restart a service execution task, Trading Networks attempts to re-execute the service again. You can restart only service execution tasks that have the task status STOPPED or FAILED.

When a service execution task is restarted, Trading Networks resets the task status to PENDING and sets the Retries value to 0. Trading Networks then attempts to re-execute the service again up to the number of attempts defined by the Retry Limit setting.

Perform the following procedure to restart a service execution task:

1 Start the Trading Networks Console. If you need procedures for this step, see “Starting the Trading Networks Console” on page 22.

2 Select View Tasks.

3 Select Show Query on the toolbar to display the query panels if they are not already displayed.

4 To indicate that you want to work with service execution tasks, select the Task Type checkbox, and select Service execution from the list.

5 To list stopped tasks, select the Task Status check box, and set the Task Status field to STOPPED. To list failed tasks, select the Task Status check box, and set the Task Status field to FAILED.

6 Select Run Query on the toolbar. Trading Networks updates the Tasks table on the bottom portion of the screen with the query results.

Note: You can restart only tasks that were started on the Integration Server to which the Trading Networks Console currently has an open session.

To restart a service execution task

490 webMethods Trading Networks User’s Guide Version 6.5

Page 491: Web Methods Trading Networks Users Guide 65

Deleting Service Execution Tasks

7 Select the task you want to restart by clicking the row for the service execution task.

8 Select Tasks Restart to restart the service execution task.

Delet ing Service Execut ion TasksTrading Networks automatically deletes service execution tasks when the document with which a service execution task is associated is either archived or deleted. If you do not use the archival and deletion feature of Trading Networks, you can manually delete service execution tasks.

You might want to delete service execution tasks that have the task status DONE because the services have already been successfully executed. You might also want to delete service execution tasks with the tasks status FAILED if you cannot correct the problem or do not want Trading Networks to attempt to re-execute the services again.

To delete service execution tasks, you enter a query to display the tasks that you want to delete. Trading Networks deletes all service execution tasks that result from the query.

Perform the following procedure to manually delete a service execution task:

1 Start the Trading Networks Console. If you need procedures for this step, see “Starting the Trading Networks Console” on page 22l.

2 Select View Tasks.

3 Select Show Query on the toolbar to display the query panels if they are not already displayed.

4 To indicate that you want to work with service execution tasks, select the Task Type checkbox, and select Service execution from the list.

5 To find the service execution task that you want to delete, perform a service execution query.

a For instructions how to fill out the fields in the query panel to select the service execution tasks that you want to view, see step 4 on page 485.

b Select Run Query on the toolbar. Trading Networks updates the Tasks table on the bottom portion of the screen with the query results.

6 Select Tasks Delete to delete the displayed service execution tasks. When Trading Networks prompts you to verify that you want to remove all displayed service execution tasks; click Yes.

To manually delete a service execution task

webMethods Trading Networks User’s Guide Version 6.5 491

Page 492: Web Methods Trading Networks Users Guide 65

C H A P T E R 2 0 S e r v i c e E x e c u t i o n Ta s k s

Reassigning a Service Execut ion Task to Another ServerEach service execution task is associated with the Integration Server on which it was started. If you have a clustered environment (that is, multiple Integration Servers that share one database), you can reassign a service execution task to another server in the cluster. You might want to reassign a service execution task if for some reason you can no longer use the Integration Server on which a service execution task was started (e.g., the server has failed for some reason). If the server on which the service execution task currently resides is running, you can only reassign service execution tasks that have the status STOPPED or FAILED. If the server is not running, you can reassign service execution tasks that have a NEW, PENDING, STOPPED or FAILED status. The server to which you are reassigning the task must be running.

When you reassign a service execution task, you need to specify the server ID of the server to which you want to reassign the service execution task. The server ID is the host name of the machine on which the Integration Server is installed.

Perform the following procedure to reassign a service execution task:

1 Start the Trading Networks Console. If you need procedures for this step, see “Starting the Trading Networks Console” on page 22.

2 Select View Tasks.

3 Select Show Query on the toolbar to display the query panels if they are not already displayed.

4 To indicate that you want to work with service execution tasks, select the Task Type checkbox, and select Service execution from the list.

5 To find the service execution task that you want to reassign, perform a service execution task query.

a For instructions how to fill out the fields in the query panel to select the service execution tasks that you want to view, see step 4 on page 485.

b Select Run Query on the toolbar. Trading Networks updates the Tasks table on the bottom portion of the screen with the query results.

Note: When reassigning a task, Trading Networks invokes the wm.server:connect and wm.server:ping services. As installed, these services are protected by the Anonymous ACL. If you update the Anonymous ACL or use a different ACL to protect these services, Trading Networks might be unable to reassign tasks.

To reassign a service execution task to another server

492 webMethods Trading Networks User’s Guide Version 6.5

Page 493: Web Methods Trading Networks Users Guide 65

Reassigning a Service Execution Task to Another Server

6 Select the service execution task you want to reassign by clicking the row for the service execution task.

7 Select Tasks Reassign. Trading Networks displays a dialog box.

8 Specify the server ID of the server to which you want to reassign the task in the Server ID to assign the task to field.

9 Click OK.

webMethods Trading Networks User’s Guide Version 6.5 493

Page 494: Web Methods Trading Networks Users Guide 65

C H A P T E R 2 0 S e r v i c e E x e c u t i o n Ta s k s

494 webMethods Trading Networks User’s Guide Version 6.5

Page 495: Web Methods Trading Networks Users Guide 65

C H A P T E R 21

The Act iv i ty Log

What is the Activity Log? . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 496

Viewing the Activity Log . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 498

Deleting Activity Log Entries . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 503

Running Activity Log Queries . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 503

webMethods Trading Networks User’s Guide Version 6.5 495

Page 496: Web Methods Trading Networks Users Guide 65

C H A P T E R 2 1 T h e A c t i v i t y L o g

What is the Act ivi ty Log?The activity log is a log that Trading Networks maintains to record the activity that occurs:

When you perform administrative actions for your Trading Networks system

While managing your partners

While documents are being received, processed, and delivered

Trading Networks only records activity log entries while documents are being received, processed, and delivered if instructed to do so by the Save Document to Database pre-processing action. For more information about this pre-processing action, see “Pre-Processing Actions” on page 327.

You can use the Activity Log screen of the Trading Networks Console to view the activity log. Additionally, if you want to view tasks that are associated with a specific document, you can use the Transaction Analysis screen to view detail information for a specific document.

The activity log contains the following information for each entry:

For more information about

The activity log, see Chapter 8, "Tracking and Analyzing Run-Time Information in Trading Networks" in the webMethods Trading Networks Concepts Guide.

The Transaction Analysis screen, see Chapter 18, “Managing and Tracking Documents”.

Field Description

Timestamp The timestamp when Trading Networks added the entry to the activity log.

Type The severity level of the entry. Type will be Error, Warning, or Message (informational).

Class An identification of the type of activity that caused Trading Networks to add the entry. For example, Class is set to Envelope if the message relates to the Trading Networks activity of attempting to extract the envelope attributes from a document. For a list of the classifications, see “Activity Class Values” on page 497.

496 webMethods Trading Networks User’s Guide Version 6.5

Page 497: Web Methods Trading Networks Users Guide 65

What is the Activity Log?

Activity Class ValuesThe following lists the values that Trading Networks uses for the Activity class. If you use the wm.tn:log built-in service to add entries to the activity log, you can specify any value you want for Activity class.

User Name The user name of the current webMethods user when the activity occurred. For example, when a Trading Networks client sends a document to your Integration Server to be processed, if the Trading Networks client was authenticated by your Integration Server, it either supplied a user name and password of a webMethods user account or presented a client certificate. In this case, User Name is the user name that the client supplied or the value from the client certificate that represents the user name.

Brief Message A shortened version of the full message that identifies the type of message in the entry. For example, if the full message is describing an error that Trading Networks encountered executing an XQL query, Brief Message is Query Failed.

Full Message The complete message that Trading Networks records in the activity log to describe the activity.

Activity class Trading Networks uses the activity class when it adds entries related to…

Delivery Performing reliable document delivery

Envelope Extracting any of the envelope attributes—ConversationID, DocumentID, GroupID, ReceiverID, and/or SenderID.

General Other unspecified error messages and warnings

Processing Processing documents using processing rules

Recognition Recognizing TN document types (before extracting document attributes)

Saving Saving a document to the database

Validation Validating a document against an IS schema

Verification Verifying the digital signature of a document

Field Description

webMethods Trading Networks User’s Guide Version 6.5 497

Page 498: Web Methods Trading Networks Users Guide 65

C H A P T E R 2 1 T h e A c t i v i t y L o g

Viewing the Act iv i ty LogYou can use the Trading Networks Console to view activity log entries. You can view all activity log entries or search for specific entries based on:

Partner associated with the entry

Activity class that identifies the Trading Networks function associated with the entry, for example, Trading Networks sets the activity class to Recognition when adding entries related to using the TN document types to recognize a document

Activity type that identifies the severity level of the entry, i.e., Error, Warning, or Message (informational)

The text of the activity log message

Date when Trading Networks added the activity log entry

Viewing Entries that Relate to Enterprise or a PartnerWhen Trading Networks adds entries that relate to a partner in the trading network to the activity log, it associates the entries with the specific partner. That partner can be either the local partner (Enterprise) or one of the other partners in the network. Entries that relate to a partner in the Trading Networks system are for the following types of activities:

Business document exchange activities where the partner is the sender

Errors that occur during reliable delivery whether the partner is the sender or the receiver

To view activity log entries that relate to your Trading Networks system, perform the following procedure.

1 Start the Trading Networks Console. If you need procedures for this step, see “Starting the Trading Networks Console” on page 22.

2 Select View Activity Log.

3 Select Show Query on the toolbar to display the query panels if they are not already displayed.

4 To specify basic search criteria, click the Basic Criteria tab. Then, select the checkbox next to each criterion that you want to use and fill in the corresponding information as described below:

To view activity log entries that relate to your Trading Networks system

498 webMethods Trading Networks User’s Guide Version 6.5

Page 499: Web Methods Trading Networks Users Guide 65

Viewing the Activity Log

For this Basic Criteria tab parameter… Specify…

Partner The partner whose activity log entries you want to view. Select a partner name from the list. To view the entries that are related to the local partner (Enterprise), select the partner name of the local partner from the list. To view the entries associated with another partner, select that partners name from the list.

Activity Class The activity class associated with the entries you want to view. To specify an activity class that Trading Networks uses, select an activity class from the Activity Class list. For descriptions of the values that Trading Networks uses for activity class, see “Activity Class Values” on page 497. To specify an activity class that your site has defined, type the activity class in the Activity Class field.

This field is case-sensitive; be sure to use the exact combination of upper- and lowercase letters.

Activity Type The type of entry you want to view. Select Error, Warning, or Message.

Brief Message A character string that identifies the text of the brief message of the entries you want to view.

This field is case-sensitive; be sure to use the exact combination of upper- and lowercase letters. You can use the following pattern matching characters:

Character Matches…

% (percent) Zero or more characters

_ (underscore) A single character

Example:

_t_p matches: Stop, stop, stepbut not: sstop, stoop

D%t matches: Document, Document Testbut not: Documents, Polled Document

To search for an entry that contains the % or _ characters, enclose the string you specify in quotes. For example, if you want to search for entries that have a brief message that contains Doc_ignored, specify ‘Doc_ignored’.

Note: There is no way to do an exact character match.

webMethods Trading Networks User’s Guide Version 6.5 499

Page 500: Web Methods Trading Networks Users Guide 65

C H A P T E R 2 1 T h e A c t i v i t y L o g

If you decide you do not want to use a criterion that you have filled out, deselect the checkbox for that criterion.

5 To specify advanced search criteria, click the Advanced tab. Then, select the checkbox next to each criterion that you want to use and fill in the corresponding information as described below:

If you decide you do not want to use a criterion that you have filled out, deselect the checkbox for that criterion.

Timestamp The date Trading Networks added the entry to the activity log.

To specify a date range, select Custom from the list. Then specify dates in the Beginning and Ending fields. You can type in a date

value, or click to open a dialog that allows you to select the date from a calendar.

For this Advanced tab parameter… Specify…

User Name The user name of the current webMethods user when the activity occurred. Select a user from the list.

Full Message A character string that identifies the text of the full message of the entries you want to view.

This field is case-sensitive; be sure to use the exact combination of upper- and lowercase letters. You can use the following pattern matching characters:

Character Matches…

% (percent) Zero or more characters

_ (underscore) A single character

To search for an entry that contains the % or _ characters, enclose the string you specify in quotes. For example, if you want to search for entries with the full message that contain Documents_persisted 100%, specify ‘Documents_persisted 100%’.

Note: There is no way to do an exact character match.

For this Basic Criteria tab parameter… Specify…

500 webMethods Trading Networks User’s Guide Version 6.5

Page 501: Web Methods Trading Networks Users Guide 65

Viewing the Activity Log

6 Select Run Query on the toolbar. Trading Networks updates the Log table on the bottom portion of the screen with the query results.

Viewing Entries that Relate to a DocumentTo view activity log entries that relate to a specific document, perform the following procedure.

:

1 Start the Trading Networks Console. If you need procedures for this step, see “Starting the Trading Networks Console” on page 22.

2 Perform the steps described in “Viewing Documents in Your System” on page 442 to have Trading Networks list information about the document for which you are interested.

3 Click the row containing the document for which you want to view activity log entries.

4 Select Transactions View Document.

5 Select the Activity Log tab.

6 To further refine the list of entries, perform the following steps.

Note: You can also view activity log entries that relate to any partner on your network when you use the Partner selection in the Selector Panel. The selection criteria in the query panel of the Activity Log screen are identical whether using the Enterprise or Trading Partners selection of the Selector Panel.

Note: Trading Networks only saves activity log entries that pertain to the processing of a document if instructed to do so by either the TN document type and/or the processing rule. If you do not save activity log entries, the Activity Log tab will have no data for you to view.

Note: If you are using an OEM version of the Trading Networks, the Transactions Analysis feature is not available through the Trading Networks Console. To view document-related activity log entries, use Trading Networks Web Manager.

To view activity log entries that relate to a document

webMethods Trading Networks User’s Guide Version 6.5 501

Page 502: Web Methods Trading Networks Users Guide 65

C H A P T E R 2 1 T h e A c t i v i t y L o g

a Click to display the query panels if they are not already displayed.

b Perform an activity log query. For instructions how to fill out the fields in the query panel to select the delivery tasks that you want to view, see step 4 on page 498.

c Select Run Query on the toolbar. Trading Networks updates the Log table on the bottom portion of the screen with the query results.

d To view the details for an activity log entry, double click the row containing that entry.

Exporting Activity Log Information to a Fi leTo print the activity log information that Trading Networks displays on the Activity Log screen or make the information available for other applications, you can export the information to a text file. When you export the information, Trading Networks places the information into the file, separating the values with commas.

You can select the type of extension to use for the exported file, e.g., .txt or.csv. After data is exported to the file, you can print the file. You can also open the file in other applications. For example, if you export the data to a .csv file, you can open the file in Microsoft Excel allowing you to create charts and reports based on the data. Another example is that you can open a .csv file in Microsoft Access allowing you to further analyze the data.

Perform the following procedure to export the activity log information that Trading Networks displays to a text file.

1 Start the Trading Networks Console. If you need procedures for this step, see “Starting the Trading Networks Console” on page 22.

2 Perform the procedures in “Viewing Entries that Relate to Enterprise or a Partner” on page 498 to list the information you want to export.

3 Select Log Export Query Results.

4 In the Export Query Results as Comma-Separated Values dialog box, specify the file to which you want to save the exported activity log information.

5 Click Save. Trading Networks displays a dialog specifying the amount of data saved. Click OK.

To export the activity log information to a file

502 webMethods Trading Networks User’s Guide Version 6.5

Page 503: Web Methods Trading Networks Users Guide 65

Deleting Activity Log Entries

Delet ing Act ivi ty Log Entr iesTrading Networks automatically deletes activity log entries when the documents with which entries are associated are either archived or deleted. However, you can manually delete activity log entries.

To delete activity log entries, you query the activity log to display the entries that you want to delete. Trading Networks deletes all activity log entries that result from the query.

Perform the following procedure to manually delete activity log entries:

1 Start the Trading Networks Console. If you need procedures for this step, see “Starting the Trading Networks Console” on page 22.

2 Perform the procedures in either “Viewing Entries that Relate to Enterprise or a Partner” on page 498 or “Viewing Entries that Relate to a Document” on page 501 to list the activity log entries that you want to delete.

3 Click . When Trading Networks prompts you to verify that you want to remove the activity log entries, click Yes.

Running Act ivi ty Log QueriesIf you plan to use the same activity log query many times, you can save the query. Trading Networks adds the activity log query to the list of saved queries on the tool bar. When you want to reuse the query, you simply select it from the queries list.

For more information about the different query functions that you can perform for activity log queries, see the following table:

To delete activity logs entries

Query Function See page...

“Enabling the Query Functions” page 402

“Creating and Saving a Query” page 404

“Selecting and Running a Query” page 405

“Updating the Search Criteria for a Saved Query” page 406

“Saving a New Query Based on an Existing Query” page 407

“Reverting to a Saved Query” page 407

“Deleting Saved Queries” page 408

webMethods Trading Networks User’s Guide Version 6.5 503

Page 504: Web Methods Trading Networks Users Guide 65

C H A P T E R 2 1 T h e A c t i v i t y L o g

504 webMethods Trading Networks User’s Guide Version 6.5

Page 505: Web Methods Trading Networks Users Guide 65

A P P E N D I X A

Export ing and Import ing Database Informat ion

About Exporting and Importing Database Information . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 506

Trading Networks Objects that You Can Export and Import . . . . . . . . . . . . . . . . . . . . . . . . 507

Dependencies For Trading Networks Objects . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 508

Migrating Profiles . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 509

Migrating Profile Fields . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 513

Migrating TN Document Types . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 514

Migrating Custom Document Attributes . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 515

Migrating Processing Rules . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 515

Migrating Trading Partner Agreements (TPAs) . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 518

Migrating Queries . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 519

Exporting Database Information from the Console . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 519

Importing Database Information from the Console . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 521

Using the tnexport and tnimport Utilities . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 526

webMethods Trading Networks User’s Guide Version 6.5 505

Page 506: Web Methods Trading Networks Users Guide 65

A P P E N D I X A E x p o r t i n g a n d I m p o r t i n g D a t a b a s e I n f o r m a t i o n

About Export ing and Import ing Database Informat ionwebMethods Trading Networks (Trading Networks) provides an export/import feature to allow you to migrate Trading Networks objects (e.g., document attributes, TN document types, profiles) from one database to another. Use the export/import feature when:

You want to deploy from a development environment to a production environment.

You are using multiple instances of Trading Networks, and you want each Trading Networks instance to have its own database with identical Trading Networks objects. You can create the Trading Networks objects on one instance of Trading Networks; then use export/import to migrate the Trading Networks objects to the databases of the other Trading Networks instances. For more information, see “Separate Database for Each Instance of Trading Networks” on page 47.

You have changed the type of database you are using; for example, you changed from an Oracle database to a SQL Server database.

When you export Trading Networks objects, Trading Networks creates a file that contains the data you exported. You place the file in a location available to the target Trading Networks system and import the data from the file into the database on the target Trading Networks system.

Trading Networks Console makes Trading Networks objects available for export regardless of whether they are disabled or deleted. The Trading Networks Console does not indicate which are disabled, enabled, or deleted. Trading Networks maintains the current state (e.g., disabled, enabled, deleted) of the Trading Networks objects that you migrate.

Important! The export/import feature is only for migrating Trading Networks objects between databases on your system that use the same version of Trading Networks. It is not for:

Migrating database information from one version of Trading Networks to another.

Sharing Trading Networks objects with trading partners.

506 webMethods Trading Networks User’s Guide Version 6.5

Page 507: Web Methods Trading Networks Users Guide 65

Trading Networks Objects that You Can Export and Import

Trading Networks Objects that You Can Export and ImportYou can export/import the Trading Networks objects listed below.

Profiles, see “Migrating Profiles” on page 509.

Profile fields, see “Migrating Profile Fields” on page 513.

TN document types, see “Migrating TN Document Types” on page 514.

Custom document attributes, see “Migrating Custom Document Attributes” on page 515.

Processing rules, see “Migrating Processing Rules” on page 515.

Trading Partner Agreements (TPAs), see “Migrating Trading Partner Agreements (TPAs)” on page 518.

Queries that you defined for Console screens, see “Migrating Queries” on page 519.

You cannot export/import information about the documents that are in your system, for example, document content, tasks, and activity log entries.

To export data using the Console, you use the Export Data dialog box; to import, use the Import Data dialog box. Trading Networks displays a tree structure in these dialog boxes that contains the items that are available for you to export/import.

Note: To export/import using the command line utilities, see “Using the tnexport and tnimport Utilities” on page 526.

webMethods Trading Networks User’s Guide Version 6.5 507

Page 508: Web Methods Trading Networks Users Guide 65

A P P E N D I X A E x p o r t i n g a n d I m p o r t i n g D a t a b a s e I n f o r m a t i o n

Dependencies For Trading Networks ObjectsIn the Export Data dialog boxes, when you select an item in the tree structure, if the selected item requires additional items, Trading Networks shows these dependencies in the Dependencies area of the dialog. For example, if you select a TN document type that references custom attributes and a duplicate checking service for the Check for Duplicate Document pre-processing action, Trading Networks lists the custom attributes and the duplicate checking service in the Dependencies area of the dialog.

Export Data dialog with a TN document type that has dependencies selected

Why You Should Use Export/ Import to Migrate DependenciesFor each Trading Networks object that you create, Trading Networks generates an internal ID for the object. For example, when you create a custom document attribute, Trading Networks generates an internal ID that uniquely identifies that custom attribute in the Trading Networks system. Trading Networks uses its internal IDs to associate Trading Networks objects with one another. For example, if you create a TN document

Note: The Import Data dialog box shows some, but not all of the dependencies. For example, the Import Data dialog box cannot display the IS Service dependencies because these dependencies are not recorded in the exported file.

508 webMethods Trading Networks User’s Guide Version 6.5

Page 509: Web Methods Trading Networks Users Guide 65

Migrating Profiles

type that references the custom attribute, Trading Networks will use the internal ID of the custom attribute to associate it with the TN document type.

As a result, when you migrate a Trading Networks object that requires other Trading Networks objects, you should migrate the dependent objects using export/import as well. For example, if you have a TN document type that references a custom attribute and you migrate the TN document type, you should also migrate the custom attribute. If you recreate the custom attribute on the target system, the target Trading Networks system generates a different internal ID for the custom attribute. The TN document type that you migrated references the internal ID generated on the source system and will not match the internal ID generated for the custom attribute that you recreated on the target system.

Migrat ing Prof i lesTo migrate profiles, use the following items in the Export Data and Import Data dialog boxes:

Items in Export/Import Data Dialog box Use to migrate... Dependencies

Partner Data Data for:

Standard profile fields

Extended profile fields

Certificate information on the Security tab of the profile.

For more information, see “Partner Data” on page 510.

Profile GroupsDelivery MethodsExternal ID TypesContact Types

For more information, see “Partner Data Dependencies” on page 511.

External ID Types External ID types referenced by the profiles on your system.

Trading Networks lists all external ID types defined in the database. These include all the standard external ID types (e.g., DUN, DUNS+4) that are installed with Trading Networks and all custom external ID types that you add using the wm.tn.dictionary:addIDType service.

None

webMethods Trading Networks User’s Guide Version 6.5 509

Page 510: Web Methods Trading Networks Users Guide 65

A P P E N D I X A E x p o r t i n g a n d I m p o r t i n g D a t a b a s e I n f o r m a t i o n

Partner DataTrading Networks lists each partner by its corporation name under the Partner Data item.

Partner Data in the Export Data or Import Data dialog box

Contact Types Contact types referenced by the profiles on your system.

Trading Networks lists all contact types defined in the database. These include both the standard contact types (i.e., Technical and Administrative) that are installed with Trading Networks and all custom contact types that you add using the wm.tn.dictionary:addContactType service.

None

Profile Groups Profile groups that you have registered on your Trading Networks system.

None

Items in Export/Import Data Dialog box Use to migrate... Dependencies

Important! You cannot use export/import to share your profile with a partner. When you export your (Enterprise) profile, Trading Networks records that the profile is the Enterprise profile. Trading Networks does not allow you to import the Enterprise system from your system into a partner's system.

Note: The Enterprise profile is also listed by its corporation name. It is not listed under Enterprise.

510 webMethods Trading Networks User’s Guide Version 6.5

Page 511: Web Methods Trading Networks Users Guide 65

Migrating Profiles

For each partner that is listed under Partner Data, Trading Networks lists the following elements:

Profile. Select this item to migrate the data for the standard profile fields for the specific partner.

Security Data. Select this item to migrate the certificate information from the Security tab of the partner's profile. If the profile has no information on the Security tab, the Security Data element will not be listed under Partner Data in the tree.

One element for each extended profile field. Select these items to migrate the data for the extended profile fields for the specific partner. If you have not defined extended fields, no extended field elements will be listed under Partner Data in the tree.

Partner Data DependenciesThe following table shows the dependencies for Partner Data. For more information about dependencies, see “Dependencies For Trading Networks Objects” on page 508.

Partner Data Element Dependencies Description

Profile Profile Groups The profile groups that are identified in the partner’s profile.

Use the Profile Groups tree element to migrate the profile groups.

Delivery Methods The delivery methods that are defined in the profile.

The profile can only contain standard delivery methods that are installed with Trading Networks (e.g., Primary HTTP), so no action is needed.

External ID Types The external ID types that are used by the profile.

If the profile uses custom external ID types that you added using the wm.tn.dictionary:addIDType service, migrate the those external ID types using the External ID Types item.

Trading Networks also lists standard external ID types. You do not need to migrate these unless they have been deleted from the target system.

webMethods Trading Networks User’s Guide Version 6.5 511

Page 512: Web Methods Trading Networks Users Guide 65

A P P E N D I X A E x p o r t i n g a n d I m p o r t i n g D a t a b a s e I n f o r m a t i o n

Profiles that Use Queues

Although the Dependencies does not list queues (public or private), they are also required if referenced by the Receiver’s Queue delivery method in a profile. Review the profiles you want to export/import and migrate the queues if needed. To create the queues on the target system, you can do one of the following:

Use the tnexport and tnimport utilities to export all public and private queues. For more information, see “Using the tnexport and tnimport Utilities” on page 526.

Manually create the required queue on the target system. Be sure to use the exact queue name with the same combination of upper and lowercase letters when defining the queue on the target system.

In addition to migrating the queue, ensure you move the scheduled delivery services that are associated with the queues to the target system.

Contact Types The contact types that are used by the profile.

If the profile uses custom contact types that you added using the wm.tn.dictionary:addContactType service, migrate those contact types using the Contact Types item.

Trading Networks also lists standard contact types. You do not need to migrate these unless they have been deleted from the target system.

Security Data Profile The partner’s profile. You migrate the profile when you select the Profile element under Partner Data.

Extended Profile Fields

Field Definition The profile field definition for the extended profile field.

Use the Field Definitions item to migrate the definition for the extended profile field. For more information, see “Migrating Profile Fields” on page 513.

Profile The partner’s profile. You migrate the profile when you select the Profile element under Partner Data.

Partner Data Element Dependencies Description

Note: Although Trading Networks typically associates related items by internal IDs that it generates (as described in “Dependencies For Trading Networks Objects” on page 508), for queues Trading Networks relates the queue to the profile by its name.

512 webMethods Trading Networks User’s Guide Version 6.5

Page 513: Web Methods Trading Networks Users Guide 65

Migrating Profile Fields

Migrat ing Prof i le FieldsTo migrate profile fields, use the following items in the Export Data and Import Data dialog boxes:

Field Definit ions DependenciesWhen you select a profile field under the Field Definitions item, Trading Networks lists the field group to which the profile field belongs in Dependencies.

If the profile field belongs to a custom field group that you added on the Extended Fields tab of a profile or by using the wm.tn.dictionary:addFieldGroup service, migrate the field groups using the Field Group item.

If the profile field belongs to a standard field group (e.g., Corporation, Delivery) that was installed with Trading Networks, Trading Networks lists the standard field group. You do not need to migrate standard field groups.

For more information about dependencies, see “Dependencies For Trading Networks Objects” on page 508.

Items in Export/Import Data Dialog box Use to migrate... Dependencies

Field Definitions Definitions for standard and extended profile fields.

Note: To migrate the data for profile fields, use the Partner Data item. For more information, see “Partner Data” on page 510.

Field Group

For more information, see “Field Definitions Dependencies” on page 513.

Field Groups Profile field groups that you added to your system on the Extended Field group of a profile or by using the wm.tn.dictionary:addFieldGroup service.

Trading Networks lists all field groups, including the standard field groups that are installed with Trading Networks (e.g., Corporation, Delivery, Contact). You only need to migrate custom field groups that you add.

None

webMethods Trading Networks User’s Guide Version 6.5 513

Page 514: Web Methods Trading Networks Users Guide 65

A P P E N D I X A E x p o r t i n g a n d I m p o r t i n g D a t a b a s e I n f o r m a t i o n

Migrat ing TN Document TypesTo migrate TN document types, use the following items in the Export Data and Import Data dialog boxes:

Document Type DependenciesThe following table shows the dependencies for Document Types. For more information about dependencies, see “Dependencies For Trading Networks Objects” on page 508.

Items in Export/Import Data Dialog box Use to migrate... Dependencies

Document Types Definitions for TN document types. IS ServicesAttributes

For more information, see “Document Type Dependencies” on page 514.

DocType Categories

(which is a sub-item under Binary Data)

Categories of documents (e.g., XML and Flat File). All Trading Networks systems will have the TN document type categories. You do not need to migrate them.

None

Dependencies Description

IS Services The fully-qualified name of the following types of services that you can specify in a TN document type:

Duplicate checking service for the Check for Duplicate Document pre-processing action

Custom attribute transformation services if specified for an attributes to extract.

If a TN document type that you are migrating uses either or both of these types of services, ensure that you move the IS services to the target Trading Networks system.

514 webMethods Trading Networks User’s Guide Version 6.5

Page 515: Web Methods Trading Networks Users Guide 65

Migrating Custom Document Attributes

Migrat ing Custom Document Attr ibutesTo migrate custom document attributes, use the following item in the Export Data and Import Data dialog boxes.

Migrat ing Processing RulesTo migrate processing rules, use the following item in the Export Data and Import Data dialog boxes.

When you select to export and import processing rules, be aware of the order of the processing rules. Trading Networks maintains processing rules in a specific order. This is

Attributes The custom document attributes that are associated with the TN document type.

Use the Attributes item to migrate the custom attributes for the TN document type. For more information, see “Migrating Custom Document Attributes” on page 515.

Dependencies Description

Note: You do not need to migrate system attributes because the system attributes are defined when you install Trading Networks, and you cannot delete nor alter their definitions.

Items in Export/Import Data Dialog box Use to migrate... Dependencies

Document Attributes

Definitions for custom document attributes. None

Items in Export/Import Data Dialog box Use to migrate... Dependencies

Processing Rules Processing rules IS ServicesDelivery Methods

For more information, see “Processing Rules Dependencies” on page 516.

webMethods Trading Networks User’s Guide Version 6.5 515

Page 516: Web Methods Trading Networks Users Guide 65

A P P E N D I X A E x p o r t i n g a n d I m p o r t i n g D a t a b a s e I n f o r m a t i o n

the order in which Trading Networks selects a processing rule to use for processing an incoming document. (Trading Networks uses the first processing rule that matches.)

When you select processing rules to export and import, the order is not necessarily maintained. Trading Networks maintains the list of processing rules that you want to export and import in the order you select them; in other words, in the order the processing rules appear in the Selected items list of the Export Data and Import Data dialog boxes.

When you import processing rules, you can select to:

Append the imported processing rules to the end of the existing list of processing rules in the target Trading Networks system

Replace all the processing rules in the target Trading Networks system with the imported processing rules

Processing Rules DependenciesThe following table shows the dependencies for Processing Rules. For more information about dependencies, see “Dependencies For Trading Networks Objects” on page 508.

Dependencies Description

IS Services The fully-qualified names of the following types of services that you can specify in a processing rule:

Service you identify with the Execute a Service processing action

Duplicate checking service for the Check for Duplicate Document pre-processing action if a custom service is specified

If a processing rule that you are migrating uses either or both of these types of services, ensure that you move the IS services to the target Trading Networks system.

Delivery Methods The immediate delivery method that is used in the Deliver Document By action of the processing rule.

If the processing rule uses a custom immediate delivery method that you added, ensure that you move the corresponding IS services to the target Trading Networks system, and use the wm.tn.delivery:registerService service to register the IS service using the same delivery method name.

If the processing rule uses a standard immediate delivery method that was installed with Trading Networks (e.g., Primary HTTP), no action is needed.

516 webMethods Trading Networks User’s Guide Version 6.5

Page 517: Web Methods Trading Networks Users Guide 65

Migrating Processing Rules

Although the Dependencies does not list the following Trading Networks objects, they are also required if referenced in a processing rule. Review the processing rules you want to export/import and migrate the following if appropriate.

Profiles for senders identified in the Sender criterion on the Criteria tab of the processing rule, see “Migrating Profiles” on page 509.

Profiles for the receivers identified in the Receiver criterion on the Criteria tab of the processing rule, see “Migrating Profiles” on page 509.

TN document types identified in the Document Type criterion on the Criteria tab of the processing rule, see “Migrating TN Document Types” on page 514.

Custom document attributes identified on the Extended Criteria tab of the processing rule, see “Migrating Custom Document Attributes” on page 515.

Queues referenced by a Scheduled Delivery used by the Deliver Document By processing action. To create the queues on the target system, you can do one of the following:

Use the tnexport and tnimport utilities to export all public and private queues. For more information, see “Using the tnexport and tnimport Utilities” on page 526.

Manually create the required queue on the target system. Be sure to use the exact queue name with the same combination of upper and lowercase letters when defining the queue on the target system.

In addition to migrating the queue, ensure you move the scheduled delivery service that are associated with the queue to the target system.

Note: Although Trading Networks typically associates related items by internal IDs that it generates (as described in “Dependencies For Trading Networks Objects” on page 508), for queues Trading Networks relates the queue to the profile by its name.

webMethods Trading Networks User’s Guide Version 6.5 517

Page 518: Web Methods Trading Networks Users Guide 65

A P P E N D I X A E x p o r t i n g a n d I m p o r t i n g D a t a b a s e I n f o r m a t i o n

Migrat ing Trading Partner Agreements (TPAs)To migrate Trading Partner Agreements (TPAs), use the following item in the Export Data and Import Data dialog boxes.

Agreements DependenciesThe following table shows the dependencies for Agreements. For more information about dependencies, see “Dependencies For Trading Networks Objects” on page 508.

Items in Export/Import Data Dialog box Use to migrate... Dependencies

Agreements TPAs ProfilesIS ServicesIS Document Types

For more information, see “Agreements Dependencies” on page 518.

Dependencies Description

Profiles The profiles that are associated with the TPA. A TPA is associated with two trading partners on your system, one that acts as the sender and one that acts as the receiver. Migrate the profiles for the sender and receiver. For more information, see “Migrating Profiles” on page 509.

IS Services The fully-qualified names of the following types of services that you can specify in a TPA:

Initialization service

Export service

If a TPA that you are migrating uses either or both of these types of services, ensure that you move the IS services to the target Trading Networks system.

IS document types The fully-qualified name of the IS document type that defines the structure of the TPA data.

Ensure that you migrate this IS document type to the target Trading Networks system.

518 webMethods Trading Networks User’s Guide Version 6.5

Page 519: Web Methods Trading Networks Users Guide 65

Migrating Queries

Migrat ing Quer iesYou can migrate all the queries you have defined for the Trading Networks Console screens (e.g., queries you defined for the Transaction Analysis screen to search for specific documents). To migrate all of your queries, use the following item in the Export Data and Import Data dialog boxes.

Export ing Database Informat ion from the ConsoleTo export database information, perform the following procedure.

Items in Export/Import Data Dialog box Use to migrate... Dependencies

Query

(a sub-item under Binary Data)

All queries that you have defined for all screens of the Trading Networks Console:

Trading Partners

Document Types

Processing Rules

Agreements

Transaction Analysis

Tasks

Activity Log

None

To export database information

1 Start the Trading Networks Console. If you need procedures for this step, see “Starting the Trading Networks Console” on page 22.

2 Select File Export. Trading Networks displays the Export Data dialog box. The Available Items contains a tree structure that lists the database items that are available for you to export.

webMethods Trading Networks User’s Guide Version 6.5 519

Page 520: Web Methods Trading Networks Users Guide 65

A P P E N D I X A E x p o r t i n g a n d I m p o r t i n g D a t a b a s e I n f o r m a t i o n

3 Select the items that you want to export by populating the Selected Items list.

When you select one of the following types of items in the Available Items list, check the Dependencies to determine whether there are other items you should export as well.

4 Click OK.

5 In the Save File dialog box, specify the file to which you want Trading Networks to write the database information. Then, click Save.

To move all items: Click to move all items from the Available Items list to the Selected Items list.

To move some but not all items:

Select one or more items from the Available Items list; then

click .

To select an item in the tree along with all of its child

elements, select the parent element and click . For example, if you want to move all processing rules, select the

Processing Rule item and click .

Item For more information about dependencies, see...

Partner Data “Partner Data Dependencies” on page 511

Field Definitions “Field Definitions Dependencies” on page 513

Document Types “Document Type Dependencies” on page 514

Processing Rules “Processing Rules Dependencies” on page 516

Note: The file that contains the exported data is a binary-encoded file.

520 webMethods Trading Networks User’s Guide Version 6.5

Page 521: Web Methods Trading Networks Users Guide 65

Importing Database Information from the Console

Import ing Database Informat ion from the ConsoleWhen importing data, you need to:

Determine how to handle importing items that have the same name as existing items in the target system. For more information, see “Importing Items that Have the Same Name as Existing Items” on page 521.

Specify how you want to import processing rules:

Append the imported processing rules to the end of the existing list of processing rules in the target Trading Networks system

Replace all the processing rules in the target Trading Networks system with the imported processing rules

For more information, see “Specifying How to Import Processing Rules” on page 524.

Importing I tems that Have the Same Name as Existing ItemsIf you select to import an item that has the name as an item that already exists in the target database, Trading Networks handles the situation based on the type of item that is being imported.

For the following items in the Import Data dialog box: Trading Networks...

Document Types

Document Attributes

Partner Data:

Profiles

Field Groups

Contact Types

Displays the Overwrite dialog box.

For more information about how to use this dialog box, see “Using the Overwrite Dialog Box” on page 522.

For information about how to force the overwrite of identically named items without displaying the Overwrite dialog box, see “Suppressing the Overwrite Dialog Box and Forcing the Overwrite of Items” on page 523.

webMethods Trading Networks User’s Guide Version 6.5 521

Page 522: Web Methods Trading Networks Users Guide 65

A P P E N D I X A E x p o r t i n g a n d I m p o r t i n g D a t a b a s e I n f o r m a t i o n

Using the Overwrite Dialog BoxWhen you attempt to import any of the following items and the same type of item with an identical name already exists in the target database, Trading Networks will prompt you to determine whether to overwrite the item in the target database:

Document Types

Document Attributes

Partner Data (Profiles only)

Field Groups

Contact Types

Field Definitions

External ID Types

Agreements

Binary Types

Partner Data:

Security Data

Extended Field Data

Does not display the Overwrite dialog box. Attempts to add the identically named item to the target database.

Processing Rules Uses the Overwrite Rules option to determine how to import the processing rules. For more information, see “Specifying How to Import Processing Rules” on page 524.

For the following items in the Import Data dialog box: Trading Networks...

Important! Although Trading Networks does not prompt you to overwrite when you import field definitions, external ID types, and agreements, the import process will throw an exception if it encounters an identically named item in the target database that is assigned a different internal ID. For more information about internal IDs, see “Dependencies For Trading Networks Objects” on page 508.

522 webMethods Trading Networks User’s Guide Version 6.5

Page 523: Web Methods Trading Networks Users Guide 65

Importing Database Information from the Console

The Overwrite dialog box allows you to select one of the following options:

Suppressing the Overwrite Dialog Box and Forcing the Overwrite of ItemsIf you want Trading Networks to automatically overwrite identically named items in the target database, select the Force Import checkbox on the Import Data dialog box. When you select the Force Import checkbox, Trading Networks does not display the Overwrite dialog box. It overwrites identically named items without prompting for confirmation.

Overwrite dialog option Description

Yes Selecting Yes grants Trading Networks permission to overwrite only the Trading Networks object described in the Overwrite dialog box.

Yes to All Selecting Yes to All grants Trading Networks permission to overwrite the Trading Networks object described in the Overwrite dialog box and all subsequent identically named items that Trading Networks might encountered during the import process. When you select Yes to All Trading Networks no longer displays the Overwrite dialog box for identically named items.

No Selecting No denies Trading Networks the permission to overwrite the Trading Networks object described in the Overwrite dialog box. Trading Networks does not import the item described in the Overwrite dialog box.

No to All Selecting No to All denies Trading Networks the permission to overwrite the Trading Networks object described in the Overwrite dialog box and all subsequent identically named items that Trading Networks might encountered during the import process. When you select No to All Trading Networks no longer displays the Overwrite dialog box for identically named items. No identically named items are imported.

webMethods Trading Networks User’s Guide Version 6.5 523

Page 524: Web Methods Trading Networks Users Guide 65

A P P E N D I X A E x p o r t i n g a n d I m p o r t i n g D a t a b a s e I n f o r m a t i o n

Specifying How to Import Processing RulesWhen you select to import processing rules, use the Overwrite Rules checkbox on the Import Data dialog to indicate how you want Trading Networks to import the processing rules.

Procedure for Importing Database Information from the ConsoleTo import database information, perform the following procedure.

3 Click the Select File icon to open the Select File dialog box to identify the file that contains the database information that you want to import. Then, click Open.

Trading Networks populates the Available Items list with the items contained in the file you select.

If you... Trading Networks...

Do not select the Overwrite Rules checkbox

Appends the imported processing rules to the end of the existing list of processing rules in the target Trading Networks system.

Note: The appended rules will be in the order in which they appear in the Selected Items list on the Import Data dialog box.

Select the Overwrite Rules checkbox

Replaces all the processing rules in the target Trading Networks system with the imported processing rules.

Note: The processing rules maintain the order in which they appear in the Selected Items list on the Import Data dialog box.

To import database information

1 Start the Trading Networks Console. If you need procedures for this step, see “Starting the Trading Networks Console” on page 22.

2 Select File Import. Trading Networks displays the Import Data dialog box.

524 webMethods Trading Networks User’s Guide Version 6.5

Page 525: Web Methods Trading Networks Users Guide 65

Importing Database Information from the Console

4 If you want Trading Networks to automatically import identically named items that exist in the target database without prompting for confirmation, select the Force Import checkbox. For more information, see “Importing Items that Have the Same Name as Existing Items” on page 521 and “Suppressing the Overwrite Dialog Box and Forcing the Overwrite of Items” on page 523.

If you do not select the Force Import checkbox, see “Using the Overwrite Dialog Box” on page 522 for how to use the Overwrite dialog box.

5 If you want to import processing rules, and you want Trading Networks to replace all the processing rules in the target database with the processing rules that you import, select the Overwrite Rules checkbox. For more information, see “Specifying How to Import Processing Rules” on page 524.

6 Select the items that you want to export by populating the Selected Items list.

When you select one of the following types of items in the Available Items list, check the Dependencies to determine whether there are other items you should import as well.

7 Click OK.

To move all items: Click to move all items from the Available Items list to the Selected Items list.

To move some but not all items:

Select one or more items from the Available Items list; then

click .

To select an item in the tree along with all of its child

elements, select the parent element and click . For example, if you want to move all processing rules, select the

Processing Rule item and click .

Item For more information about dependencies, see...

Partner Data “Partner Data Dependencies” on page 511

Field Definitions “Field Definitions Dependencies” on page 513

Document Types “Document Type Dependencies” on page 514

Processing Rules “Processing Rules Dependencies” on page 516

Note: If there are any import errors, Trading Networks displays the Import Errors dialog. This dialog lists each item that has an error. To see more details of the error, select the item in the Name column.

webMethods Trading Networks User’s Guide Version 6.5 525

Page 526: Web Methods Trading Networks Users Guide 65

A P P E N D I X A E x p o r t i n g a n d I m p o r t i n g D a t a b a s e I n f o r m a t i o n

Using the tnexport and tnimport Ut i l i t iesIn addition to exporting and importing data using the Trading Networks Console, you can export and import data using the command line utilities tnexport and tnimport. Runthese utilities from the following directory:

webMethods6\IntegrationServer\packages\WmTN\bin

Use these utilities to perform a bulk transfer of data from one Trading Networks system to another.

tnexport Uti l ityUse the tnexport utility to export all objects of the selected types. For example, if you specify you want to export processing rules, all processing rules defined in the Trading Networks database are exported. The format of the tnexport command line is as follows:

where:

outfile is one of the following:

options is one or more of the following:

tnexport outfile options

-bin binfile Use the -bin option to export the data to a binary file. binfile is the path and file name to which you want to export the data. The directory in which you want the output file placed must already exist. If you specify a relative path, Trading Networks uses a directory relative to the directory from which you are running the tnexport utility. If the file already exists, Trading Networks overwrites it.

Note: Binary output is much smaller than the XML output, but cannot be read by humans.

-xml xmlfile Use the -xml option to export the data to an XML file. xmlfile is the path and file name to which you want to export the data. The directory in which you want the output file placed must already exist. If you specify a relative path, Trading Networks uses a directory relative to the directory from which you are running the tnexport utility. If the file already exists, Trading Networks overwrites it.

-attribs Indicates you want to export all the document attributes.

-types Indicates you want to export all the TN document types.

526 webMethods Trading Networks User’s Guide Version 6.5

Page 527: Web Methods Trading Networks Users Guide 65

Using the tnexport and tnimport Utilities

ExamplesYou want to export all profiles, all extended field values in the profiles, and all the extended field definitions to the XML file \TradingNetworks\ExportedData.xml. Use the following command line:

tnexport -xml \TradingNetworks\ExportedData.xml -profiles -extflds -flddefs

You want to export all data in the Trading Networks database to the binary file ExportedData.bin, and you want the utility to create the ExportedData.bin file in the same directory as where you are running the utility. Use the following command line:

tnexport -bin ExportedData.bin -all

-rules Indicates you want to export all the processing rules.

-profiles Indicates you want to export all the profiles.

-extflds Indicates you want to export the values for the extended fields that are in the profiles.

-flddefs Indicates you want to export all the definitions for field groups and all the definitions for the profile fields in those groups.

-lkup Indicates you want to export all the definitions for contact types, external ID types, and profile groups that you might have added.

-queues Indicates you want to export all public and private queues.

-securityData Indicates the you want to export all certificate information from the Security tabs of all profile.

-tpas Indicates you want to export all the trading partner agreements (TPAs).

-all Indicates that you want to export all objects, that is, all attributes, TN document types, processing rules, profiles, extended field values, profile field groups, field definitions, custom contact types, custom extended fields, public queue, and TPAs.

webMethods Trading Networks User’s Guide Version 6.5 527

Page 528: Web Methods Trading Networks Users Guide 65

A P P E N D I X A E x p o r t i n g a n d I m p o r t i n g D a t a b a s e I n f o r m a t i o n

tn import Uti l i tyUse the tnimport utility to import all data in a specified file. The file you specify must contain data that you previously exported from a Trading Networks database using either the tnexport utility or the Trading Networks Console.

The format of the tnexport command line is as follows:

where:

infile is one of the following:

options is one or more of the following:

Note: After using the tnimport utility, you must reload the WmTN package to be able to use the imported data.

tnimport infile options

-bin binfile Use the -bin option to import the data from a binary file. binfile is the path and file name of the binary file that contains the data to import. If you specify a relative path, Trading Networks looks for the directory relative to the directory from which you are running the tnimport utility.

-xml xmlfile Use the -xml option to import the data from an XML file. xmlfile is the path and file name of the XML file that contains the data to import. If you specify a relative path, Trading Networks looks for the directory relative to the directory from which you are running the tnimport utility.

-db Indicates that you actually want to import the information and write it to the Trading Networks database.

If you do not specify this option, the tnimport utility will only load and print information about the data in your file. This is useful for testing purposes.

528 webMethods Trading Networks User’s Guide Version 6.5

Page 529: Web Methods Trading Networks Users Guide 65

Using the tnexport and tnimport Utilities

ExamplesYou want to import the data in the XML file \TradingNetworks\ExportedData.xml. You want the tnimport utility to overwrite objects that have the same name as those in the input file, and you want to completely overwrite the current list of processing rules. Use the following command line:

tnimport -xml \TradingNetworks\ExportedData.xml -db -force

You want to view information about the data in the input file ExportedData.bin that resides in the same directory as the tnimport utility. You do not want to import it into your database. Use the following command line:

tnimport -bin ExportedData.bin

You want to import all data in the binary file ExportedData.bin that resides in the same directory as the tnimport utility. You do not want to overwrite objects that have the same name as those in the input file, and you want the tnimport utility to append the imported processing rules to the existing list of processing rules rather than overwrite the processing rules. Use the following command line:

tnimport -bin ExportedData.bin -db -rrappend

-force Indicates whether you want the tnimport utility to overwrite existing data with the same ID that already exists in the Trading Networks database. This option only applies when importing document attributes, TN document types, profiles, profile field groups, profile field definitions, and TPAs.

If you do not specify this option and an object with the same ID already exists in the Trading Networks database, the import fails.

-rrappend Indicates whether you want the tnimport utility to append the processing rules in the input file to the current list of processing rules. This applies only to importing processing rules.

If you do not specify this option, the tnimport utility completely replaces the current processing rules in your database.

webMethods Trading Networks User’s Guide Version 6.5 529

Page 530: Web Methods Trading Networks Users Guide 65

A P P E N D I X A E x p o r t i n g a n d I m p o r t i n g D a t a b a s e I n f o r m a t i o n

530 webMethods Trading Networks User’s Guide Version 6.5

Page 531: Web Methods Trading Networks Users Guide 65

A P P E N D I X B

XQL Reference

XQL Reference Information . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 532

Sample XML File . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 532

Example XQL Queries . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 533

Extracting Custom Attributes From XML Documents . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 536

webMethods Trading Networks User’s Guide Version 6.5 531

Page 532: Web Methods Trading Networks Users Guide 65

A P P E N D I X B X Q L R e f e r e n c e

XQL Reference Informat ionUse the following link for more information about the W3C, World Wide Web Consortium reference information for XQL: http://www.w3.org/TandS/QL/QL98/pp/xql.html.

Sample XML Fi leThe example XQL queries in the next section reference the following XML file.<?xml version='1.0'?><!-- This file represents a fragment of a book store database. --><bookstore specialty='novel'> <book style='autobiography'> <title>Seven Years in Trenton</title> <author> <first-name>Joe</first-name> <last-name>Bob</last-name> <award>Trenton Literary Review Honorable Mention</award> </author> <price>12</price> </book> <book style='textbook'> <title>History of Trenton</title> <author> <first-name>Mary</first-name> <last-name>Bob</last-name> <publication> Selected Short Stories of <first-name>Mary</first-name> <last-name>Bob</last-name> </publication> </author> <price>55</price> </book> <magazine style='glossy' frequency='monthly'> <title>Tracking Trenton</title> <price>2.50</price> <subscription price='24' per='year'/> </magazine> <book style='novel' id='myfave'> <title>Trenton Today, Trenton Tomorrow</title> <author> <first-name>Toni</first-name> <last-name>Bob</last-name> <degree from='Trenton U'>B.A.</degree> <degree from='Harvard'>Ph.D.</degree> <award>Pulitzer</award> <publication>Still in Trenton</publication> <publication>Trenton Forever</publication> </author>

532 webMethods Trading Networks User’s Guide Version 6.5

Page 533: Web Methods Trading Networks Users Guide 65

Example XQL Queries

<price intl='canada' exchange='0.7'>6.50</price> <excerpt> <p>It was a dark and stormy night.</p> <p>But then all nights in Trenton seem dark and stormy to someone who has gone through what <emph>I</emph> have.</p> <definition-list> <term>Trenton</term> <definition>misery</definition> </definition-list>

</excerpt> </book> <my:book style='leather' price='29.50' xmlns:my='http://www.placeholder-name-here.com/schema/'> <my:title>Who's Who in Trenton</my:title> <my:author>Robert Bob</my:author> </my:book></bookstore>

Example XQL Quer iesThe following table lists sample XQL queries.

XQL Query Description

/bookstore To find the root element (bookstore) of the document

//author Find all author elements anywhere within the current document.

//author/first-name Find all first-name elements within an author element anywhere in the current document.

bookstore/*/title Find all title elements that are grandchildren of bookstore elements.

//@style Find all style attributes anywhere within the current document.

bookstore/book/price/@exchange Find the exchange attributes of price elements that are contained inside book elements that are contained in a bookstore element.

//book[excerpt] Anywhere within the current document, find all book elements containing at least one child excerpt element.

webMethods Trading Networks User’s Guide Version 6.5 533

Page 534: Web Methods Trading Networks Users Guide 65

A P P E N D I X B X Q L R e f e r e n c e

//book[excerpt]/author[degree] Anywhere within the current document, find all author elements containing at least one child degree element that are contained inside a book element that has at least one excerpt element.

//book[excerpt][title] Anywhere within the current document, find all book elements containing at least one excerpt element and at least one title element.

//author[(degree $or$ award) $and$ publication]

Anywhere within the current document, find all author elements that contain at least one degree element or award element and at least one publication element.

//degree[@from $ne$ 'Harvard'] Anywhere within the current document, find all degree elements where the from attribute is not equal to “Harvard”.

//(book/author)[end()] Anywhere within the current document, find the last author element from the entire set of author elements that are contained within book elements.

//my:book Anywhere within the current document, find all book elements with the namespace my.

/*/my:book/my:title Find the title element with a my prefix within a book element with a my prefix that is a child of the root node of the document.

//book[index() $le$ 1] Find the first two books anywhere within the current document.

//author[publication!count() $gt$ 1] Anywhere within the current document, find all author elements that contain more than one publication element.

//author[$any$ last-name = 'Bob'] Find all author elements where at least one of the last-name elements is "Bob" anywhere within the current document.

XQL Query Description

534 webMethods Trading Networks User’s Guide Version 6.5

Page 535: Web Methods Trading Networks Users Guide 65

Example XQL Queries

//book $union$ //book/author Anywhere within the current document, find all book elements and all author elements that are children of book elements.

/bookstore/book/author[last-name/regex('Bo.')]

Find all the author elements that have last-name elements that contain the string "Bo." and another single character.

//book[@style/regex("no.*")] Find all the book elements that have a style attribute that contains the regular expression pattern "no.*"

/comment()[0] Find the first comment element starting from the root of the current document.

XQL Query Description

webMethods Trading Networks User’s Guide Version 6.5 535

Page 536: Web Methods Trading Networks Users Guide 65

A P P E N D I X B X Q L R e f e r e n c e

Extract ing Custom Attr ibutes From XML DocumentsFor custom attributes that are extracted from an XML document, Trading Networks returns specific values for different attribute data types:

STRINGLIST and STRING

NUMBERLIST and NUMBER

DATETIMELIST and DATETIME

The following tables demonstrate the values that Trading Networks returns using the example XQL query of: /node/item. In some cases, the query returns a null value.

Extracting STRINGLIST or STRING ATTRIBUTESThis table shows the values Trading Networks stores for a STRINGLIST or STRING attribute based on the value returned by the XQL query of: /node/item

XML Data

What the XQL query returns

How Trading Networks stores the results as a:

(result always returned as a String List) STRINGLIST STRING

<node></node> null null null

<node><item></item>

</node>

{““}

(String List with one element, an empty String)

{null}

(String List with one element, a null String)

null

<node><item>value</item>

</node>

{“value”}

(String List with one element)

{“value”}

(String List with one element)

“value”

<node><item>value</item><item></item>

</node>

{“value”, ““}

(String List with two elements)

{“value”, null}

(String List with two elements)

“value”

<node><item></item><item>value</item>

</node>

{““, “value”}

(String List with two elements)

{null,“value”}

(String List with two elements)

null

536 webMethods Trading Networks User’s Guide Version 6.5

Page 537: Web Methods Trading Networks Users Guide 65

Extracting Custom Attributes From XML Documents

Extracting NUMBERLIST or NUMBER ATTRIBUTESThis table shows the values Trading Networks stores for a NUMBERLIST or NUMBER attribute based on the value returned by the XQL query of: /node/item

<node><item></item><item></item>

</node>

{““, “”}

(String List with two elements)

{null, null}

(String List with two elements)

null

<node><item>valuea</item><item> </item><item></item><item>valuez</item>

</node>

{“valuea”,““,””,”valueb”}

(String List with four elements)

{“valuea”, null, null, ”valueb”}

(String List with four elements)

“valuea”

XML Data

What the XQL query returns

How Trading Networks stores the results as a:

(result always returned as a String List) STRINGLIST STRING

XML Data

What the XQL query returns

How Trading Networks stores the results as a:

(result always returned as a String List) NUMBERLIST NUMBER

<node></node> null null null

<node><item></item>

</node>

{““}

(String List with one element, an empty String)

{null}

(Number List with one element, a null element)

null

<node><item>123</item>

</node>

{“123”}

(String List with one element)

{“123”}

(Number List with one element)

“123”

<node><item>123</item><item></item>

</node>

{“123”, ““}

(String List with two elements)

{“123”, null}

(Number List with two elements)

“123”

<node><item></item><item>123</item>

</node>

{““, “123”}

(String List with two elements)

{null,“123”}

(Number List with two elements)

null

webMethods Trading Networks User’s Guide Version 6.5 537

Page 538: Web Methods Trading Networks Users Guide 65

A P P E N D I X B X Q L R e f e r e n c e

Extracting DATETIMELIST or DATETIME ATTRIBUTESThis table shows the values Trading Networks stores for a NUMBERLIST or NUMBER attribute based on the value returned by the XQL query of: /node/item

<node><item></item><item></item>

</node>

{““, “”}

(String List with two elements)

{null, null}

(Number List with two elements)

null

<node><item>123</item><item> </item><item></item><item>456</item>

</node>

{“123”, ““,””,”456”}

(String List with four elements)

{“123”, null,null,”456”}

(Number List with four elements)

“123”

XML Data

What the XQL query returns

How Trading Networks stores the results as a:

(result always returned as a String List) NUMBERLIST NUMBER

XML Data

What the XQL query returns

How Trading Networks stores the results as a:

(result always returned as a String List) DATETIMELIST DATETIME

<node></node> null null null

<node><item></item>

</node>

{““}

(String List with one element, an empty String)

{null}

(Datetime List with one element, a null element)

null

<node>

<item>2004/12/31</item></node>

{“2004/12/31”}

(String List with one element)

{“2004/12/31”}

(Datetime List with one element)

“2004/12/31”

<node>

<item>2004/12/31</item><item></item>

</node>

{“2004/12/31”, ““}

(String List with two elements)

{“2004/12/31”, null}

(Datetime List with two elements)

“2004/12/31”

538 webMethods Trading Networks User’s Guide Version 6.5

Page 539: Web Methods Trading Networks Users Guide 65

Extracting Custom Attributes From XML Documents

I

<node><item></item>

<item>2004/12/31</item></node>

{““, “123”}

(String List with two elements)

{null,“2004/12/31”}

(Datetime List with two elements)

null

<node><item></item><item></item>

</node>

{““, “”}

(String List with two elements)

{null, null}

(Datetime List with two elements)

null

<node><item>2004/12/31</item><item> </item><item></item><item>2005/01/31</item>

</node>

{“2004/12/31”, ““,””,”2006/01/31”}

(String List with four elements)

{“2004/12/31”, null,null,”2005/01/31”}

(Datetime List with four elements)

“2004/12/31”

XML Data

What the XQL query returns

How Trading Networks stores the results as a:

(result always returned as a String List) DATETIMELIST DATETIME

webMethods Trading Networks User’s Guide Version 6.5 539

Page 540: Web Methods Trading Networks Users Guide 65

A P P E N D I X B X Q L R e f e r e n c e

540 webMethods Trading Networks User’s Guide Version 6.5

Page 541: Web Methods Trading Networks Users Guide 65

A P P E N D I X C

Large Document Handling

Overview of Large Document Handling . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 542

What You Need to Do to Use Large Document Handling . . . . . . . . . . . . . . . . . . . . . . . . . . 542

Features Not Available for Large Documents . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 543

Defining TN Document Type XQL Queries for Large Documents . . . . . . . . . . . . . . . . . . . . 544

Creating Services that Recognize Large Document Handling . . . . . . . . . . . . . . . . . . . . . . 544

Sending Large XML Documents for Processing . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 548

Viewing Large Documents that Trading Networks Has Processed . . . . . . . . . . . . . . . . . . . 549

webMethods Trading Networks User’s Guide Version 6.5 541

Page 542: Web Methods Trading Networks Users Guide 65

A P P E N D I X C L a r g e D o c u m e n t H a n d l i n g

Overview of Large Document Handl ingAs installed, when webMethods Trading Networks (Trading Networks) receives a document, it keeps the document’s content in memory during processing. If a document is large, Trading Networks can encounter memory constraint problems, for example:

When Trading Networks attempts to execute an XQL query against a document during document recognition

When Trading Networks attempts to perform pre-processing and processing actions defined

You can set up Trading Networks to behave differently for large documents; that is, to have Trading Networks write large document content to hard disk drive space (called tspace) and keep a pointer to the large document content in memory rather than the document content itself.

What You Need to Do to Use Large Document Handl ingYou must set up Trading Networks to use large document handling. As installed, Trading Networks does not use this feature for any documents.

To use large document handling you must:

Ensure your system meets the minimum hardware requirements. For more information, see “Minimum Hardware Requirements for Large Document Handling” on page 56”.

Set configuration properties that determine when and how Trading Networks uses large document handling. For more information see, “Configuring Trading Networks for Large Document Handling” on page 56.

Redefine the XQL queries in your TN document types, so they do not require Trading Networks to read the entire document content into memory. For more information see, “Defining TN Document Type XQL Queries for Large Documents” on page 544.

To learn more about Trading Networks large document processing, see Chapter 5, "Trading Networks Document Processing" in the webMethods Trading Networks Concepts Guide.

542 webMethods Trading Networks User’s Guide Version 6.5

Page 543: Web Methods Trading Networks Users Guide 65

Features Not Available for Large Documents

Code custom services to recognize when a document is large and take the appropriate actions based on whether the document content is in memory or written to hard disk drive space. This affects the following services that you create:

Services specified with the Execute a service processing action

Immediate and scheduled delivery services that you add

For more information see, “Creating Services that Recognize Large Document Handling” on page 544.

Ensure IS clients (trading partners) do not use the $xmldata variable to send large XML documents to Trading Networks.

Features Not Avai lable for Large DocumentsThe following Trading Networks features are not available for large documents:

Queue for polling delivery method–Trading Networks does not schedule large documents for polling. If a processing rule indicates that Trading Networks is to use queue for polling as the delivery method for a large document, Trading Networks logs a message to the activity log and continues processing. The document is not available for your partner to poll. If the pre-processing actions indicated that the document be saved, the document is saved in the Trading Networks database.

Validate pre-processing action–The validation service that Trading Networks uses to validate the structure of a document does not support large document handling. When Trading Networks processes a large document and is instructed to validate the document structure, Trading Networks does not validate the document, logs a message to the activity log, and continues document processing.

Verify pre-processing action–The service that Trading Networks uses to verify the digital signature of a document does not support large document handling. When Trading Networks processes a large document and is instructed to verify the document’s digital signature, Trading Networks does not verify the digital signature, logs a message to the activity log, and continues document processing.

webMethods Trading Networks User’s Guide Version 6.5 543

Page 544: Web Methods Trading Networks Users Guide 65

A P P E N D I X C L a r g e D o c u m e n t H a n d l i n g

Defining TN Document Type XQL Queries for Large DocumentsWhen defining TN XML document types, you can include two types of XQL queries: identifying queries and queries to extract document attributes. When a document is considered large, Trading Networks does not necessarily read the entire document content into memory to perform the XQL queries. Instead, Trading Networks reads a set number of bytes of the document into memory. You set a configuration property (tn.xml.xqlThreshold) to define the number of bytes that Trading Networks reads. For more information, see “Configuring Trading Networks for Large Document Handling” on page 56.

Because Trading Networks only reads in a set number of bytes, the XQL queries you define for identifying and attribute queries, must match to nodes in the first portion of the document that Trading Networks reads into memory. If the XQL query identifies a node that is in the portion of the document that is not in memory, the query will fail. A failed identifying query causes Trading Networks not to select the TN document type for the document. A failed attribute query causes Trading Networks to be unable to extract the attribute information from the document.

For more information about specifying identifying queries and queries for extracting document attributes in TN XML document types, see Chapter 12, “TN XML Document Types”.

Creat ing Services that Recognize Large Document Handl ingYou can create services that act on documents that Trading Networks receives. These services are:

Services specified with the Execute a service processing action in a processing rule. For more information, see “Action 1—Execute a Service” on page 330.

Immediate and scheduled delivery services. For more information, see “Creating an Immediate Delivery Service” on page 411 and “Creating a Scheduled Delivery Service” on page 413.

When you create these services, you should code them to handle documents that are considered large and documents that are not considered large; that is, code them to recognize when the document content is in memory or when the service must retrieve the document content from hard disk drive space. For example, a processing rule that might match documents that are considered large can also match documents that do not meet the large document requirement that you configure. If the processing rule invokes a

Important! Large XML files that are sent to Trading Networks for processing must contain the XML declaration (e.g., <?xml...) as the first line. If a large XML document contains any blank space before the XML declaration, Trading Networks throws an exception when attempting to process the document.

544 webMethods Trading Networks User’s Guide Version 6.5

Page 545: Web Methods Trading Networks Users Guide 65

Creating Services that Recognize Large Document Handling

service, it must take appropriate actions to obtain the document content whether the document content is in memory or on hard disk drive space.

Determining Where the Document Content is StoredRegardless of whether a document is considered large or not, Trading Networks keeps information about the document in the pipeline in the bizdoc variable. Fields within the bizdoc indicate whether Trading Networks considers the document large, and therefore, indicates whether the document is stored in memory (if the document is not considered large) or on hard disk drive space (if the document is considered large).

Note: The structure of bizdoc is defined by the wm.tn.rec:BizDocEnvelope IS document type.

webMethods Trading Networks User’s Guide Version 6.5 545

Page 546: Web Methods Trading Networks Users Guide 65

A P P E N D I X C L a r g e D o c u m e n t H a n d l i n g

Using Fields in bizdoc to Determine Where the Document Content is Stored

If the document contains at least onelarge part, LargeDocument? is true.

If the part is large, LargePart?, is true.

If StorageType is “tspace”, the document is in the hard disk drive space.

If StorageType is null, the document isin the Content object.

546 webMethods Trading Networks User’s Guide Version 6.5

Page 547: Web Methods Trading Networks Users Guide 65

Creating Services that Recognize Large Document Handling

Use the following fields in bizdoc to determine whether the document is stored in memory or on the hard disk drive space:

LargePart?–This field that is within the ContentParts field, indicates whether the content part is considered large. Its value is true if Trading Networks considers the content part large; otherwise it is false.

LargeDocument?–This field indicates whether any of the content parts of the document are large. If at least one of the content parts is considered large, its value is true. If all content parts are not considered large, its value is false.

If a content part is considered large, Trading Networks sets StorageType to tspace and leaves the Content variable null. If the document is not considered large, Trading Networks stores the document content in the Content variable and leaves StorageType null.

Retrieving Document Content from Hard Disk Drive SpaceUse the wm.tn.doc:getContentPartData service to retrieve the document content from the hard disk drive space. When you invoke this service, specify the following as input:

If you indicate that you want the wm.tn.doc:getContentPartData service to retrieve a specified number of bytes, the service returns a byte array that contains the retrieved bytes of the document content. If you indicate that you want the

Input Variable Description

BizDocEnvelope The BizDocEnvelope that Trading Networks created for the document.

partName The part name of the content that you want to retrieve.

getAs How you want Trading Networks to retrieve the document content. Specify one of the following:

bytes—to retrieve a specified number of bytes of the document content

stream — to obtain the document content using a Java InputStream object

startIndex If you specified bytes for getAs, specify the index into the document where you want Trading Networks to start retrieving content. For example, to retrieve document content from the beginning, specify 0.

byteCount If you specified bytes for getAs, specify the number of bytes of content that you want Trading Networks to retrieve.

webMethods Trading Networks User’s Guide Version 6.5 547

Page 548: Web Methods Trading Networks Users Guide 65

A P P E N D I X C L a r g e D o c u m e n t H a n d l i n g

wm.tn.doc:getContentPartData service to retrieve using a stream, the service returns a Java InputStream object.

Note that you can invoke this service for all documents, that is whether a document is considered large or not.

Retrieving the Content for Document DeliveryTo deliver a document, you need the original document content (i.e., the content Trading Networks received before processing). Use the wm.tn.doc:getDeliveryContent service to retrieve the document content. When you invoke this service, specify the following as input:

You can invoke this service for all documents. The service determines whether the document is considered large or not. If the document is not considered large, the service returns a byte array that contains the retrieved delivery content. If the document is considered large, the service retrieves the delivery content using a Java InputStream object.

Programmatical ly Finding Nodes in a Large DocumentYou might need to locate specific nodes within an XML document; for example, to obtain the value of a node or to validate the structure of an XML document. webMethods provides sample code you can review to determine how to code your service to locate specific nodes within an XML document without reading the document into memory. The sample code is located in the WmTNSamples package.

Sending Large XML Documents for ProcessingTo have Trading Networks process XML documents, send them to the Integration Server. To send the XML documents, create an IS service or IS client (Java client, C/C++ client, Visual Basic client, Excel client, or browser-based client). When sending a document that Trading Networks considers large, do not submit the document using the $xmldata variable.

For more information about other methods you can use to submit XML documents (besides the $xmldata variable), see the chapter about passing XML data to services in the webMethods Developer User’s Guide. For more information about creating clients, see the chapter about creating client code in the webMethods Developer User’s Guide. For more information about sending XML documents to Trading Networks, see the Building Your Trading Network manual.

Input Variable Description

BizDocEnvelope The BizDocEnvelope that Trading Networks created for the document.

548 webMethods Trading Networks User’s Guide Version 6.5

Page 549: Web Methods Trading Networks Users Guide 65

Viewing Large Documents that Trading Networks Has Processed

Viewing Large Documents that Trading Networks Has ProcessedYou can use the Trading Networks Console to view large documents. Trading Networks lists the documents on the Transaction Analysis screen. From the Transaction Analysis screen, you can view the Document Details screen (Transactions View Document). The Content tab of the Document Details screen displays 1,000 bytes of the document.

Content tab of Document Details screen

Click to display the next 1,000 bytes. Click to display the previous 1,000 bytes.

webMethods Trading Networks User’s Guide Version 6.5 549

Page 550: Web Methods Trading Networks Users Guide 65

A P P E N D I X C L a r g e D o c u m e n t H a n d l i n g

550 webMethods Trading Networks User’s Guide Version 6.5

Page 551: Web Methods Trading Networks Users Guide 65

Index

Index

Symbols

"Any” document type in processing rule query 370$contentEncoding variable 278, 282$contentType variable 282$receiveSvc variable 282, 454/invoke/wm.tn/receive URL

for your profile 112, 124, 138on partner profile 154

AABORTED processing status 434ACCEPTED processing status 434

and queue for polling 397ACCEPTED W/ERRORS processing status 434

and queue for polling 397ACL, Administrators group 23actions

pre-processing, See pre-processing actionsprocessing rules, See processing rules, actions

Active profile statusfor partner profile 164

change status to 176for your profile 116

change status to 129activity class

case-sensitive 499error messages 497on activity log 496, 499values 497

activity logactivity class, See activity classActivity Log tab 501activity type 496, 499Advanced tab 500and Tasks tab 449Basic Criteria tab 498brief message 497, 499

defined 496error logged to, for XML document 228exporting information

as comma-separated values 502from to a file 502

full message 497, 500list of fields for each entry 496printing 502queries 503saving data 502saving queries 503selector panel button 28timestamp 496, 500user name 497, 500viewing entries 498

for partner 499using Enterprise 498using Partner 498

activity type on activity log 496, 499adding

address for your profile 119address on a partner profile 148CA certificates to partner profile 161CA certificates to your profile 127certificates to partner profile 161certificates to your profile 126contact 121, 151, 153corporation information 147default processing rule last 314, 348delivery method 123, 153delivery service 422extended fields 98external ID 118, 120external ID type 148identifying queries to XML document types

not using sample document 248, 262using sample document 235, 257

webMethods Trading Networks User’s Guide Version 6.5 551

Page 552: Web Methods Trading Networks Users Guide 65

I n d e x

partnersplanning for 82profile 132, 146to webMethods for Partners 145

private key in partner profile 162private key to your profile 128processing rules, and order of 313profile group 55public queues 55, 380

addressadding for your profile 119adding on partner profile 148deleting for your profile 119deleting on partner profile 152editing 119

administratorsACL and user name 23Trading Networks 37

Advanced tab, on Activity Log 500agreed agreement status 188

and data status 180cannot delete TPA with this status 192changes you can make 188

Agreement Details screen 181Agreement ID

TPA 178TPA query 186

agreement statusagreed 188changing 188disabled 188list of changes you can make 188proposed 188TPA query 186updating 189

Agreements screenSee also TPAselector panel button 27

Alert e-mail action 90, 338e-mail address as recipient of message 339prerequisites for processing rule action 338

recipient 338receiver 339sender 338webMethods Administrator 339

aliasesidentifying servers in a cluster 49remote server for clustered environment 48tn.cluster.sync.remoteAliases server property 44, 45

ambiguous document, defined 268Anonymous ACL 479, 492any

document type criteria in processing rule 319receiver criteria in processing rule 318sender criteria in processing rule 318

API, Java 319archiving

clustering 459, 461documents 456

and delivery tasks 469persistence 459, 461properties, list of 458repeating 459, 462scheduling of 458, 461tn.archive:archiveAfterDays system property 458tn.archive:deleteAfterDays system property 458wm.tn.archive:archive service 459wm.tn.archive:deleteAfterDays system property 458

arraybyte, delivery content returned 412of numbers 218

flat file document 290for XML document 214

associatingdocuments 449IS document type with TN XML document type 77, 226IS schema with TN XML document type 226parsing schema with TN flat file document type 279, 295profiles with profile groups 109, 120, 135, 150query with trading partner 447schema with TN document type 77

asynchronous, execute a service as 331, 357, 433

552 webMethods Trading Networks User’s Guide Version 6.5

Page 553: Web Methods Trading Networks Users Guide 65

I n d e x

attributesSee also document attributesAttributes tab 448custom, See custom attributesCustom Criteria tab 445data type, in search 167, 437Extended Criteria tab 353how to sort 446search criteria for documents 437search criteria for profiles 167system, See system attributes

average saving value for document attributes 218for flat file document 290for XML document 214

BB2B Developer, See webMethods DeveloperB2B Integration Server, See webMethods Integration Server (IS)Basic Criteria tab

See also basic search criteraactivity log 498for documents 429processing rules 366, 368profiles 167transaction analysis 429, 442

basic operations for Console 31basic search criteria, See Basic Criteria tabbatch delivery tasks 413batch documents

scheduled delivery 344queue 378service 410

single destination 417viewing 450wm.tn.queuing:deliverBatch service 418wm.tn.transport:batchFtp service 413, 417, 419

Batch FTP scheduled delivery service, See wm.tn.transport:batchFtp service 381

bizdocfor FTP delivery location 124

for your profile 112, 138for FTPS delivery location 124

for your profile 112, 138

large documents 545wm.tn.doc.xml:bizdocToRecord 226

brief message on activity log 497, 499built-in services 327

pub.schema:validate 228wm.tn.delivery:registerService 422wm.tn.dictionary:addContactType 109, 136wm.tn.dictionary:addFieldGroup 113, 143wm.tn.dictionary:addIDType 108wm.tn.dictionary:addIDTypes 108wm.tn.doc.xml:bizdocToRecord 226wm.tn.doc:changeStatus 319wm.tn.doc:relateDocuments 449wm.tn.queuing:getQueuedTask 415wm.tn.queuing:updateQueuedTask 416

buttonsarrows to reposition

custom attributes 35, 171, 446processing rule search order 371processing rules 364

Console, list of 26data input for IS document type 190selector panel, list of 26selector panel, on Console 26to navigate the Results table from a query 406

CCA certificates

adding to partner profile 161adding to your profile 127and webMethods Integration Server’s list of trusted CA

certificates 113, 144case

string value, altering 216, 289XQL queries 212

case-sensitiveactivity class 499ConversationID 444DocumentID 443GroupID 444IS password 23IS user name 23password, IS 23

553 webMethods Trading Networks User’s Guide Version 6.5

Page 554: Web Methods Trading Networks Users Guide 65

I n d e x

password, on Proxies tab 64, 65query values 208user name, for server preferences 62user name, IS 23user name, on Proxies tab 64user name, when starting Console 23user status, on Basic Criteria tab 443Value, Custom Criteria tab 171Value, Extended Criteria tab 353XQL queries 207

Certificate Chain fieldfor partner profile 145, 161for your profile 114, 126

certificatesSee also digital certificatesadding to partner profile 161adding to your profile 126CA, See CA certificatesdefault certificate sets 114deleting from partner profile 162deleting from your profile 127digitally sending documents 144, 160viewing, in partner profile 161viewing, in your profile 126

changingagreement status 188IS document type inputs 190private queue state 393profile status to Active 129profile status to Inactive 129public queue state 392scheduled delivery queue states 391table format 33

processing rules 371TPA data inputs 190user status, processing rule action 341

Check for Duplicate Document pre-processing actionSee also duplicate document checkflat file document 296processing rules 327XML document 228

check uniqueness, See duplicate document check

closing sessionsclose Console 37

session on the server 19on other servers 24

clustered environment 44clustering, when archiving and deleting 459, 461configuring Trading Networks for 48notifying when

change in cached memory 49Trading Networks properties change 49user accounts created 49

properties 48reassigning delivery task in 479reassigning service execution task in 492setting up servers 44, 312tn.cluster.notifyPropertyChange property 42tn.cluster.sync.remoteAliases property 49, 312

columns, Detail Viewdocuments 441processing rules 367, 371profiles 168

columns, how to reposition and sort information in 33com.wm.app.tn.db.BizDocStore.changeStatus(BizDocEnvelope,

String,String) 319com.wm.app.tn.doc.BizDocEnvelope.setUserStatus(String) 319comma-separated values, exporting

activity log as 502service execution task to a file 488

Complex Intervalexamples of how to use 387on Schedule tab 157, 386, 390Run Mask settings 386scheduling delivery service 386settings 386

complex repeating, when archiving and deleting 459, 462components of Trading Networks Console 25configuration

database 43document delivery 51for clustered environment 48

554 webMethods Trading Networks User’s Guide Version 6.5

Page 555: Web Methods Trading Networks Users Guide 65

I n d e x

settingsother tasks 61overriding when starting server 19profile 50

Trading Networksand Integration Server (IS) 20configuration properties 42

connecting toConsole, shared database in non-clustered environment 46database 43Integration Server 23load balancer 46remote server 417secure connection 62using wm.tn.transport:batchFtp service 413via proxy server 63

connection pools, configuring 43Console

basic operations 31closing 37components of 25customizing preferences 61diagram of 25

processing rules ordering 314display area 29familiarizing yourself with 25menu bar 26panes 31proxy server 63refreshing 30screen name 29selector panel buttons, list of 26starting 22tables 33toolbar 30, 401user and Retrieve SenderID from session 287, 453

contactadding 121, 151, 153deleting 123editing 121, 151, 153

Contact tabfields for partner 151fields for your profile 121

content types and Respond with processing action 347control number of TPA 179conventions used in this document 15ConversationID

Basic Criteria tab 444case-sensitive 444document

search criteria 436that you want to view 444

extractingfor flat file 288for flat file documents 281

extracting for XML documents 210search criteria 444system attribute 194

convertingpub.flatfile:convertToValues service 278, 295TPA and exporting to industry-standard 180

copyingSee also duplicatingdocument attributes 182, 196document content to database 355not copying data to new database 43public queues 380

Corporate tabexternal ID types 120, 149fields for partner 147fields for your profile 118

corporation informationadding 147logo, See corporate logoname, standard field 89profile 106

creatingduplicate document check 329immediate delivery service 411profile

group profile 55partner 146your own 115

scheduled delivery service 413

555 webMethods Trading Networks User’s Guide Version 6.5

Page 556: Web Methods Trading Networks Users Guide 65

I n d e x

Criteria tablist of fields 349processing rules

document errors 352document types 351receiver 350sender 349user status 352

customattributes, See custom attributesConsole setting preferences 61scheduled delivery service and wm.tn.transport:batchFtp

delivery service 413search criteria

documents 437, 445profiles 167, 170transaction analysis 437, 445

custom attributes 194changing the order of 35, 171, 446Custom Criteria tab 445custom document search criteria 437Detail View tab 35, 446Extended Criteria tab in processing rules 322, 353extracting

for flat file 285for XML documents 211

moving in Detail view 35, 446processing rule criteria 322

Custom Criteria tablist of fields

profiles 170transaction analysis 445

profilesattribute 170operator 171value, for queries 171

trading partner profiles 170transaction analysis

attribute 445operator 445value, for queries 445

custom serviceduplicate document check 328, 329large document handling 543

Ddata status

modifiable 180non-modifiable 180only when agreement status is Agreed 180

data typesDATETIME

for flat file 289for flat file document 289for XML document 214, 215

DATETIME LISTfor flat file document 289for XML document 214, 215

in search criteria 167, 437NUMBER

for flat file document 290for XML document 214, 218

NUMBER LISTfor flat file document 291for XML document 218

STRINGextended profile field 97for flat file 289for flat file document 289for XML document 214, 216

STRING LISTfor flat file document 289for XML document 214, 216

databaseand delivery queue 411clustered environment 44exporting

data from command line 526information 506using tnexport utility 526

exporting and importing 507identifying services sharing database 49

556 webMethods Trading Networks User’s Guide Version 6.5

Page 557: Web Methods Trading Networks Users Guide 65

I n d e x

importingdata from command line 526information 506using tnimport utility 526

migrating to another database 506non-clustered environment 45password for 43properties 43saving flat file documents to 297saving XML documents to 230separate database for each instance of Trading Networks 47URL and location of 43user name for 43

date rangedelivery task query 473service execution task query 486TPA query 187

date receivedBasic Criteria tab 444defined 437document search criteria 437

DATEIMTELIST data type 325DATETIME data type 325

documents search 440for XML document 214specifying detail information for attributes 215

for flat file document 289transaction analysis custom search 440

DATETIME LIST data typedocuments search 440for flat file document 289for XML document 214, 215transaction analysis custom search 440

Days, Run Mask setting 386deactivating vs. permanently deleting processing rules 375debug mode, Integration Server 19Decrypt/Encrypt sub-tab (on Security tab)

for partner profiles 144, 160for your profile 113, 126list of trusted CA certificates 113, 144

defaultdata type 100delivery service, alternative to 421

extended field value 97namespaces 222port number for FTP 123

on partner profile 137on your profile 111

port number for FTPS 123on partner profile 137on your profile 111

port number for HTTP 123on partner profile 137on your profile 111

port number for HTTPS 123on partner profile 137on your profile 111

processing rule 316, 317Add Last option 314, 348listed last 363

profile field value 100server 61string data type 97, 100values for properties.cnf parameters, See online help from TN

Properties pagedefining

document attributes 196document gateway service outputs 276, 280document types 72, 80processing rules 81, 347

based on a saved document 362public queue 380scheduled delivery service inputs 413scheduled delivery service outputs 414TPA 181XML document types 232

definitions, Refer to the Glossary in the Trading Networks Concepts Guide

Delete Query toolbar button 401deleting

address 119, 152, 155certificates, from partner profile 162certificates, from your profile 127contact 123delivery method 124delivery tasks, manually 478disabled extended fields 103

557 webMethods Trading Networks User’s Guide Version 6.5

Page 558: Web Methods Trading Networks Users Guide 65

I n d e x

external ID 121, 149flat file document types 308partner’s profile 175private key 128

in partner profile 163processing rules 374profile 174

referenced by TPA 192profile group association 150public queues 384saved document queries 408scheduling of archival and deletion service 458, 461TPA 192XML document types 266

deliver documentimmediate delivery methods and reliable delivery 343, 344large documents, See large documentsmaximum retries 141, 158, 343, 345multiple times 343polling frequency 142polling method 142, 159processing rule action 341, 433

prerequisites for 342protocol 111, 137queue for polling 112, 141retry factor 142, 159, 343wait between retries 53, 141, 158, 343

delivering task status 471delivery

See also document delivery and deliver documentactivity class 497jobs, See delivery taskslocation 124

for your profile 112, 138on partner profile 154

method, See delivery methodpolling, See queue for pollingqueue, See delivery queueschedule, See scheduled delivery serviceservice, See delivery servicetab, See Delivery Method tabtasks, See delivery tasks

Delivery Maximum Retries 141delivery method 158, 343, 345

delivery methodadding 123, 153deleting 124

on partner profile 155delivery task 467

query 473search criteria 473

editing 123, 153maximum retries 141, 158, 343, 345preferred, See preferred protocolprotocol 123

on partner profile’s Delivery Method tab 137, 153on your profile’s Delivery Method tab 111, 123

queue for polling 112, 141retry factor 142, 159, 343service execution task, not applicable to 483, 484service name 421tab, See Delivery Method tabTrading Networks, out-of-box 111use as preferred protocol

for your profile 112, 124on partner profile 141, 155

viewing 472wait between retries 158

Delivery Method tabDelivery Maximum Retries, on partner profile 141, 158Delivery Maximum Retries, processing rules 343, 345e-mail address 139

for your profile 112on partner profile 139

fields, for your profile 123fields, on partner profile 153host 111, 137location

for your profile 124Location field 112, 138on partner profile 154

password, for partner to update your profile to the partner’s system 166

password, your TN system to supply when connecting to partner’s system 139

polling 142, 159

558 webMethods Trading Networks User’s Guide Version 6.5

Page 559: Web Methods Trading Networks Users Guide 65

I n d e x

port 123port, for your profile 111port, on partner profile 137protocol 123

on partner profile 137, 153on your profile 111, 123

Queue for delivery, partner’s profile 155Retry Factor 142, 159, 343Use as preferred protocol, for your profile 112, 124Use as preferred protocol, on partner profile 141, 155use public queue 139user name 138Wait Between Retries, configuration 53Wait Between Retries, on partner profile 141, 158Wait Between Retries, processing rules 343

delivery queuedefined in Trading Networks 411delivery schedule 410scheduled delivery service 410

delivery serviceadding and registering 422adding new service 421Batch FTP 381defined 410executing 422execution task queries 489host name of Integration Server 423immediate, See immediate delivery serviceinput parameters, list of 423Java code 422password 424port number of Integration Server 424private queue 156registering 421, 422re-registering 425schedule

complex options (Complex Interval) 386to repeat (Simple Interval) 385to run once 385

scheduled, See scheduled delivery serviceservice name 421, 424

name of delivery method 423serviceOutput IS document type 411

user name of User account 424webMethods Developer 422wm.tn.delivery:registerService built-in service 422

delivery tasksand reliable delivery 343, 345cannot stop for scheduled delivery 476, 477, 478configuration settings 52defined 466deleting manually 478delivering task status 471delivery method 467done task status 469, 471exporting as comma-separated values 475exporting information to a file 474failed task status 470, 471finding 472, 485immediate deliveries, task statuses 469information, list of 467managing 466new task status 469pending task status 469printing 474queries 475query 472queued task status 470reassigning to another server 479reliable delivery 466restarting 477retries 468, 484retry factor 467, 484retry limit 467saving queries 475scheduled delivery queue 378scheduled delivery, task statuses 470search criteria for 472

viewing task 472server ID 468, 479status 468, 484

delivery task query 473message 468, 484viewing 472

stop for immediate delivery 476, 477stopped task status 470

559 webMethods Trading Networks User’s Guide Version 6.5

Page 560: Web Methods Trading Networks Users Guide 65

I n d e x

task ID 467task manager 52task output 469task status 469task type 467time created 467, 472time to wait before retry 468time updated 467tracking 466transport time 468viewing 472, 485

in your system 472tasks associated with a document 474

when automatically deleted 469Detail View

after search 367, 441buttons, navigation arrows 406columns

documents 441processing rules 367, 371profiles 168

custom attributes 35, 446defined 428exporting information to a file 450moving selected custom attributes 35, 446profile 171repositioning attributes 35, 171, 446rows 367sorting attributes 446standard attributes 35, 445Transaction Analysis screen 448

Developer, See webMethods Developerdiagram of

document attributes and how it relates to TN document types 195

processing rules ordering 314Query tabs

displayed 30, 403hidden 29, 402

Query toolbarbuttons for the Trading Partners screen 400location on Console screen 400

Trading Networks Console 25

user status and processing 320Using fields in bizdoc to determine location of document

content 546wm.tn.transport:batchFtp service 419

digital certificates, See certificatesdigital signatures

verifying 144, 160digital signatures, verifying

for flat file 294for flat file document 294for XML document 227pre-processing action 354

disable action 391Disable Queue, public queue state 382disabled

agreement status 188document attributes 198, 199

hiding 199extended fields 98, 102, 103

displaying 101flat file document types 306, 308inactive status of TPA 188state of scheduled delivery queue 390XML document types 255, 266

disabled extended fields 103disabling

a profile 129, 175document attributes 199extended fields 102flat file document types 308partner’s profile 175permanently removing flat file document type from database

308permanently removing XML document type from database

266processing rules 373vs. permanently removing extended fields 103XML document types 266your profile 129

disconnecting Trading Networks Console from Integration Server 19

display area on Trading Networks screen 29Display Column panel

processing rules query 375

560 webMethods Trading Networks User’s Guide Version 6.5

Page 561: Web Methods Trading Networks Users Guide 65

I n d e x

Display Column panel, processing rules query 371displaying, See viewingDOCTYPE identifier 206, 208

Identify tab 236, 248, 258, 263DoctypeID, extracting for flat file documents 280DoctypeName, extracting for flat file documents 280document attributes

custom, See also custom attributescopying 182, 196custom 194DATETIME data type 325

for flat file 289for XML document 214

DATETIME LIST data type 440DATETIMELIST data type 325defining 196detail information for XML documents 214determining TN document type dependencies 201disabled 198disabling 199enabling 200generating reports 196list of 197lowercase 216, 289managing 198new with empty fields 146, 196, 235, 247, 348, 349NUMBER data type 218, 324

for flat file document 290for XML document 214

NUMBERLIST data type 324purchase order, as example of extracted string attributes 216,

289requiring extraction from flat file document types 285requiring extraction from XML documents 213saving

average value of 218, 290for XML document 214maximum value of 218, 291

for flat file document 291minimum value of 218

for flat file document 290sum value of 218

for flat file document 291

STRING data type 323for flat file 289for XML document 214

string substitution 217, 290STRINGLIST data type 323system attributes, See also system attributesTN_parms 276, 280transform for XML document 214updating 199uppercase 216, 289using as search criteria 195viewing 198, 448

related activity log entries 449document delivery

action, See deliver document and processing rulesconfiguration 51deliver document by processing rule action 341delivery tasks, See delivery tasksfrom email address 51immediate delivery methods and reliable delivery 343, 344large documents, See large documentsprocessing rules, See deliver document and processing rulesreliable delivery 466

and immediate delivery 343and scheduled delivery 344

screen, to view delivery tasks 472selector panel button 28task manager 52tn.mail.from property 51tn.mail.subject property 51tn.task.sweepTime property 52via e-mail, configuration settings 51viewing delivery tasks in your Trading Networks system 472

document errorsCriteria tab 352criterion 321, 352has criteria 322has no criteria 322may have criteria 322processing rule criterion 321, 352

list of 322

561 webMethods Trading Networks User’s Guide Version 6.5

Page 562: Web Methods Trading Networks Users Guide 65

I n d e x

document gateway service$contentEncoding variable for flat file document 278$receiveSvc variable for resubmitting flat file document 454defined 70, 272inputs and outputs 276outputs, list of 276, 280overview 272resubmitting flat file document 454service signature for 276wm.tn.doc.ff:routeFlatFile 277wm.tn.samples.gateway:gateway 276wm.tn:receive 277

document typesSee also IS document typesSee also TN document typesSee also flat file document typesSee also XML document typesDOCTYPE identifier 236processing rule criterion 319, 351selector panel button 27

documentationadditional 16conventions used 15feedback 16

DocumentIDBasic tab 443case-sensitive 443duplicate document

for flat file document 296for XML document 229pre-processing action 327

extracting for flat file documents 280extracting for XML documents 210of document that you want to view 443search criteria 435, 443system attribute 194

documents 542ACCEPTED status, change to 397ACCEPTED W/ERRORS status, change to 397ambiguous 268archiving 456archiving properties, list of parameters 458

attributes, See document attributesbasic search criteria, list of 366, 429batch, and scheduled delivery queue 378deleting saved queries 408delivery, See document deliverydigitally signing 144, 160DONE status, change to 396DONE W/ERRORS status, change to 396errors, See document errorsextracting attributes for processing 71flat files, See flat file documentsgateway service, See document gateway servicelarge, See large documentsmanaging 428matching to flat file document type 294matching to XML document type 226partner

as receiver 431as sender 430

pollable 450POLLABLE status, change to 397printing information about 450processing

a saved document again 452reprocessing 454, 455resubmitting 452, 454

queue for polling 397QUEUED status, change to 396recognition, See recognitionretrieving content with wm.tn.doc:getDeliveryContent service

412reverting to saved queries 407saving queries 404scheduled delivery queue 396search criteria

basic list 429custom 437

SQL query 451tracking 428types, See document typestypes, See TN document types

562 webMethods Trading Networks User’s Guide Version 6.5

Page 563: Web Methods Trading Networks Users Guide 65

I n d e x

unknownreceiver 431sender 430TN document type 432

updating saved queries 406viewing 428

activity log entries related to 449content 448delivery tasks associated with 474in a queue 396in your system using Partner 447pollable documents 397related documents 449scheduled delivery documents 396service execution tasks associated with 487

XML, See XML documentdone

delivery task status 469, 471service execution task status 483

DONE processing status 433and scheduled delivery queue 396

DONE W/ERRORS processing status 433and scheduled delivery queue 396

draft status of TPA, proposed 188drain action, scheduled delivery queue 392Drain Queue, public queue state 383drained state, scheduled delivery queue 391D-U-N-S number, as ID type 120, 149duplicate

See also copyingdocument, See duplicate document checkflat file document type 300XML document type 233

duplicate document check 327Check for Duplicate Document processing action 327custom services 328DocumentID

for XML document 229, 296pre-processing action 327

for flat file document 296ReceiverID 327SenderID 327TN document type 327

wm.tn.rec:DupCheckService specification 329XML document 228

EebXML

wm.ip.ebMXL.cpa.rec:tpaDataSchema 179wm.ip.ebxml.cpa:initTPA 181

e-delivery service, example of scheduling times 385EDI

control number and TPA 179wm.b2b.editn.TPA:EDITPA 179wm.b2b.editn.TPA:initService 181

Edit menu option 26editing

address 119contact 121, 151, 153delivery method 123, 153extended field 125external ID 118, 120public queues 380

e-mailaddress 90address as recipient of e-mail message 339Alert action 90, 338configuration settings for document delivery 51delivery location

for partner 139for your profile 112, 124

example of message body 340from address 51partner to deliver to 139pipeline information 340, 347recipients, list of 338standard field 90subject when delivering document 51

enable, See enablingenabled

document types, See also disabled document typesflat file document types 309state, scheduled delivery queue 390XML document types 267

563 webMethods Trading Networks User’s Guide Version 6.5

Page 564: Web Methods Trading Networks Users Guide 65

I n d e x

enablinga profile 129, 176document attributes 200extended fields 103flat file document types 309partner’s profile 164, 176processing rules 374public queue state 382queue state 382scheduled delivery queue state 391toolbar button for showing just enabled 199, 201XML document types 267your profile 129

encoding, $contentEncoding variable for flat file document 278Encrypt sub-tab See Decrypt/Encrypt sub-tabEnd Date, Complex Interval setting 386End Time, Complex Interval setting 386Enterprise

in processing rule 318profile 106profile query 166query for profile 166selector panel icon 26viewing activity log entries using Enterprise 498vs. Trading Partners view, for Sent and Received queries 447

envelope activity class 497error messages

Activity class 497limit number of 228, 296logged to activity log for XML document 228profile fields 116, 163

errorsdocument recognition, processing rule criterion 352document, See document errorsimport database 525invalid e-mail 339OutOfMemory when parsing 278, 295parsing (OutOfMemory) 278, 295undefined webMethods administrator 339unknown receiver in e-mail address 339unknown sender in e-mail address 338

example ofCBL document and XQL query and NUMBER data type 219Complex Interval delivery service settings 387e-mail message body 340namespace

affecting XQL queries 223in XML document 221mappings 223

processing rules ordering 314purchase order as example of extracted string attributes 216purchase order, as example of extracted string attributes 289scheduling delivery service times 385service execution task parameters 53standard profile field entries 89uses for processing rules 81

execute a serviceasynchronously 331, 357, 433delivery 422how often task manager runs 52prerequisites for processing rule action 330processing rule action 330, 433reliable execution 331service execution task 331setting input values 336synchronously 331, 357

EXIT flow operation 418export service of TPA 180

vs. export function 184exporting

activity log information 502database information 506

from Console 519items you can export 507tnexport utility 526

delivery task information 475detail view information 450query results, activity log 502service execution task information 488

extended criteriaattributes you can select 322operator 322tab, See Extended Criteria tabvalue of custom attribute 325

564 webMethods Trading Networks User’s Guide Version 6.5

Page 565: Web Methods Trading Networks Users Guide 65

I n d e x

Extended Criteria tab 353attribute 353operator 353value 353

extended fieldsadding 98custom profiles search criteria 167defined 84, 88disabled 98, 102disabling 102editing 125enabling 103Group 125managing 101permanently remove vs. disable 103profile 97tab, See Extended Fields tabviewing 164

for your profile 101, 125on partner profile 159, 163

extended profile fields, See extended fieldsexternal ID information

adding 118, 120deleting 121, 149editing 118, 120

external ID typeadding 148Corporate tab on Profile screen 120, 149ReceiverID

for flat file 215for flat file documents 286, 288for XML document 214

required type 50SenderID

for flat file documents 286, 288for XML document 214, 215

tn.required.idType to specify required type 50extracting

attributesfrom documents 71information for TN document type 214

custom attributesfor flat file 285for XML document 211

information for XML document 210, 214system attributes for XML document 210

Ffailed

delivery task status 470, 471service execution task status 483

failureand exiting scheduled delivery service 418message, EXIT flow operation 418

ffdata, output for flat file document 276, 280fields

extended, See also extended fieldsextended, See extended fieldsprofile, See also profile fieldsrequired 88standard 84, 88that you define 84, 88webMethods-defined 84, 88

File menu option 26File Screen function 26files

.csv file 450, 475, 488, 502

.txt file 450, 475, 488, 502exporting

delivery information to 474detail view information to 450service execution information to 488

sample XML 532script 18server.sh script file 18Trading Networks properties file 42

final status of TPA, agreed 188finding

delivery tasks 472, 485processing rules 366, 367profiles 166TPAs 185

565 webMethods Trading Networks User’s Guide Version 6.5

Page 566: Web Methods Trading Networks Users Guide 65

I n d e x

flat file document typesSee also flat file documents 539associated with parsing schema 279, 295attributes in the definition 283defining 283definition of 272disabled 306disabling 308document gateway service, See document gateway serviceduplicate 300enabling 309Extract panel 301Identify panel 300new with empty fields 300non-matching 284options 294Options tab 304parsing schema 304permanently removing from database 308requiring extraction of attributes 285schema, see flat file schemaunknown 284viewing 306

flat file documentsconverting the input stream to an IS document 278, 295defined 272digital signature, verifying flat file document 294document gateway service 454

See also document gateway servicedocument types 283

See also flat file document typesduplicate document check 296ffdata 276, 280reading the input stream 278resubmitting 454saving document to database 297TN_parms 276, 280wm.tn.doc.ff:routeFlatFile 277wm.tn.samples.gateway:gateway 276wm.tn:receive 277

flat file schemaand flat file document structure validation 295associated with document type 279, 295

flow servicesdelivery task 415writing document gateway services as flow services 276

flow services, writing document gateway services as flow services 278

FTPdelivery location, for your profile 112, 124, 138delivery location, on partner profile 154port number 123port number, for your profile 111port number, on partner profile 137protocol, on partner’s profile 137protocol, on your profile 111wm.tn.transport:batchFtp delivery service 411

FTPSdelivery location, for your profile 112, 124, 138delivery location, on partner profile 154port number 123port number, for your profile 111port number, on partner profile 137protocol, on partner’s profile 137protocol, on your profile 111

full message on activity log 497, 500

Ggateway service, See document gateway servicegroup

Administrators ACL 23Extended Fields tab 125profile group, defining 135, 150profile group, deleting 150

GroupIDBasic Criteria tab 444case-sensitive 444document search criteria 436extracting for flat file documents 281extracting for XML documents 211of document that you want to view 444search criteria 444system attribute 194

566 webMethods Trading Networks User’s Guide Version 6.5

Page 567: Web Methods Trading Networks Users Guide 65

I n d e x

Hhandling exceptions, and wm.tn.queuing:deliverBatch service

418hard disk drive space, and storing large documents 547has errors processing rule criteria 322has no errors processing rule criteria 322Help menu option 26Hide query toolbar button 401hiding

disableddocument attributes 199flat file document types 306XML document types 255

queriespanels 448toolbar button for 401

high availability environment 44host delivery service 423Hours, Run Mask setting 386HTTP

delivery location, for your profile 112, 124, 138delivery location, on partner profile 154password 64port number 123port number, on partner profile 137port number, on your profile 111primary delivery method 342Primary/Secondary 165protocol, on partner’s profile 137protocol, on your profile 111proxy server address 64user name 64user name, for primary/secondary fields 165

HTTPSdelivery location, for your profile 112, 124, 138delivery location, on partner profile 154password 65port number 123port number, on partner profile 137port number, on your profile 111Primary/Secondary 165protocol, on partner’s profile 137

protocol, on your profile 111proxy server address 64secure 64user name 64user name, for primary/secondary fields 165

hubEnterprise local partner 349Integration Server for queue for polling 395

Iicons

Activity Log 28Agreements 27Delete Query 401Document Types 27Hide query 401Processing Rules 27Profile 26Revert to Saved Query 401Run Query 401Save Query 401Save Query As 401Show Enabled 199, 201Show query 401Tasks 28Transaction Analysis 28

ID typeCorporate tab on Profile screen 120, 149D-U-N-S number 120, 149external 50, 120, 149

required type 50tn.required.idType to specify required type 50

identification information for XML document types, list of items 206

identification of flat file documents 283identifier

DOCTYPE, See DOCTYPE identifiersystem, See system identifier

Identify panelSee also Identify tablist of flat file fields 300root tag, flat file document type 301

567 webMethods Trading Networks User’s Guide Version 6.5

Page 568: Web Methods Trading Networks Users Guide 65

I n d e x

Identify tabSee also Identify panelDOCTYPE identifier 236, 248, 258, 263list of fields 234, 247root tag 236, 248, 258, 263

identifying queries 207See also XQL queries 206adding to XML document type 235, 248defined for XML document 206updating in XML document types 257, 262

immediate deliveryreliable delivery 343, 344service, See immediate delivery servicestopping delivery tasks 476, 477task query 473

immediate delivery servicecreating 411defined 410do not save in WmTN package 412input and output variables 411name of new 421output, serviceOutput IS document type, variable 412retrieving document content 412status, serviceOutput IS document type, variable 412statusMessage, serviceOutput IS document type, variable 412transportTime, serviceOutput IS document type, variable 412wm.tn.rec:DeliveryServiceSignature defined input and output

variables 411implicit matching of senders/receivers in processing rule queries,

See Perform Implicit Matching optionimport/export feature, instances of Trading Networks 47importing database information 506

from console 524items you can import 507tnimport utility 526

inactivechange status to 129, 175profile status 116, 164, 173, 256status of TPA, disabled 188

informationactivity log, exporting 502delivery task, list of 467delivery, exporting 474detail for attribute, for XML document 214

detail view, exporting 450display in detail view 367, 441document attributes and content, viewing 448document attributes, extracting 71extraction, for XML documents 210namespaces, for XML document types 221options,for XML document types 226partners

planning 80planning to add 82

service execution taskexporting 488list of 482

initialization service, TPA 181input stream

converting a flat file to an IS document 278, 295reading flat file 278

input stream of flat file document 278, 295inputs

defined by wm.tn.rec:DeliveryServiceSignature 411immediate delivery service, variables for 411scheduled delivery service, list of 413setting values for executing a service 336

Integration Server (IS) 18clustered environments 44configuring Trading Networks for clustered environment 48connecting to 23debug mode 19document types, See IS document typeshost name, for delivery service 423logging on to 23opening session on 23port number, for delivery service 424predefining list of 61, 62proxy server 63schema, See IS schemaserver ID for

delivery task 468reassigning delivery task 479reassigning service execution task 492service execution task 484

shutting down 19starting from the command line 19

568 webMethods Trading Networks User’s Guide Version 6.5

Page 569: Web Methods Trading Networks Users Guide 65

I n d e x

starting on UNIX 18starting on Windows NT 18trusted CA certificates list 113, 144wm.tn.rec:TaskFailure 52, 470, 471

Integration Server (IS) schema, See IS schemaInternalID 435IS document types

associated with TN XML document type 240, 252associated with TN XML document types 226associated with XML document types 226, 231changing data inputs 190data input dialog buttons 190data tree on Agreement details screen 181initialization service 181TPA 179TPA query 186wm.b2b.editn.TPA:EDITPA 179wm.ip.ebMXL.cpa.rec:tpaDataSchema 179

IS document, converting flat file input stream to 278, 295IS schema

and XML document structure validation 228associated with XML document type 227, 240, 252pub.schema:validate built-in service 228

JJava

API 319GUI, starting 22jcode utility and delivery service 422services, writing as document gateway services 276, 278

java.io.InputStream class 278JDBC driver and database 43

Llarge documents

bizdoc 545creating services 544features not available for 543handling 542hard disk drive space 547nodes 548overview 542processing 548

retrieving document content with wm.tn.doc:getDeliveryContent service 412

sending for processing 548stored in memory 547viewing on Transaction Analysis screen 549wm.tn.doc:getContentPartData service 547wm.tn.doc:getDeliveryContent service 548XML document types 544XOL queries 544

large, See large documentsLast Modified Time, processing rules query 371licensed seat 24load sample XML document 233local partner

See also Enterpriseas sender/receiver, for processing rule criteria 318

location/invoke/wm.tn/receive 112, 124, 138, 154database 43of attribute in TN document type 195URL for delivery

for your profile 124on partner profile 154on your profile 112, 138

logging off ofcurrent server 24Trading Networks Console 37

logging on toIntegration Server 23Trading Networks Console 22

logicrequired in scheduled delivery service 415typical to include in scheduled delivery service 417

lowercase document attribute values 216, 289

Mmanaging

delivery tasks 466document attributes 198documents 428extended fields 101partners 131processing rules 372

569 webMethods Trading Networks User’s Guide Version 6.5

Page 570: Web Methods Trading Networks Users Guide 65

I n d e x

profiles, your own 117scheduled delivery queue 390service execution tasks 482TPAs 185your profile 105

manuallyadding profile user name 443deleting delivery tasks 478deleting service execution tasks 491

mappings, namespacedefining from xmlns attribute in sample document 225description 223guidelines for defining 225in XML document types 221

matchingTN document types 319XML document types 209, 268

maximumretries for service execution task 53retry limit, for delivery 467saving value for document attributes 218, 291

for flat file document 291for XML document 214

may have errors processing rule criteria 322memory, large documents 547menu bar, Console 26menu options

Edit 26File 26Help 26Screen function 26Tools 26View 26

menusConsole 26on screen 34right-click on screen 34Trading Networks 26

messagesbrief, activity log 497, 499content type 347error, See error messagesfull, activity log 497, 500

respond with (processing rule action) 346status delivery message 468, 484

migrating database information 506data you can migrate 507

minimum saving value for document attributes 218for flat file document 290for XML document 214

Minutes, Run Mask setting 386modifiable TPA data status 180Months, Run Mask setting 386multiple

custom attributes, in search 440instances of Trading Networks 44panes 31, 32

Nname

of new immediate delivery service 421of scheduled delivery service 421processing rules query 370public queues 381

namespace mappingsdefining from xmlns attribute in sample document 225description 223guidelines for defining 225

namespacesand XQL queries 223default 222defining 222description 221elements in 221example, in XML document 221example, mappings 223example, with XQL queries 223guidelines when defining namespace mappings 225in XML document types 221mappings, See namespace mappingsprefix 222

default namespace 222URI 222

network planning 68

570 webMethods Trading Networks User’s Guide Version 6.5

Page 571: Web Methods Trading Networks Users Guide 65

I n d e x

newdelivery task status 469document attribute 146, 182, 196, 235, 247, 348, 349extended profile field, adding 98flat file document type 300processing status 433public queues 380server, adding 62service execution task status 483XML document type 233

New Document Type screen, sample XML document from 233NEW processing status 433New Protocol tab

delivery service, private queue 156fields, partner’s profile 155private queue 156public queue 155queue state, private queue 156

nodein large documents 548in XML document 207viewing 236, 239

non-clustered environment and shared database 45non-matching

flat file document types 284TN document types 319XML document types 209, 268

non-modifiable TPA data status 180non-root user 19notification

notifying servers in clusterchange to cached memory 49change to Trading Networks properties 49new user accounts 49

tn.cluster.notifyCacheChange 49tn.cluster.notifyProfileAddUser 49tn.cluster.notifyPropertyChange 49

notification when required attributes not extracted 213null user status 319, 320, 341NUMBER data type 218, 324

documents search 439for flat file document 290

for XML document 214transaction analysis custom search 439

NUMBER LIST data typefor flat file document 291for XML document 218

NUMBER, sample of CBL document 219, 291NUMBERLIST data type 324

documents search 439transaction analysis custom search 439

Oonline help for TN Properties page, accessing 42opening sessions

on Integration Server 23on servers 24

operatorCustom Criteria tab 445custom search criteria 437

profile fields 167extended criteria in processing rules 322Extended Criteria tab 353

optionsflat file document types 294pre-processing for XML document 226XML document types 226, 240, 252

list of 226Options tab, list of fields 240, 252order of processing rules 313, 363

search 371ordinals

processing rule order 313processing rules query 371

other servers, opening/closing sessions on 24OutOfMemory errors, parsing 278, 295output delivery task 469, 484outputs

defined by wm.tn.rec:DeliveryServiceSignature 411document gateway service, list of 276, 280ffdata for flat file document 276, 280immediate delivery service, variables for 411, 412scheduled delivery service, list of 414template tags 340, 347

571 webMethods Trading Networks User’s Guide Version 6.5

Page 572: Web Methods Trading Networks Users Guide 65

I n d e x

overviewdocument gateway service 70document gateway service and flat files 272exporting and importing database information 506Trading Partner Agreement (TPA) 178

Ppanes

multiple 31resizing 32single 31split 31, 32tabs 32

parsing 278, 295flat file documents 295flat file schema 279, 295flat file schema associated with flat file document type 279,

295OutOfMemory errors 278, 295pub.flatfile:convertToValues 278, 295schema associated with flat file document type 304

partner authority, Web Manager 451Partner Connect Express 39partners

See also trading partnersactivity log 499adding 145adding profile 145and delivery task 472and TPA 178as receiver for document 431as sender for document 430certificate information 144, 160Contact tab 151Corporate tab 147creating a partner’s profile 132deleting profile 175Delivery Method tab 153delivery task query 473delivery task search criteria 473disabling profile 175enabling profile 164, 176Extended Fields tab 159

indicating you want to poll their systems for documents 142, 159

management, See trading partner managementmanaging 131NEW QUEUE tab 155partner passwords, protecting 139passwords, protecting 424planning

for adding partners 82to work with partners 80

polling for documents 394profile 84, 85, 132

creating 132information 132profile group 150

Profile screen 132receiver of documents to view 442Security tab 144, 160sender of documents to view 442service execution task query 486service execution task search criteria 486unknown 318updating profile 173user name 138

when manually creating a profile 443viewing

activity log entries 499activity log entries using Enterprise 498documents in a partner’s system 451information for 26partner receiving document 472

passwordcase-sensitive, on Proxies tab 64, 65database 43Delivery Method tab 139, 166delivery service 424for accessing Web Manager 451for user account 23informing partner of 165partner passwords, protecting 424partner, protecting 139profile 139Proxies tab 64, 65

572 webMethods Trading Networks User’s Guide Version 6.5

Page 573: Web Methods Trading Networks Users Guide 65

I n d e x

to access HTTP proxy server 64to access HTTPS proxy server 65viewing when hidden 139Web Manager 451when logging in 23

Password Manager, role of 139, 424pattern-matching characters, on Basic Criteria Tab 443pending

delivery task status 469service execution task status 483

PENDING processing status 433Perform Implicit Matching option

specifying receiver in processing rule query 370specifying sender in processing rule query 369

persistence, when archiving and deleting 459, 461pipeline information

in body of e-mail address 340, 347output template tags 340, 347TN_parms 276, 280

pipeline matching variable for XML document 206, 208planning

business document exchange 68document information for processing 71extracting document attributes 71network 68partner information 80processing rules 81profiles, creating 81TN document types 72Trading Networks 67trading partner management 68, 80, 82transaction types 69

pollabledocuments, viewing 450POLLABLE processing status 433status and queue for polling 397

pollingfor documents 394frequency that Trading Networks polls partner’s system 142how receiving partners poll for documents 394method to retrieve queued documents from partners 142, 159on Delivery Method tab on partner’s profile 142, 159queue for, processing rule action 359

requesting list of queued documents 394specifying you want to poll partner’s system 142

port delivery service 424port number

default 123default, on partner profile 137default, on your profile 111FTP 123FTP, on partner profile 137FTP, on your profile 111FTPS 123FTPS, on partner profile 137FTPS, on your profile 111HTTP 64, 123HTTP, on partner profile 137HTTP, on your profile 111HTTPS 64, 123HTTPS, on partner profile 137HTTPS, on your profile 111

preferencesproxy servers 63servers Console can open sessions on 62

preferred delivery methodSee also delivery methodSee also preferred protocolSee also Use as preferred protocolreceiver’s 359standard field 89

preferred protocolSee also Use as preferred protocolexception 155for your profile 112, 124on partner profile 141, 155receiver’s, processing rule action 359

prefix for namespace 222pre-processing

actions, See pre-processing actionstab, See Pre-Processing tab

pre-processing actionsdefined 312, 327duplicate document check of an XML document 228duplicate document check of flat file document 296list of 327

573 webMethods Trading Networks User’s Guide Version 6.5

Page 574: Web Methods Trading Networks Users Guide 65

I n d e x

for flat file 226for XML document 226

savingdocument to database 355flat file document to database, flat file document 297XML document to database 230XML document type to database 228

tab, See Pre-Processing tabvalidating the structure of

document 354flat file document 295XML document 228

verifying digital signature ofdocument 354flat file document 294XML document 227

Pre-Processing tablist of fields 354validate 354verify 354

prerequisites foradding a profile 146Alert e-mail processing rule action 338check duplication of

documentID 327documentID and SenderID 327documentID, SenderID, and document type 327documentID, SenderID, and ReceiverID 327

deliver document processing rule action 342execute a service processing rule action 330reprocessing a saved document 455resubmitting a saved document 452

printingactivity log information 502delivery tasks information 474information about documents 450service execution tasks information 488transaction analysis 450

private keyadding 114adding in partner profile 162adding to your profile 128deleting 128

deleting in partner profile 163viewing in partner profile 162viewing in your profile 127

Private Key field, on Security tabfor partner profile 145, 162for your profile 114, 127

private queuecannot use as preferred protocol 155changing state of 393defined 379delivery service, See also scheduled delivery serviceon NEW QUEUE tab 156preferred protocol, cannot use as 155queue state

on NEW QUEUE tab 156on Settings sub-tab 156

Schedule tab 157scheduling delivery 384Settings tab 156using 156

processingactions, See processing rules, actionsactivity class 497document again

flat file document 454reprocessing 454, 455resubmitting 452, 454

documents, See business document exchangelarge documents, See large documentsplanning for 81reprocess function 454, 455resubmit function 452, 454rules, See processing rulessaved document again 452transaction types 69

processing rulesABORTED status 434ACCEPTED status 434ACCEPTED W/ ERRORS status 434action

Change user status 341Deliver document 433Deliver the Document to the Receiver 341

574 webMethods Trading Networks User’s Guide Version 6.5

Page 575: Web Methods Trading Networks Users Guide 65

I n d e x

Execute a service 330, 433list of 329Respond with a message 346Send an Alert E-mail 338

adding and order of 313and pre-processing actions 312, 327any document type 319any receiver 318any sender 318based on a saved document 362Basic Criteria tab 366change

order of rules 364user status 341

Check for Duplicate Document pre-processing action 327criteria 317

custom attributes 322example of 317

Criteria tab 349custom attribute 322default 316, 317

listed last 363defined 312defining 347

one based on a saved document 362deleting 374deliver document by (action) 341, 433Detail View tab 371disabling 373document

errors criterion 321, 352type criterion 319, 351

DONE status 433DONE W/ERRORS, as search criteria 433duplicate document check 327enabling 374Enterprise 318execute a service (action) 330, 433extended criteria 322Extended Criteria tab 353finding 367local partner as sender/receiver 318

lookup 312bypassing lookup 326ordering rules for lookup 313reordering rules for lookup 316

managing 372NEW status 433order of 313ordering 313, 363

example of 314ordinal 313PENDING status 433permanently deleting vs. deactivating 375planning 81POLLABLE status 433Pre-Processing tab 354queries 367

"Any" document type 370function 366implicit matching of receiver 370implicit matching of sender 369

QUEUED status 433receiver criteria 317, 350receiver, preferred protocol (action) 359reprocess function 454, 455

prerequisites for 455respond with a message (action) 346resubmit function 452, 454

prerequisites for 452results table 367

changing display format 371saving 360search 367search criteria, basic list 366search order 371selected

document type 319receiver 318sender 318

selector panel button 27send an alert e-mail (action) 338sender criteria 317, 349stateless 81

575 webMethods Trading Networks User’s Guide Version 6.5

Page 576: Web Methods Trading Networks Users Guide 65

I n d e x

summary information 367table 367

changing display format 371testing order of 365unknown

document type 319receiver 318sender 318

user status criterion 319, 352viewing 366, 367

Processing Rules screen selector panel button 27processing status

Basic Criteria tab 442, 443for document to be viewed 433, 442, 443list of 433, 442, 443search criteria 433, 442, 443

processingRuleID, extracting, for flat file documents 282processingRuleName, extracting, for flat file documents 282profile

adding partners 85, 132assistant, See Profile AssistantBasic Criteria tab 167basic search criteria, list of 167configuration settings 50Contact tab

partner’s profile 151your profile 121

Corporate tabpartner’s profile 147your profile 118

creatinga partner’s profile 132planning for 81

defined 106, 132deleting 174

one referenced by TPA 192partner’s 175

Delivery Method tabpartner’s profile 153your profile 123

disablingpartner’s profile 175your profile 129

enablingpartner’s profile 164, 176your profile 129

Enterprise 106error message 116, 163Extended Fields tab

partner’s profile 55, 143, 159your profile 113

fields, See profile fieldsmanaging 105

partner’s profile 131your profile 117

New Protocol tab 155partner’s

profile 84, 85, 132Profile screen 132

planning to create 81Profile screen, See Profile screenquery function 166results table 168search 168search criteria

basic list 167custom 167custom list 167

Security tab 144partner’s profile 144, 160your profile 126

selector panel button 26status

Active 116, 164, 173, 256Inactive 116, 164, 173, 256list of, for your partner 164list of, for your profile (Enterprise) 116

table 168tn.required.idType to specify required external ID type 50updating

partner’s profile 173your profile 117

user name for 138, 443viewing 166, 168

your corporation’s Profile screen 106your profile on partner’s system 117

576 webMethods Trading Networks User’s Guide Version 6.5

Page 577: Web Methods Trading Networks Users Guide 65

I n d e x

your corporation’s Profile screen 106Profile Assistant

adding your profile 115updating user name and password 165, 166

profile fieldsdata types, See also data typeserror message 116, 163extended 55, 84, 88, 97, 113, 143

See also extended fieldsrequired 88saving 116standard 84, 88

See also standard fieldsexample of entries 89

profile groupassociating partner profile with 150associating your profile with 120creating 55defined 55

profile group membership 150Profile screen

See also profileadding partner profile 146partner’s profile 132selector panel button 26tab screens, partner’s profile 132tab screens, your corporation 106your profile 106

Profile tab, See Profile screenprogram code conventions in this document 15properties

.cnf, See properties.cnfarchiving and deleting documents 458database 43Trading Networks 42

See online help from TN Properties pagetn.archive.archiveAfterDays 458tn.archive.deleteAfterDays 458tn.cluster.notifyCacheChange 49tn.cluster.notifyProfileAddUser 49tn.cluster.notifyPropertyChange 49tn.cluster.sync.remoteAliases 44, 45, 49, 312tn.mail.from 51

tn.mail.subject 51tn.required.idType 50tn.task.attempt.notPersisted 298tn.task.maxRetries 53tn.task.notifyFailure 55tn.task.sweepTime 52tn.task.ttw 53

properties.cnfaccessing online help for 42description of settings

See online help from TN Properties pagefile location 42tn.archive.archiveAfterDays 458tn.archive.deleteAfterDays 458tn.cluster.notifyCacheChange 48, 49tn.cluster.notifyProfileAddUser 48, 49tn.cluster.notifyPropertyChange 48, 49tn.cluster.sync.remoteAliases 49tn.mail.from 51tn.mail.subject 51tn.required.idType 50tn.task.attempt.notPersisted 298tn.task.maxRetries 53tn.task.notifyFailure 55tn.task.sweepTime 52tn.task.ttw 53wm.tn.admin:setProperties 45, 46

proposed agreement statusagreement status 188changes you can make 188

protocol, delivery method 111, 123, 137, 153Proxies tab

Host:Port 64password 64, 65user name 64

proxy server 23, 63HTTP 64HTTPS 64

pub.flatfile:convertToValues 278, 295pub.io folder, services for reading flat file input streams 278pub.schema:validate built-in service 228, 327public identifier 206, 208, 236, 248, 258, 263

577 webMethods Trading Networks User’s Guide Version 6.5

Page 578: Web Methods Trading Networks Users Guide 65

I n d e x

public queueadding 55, 380batch FTP scheduled delivery service 381batch scheduled delivery service 381changing state of 392copying 380defined 379defining 380deleting 384delivery service 381

See also scheduled delivery servicescheduling 384

Disable Queue state 382Drain Queue state 383editing 380Enable Queue state 382inputs for delivery service 381name 381new 380on NEW QUEUE tab 155partner to deliver to 139registry setting 55Schedule tab 389scheduled delivery service 381scheduling

delivery 384execution of delivery service 388

Settings tab 384state 382Suspend Delivery state 383using 155

purchase orderas example of extracted string attributes 289in example of user status and processing 319

purchase order, as example of extracted string attributes 216

Qqueries

"Any" document type 370activity log 503Basic Criteria tab

processing rules 366profiles 167

Custom Criteria tab, trading partners 170deleting a query, toolbar button for 401deleting a saved document queries 408delivery tasks 472, 475diagram of hidden query tabs 29, 402diagram of query tabs 30, 403Enterprise vs. Trading Partners, for Sent and Received queries

447exporting

Detail view results as comma-separated values 451results of, from activity log 502

hiding query, toolbar button for 401identifying, See identifying querieslist of toolbar items 401panel 401processing rules 366, 367profiles 166results

processing rules 367profiles 168

reverting to saved document queries 407running a query, toolbar button for 401saving

activity log queries 503delivery task queries 475document queries 404service execution task queries 489

selector button for Transaction Analysis 28Sent and Received queries for Enterprise vs. Trading Partners

447service execution tasks 485, 489Show/Hide Query panels 448showing query, toolbar button for 401SQL 451testing XQL 245TPA 185updating saved document queries 406using document attributes 195value for, on Custom Criteria tab 445values are case-sensitive 208viewing panels with Show/Hide Query 448XQL, See XQL queries

queue document polling, See queue for pollingQueue for delivery, cannot use as preferred protocol 155

578 webMethods Trading Networks User’s Guide Version 6.5

Page 579: Web Methods Trading Networks Users Guide 65

I n d e x

queue for polling 394ACCEPTED processing status 397ACCEPTED W/ERRORS processing status 397defined 394delivery method 112, 141documents 397POLLABLE processing status 397

queue name, public queue, on Settings tab 381queue state

private queue on NEW QUEUE tab 156private queue on Settings sub-tab 156public queue, on Settings tab 382

queueddelivery task status 470QUEUED processing status and scheduled delivery queue

396QUEUED processing status 433queues

and trading partners 378defined 378delivery 410

See also delivery queuesprivate, See private queuespublic, See public queuesscheduling delivery 384scheduling execution of delivery service 388Settings tab 384state, See queue stateviewing documents in 396wm.tn.queuing:getQueuedTask 415wm.tn.queuing:updateQueuedTask 416

RRDBMS, See relational databasereassigning

delivery tasks to another server 479service execution tasks to another server 492

received queries 447receiver

any criteria 318Basic Criteria tab 442criteria for processing rule 350Criteria tab 350

document search criteria 431implicitly matching receivers in processing rules query 370local partner as, for processing rule criteria 318partner who receives documents to view 442preferred protocol, processing rule action 359processing rule criteria 317processing rules query 370recipient of e-mail message 339search criteria 442selected criteria 318TPA 178TPA query 186unknown criteria 318unknown, in e-mail address 339

ReceiverIDduplication of

for flat file document 296for XML document 229pre-processing action 327

extractingfor flat file documents 280for XML documents 210

extracting from flat file 286specifying detail information for extraction 215system attribute 194transforming value before storing in database, for flat file

documents 286, 288XML document 214

recipiente-mail address 339of e-mail message 338receiver 339sender 338webMethods Administrator 339

recognitionactivity class 497and reprocessing a document 326document gateway service 70, 272errors criterion 321in processing rule 319of flat file documents 70, 272of OAG documents, example of 206of XML documents 204

579 webMethods Trading Networks User’s Guide Version 6.5

Page 580: Web Methods Trading Networks Users Guide 65

I n d e x

refresh Console 30registering

defined 421delivery service 421, 422

reliable deliveryand delivery maximum retries 141, 158and delivery tasks 343, 345and retry factor 141, 158configuration settings 52defined 343, 344delivery tasks 466how often task manager runs 52immediate delivery method 343multiple times 343scheduled delivery queue 378

reliable executionand service execution tasks 53, 482configuration settings 52defined 333how often task manager runs 52view service execution tasks 485

remote aliases 45removing

delivery service with wm.tn.delivery:removeService 425extended fields 103flat file document type from database 308partner and disabling profile 175XML document type from database 266

repeatingcomplex, archiving 459, 462when archiving and deleting 459, 462

reportsand User Status action 341exporting data to create 450, 475, 488, 502from document attributes 196

repositioningattributes 446columns 33custom attributes 35, 171, 446order of processing rules 364

reprocess function 454, 455prerequisites 455

requiredattributes for flat file 285attributes for XML document 213fields, defined 88logic in scheduled delivery service 415profile fields 88

re-registering with wm.tn.delivery:removeService 425resizing panes 32respond with a message

processing rule action 346processing rule action, example of 347

restartingdelivery task 477service execution task 490

resubmit function 452, 454prerequisites 452

resubmitting$receiveSvc variable for flat file document 454flat file document 454

Retrieve SenderID from session option 287retrieving delivery task and wm.tn.queuing:getQueuedTask 415retrieving document content

and wm.tn.doc:getDeliveryContent service 412of immediate delivery service 412of scheduled delivery service 414

retrylimit, delivery task 467number of, delivery task 468, 484

Retry Factordelivery method 142, 343delivery task 467, 484on Delivery Method tab, partner’s profile 159service execution task 53

Revert to Saved Query toolbar button 401reverting saved document queries 407right-click menus 34root tag

Identifypanel for flat file document type 301tab 236, 248, 258, 263

XML document 206, 208, 236, 248, 258, 263, 301routing rules, See processing rules

580 webMethods Trading Networks User’s Guide Version 6.5

Page 581: Web Methods Trading Networks Users Guide 65

I n d e x

rows, Detail View 367Run Mask settings, Complex Interval 386Run Once

on Schedule tab 157, 389scheduling delivery service 385

Run Query toolbar button 401

Ssample service, wm.tn.samples.gateway:gateway sample

service 276Save Document to Database pre-processing action, flat file

document 297Save Query As toolbar button 401Save Query toolbar button 401saving

activity logdata 502entry 497queries 503

delivery task queries 475document

content to database 355query 404to the database, for flat file document 297

flat file document to database 297immediate delivery service not in WmTN package 412pre-processing action 355

for XML document 228processing rules 360profile fields 116query as button 401query button 401scheduled delivery service not in WmTN package 413service execution task queries 489XML document to database 230

Schedule tabComplex Interval 157, 386, 390private queues 157public queues 389Run Once 157, 389Simple Interval 157, 385, 389

scheduled deliverydelivery task query 473service, See scheduled delivery servicestopping delivery tasks 476, 477, 478

scheduled delivery queueand reliable delivery 378defined 378delivery tasks 378disable action 391disabled state 390documents 396DONE processing status 396DONE W/ERRORS processing status 396drain action 392drained state 391enable action 391enabled state 390managing 390QUEUED processing status 396states of

and public and private queue 391changing to action 391

suspend action 392suspended state 391

scheduled delivery serviceSee also scheduled deliveryand handling exceptions 418and wm.tn.queuing

getQueuedTask 415updateQueuedTask 416

associated with delivery queues 410Batch FTP 381creating 413custom and wm.tn.transport:batchFtp service 413defined 410do not save in WmTN package 413how to schedule 384inputs, list of 413name of 421outputs, list of 414public queues 381required logic to include in 415

581 webMethods Trading Networks User’s Guide Version 6.5

Page 582: Web Methods Trading Networks Users Guide 65

I n d e x

retrieving document content 414typical logic to include in 417wm.tn.transport:batchFtp service 411

schedulingarchiving and deleting 458, 461Complex Interval 386delivery service execution 388delivery service for queues 384private queues on New Protocol tab, partner’s profile 157Run Once 385Simple Interval 385wm.tn.archive:archive service 459

schema, flat fileassociated with document type 279, 295parsing 279, 295using to validate documents 295

schema, IS schemaand XML document structure validation 228associated with XML document type 227, 240, 252, 304

screendisplay area 29name corresponding to selector panel function on Console 29Query toolbar 401right-click menu 34tables 33toolbar 30toolbar buttons 401

script file, server.sh 18search

See also queriesattribute 437

profile fields 167Basic Criteria tab

partner profiles 169processing rules 368Transaction Analysis 442

ConversationID 436custom attributes 437Custom Criteria tab

and specifying custom search criteria 445Partner Profile 170

data types, in custom searches 167, 437date received 437

delivery tasks 472document attributes 429DocumentID 435documents

basic criteria 429custom 437

extended profile fields 167GroupID 436InternalID 435multiple custom attributes 440operator 437

profile fields 167order of processing rules 371pattern-matching characters, Basic Criteria tab 443processing rules 366, 367

basic criteria 366processing status 433profiles 167, 168

basic criteria 167custom criteria 167, 170

receiver 431sender 430service execution tasks 485TN document type 432TPA 185user status 435value 440

Search Order panel, processing rule query 371secure connection, HTTPS 64Secure Sockets Layer (SSL), when logging in 23security of partner passwords 424Security tab

Certificate Chain fieldfor partner profile 145, 161for your profile 114, 126

Decrypt/Encrypt sub-tab 113, 126, 144, 160fields for

partner’s profile 144, 160your profile 126

Private Key fieldfor partner profile 162for your profile 114, 127on partner’s profile 145

582 webMethods Trading Networks User’s Guide Version 6.5

Page 583: Web Methods Trading Networks Users Guide 65

I n d e x

Sign/Verify sub-tab 113, 126, 144, 160SSL Client sub-tab 114, 126, 144, 160

selecteddocument type criteria in processing rule 319receiver criteria in processing rule 318sender criteria in processing rule 318

selector panel 447buttons on Console 26

senderany criteria 318Basic Criteria tab 442criteria for processing rule 349Criteria tab 349document search criteria 430ID, See SenderIDimplicitly matching senders in processing rules query 369local partner as, for processing rule criteria 318partner who sent documents to view 442processing rule criteria 317processing rules query 369recipient of e-mail message 338search criteria 442selected criteria 318TPA 178TPA query 186unknown 318unknown criteria 318unknown, in e-mail address 338

SenderIDduplicate document for XML document 229duplication of 327

for flat file document 296extracting for flat file documents 280extracting from flat file 286extracting, for XML documents 210for XML document 214Retrieve SenderID from session option 287specifying detail information for extraction 215system attribute, XML document 194transforming value before storing in database, for flat file

documents 286, 288

sendingan alert e-mail, processing rule action 338

See also Alert e-mail actiondocuments digitally 144, 160documents, See sending documentslarge documents 548

sent queries 447separate database for each instance of Trading Networks 47server ID

delivery task 468reassigning 479

service execution task 484reassigning 492

server.sh script file 18serverName, on Servers tab 62servers

closing sessions on 24clustered environment 44, 312licensed seat 24network, See Trading Networks Network Serveropening sessions on 24opening/closing sessions on 24proxy 23, 63reassigning a delivery task to another server 479reassigning a service execution task to another server 492shutting down 19starting 18tn.cluster.sync.remoteAliases property 44, 312Trading Networks, See Integration Serverwith multiple user names 62

Servers tabserverName 62user name 62

service execution tasksand reliable execution 53, 482configuration settings 52defined 333, 482deleting manually 491delivery method, not applicable to 483, 484done task status 483exporting 488failed task status 483

583 webMethods Trading Networks User’s Guide Version 6.5

Page 584: Web Methods Trading Networks Users Guide 65

I n d e x

information, list of 482managing 482maximum retries 53new task status 483pending task status 483printing 488query 485, 486reassigning to another server 492restarting 490retry factor 53saving queries 489search criteria 485search criteria, for viewing task 485server ID 484, 492status 486stopped task status 483stopping 489task ID 482task manager 52task output 484task status 483time created 482time to wait before retry 484time updated 483tn.task.maxRetries property 53tn.task.retryFactor property 53tn.task.ttw property 53tracking 482transport 484transport time 484viewing 485

in your system 485tasks associated with a document 487

wait between retries 53when automatically deleted 484

serviceNamedelivery service 421, 423name of new delivery method 421

serviceOutput IS document type, list of variables 411services

and service execution tasks 482built-in, See built-in servicesdelivery service name 424

large documents, creating for 544reliable execution 482screen, to view service execution tasks 485TPA, export service to industry-standard format 180TPA, initialization service for IS document type 181viewing service execution tasks in your Trading Networks

system 485wm.server:connect 479, 492wm.server:ping 479, 492

sessionsclosing session on the server 19opening on Integration Server 23opening on servers 24stopping all active 19

Set Inputs public queue delivery service 381setting up document archival and deletion

basic archival and deletion 457configurable archival and deletion 460

settingsComplex Interval 386Console preferences 61, 62document delivery via e-mail 51of input values for executing a service 336other configuration 61private queues 156profile 50public queues 384Run Mask 386server list 62tasks 52

Settings tabdelivery service, private queue 156private queues 156public queues 384queue state, private queue 156queues 384

shared database in clustered environment 44Show Enabled toolbar button 199, 201show node 236, 239Show query toolbar button 401Show/Hide Query 448showing, See viewingshutting down Integration Server (IS) 19

584 webMethods Trading Networks User’s Guide Version 6.5

Page 585: Web Methods Trading Networks Users Guide 65

I n d e x

Sign/Verify sub-tab (on Security tab)for partner profiles 144, 160for your profile 113, 126

signaturedigital, See also digital signaturessystem attribute 194

Signature, extracting for XML documents 211SignedBody, extracting for XML documents 211, 227Simple Interval

on Schedule tab 157, 385, 389scheduling delivery service 385

Simple Mail Transfer Protocol (SMTP), See SMTPSMTP

See also e-mailprotocol, on partner’s profile 137protocol, on your profile 111server address 338

sortingattribute information 446column information 33custom attributes 35, 171, 446

split panes 31, 32SQL query 451SSL Client sub-tab (on Security tab)

for partner profiles 144, 160for your profile 114, 126

standard attributes on Detail View tab 35, 445standard fields

corporation name 89defined 84, 88e-mail address 90example of entries 89list of 88preferred delivery method 89profile 88required 88viewing 95

standard profile fields, See standard fieldsStart Date, Complex Interval setting 386Start Time, Complex Interval setting 386starting

Console 22delivery task again 477

Integration Server from the command line 19Integration Server on UNIX 18Integration Server on Windows NT 18server, overriding configuration settings 19service execution task again 490

state, See queue statestateless processing rules 81states

of private queue, changing 393of public queue, changing 392of scheduled delivery queue, changing to action 391of scheduled delivery queue, public vs. private queue 391

statusABORTED 434ACCEPTED 434ACCEPTED W/ ERRORS 434Active 116, 164, 173, 256change to Active 129, 176change to Inactive 129, 175delivering delivery task 471delivery task 469DONE 433done delivery task 469, 471done service execution task 483DONE W/ ERRORS 433failed delivery task 470, 471failed service execution task 483immediate delivery service, variable for 412Inactive 116, 164, 173, 256message, delivery task 468, 484NEW 433new delivery task 469new service execution task 483of delivery attempt, delivery task 468, 484of user as processing rule criterion 319, 352PENDING 433pending delivery task 469pending service execution task 483POLLABLE 433profile, See also profile, statusQUEUED 433queued delivery task 470service execution task 483

585 webMethods Trading Networks User’s Guide Version 6.5

Page 586: Web Methods Trading Networks Users Guide 65

I n d e x

stopped delivery task 470stopped service execution task 483stopped task status 470task for scheduled deliveries 470

statusMessage immediate delivery service variable 412stopped

delivery task status 470service execution task status 483

stoppingactive sessions 19delivery task for immediate delivery 476server 19service execution task 489

STRING data type 216, 323altering case value of 216altering case value of, for flat file document 289documents search 438extended profile field 97for flat file document 289for XML document 214profiles search 168specifying detail information for attribute 216specifying detail information for attribute, for flat file document

289string substitution 216, 217, 290

for flat file document 289transaction analysis custom search 438

STRING LIST data typefor flat file document 289for XML documents 214, 216

STRINGLIST data type 323documents search 438transaction analysis custom search 438

structureflat file and document gateway service 70verify for flat file document 295

structure of flat file and document gateway service 272sum saving value for document attributes 218

for flat file document 291summary

actions you can take against sample document 243information, Processing Rules screen 367View Detail/Summary display 362

suspend action 392Suspend Delivery, public queue state 383suspended state, scheduled delivery queue 391synchronous, execute a service as 331, 357system attributes

ConversationIDfor flat file 288for flat file documents 281for XML documents 210

DATETIME 215for flat file documents 289

DoctypeIDfor flat file documents 280

DoctypeNamefor flat file documents 280

DocumentIDfor flat file documents 280for XML documents 210, 229, 296pre-processing action 327

GroupIDfor flat file documents 281for XML documents 211

list of 194for XML documents 210

processingRuleID, for flat file documents 282processingRuleName, for flat file documents 282ReceiverID 215, 286, 327

for flat file documents 280, 286, 288for XML documents 210, 214, 229, 296

SenderID 215, 286, 327for flat file documents 280, 286, 288for XML documents 210, 214, 229, 296

Signature, for XML documents 211, 227SignedBody, for XML documents 211, 227STRING 216

for flat file document 289UserStatus

for flat file documents 281for XML documents 211

system attributes, extractingfor XML documents 210

system identifier 206, 208, 236, 248, 258, 263

586 webMethods Trading Networks User’s Guide Version 6.5

Page 587: Web Methods Trading Networks Users Guide 65

I n d e x

Ttable

columns, how to reposition 33Detail View tab, processing rules 371processing rules 367

changing display format 371profiles 168reposition columns, how to 33

tabsActivity Log 501

and viewing document attributes and content 449Advanced tab on Activity Log 500Attributes on Detail view of Transaction Analysis screen 448Basic Criteria tab

Activity Log 498Processing Rules screen 368Transaction Analysis screen 170, 442

Contact tabfor partner’s profile 151for your profile 121

Corporate tabfor partner’s profile 147for your profile 118

Criteria tab on Processing Rule Details screen 349Custom Criteria on Transaction Analysis screen 445Decrypt/Encrypt sub-tab

for partner profiles 144, 160for your profile 113, 126

Delivery Method tabfor partner’s profile 153for your profile 123

Detail View on Processing Rules screen 367Detail View on Transaction Analysis screen 35, 171, 371, 441,

445Extended Criteria tab on Processing Rule Details screen 353Extended Fields tab for partner’s profile 159Extract panel on Flat File Document Types screen 301Extract tab on XML Document Types screen 237, 249Identify panel on Flat File Document Types screen 300Identify tab on XML Document Types screen 234, 247Namespaces tab on XML Document Types screen 240, 251New Protocol tab for partner’s profile 155

Options tabon Document Types screen 240, 252on Flat File Document Types screen 304on XML Document Types screen 240, 252

Schedule tab 157Security tab

for partner’s profile 144, 160for your profile 126

selecting 32Settings tab 156Sign/Verify sub-tab

for partner profiles 144, 160for your profile 113, 126

SSL Client sub-tabfor partner profiles 144, 160for your profile 114, 126

Tasksand viewing document attributes and content 449tab on Transaction Analysis screen 474, 487

task manager 52how often it runs 52interval (secs) 52

task typedelivery task query 472service execution task query 485

tasksdelivery, See delivery tasksfailure notification 54ID, delivery task 467ID, service execution task 482output, delivery task 469, 484service, See service execution tasksstatus

delivery task 469delivery task search criteria 473service execution task 483service execution task search criteria 486

Tasks query panel 474, 487Tasks tab

and Activity tab 449and viewing document attributes and content 449on Transaction Analysis screen 474, 487

type, delivery task 467

587 webMethods Trading Networks User’s Guide Version 6.5

Page 588: Web Methods Trading Networks Users Guide 65

I n d e x

type, service execution task 482viewing delivery task status 472wm.tn.rec:TaskFailure 52, 470, 471

Tasks screen selector panel button 28testing

order of processing rules 365XML document types 268XQL queries 245

text/plain content type 278time

createddelivery task 467delivery task query 473delivery task search criteria 473service execution task 482service execution task query 486service execution task search criteria 486viewing for delivery task 472

delivery task query 473processing rules query 371service execution query 486to wait, delivery task 468, 484TPA query 187transport, delivery task 468, 484updated

delivery task 467service execution task 483

timestampactivity log 496, 500TPA query 187

TN document types"Any" in processing rules query 370and pre-processing actions 312, 327any criteria 319Basic Criteria tab 442Criteria tab 351criterion, list of 319defining 72document search criteria 432duplication check of 327for document to be viewed 442large documents 544

listing those dependent on an attribute 201matching multiple 319planning 72processing rules query 370search criteria 442selected criteria 319unknown 319

TN flat file document typesdefining 283definition of 272

TN Properties pageaccessing online help for 42tn.archive.archiveAfterDays 458tn.archive.deleteAfterDays 458tn.cluster.notifyCacheChange 49tn.cluster.notifyProfileAddUser 49tn.cluster.notifyPropertyChange 49tn.cluster.sync.remoteAliases 49tn.mail.from 51tn.mail.subject 51tn.required.idType 50tn.task.maxRetries 53tn.task.notifyFailure 55tn.task.sweepTime 52tn.task.ttw 53

TN XML document types, defined 204tn.archive.archiveAfterDays 458tn.archive.deleteAfterDays 458tn.cluster.notifyCacheChange 48, 49tn.cluster.notifyProfileAddUser 48, 49tn.cluster.notifyPropertyChange 48, 49

clustered environment 42tn.cluster.sync.remoteAliases 44, 45, 49, 312tn.doc.validate.max_errs 228tn.mail.from 51tn.mail.subject 51tn.required.idType 50tn.task.maxRetries 53tn.task.notifyFailure 55tn.task.sweepTime 52tn.task.ttw 53

588 webMethods Trading Networks User’s Guide Version 6.5

Page 589: Web Methods Trading Networks Users Guide 65

I n d e x

TN_parms$contentEncoding variable for flat file document 278$contentEncoding variable for resubmitting flat file document

282$contentType variable for resubmitting flat file document 282$receiveSvc variable for resubmitting flat file document 282,

454tnexport utility 526tnimport utility 526TNPartners group

user account 138webMethods User account 138

toolbarbuttons 401Console 30, 401

Tools menu option 26TPA

Agreement ID 178Agreements Detail screen 181changing agreement status 188changing data inputs 190control number 179data inputs, to variables on IS document type 181data status 180defined 178defining 181deleting 192export service 180finding 185initialization service 181IS document type 179

data tree 181list of fields 182managing 185new with empty fields 182query 185receiver 178search 185search criteria for 186selector panel button 27sender 178updating 187viewing 185wm.b2b.editn.TPA:EDITPA IS document type 179

wm.b2b.editn.TPA:initService 181wm.ip.ebxml.cpa.rec:tpaDataSchema 179wm.ip.ebxml.cpa:initTPA 181

trackingdelivery tasks 466documents 428service execution tasks 482

Trading Network Partner Agreement (TPA)See TPA

Trading Networksactivity log 496adding partners 145adding partners, planning for 82administrators 37clients, See Trading Networks clientsclosing the Console 37clustered environment 44configuring 20, 41Console 25, 61

See also Consoledatabase, See databasedatabase properties 43delivery tasks, managing and tracking 466diagram of Console 25diagram of processing rules ordering 314digital signature, verifying, flat file documents 294display area 29document attributes 193documents, managing and tracking 428Enterprise view 26flat file document types 203, 271flat file documents

digital signature, verifying 294duplicate documents, checking for 296saving to database 297validating structure of 278, 295

Java API 319large document handling 542managing your profile 105menu bar 26multiple instances 44non-clustered environment 45partners, managing 131

589 webMethods Trading Networks User’s Guide Version 6.5

Page 590: Web Methods Trading Networks Users Guide 65

I n d e x

planning your network 67processing rules 312processing saved document again 452profiles 105, 131properties files, list of parameters

Refer to the online help from TN Properties pagesaving

activity log queries 503delivery task queries 475document query 404flat file documents to database 297service execution task queries 489XML documents to database 230

screen name 29searches 428selector panel buttons, list of 26separate database for each instance of 47Server, See Integration Server (IS)service execution tasks, managing and tracking 482starting the Console 22toolbar 30, 401TPAs 178validating flat file document structure 295viewing

activity log entries 498delivery tasks in your system 472documents 428documents in a partner’s system 451documents in your system 442documents in your system using Partner 447service execution tasks in your system 485

Web Manager 39XML document types 203your profile 105

Trading Networks Web Manageraccess to partner’s system 451user interface 39viewing documents in a partner’s system 451viewing documents with 451

Trading Partner Agreement (TPA)See TPAs

trading partner managementplanning 68, 80, 82task checklist 85

trading partnersSee partnersand queues 378management, See trading partner management

Trading Partners viewinformation for 27vs. Enterprise, for Sent and Received queries 447

Transaction Analysis screenlarge documents 549printing information in Detail view 450selector panel button 28Tasks tab 474, 487viewing documents 428

transaction types, identifying 69transforming attribute values

flat file documents 288XML documents 214

transport time message, delivery task 468, 484transportTime immediate delivery service variable 412troubleshooting information 16type search criteria 432typical logic in scheduled delivery service 417typographical conventions in this document 15

Uuniqueness

See duplicate document checkof an XML document 228ReceiverID, for XML document 229, 296SenderID, for XML document 229, 296XML document type 229, 296

UNIX starting Integration Server 18from the command line 19

unknownambiguous document 268document type criteria in processing rule 319flat file document type 284

590 webMethods Trading Networks User’s Guide Version 6.5

Page 591: Web Methods Trading Networks Users Guide 65

I n d e x

multiple matchingTN document types 319XML document types 209, 268

non-matchingflat file document type 284TN document type 319XML document type 209, 268

partner, defined 318receiver

for document 431in e-mail address 339in processing rule 318

sender 318criteria in processing rule 318for document 430in e-mail address 338

TN document type 319for document 432

XML document type 209, 268updating

delivery task and wm.tn.queuing:updateQueuedTask 416document attributes 199partner’s profile 173saved document queries 406TPA agreement status 189TPA fields 187XML document types 255your profile 117

uppercase document attribute values 216, 289URI, for namespace and xmlns attribute 222URL

/invoke/wm.tn/receive 112, 124, 138, 154database location 43

Use as preferred protocolSee also preferred delivery methodcannot be

Queue for delivery 155Use Private Queue delivery method 155Use Public Queue delivery method 155

delivery methodfor your profile 124on partner profile 141, 155

receiver’s, See also preferred protocol

Use as preferred protocol, delivery methodfor your profile 112

Use Private Queue delivery method, cannot use as preferred protocol 155

Use Public Queue delivery method, cannot use as preferred protocol 155

user nameassociated with profiles 138case-sensitive 23case-sensitive, for server preferences 62case-sensitive, on Proxies tab 64database 43Delivery Method tab 138delivery service 424for accessing Web Manager 451for profile, when manually creating a profile 443HTTP proxy server 64HTTPS proxy server 64informing partner of 165multiple, on same server 62on activity log 497, 500on server 23on user account of Integration Server 62partners to webMethods Trading Networks 138Primary/Secondary, HTTP 165Primary/Secondary, HTTPS 165profile 138Proxies tab 64Servers tab 62user for activity log 500Web Manager 451when logging in 23when manually creating a profile 443

user statusas processing rule criterion 319Basic Criteria tab 443case-sensitive 443changing 341criterion in processing rules 319document search criteria 435null 319, 320, 341of documents that you want to view 443on Criteria tab 352processing rules

591 webMethods Trading Networks User’s Guide Version 6.5

Page 592: Web Methods Trading Networks Users Guide 65

I n d e x

criterion, list of 321query 370

purchase order, in example of user status and processing 319search criteria 443system attribute 194

user, non-root 19username, See user nameUserStatus

extracting for flat file documents 281extracting for XML documents 211

Vvalidate

document structure 354flat file document structure 295Pre-Processing tab 354pub.schema:validate built-in service 327tn.doc.validate.max_errs 228XML document structure 228

validation activity class 497value search criteria 440variables, pipeline matching for XML document 206, 208verification activity class 497verify digital signature

document 354of flat file document 294of XML document 227Pre-Processing tab 354

Verify Digital Signature pre-processing actionflat file document 294

Verify sub-tab, See Sign/Verify sub-tabView menu option 26viewing

activity log 498entries for Enterprise or Partner 498entries related to a document 449

delivery method 472delivery task 472, 485

associated with a document 474in your system 472status 472time created 472

detailed list 367, 441

digital certificate informationin partner profile 161in your profile 126

disableddocument attributes 198flat file document types 306XML document types 255

documents 428attributes 198attributes and document content 448in a partner’s system 451in queue 396in scheduled delivery queue 396in your system 442in your system using Partner 447related 449types 255with Web Manager 451

extended field 101, 125, 159, 163, 164hub information 26large documents 549node 236, 239partner

information 26receiving document 472

password when hidden 139pollable documents 397, 450private key

in partner profile 162in your profile profile 127

processing rules 366, 367profile

your Enterprise 117your profile on partner’s system 117

profiles 166query panels, Show/Hide Query 448related documents 449scheduled delivery documents 396service execution tasks

associated with a document 487in your system 485

standard fields 95time created, delivery task 472

592 webMethods Trading Networks User’s Guide Version 6.5

Page 593: Web Methods Trading Networks Users Guide 65

I n d e x

TN flat file document types 306TN XML document types 255TPAs 185your profile on a partner’s system 117

WWait Between Retries

delivery method 53, 141, 343on Delivery Method tab, partner’s profile 158

Web Manager, See Trading Networks Web ManagerwebMethods Administrator, as recipient of e-mail message 339webMethods B2B Developer, See webMethods DeveloperwebMethods Developer, to create delivery service 422webMethods for Partners

adding partners 145user name 138

webMethods Integration Server (IS), starting 18webMethods Trading Networks Web Manager Administrator’s

Guide 39Weekdays, Run Mask setting 386Windows NT and starting Integration Server 18wm.b2b.editn.TPA:EDITPA IS document type 179wm.b2b.editn.TPA:initService service 181wm.ip.ebxml.cpa.rec:tpaDataSchema IS document type 179wm.ip.ebxml.cpa:initTPA service 181wm.server:connect service 479, 492wm.server:ping service 479, 492wm.tn.admin:setProperties 46wm.tn.admin:setProperties service 45wm.tn.archive:archive service 459wm.tn.delivery:registerService service 422wm.tn.delivery:removeService service 425wm.tn.dictionary:addContactType service 109, 136wm.tn.dictionary:addFieldGroup service 113, 143wm.tn.dictionary:addIDTypes service 108wm.tn.doc.ff:routeFlatFile service 277wm.tn.doc.xml:bizdocToRecord service 226wm.tn.doc:changeStatus built-in service 319wm.tn.doc:getContentPartData service, large documents 547wm.tn.doc:getDeliveryContent service 412wm.tn.doc:getDeliveryContent service, large documents 548wm.tn.doc:relateDocuments service 449wm.tn.queuing:deliverBatch service 418

wm.tn.queuing:getQueuedTask service 415wm.tn.queuing:updateQueuedTask service 416wm.tn.rec:DeliveryServiceSignature specification 411wm.tn.rec:DupCheckService specification 329wm.tn.rec:GatewayService service, standard input and output

values 276wm.tn.rec:TaskFailure IS document type 52, 470, 471wm.tn.transport:batchFtp service

diagram of service 419reference for creating custom scheduled delivery service 413scheduled delivery service 381, 411typical logic to include in scheduled delivery service 417

wm.tn:receive servicedocument gateway service 277flat file documents 277

WmFlatFile package, services to read flat file input streams 278WmTN package

not saving immediate delivery service in 412not saving scheduled delivery service in 413

XXML document 206, 235, 248, 257, 262

DOCTYPE, See DOCTYPE identifierduplicate document check 228example, namespace in 221example. with sample XQL queries 532load sample 233namespaces 221node information 207

See also noderoot tag 206, 208

See also root tagsample document 233saving to database pre-processing action 230sending, See sending documentsspecifying content type, example of 347xmlns attribute 222

XML document typesadding identifying queries 235, 248associated with IS document types 226, 240, 252associated with IS schema 226, 227, 240, 252, 304checking uniqueness of 228defining 232

593 webMethods Trading Networks User’s Guide Version 6.5

Page 594: Web Methods Trading Networks Users Guide 65

I n d e x

definition, determining 209determining 209disabled 255disabling 266DOCTYPE identifier 208, 248, 258, 263duplicate XML doc type 233duplication of

for flat file document 296for XML document 229

enabling 267Extract tab 237, 249extraction information 210Identify tab 234, 247large documents 544matching

exactly one defined 268multiple 209, 268

multiple, ambiguous 268namespace mappings 221Namespaces tab 240, 251new with empty fields 233non-matching 209, 268, 319options 205, 226, 240, 252Options tab 240, 252permanently removing from database 266requiring extraction of attributes 213

root tag 208testing 268unknown 209, 268updating 255

identifying queries 257, 262viewing 255

xmlns attributeand namespaces 222using from sample document to define namespace mappings

225XQL queries

and namespaces 223case-sensitive 207, 212example, list of sample queries 533example, with namespaces 223example, XQL queries in XML file 532for XML document 206identifying queries 207

with sample document 235, 257without sample document 248, 262

large documents 544reference information 532testing 245with namespace prefixes 223XML document type and invalid location of SenderId/Receiver

ID 318

594 webMethods Trading Networks User’s Guide Version 6.5