You are on page 1of 124

TitlePage

Trading Networks

Version 7.1

webMethods Trading Networks Concepts Guide

Copyright & Docu mentID

Cerebra,Glue,InfravioXBroker,InfravioXRegistry,Infravio,MywebMethodsServer,MywebMethods,webMethodsAccess,webMethodsAdministrator, webMethodsBroker,webMethodsCentralConfiguration,webMethodsDashboard,webMethodsDesigner,webMethodsDeveloper,webMethodsFabric, webMethodsGlue,webMethodsInfrastructureDataCollector,webMethodsInfravioXBroker,webMethodsInfravioXRegistry,webMethodsInstaller, webMethodsIntegrationServer,webMethodslogo,webMethodsMainframe,webMethodsManager,webMethodsModeler,webMethodsMonitor, webMethodsOptimizeforInfrastructure,webMethodsOptimizeforProcess,webMethodsOptimize,webMethodsPortal,webMethodsProcessEngine, webMethodsServicenet,webMethodsTaskEngine,webMethodsTradingNetworks,webMethodsWorkflow,andwebMethodsareeitherregistered trademarksortrademarksofwebMethods,Inc. Acrobat,Acrobat,andReaderareregisteredtrademarksofAdobeSystemsIncorporated.AmdocsandClarifyCRMareregisteredtrademarksofAmdocs. AribaisaregisteredtrademarkofAriba,Inc.BEA,BEAWebLogicServer,Jolt,andTuxedoareregisteredtrademarks,andBEAWebLogicPlatformisa trademarkofBEASystems,Inc.ActionRequestSystem,BMCSoftware,PATROL,andRemedyareregisteredtrademarksofBMCSoftware,Inc.BroadVision isaregisteredtrademarkofBroadVision,Inc.ChemeStandardsandCIDXaretrademarksofCIDX,TheChemicalIndustryDataExchange.SiteMinderand UnicenterareregisteredtrademarksofCA,Inc.PopChartisaregisteredtrademarkofCORDATechnologies,Inc.KenanandArborareregisteredtrademarks ofAlcatelLucent.DataConnectionandSNAPIXareregisteredtrademarksofDataConnectionCorporation.D&BandDUNSareregisteredtrademarksof Dun&BradstreetCorporation.EclipseisatrademarkofEclipseFoundation,Inc.EntrustisaregisteredtrademarkofEntrust,Inc.papiNetisaregistered trademarkoftheEuropeanUnionandtheUnitedStates.FinancialInformationeXchange,F.I.X,andF.I.XProtocolaretrademarksofFIXProtocolLtd. UCCnetandeBusinessReadyareregisteredtrademarks,and1SYNCandTransoraaretrademarksofGS1US.HewlettPackard,HP,HPUX,OpenView,PA RISC,andSNAplus2aretrademarksofHewlettPackardCompany.i2isaregisteredtrademarkofi2Technologies,Inc.AIX,AS/400,CICS,ClearCase,DB2, Domino,IBM,Informix,Infoprint,Lotus,LotusNotes,MQSeries,OS/390,OS/400,RACF,RS/6000,SQL/400,S/390,System/390,VTAM,andWebSphere,and z/OSareregisteredtrademarks;andCommunicationsSystemforWindowsNT,DB2UniversalDatabase,IMS,MVS,andSQL/DSaretrademarksofIBM Corporation.InnoDBisatrademarkofInnobaseOy.ItaniumisaregisteredtrademarkofIntelCorporation.LinuxisaregisteredtrademarkofLinus Torvalds.W3Cisaregisteredtrademark,andXWindowSystemisatrademarkoftheMassachusettsInstituteofTechnology.MetaSolvisaregistered trademarkofMetasolvSoftware,Inc.ActiveX,Microsoft,Outlook,VisualBasic,VisualSourceSafe,Windows,WindowsNT,andWindowsServerare registeredtrademarksofMicrosoftCorporation.SixSigmaisaregisteredtrademarkofMotorola,Inc.FirefoxandMozillaareregisteredtrademarksofthe MozillaFoundation.MySQLisaregisteredtrademarkofMySQLAB.nCipherisatrademarkofnCipherCorporationLtd.EclipseisatrademarkofEclipse Foundation,Inc.EntrustisaregisteredtrademarkofEntrust,Inc.papiNetisaregisteredtrademarkoftheEuropeanUnionandtheUnitedStates.Financial InformationeXchange,F.I.X,andF.I.XProtocolaretrademarksofFIXProtocolLtd.UCCnetandeBusinessReadyareregisteredtrademarks,and1SYNCand TransoraaretrademarksofGS1US.HewlettPackard,HP,HPUX,OpenView,PARISC,andSNAplus2aretrademarksofHewlettPackardCompany.i2isa registeredtrademarkofi2Technologies,Inc.AIX,AS/400,CICS,ClearCase,DB2,Domino,IBM,Informix,Infoprint,Lotus,LotusNotes,MQSeries,OS/390, OS/400,RACF,RS/6000,SQL/400,S/390,System/390,VTAM,andWebSphere,andz/OSareregisteredtrademarks;andCommunicationsSystemforWindows NT,DB2UniversalDatabase,IMS,MVS,andSQL/DSaretrademarksofIBMCorporation.InnoDBisatrademarkofInnobaseOy.Itaniumisaregistered trademarkofIntelCorporation.TeradataisaregisteredtrademarkofNCRCorporation.NetscapeisaregisteredtrademarkofNetscapeCommunications Corporation.ServletExecisaregisteredtrademark,andNewAtlantaisatrademarkofNewAtlantaCommunications,LLC.SUSEisaregisteredtrademark ofNovell,Inc.AppiaisaregisteredtrademarkandJavelinTechnologiesisatrademarkofNYFIX,Inc.CORBAisaregisteredtrademarkofObject ManagementGroup,Inc.JDEdwards,OneWorld,Oracle,PeopleSoft,Siebel,andVantiveareregisteredtrademarks;andInfranet,PeopleSoftPureInternet Architecture,Portal,andWorldSoftwarearetrademarksofOracleCorporation.PerforceisatrademarkofPerforceSoftware.JBossandRedHatare registeredtrademarksofRedHat,Inc.PIPandRosettaNetaretrademarksofRosettaNet,anonprofitorganization.SAPandR/3areregisteredtrademarks ofSAPAG.PVCSisaregisteredtrademarkofSerenaSoftware,Inc.SWIFTandSWIFTNetareregisteredtrademarksofSocietyforWorldwideInterbank FinancialTelecommunicationSCRL.SPARCandSPARCStationareregisteredtrademarksofSPARCInternational,Inc.BAANandSSAareregistered trademarks;andSSAGlobalisatrademarkofSSAGlobalTechnologies,Inc.EJB,EnterpriseJavaBeans,Java,JavaServer,JDBC,JSP,J2EE,Solaris,Sun,and SunMicrosystemsareregisteredtrademarks;andJavaNamingandDirectoryInterface,JavaServerPages,SOAPwithAttachmentsAPIforJava,andSunSoft aretrademarksofSunMicrosystems,Inc.SybaseisaregisteredtrademarkofSybase,Inc.VERITASisaregisteredtrademark,andVERITASClusterServeris atrademarkofSymantecCorporation.UNIXisaregisteredtrademarkofTheOpenGroup.UnicodeisatrademarkofUnicode,Inc.VeriSignisaregistered trademarkofVerisign,Inc. SoftwareAGandallSoftwareAGproductnamesareeithertrademarksorregisteredtrademarksofSoftwareAG. Otherproductandcompanynamesmentionedhereinmaybethetrademarksoftheirrespectiveowners. Copyright20052007webMethods,Inc.Allrightsreserved. Copyright20052007SoftwareAGand/oritssuppliers,Uhlandstrasse12,64297Darmstadt,Germany.Allrightsreserved.

Document ID: TN-CG-71-20070831

Contents

Contents
About This Guide. . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . .
Document Conventions . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . Additional Information . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . .

7
7 8

Chapter 1. Overview of webMethods Trading Networks . . . . . . . . . . . . . . . . . . . . . . . . . .


What Is a Trading Network? . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . What Is webMethods Trading Networks? . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . Architecture and Components . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . Trading Networks Is the Foundation for eStandards Processing . . . . . . . . . . . . . . . . . . . . . . . . Partners in a Trading Network . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . Document Processing with Trading Networks . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . Overview of Trading Networks Processing . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . Design Time . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . Run Time . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . .

9
10 10 11 12 12 14 15 16 16

Chapter 2. Trading Partners . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . .


Overview of Trading Partner Information . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . Profiles . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . Profile Status . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . Profile Fields . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . Data Types of Profile Fields . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . Required Fields . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . Trading Partner Agreements (TPAs) . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . TPA Information vs. Profile Information . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . Information in a TPA . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . TPA Statuses . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . .

17
18 18 19 19 20 20 21 22 22 23

Chapter 3. Setting Up Trading Networks to Process Documents . . . . . . . . . . . . . . . . . . .


Overview of Items to Set Up for Processing Documents . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . Document Attributes . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . What You Specify to Define a Document Attribute . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . How Document Attributes Relate to TN Document Types . . . . . . . . . . . . . . . . . . . . . . . . . . . . . How Trading Networks Uses Document Attributes . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . TN Document Types . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . TN XML Document Types . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . TN Flat File Document Types . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . Document Gateway Services . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . .

25
26 27 28 28 29 30 31 33 33

webMethods Trading Networks Concepts Guide Version 7.1

Contents

Information You Supply to Define TN Flat File Document Types . . . . . . . . . . . . . . . . . . . . Unknown TN Document Type . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . Processing Rules . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . Processing Rule Criteria . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . Pre-processing Actions . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . Processing Rule Actions . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . Scheduled Delivery Queues and Processing Rules . . . . . . . . . . . . . . . . . . . . . . . . . . . . . .

34 35 36 37 38 38 39

Chapter 4. Sending Documents to Trading Networks for Processing . . . . . . . . . . . . . . .


Overview of Sending Documents . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . Sending Documents to Trading Networks . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . Clients that Trading Partners Use to Send Documents . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . Service the Client Should Invoke . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . User Accounts for Partners . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . Protocols the Client Can Use . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . Sending the Documents to Trading Networks . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . Forwarding Documents to Another Server . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . Sending a Document Back to the Same Server . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . .

41
42 42 42 43 43 44 44 46 48

Chapter 5. Trading Networks Document Processing . . . . . . . . . . . . . . . . . . . . . . . . . . . . .


Overview of How Trading Networks Processes a Document . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . Processing of Documents in Trading Networks . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . Recognition Processing . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . Recognition of XML Documents . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . Recognition of Flat Files . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . Document Gateway Services During Flat File Recognition . . . . . . . . . . . . . . . . . . . . . . . . . Trading Networks Processing During Flat File Recognition . . . . . . . . . . . . . . . . . . . . . . . . Processing Rule Selection . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . Pre-processing Actions . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . Processing Rule Actions . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . Pipeline Information that You Can Use in Processing Actions . . . . . . . . . . . . . . . . . . . . . . . . . . Execute a Service Processing Action . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . Send an Alert E-mail Processing Action . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . Change User Status Processing Action . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . Deliver the Document to the Receiver Processing Action . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . Respond with a Message Processing Action . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . Large Document Handling . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . How Trading Networks Handles Large Documents Differently . . . . . . . . . . . . . . . . . . . . . . . . . . Items You Must Set Up Differently for Large Documents . . . . . . . . . . . . . . . . . . . . . . . . . . . . . .

51
52 53 55 56 56 56 59 60 61 63 64 65 66 66 67 67 67 68 68

webMethods Trading Networks Concepts Guide Version 7.1

Contents

Chapter 6. Delivering Documents to Partners . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . .


Overview of Delivering Documents . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . How Trading Networks Determines Delivery Method Information . . . . . . . . . . . . . . . . . . . . . . . . . . . . When Delivery Information Cannot Be Determined . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . Immediate Delivery . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . Immediate Delivery Methods Provided with Trading Networks . . . . . . . . . . . . . . . . . . . . . . . . . . Adding Your Own Immediate Delivery Methods . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . Reliable Delivery with Immediate Delivery . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . Using Reliable Delivery for an Immediate Delivery . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . Scheduled Delivery . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . Scheduled Delivery Queues . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . Scheduled Delivery Services . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . Scheduled Delivery Services Provided with Trading Networks . . . . . . . . . . . . . . . . . . . . . . Adding Your Own Scheduled Delivery Services . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . Reliable Delivery and Scheduled Delivery . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . Queuing Documents for Polling . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . When Trading Networks Uses Queue for Polling . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . .

71
72 73 74 75 75 76 76 77 77 79 80 80 80 81 82 83

Chapter 7. Sending Documents to Business Processes for Processing . . . . . . . . . . . . .


Overview of Sending Documents to Business Processes . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . How You Define the Business Process . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . Conversation IDs for Trading Networks Documents . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . How Documents Are Passed to a Business Process . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . .

85
86 86 87 88

Chapter 8. Tracking and Viewing Run-Time Information in Trading Networks . . . . . . . .


Run-time Information that You Can Track . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . Viewing Documents . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . Resubmitting and Reprocessing Documents . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . Viewing Tasks . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . Stopping, Restarting, Reassigning, and Deleting Tasks . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . Viewing the Activity Log . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . Viewing the Server Log . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . Using Trading Networks Web Manager . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . .

91
92 93 94 94 95 96 96 97

Chapter 9. Business Analysis and Monitoring of Trading Networks Transaction Data .


Overview of the Analysis of Trading Networks Transaction Data . . . . . . . . . . . . . . . . . . . . . . . . . . . . Architecture and components . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . Design Time Actions . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . Monitoring Trading Networks Transaction Data . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . Stages at Which the Events are Passed to the Broker . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . .

99
100 100 102 102 103

webMethods Trading Networks Concepts Guide Version 7.1

Contents

Appendix A. Glossary for Trading Networks . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 105 Appendix B. Security within Trading Networks . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 115
Overview of Security Features . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . Communicating Securely Using SSL . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . Protecting Access to User Interfaces . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . Access to My webMethods for Trading Networks Actions . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . Access to Trading Networks User Interfaces . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . Protecting Partner Profile Passwords . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . Protecting Access to Trading Networks Processing . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . Access Control Lists . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . Certificates for Verifying, Signing, Encrypting, and Decrypting Documents . . . . . . . . . . . . . . . . . . . . Verifying Digital Signatures . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . Actions You Must Take to Verify Digital Signatures . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . How Trading Networks Verifies Digital Signatures . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . Digitally Signing Documents . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . How Trading Networks Signs Documents . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . Encrypting and Decrypting Data . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . Encrypt Certificates . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . How Trading Networks Encrypts Documents . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . Decrypt Certificates . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . How Trading Networks Decrypts Documents . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 116 116 116 116 118 118 119 119 120 121 121 122 122 123 123 123 123 124 124

webMethods Trading Networks Concepts Guide Version 7.1

About This Guide

About This Guide

ThismanualisforusersofwebMethodsTradingNetworksandwebMethodsforPartners andprovidesanoverviewofwebMethodsTradingNetworks(TradingNetworks).It containsinformationtofamiliarizeyouwithusingTradingNetworksanddescribeshow tomonitorTradingNetworksdata. Note: ThewebMethodsTradingNetworksandwebMethodsforPartnerscomponents performthesamefunctionality.Thedifferencebetweenthecomponentsisthat webMethodsTradingNetworksallowsyoutohaveasmanypartnersinyournetworkas youwant,andwebMethodsforPartnersallowsyoutohaveonlyasinglepartner.This guideprovidesdocumentationforbothcomponentsalthoughitrefersonlyto webMethodsTradingNetworks(referredtoasTradingNetworks).

Document Conventions
Convention Bold Italic Description Identifieselementsonascreen. Identifiesvariableinformationthatyoumustsupplyorchange basedonyourspecificsituationorenvironment.Identifiestermsthe firsttimetheyaredefinedintext.Alsoidentifiesserviceinputand outputvariables. IdentifiesstoragelocationsforservicesonthewebMethods IntegrationServerusingtheconventionfolder.subfolder:service. Identifiescharactersandvaluesthatyoumusttypeexactlyor messagesthatthesystemdisplaysontheconsole. Identifieskeyboardkeys.Keysthatyoumustpresssimultaneously arejoinedwiththe+symbol. Directorypathsusethe\directorydelimiterunlessthesubjectis UNIXspecific. Optionalkeywordsorvaluesareenclosedin[].Donottypethe[] symbolsinyourowncode.

Narrow font
Typewriter font

UPPERCASE \ []

webMethods Trading Networks Concepts Guide Version 7.1

About This Guide

Additional Information
ThewebMethodsAdvantageWebsiteathttp://advantage.webmethods.comprovidesyou withimportantsourcesofinformationaboutwebMethodsproducts: Troubleshooting Information.ThewebMethodsKnowledgeBaseprovides troubleshootinginformationformanywebMethodsproducts. Documentation Feedback.ToprovidefeedbackonwebMethodsdocumentation,goto theDocumentationFeedbackFormonthewebMethodsBookshelf. Additional Documentation.Startingwith7.0,youhavetheoptionofdownloadingthe documentationduringproductinstallationtoasingledirectorycalled _documentation,locatedbydefaultunderwebMethodsinstallationdirectory.In addition,youcanfinddocumentationforallwebMethodsproductsonthe webMethodsBookshelf.

webMethods Trading Networks Concepts Guide Version 7.1

Chapter 1. Overview of webMethods Trading Networks

What Is a Trading Network? . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 10 What Is webMethods Trading Networks? . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 10 Architecture and Components . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 11 Partners in a Trading Network . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 12 Document Processing with Trading Networks . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 14 Overview of Trading Networks Processing . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 15

webMethods Trading Networks Concepts Guide Version 7.1

1. Overview of webMethods Trading Networks

Note: ThewebMethodsTradingNetworksandwebMethodsforPartnerscomponents providethesamefunctionality.Thedifferencebetweenthecomponentsisthat webMethodsTradingNetworksallowsyoutohaveasmanypartnersinyournetworkas youwant,whilewebMethodsforPartnersallowsyoutohaveonlyasinglepartner.This guideprovidesdocumentationforbothcomponentsalthoughitonlyrefersto webMethodsTradingNetworks.

What Is a Trading Network?


Atradingnetworkisasetoforganizationsthathaveagreedtoexchangebusiness documents.Participantsmightincludestrategicpartners,buyers,suppliers,and marketplaces.Examplesoftypicalbusinessdocumentsarepurchaseorders,order statuses,purchaseorderacknowledgements,invoices,aswellasotherdomainspecific businessdocuments.Theorganizationsinyournetworkarereferredtoastradingpartners (partners).Atradingpartnercanbeanysystem,withinoroutsideyourenterprise,that producesorconsumesbusinessdocuments.

What Is webMethods Trading Networks?


webMethodsTradingNetworks(alsoreferredtoasTradingNetworks)isacomponentthat runsonthewebMethodsIntegrationServer.TradingNetworksenablesyourenterpriseto linkwithothercompanies(buyers,suppliers,strategicpartners)andmarketplacestoform abusinesstobusinesstradingnetwork. ThecomponentsofTradingNetworksareaserverandthefollowinguserinterfaces: MywebMethods,whichisawebbased,administrationandmonitoringuserinterface formanagingyourwebMethodscomponents. TradingNetworksConsole,whichisastandaloneuserinterfacethatisTrading Networksspecific.PortionsoftheConsolearedeprecatedin7.1.Thedeprecated portionsarethoseareasoffunctionalitythathavebeenmigratedtoMywebMethods (e.g.,transactionanalysis,tasks,andactivitylogviewing,profilemanagement). TradingNetworksWebManager,whichisalsoawebbaseduserinterface;however thisisaTradingNetworksspecificuserinterfaceandhasonlylimitedfunctionality. TradingNetworksWebManagerisdeprecated.

webMethods Trading Networks Concepts Guide Version 7.1

10

1. Overview of webMethods Trading Networks

Architecture and Components


ThefollowingshowsthecomponentsofTradingNetworks:
Architecture and Components My webMethods My webMethods Server

Trading Networks Console

Trading Networks
WmTN package WmTNWeb package

Relational Database

Trading Networks Web Manager

Integration Server

My webMethods ServeristheruntimecontainerforfunctionsthatwebMethods componentsmakeavailable.Forexample,TradingNetworksmakesthefunctionsto monitorandmanagetransactionsavailable.UsersaccessthesefunctionsfromtheMy webMethodsuserinterface.Forexample,whenausermonitorsatransaction,My webMethodsServerhandlestherequestbyinteractingwithTradingNetworksto performthefunctionandreturninformationtotheuser. Trading NetworksWmTNandWmTNWebpackagesrunwithintheIntegrationServer. Thepackagesprovidethelogictohandlethemanagementofpartnersonyour networkandtheexchangeofdocuments.YoucaninteractwiththeTradingNetworks viatheuserinterfaces.Yourpartnersinteractwiththeservertoexchangebusiness documents. Note: TheWmTNWebpackage,whichisforWebManager,isdeprecated. Integration Serverhostspackagesthatcontainservicesandrelatedfiles.TheIntegration Serverprovidesanenvironmentfortheorderly,efficient,andsecureexecutionof services. Relational database (RDBMS)thatTradingNetworksusestostoreallinformationabout thetradingnetwork:partnerinformation,thetypesofdocumentstoprocess,howto processbusinessdocuments,informationaboutbusinessdocumentsthatpass throughthenetwork,loginformation,etc.Youneedtoinstallarelationaldatabasefor TradingNetworksuse,forexample,OracleorSQLServer.

webMethods Trading Networks Concepts Guide Version 7.1

11

1. Overview of webMethods Trading Networks

My webMethodsisawebbased,administrationandmonitoringuserinterfacefor managingyourwebMethodscomponents.YoucanuseittomonitorTrading Networkstransactions,serviceexecutiontasks,deliverytasks,andtheactivitylog. Additionally,youcanusewebMethodstomanageprofiles,profilegroups,and TradingNetworksqueues. Trading Networks Console,whichisaJavabasedGUI,isaTradingNetworksuser interfaceprimarilyfordesigninghowyouwantTradingNetworkstorecognize documentsusingTNdocumenttypesandhowTradingNetworksprocesses documents.YoucanalsouseittoperformfunctionsthathavebeenmigratedtoMy webMethods.Theseportions(e.g.,transactionanalysis,tasks,andactivitylog viewing,profilemanagement)oftheConsolethathavebeenmigratedtoMy webMethodsaredeprecated. Trading Networks Web Manager isanotheruserinterfaceforTradingNetworksthatyou accessviaaWebbrowser.TradingNetworksWebManagerisdeprecated.Itoffers someofthefunctionalityoftheTradingNetworksConsoleplusadditional administrativeactions.

Trading Networks Is the Foundation for eStandards Processing


TradingNetworksisalsothebasethroughwhichwebMethodscomponentssupport numerouseBusinessStandards(eStandards)suchasRosettaNet,EDI,ebXMLMessaging Service,SWIFT,FIX,andCIDX.webMethodseStandardsModulesthatusefeaturesofthe TradingNetworkscomponenttocarryouttheprocessingbehaviorthatisspecifictothe eStandardthemodulesupports.

Partners in a Trading Network


Toformatradingnetwork,youaddtradingpartners(alsoknownaspartners)thatwillsend documentstoTradingNetworksforprocessingand/orthatwillreceivedocumentsthat TradingNetworksisinstructedtodeliver.YouaddpartnersbycreatingaTrading Networksprofileforeachpartneryouwanttoaddtothetradingnetwork.Theprofile containsinformationaboutapartner. Eachofyourpartnershastheirownsystemthatcommunicateswithyourinstanceof TradingNetworks.TradingNetworksdoesnotrequirethatallpartnersinthenetworkuse webMethodsTradingNetworksorSoftware AGsoftware.Ifyouhaveabuyer,supplier,or strategicpartnerthatusesothersoftware,youcanaddthemtoyournetwork.Whenyou addthepartnerbydefiningitsprofile,youprovideinformationabouthowtoconnectto thepartnerandhowtosendthatpartnerinformation.

webMethods Trading Networks Concepts Guide Version 7.1

12

1. Overview of webMethods Trading Networks

A Trading Network
Trading Networks Integration Server Trading Networks Integration Server Trading Networks Integration Server DB Trading Networks Integration Server Integration Server Application Server

Marketplace

DB

DB

DB

Intheabovenetwork,oneofthenonTradingNetworkspartnersisawebMethods IntegrationServerthatisnotusingTradingNetworks.Also,theapplicationserverand marketplace(e.g.,AribaNetwork)mightnotuseSoftware AGsoftwareatall. Alsonoteintheabovenetwork,thatthepartnerinthecenterisreferredtoasthehubof thenetwork.Theotherpartnersarereferredtoasspokes.Thehubhoststhenetworkand thespokesparticipatebyinteractingwiththehub.

webMethods Trading Networks Concepts Guide Version 7.1

13

1. Overview of webMethods Trading Networks

ATradingNetworkspartnerdoesnothavetobeexclusivelyahuboraspoke;itcanbe both,asillustratedbelow.Itcanbeahubofitsownnetworkandaspokeinanother partnersnetwork.


Trading Networks Partner Can Be Both a Hub and a Spoke
Integration Server Trading Networks Integration Server Trading Networks Integration Server Application Server Trading Networks Marketplace Integration Server

DB

DB Trading Networks Integration Server Trading Networks Integration Server DB hub and spoke DB Trading Networks Integration Server

Trading Networks Integration Server

DB hub and spoke

DB

DB

Document Processing with Trading Networks


UseTradingNetworkstosetupyournetworkoftradingpartnersinadocumentoriented exchangescenario.Youcanexchangebusinessdocumentswiththepartnersinyour networktorelayproductioninformation.Thebusinessdocumentscanbeinanyformat recognizedbytwopartnersthatexchangedata,e.g.,XMLandflatfile. Conceptually,TradingNetworksisaformatneutral,businessdocumentgatewaythatcan recognizeandprocessavarietyofXMLandstructuredflatfileformatsthatflowbetween distributedtradingpartners.

webMethods Trading Networks Concepts Guide Version 7.1

14

1. Overview of webMethods Trading Networks

Tospecifyhowtoexchangedocuments,youdefine: Profilesforpartners;thatis,theinformationyouwanttocollectandmaintainabout yourpartners.AprofilecontainstheinformationthatTradingNetworksneedsto exchangedocumentswithyourpartners. TN document typesthatspecifythetypesofbusinessdocumentsthatyouwantto exchangewithyourpartners.Thebusinessdocumentsmightconformtoanindustry standard,suchas,cXML,CBL,OAG,andEDI,orhaveyourowncustomized specifications. Processing rulesthatindicatehowyouwantTradingNetworkstoprocessdocuments astheytraverseyourtradingnetwork. Afteryouhaveyourtradingnetworkestablished,youuseTradingNetworkstomanage andmaintainyourtradingnetwork.

Overview of Trading Networks Processing


Thefollowingdiagramandaccompanyingtextprovideahighleveloverviewofhow TradingNetworksreceivesandprocessesdocuments.
Overview of Processing
Trading Partner

Trading Networks Integration Server

Trading Partner

Client

Receiver

Step
1 2

Description AclientsendsadocumenttoTradingNetworks. TradingNetworksreceivesandprocessesthedocument.Forexample,Trading Networksmightbeinstructedtodeliverthedocumenttoanothertrading partner.

YoudefinetheprocessingthatTradingNetworksperformsatruntimewhenadocument isreceived.YoudefinethisruntimeprocessingbydefiningTradingNetworksobjectsat designtime.ForalistanddescriptionoftheseTradingNetworksobjects,seeDesign Timebelow.

webMethods Trading Networks Concepts Guide Version 7.1

15

1. Overview of webMethods Trading Networks

Design Time
Atdesigntime,youdefinethefollowingobjectsforTradingNetworks: Define for Trading Networks Profiles TN document types Document attributes

Description Identifiesthepartnersyouwant TradingNetworkstointeractwith. Definesthetypesofdocumentsthat youwantTradingNetworksto recognizeandprocess. Identifiesthepiecesofinformation withinthedocumentsthatare importanttoyouforprocessing documentsandforlateranalyzing thedocumentsthathavepassed throughyournetwork. Definestheactionsyouwant TradingNetworkstotakeagainst thedocumentsitreceives,for example,deliveringthedocument toitsreceiver.

For more information, see... Profilesonpage 18 TNDocumentTypeson page 30 DocumentAttributeson page 27

Processing rules

ProcessingRuleson page 36 ProcessingRuleActionson page 38

Run Time
Atruntime,thefollowingactionsoccur: Action for Trading Networks Aclientorbackendsystemsendsadocumentto TradingNetworks TradingNetworksprocessesthedocument For more information, see... Chapter 4,Sending DocumentstoTrading NetworksforProcessing Chapter 5,Trading NetworksDocument Processing Chapter 6,Delivering DocumentstoPartners

TradingNetworkscandeliverthedocumenttoa tradingpartner

webMethods Trading Networks Concepts Guide Version 7.1

16

Chapter 2. Trading Partners

Overview of Trading Partner Information . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 18 Profiles . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 18 Profile Status . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 19 Profile Fields . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 19 Trading Partner Agreements (TPAs) . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 21

webMethods Trading Networks Concepts Guide Version 7.1

17

2. Trading Partners

Overview of Trading Partner Information


Yousupplyinformationabouttradingpartnersin: Profiles.Profilesarerequiredforeachpartnerinyourtradingnetwork.Toadda partnertoyourtradingnetwork,youdefineaprofileforthatpartner.Trading Networksisonlyawareofpartnersforwhichithasaprofile.Theprofilecontains informationsuchascontactinformationandinformationthatTradingNetworksuses whenexchangingdocumentswiththepartner. Trading partner agreements (TPAs). Optionally,youcandefinetradingpartner agreementsforpairsofpartners.EachTPAcontainsspecificinformationfortwo tradingpartners,whereonepartnerrepresentsasenderandtheotherrepresentsthe receiver.YoucancreateapplicationsthatuseTPAinformationtotailorhow documentsareexchanged.OtherwebMethodscomponents(e.g.,webMethodsEDI Module)useTPAstoperformprocessing.

Profiles
Aprofileisacollectionofinformationaboutacorporationthatisapartofatrading network.TradingNetworksmaintainsyourprofile(calledtheEnterpriseprofile),aswellas theprofileofeachofyourtradingpartnersonyournetwork. Theinformationinaprofileencompassesbothtechnical(e.g.,HTTPportnumber)and businesslevel(e.g.,paymentterms)information.Youfillinprofilefieldstodefinethe informationforaprofile.Aprofilecontainsstandardprofilefieldsthatareprovided outoftheboxandextendedprofilefieldsthatyoudefine.Formoreinformation,see ProfileFieldsonpage 19. Theinformationintheprofileincludesthefollowingtypesofinformation: Generalinformationaboutthecorporation,forexample,thecorporationnameandits address. Contactinformationforthecorporation,forexample,atechnicalcontact. Informationabouthowdocumentsshouldbedeliveredtothecorporation,for example,theHTTPhostnameandportnumbertousetodeliveradocumenttothe corporationviaHTTP. Certificateinformationfordigitalsigningofdocuments,verifyingdigitalsignatures, encryptinganddecryptingdocuments. AnyinformationthatyouwanttoincludeintheprofilethatTradingNetworksdoes notprovide.Youdefineextendedfieldsforthisinformation.

webMethods Trading Networks Concepts Guide Version 7.1

18

2. Trading Partners

For more information about: Definingprofiles,seeChapter9,DefiningandManagingYourProfile(Your Enterprise),AppendixH,ManagingYourProfileUsingtheConsole, Chapter10,DefiningandManagingPartnerProfiles,andAppendixI, ManagingPartnerProfilesUsingtheConsoleinthewebMethodsTrading NetworksAdministratorsGuide. Certificateinformation,see,Appendix B,SecuritywithinTradingNetworks.

Profile Status
TradingNetworksmaintainsastatusfortheprofileofeachpartner.Afteryouadda profileforapartnerandTradingNetworksvalidatesthefields,TradingNetworkssaves theprofileandsetsprofilestatustoInactive.Beforeyoucanexchangedocumentswith thepartner,youmustenabletheprofilebyupdatingthestatustoActive.Whenyou enableyourownprofile,youareabletoexchangedocumentswithpartners.Whenyou enableapartnersprofile,youareabletoexchangedocumentswiththatpartner. Thefollowingtableshowsthepossibleprofilestatusesandtheirmeanings: Value Active Meaning YouhavefilledinthepartnersprofileandTradingNetworkshas programmaticallydeterminedthatallprofilefields(standardandextended) arevalid.YouhaveenabledtheprofilebysettingthestatustoActive. Whenthepartnersprofileisactive,youcanexchangedocumentswiththe partner. Inactive Whenapartnersprofileisinactive,youcannotexchangedocumentswith thispartner. Eitheryouhavejustaddedtheprofileandhavenotyetenabledit,oryou havedisabledtheprofile.

Profile Fields
Profilefieldsarethefieldsinaprofile.Eachprofilefieldrepresentsinformationthatyou cancollectandmaintainaboutyourownenterpriseandtheenterprisesofeachpartnerin yournetwork.Therearetwotypesofprofilefieldsstandardandextended. Standard fieldsareTradingNetworksdefinedfieldsthatincorporatethemajorityofthe informationthatyouwillwanttocollectandmaintainaboutapartner.Theseprofile fieldsareavailableoutofthebox. Mostofthestandardfieldsareforyourownuse,forexample,thenameofthe corporationanditsmailingaddress.However,TradingNetworksrequiressomeof

webMethods Trading Networks Concepts Guide Version 7.1

19

2. Trading Partners

thestandardfieldstooperatenormally,forexample,thehostandportnumberthata partnerusesforHTTPtodeliveradocumenttothepartnerviaHTTP. Extended fieldsarecustomfieldsthatyoudefinetoextendthestandardprofilethatare providedoutofthebox.Ifyouwanttocollectadditionalinformationaboutyour partnersthatisnotcoveredbythestandardfields,youcandefineextendedfields.If youdefineextendedfields,allprofilesonyourTradingNetworkssystemwillcontain thestandardfieldsandtheextendedfieldsthatyoudefine. Bothstandardandextendedprofilefieldsare1)haveadatatypeand2)canberequired. For more information aboutdefiningprofilefields,seeChapter8,Definingand ManagingProfileFieldsandAppendixG,ManagingProfileFieldsUsingthe ConsoleinthewebMethodsTradingNetworksAdministratorsGuide.

Data Types of Profile Fields


Aprofilefieldcanhaveoneoftwodatatypesstringorbinary. Whenthedatatypeisstring,youcandefine: Adefaultvalueforthefield.TradingNetworksincludesthedefaultvalueinthe partnerprofilethatitdisplays. Themaximumlengthallowedforthefield.TradingNetworksassuresthatthe specifiedvalueforthefieldisnolongerthanthemaximumvalue. Alistofvalidvaluesthatcanbespecifiedforafield.Ifvalidvaluesarespecified, TradingNetworksassuresthatthespecifiedvalueforthefieldmatchesoneofthe validvalues.

Required Fields
Arequiredfieldisonethatyouwantsuppliedforallprofiles,bothyourprofileandyour partners. Severalofthestandardfieldsarerequired.Ifyouwant,youcanchangestandardfields thatcomeoutoftheboxasnonrequiredtorequired.Whenyouaddyourownextended fields,youcanmakethemrequired. Eachprofileonyoursystemmusthaveavalueforeachrequiredprofilefieldbeforeyou canmaketheprofileactive.Inotherwords,apartnersprofilemustcontainavalidvalue forallrequiredfieldsbeforeyoucanenablethepartnersprofileandthereforemakethe partneranactivememberinthetradingnetworkfromwhichTradingNetworkswill acceptdocumentsandtowhichTradingNetworkscansenddocuments. InMywebMethodsandtheTradingNetworksConsole,TradingNetworksplacesan asterisk(*)nexttotherequiredfields,soyoucaneasilyseethefieldsthatarerequired.

webMethods Trading Networks Concepts Guide Version 7.1

20

2. Trading Partners

Trading Partner Agreements (TPAs)


ATradingPartnerAgreement(TPA)isanoptionalsetofparametersthatyoucandefineand usetotailorhowdocumentsareexchangedbetweentwotradingpartners.Thesecanbe anytwopartners,notnecessarilythehubandaspoke.Bothpartnersmusthaveexisting profilesinTradingNetworks. EachTPAmusthaveauniquecombinationofthefollowing: Partnerthatrepresentsthesender Partnerthatrepresentsthereceiver TypeofTPA,representedbytheAgreementID YoumighthavemultipleTPAsforapairoftradingpartners.Forexample,thefollowing showstwoTPAsforpartnersAandBthatareusedbythewebMethodsEDIModule: TPA field Partnerthatrepresentsthesender Partnerthatrepresentsthereceiver TypeofTPA(AgreementID) TPA 1 A B EDITPA TPA2 B A EDITPA

TradingNetworksdoesnotuseTPAsforitsownprocessing.Forexample,Trading NetworksdoesnotuseTPAswhendeterminingtheprocessingrulestousefora document.RathertheparametersthatyouspecifyintheTPAareavailableforyourown use.Forexample,youcanaccesstheTPAinformationfromservicesexecutedbya processingrule.Accesstothisinformationallowsyoutobuildadocumentexchange applicationthatusestheTPAtotailortheexchangeofdocumentsbetweenpartners. OtherwebMethodscomponentstakeadvantageoftheTPAfeatureinTradingNetworks. Forexample,thewebMethodsebXMLModuleusestheTPAfeaturetosupportebXML CollaborationProtocolAgreements(CPAs).Formoreinformation,seethewebMethods ebXMLUsersGuide. Basedonthedocumentexchangeprocessingthatyouwanttoputintoeffect,youdefine theparametersthatyouwantsavedintheTPA.Thesetofparameterscanbedifferentfor differenttypesofTPAs.Forexample,youmightuseTPAsforpartnersthatexchange documentsusingebXMLthatcontaintheparametersdefinedbythewebMethodsebXML Module.OtherpartnersmightexchangedocumentsusingEDI,andforthosepartnersyou createTPAsthatcontainparametersdefinedbythewebMethodsEDIModule.Formore information,seethewebMethodsEDIModuleUsersGuide. For more information abouthowtodefineTPAs,seeChapter12,DefiningandManaging TradingPartnerAgreements(TPAs)inthewebMethodsTradingNetworksUsersGuide.

webMethods Trading Networks Concepts Guide Version 7.1

21

2. Trading Partners

TPA Information vs. Profile Information


ThetypeofinformationthataTPAcontainsisdifferentthanthetypeofinformationthat TradingNetworksmaintainsinaprofile.Aprofilecontainsinformationaboutthepartner thatdoesnotvarywitheachdocumentbeingexchanged(e.g.,companyinformationand address,certificateinformation,deliveryprotocolparameters,externalIDs).However, TPAsareintendedtocontaintransactiondependentinformation(e.g.,configuration informationtosupportspecifictypesofdocumentsbeingexchanged)thatarespecifictoa groupoftransactionsbetweenthetwotradingpartners(e.g.,digitalsignatureor encryptiontoamessage).TheTPAaugmentstheprofileinTradingNetworksandoffersa flexiblewaytoprocessandmanagethedocumentsexchangedbetweentwotrading partners. TheprimarygoaloftheTPAfunctioninTradingNetworksistoofferusersaflexibleand efficientwaytodefinethesetransactionspecificparameters;userscandesignandstore anyapplicationspecificTPAinformationatdesigntimeandefficientlyretrievetheTPA informationatruntime.

Information in a TPA
WhenyoudefineaTPA,youassignthefollowinginformation: ThepartnerthatrepresentsthesenderfortheTPA. ThepartnerthatrepresentsthereceiverfortheTPA. AnagreementIDtoidentifythetypeofTPA(e.g.,TPAsforthewebMethodsEDI ModuleusetheagreementIDEDITPA). TheTPAdatathatcontainstheapplicationspecificvariablestousetotailorthe processingofdocumentsexchangedbetweenthesenderandreceiver.Youspecifythis databydefininganISdocumenttypethatdefinesthestructureofthedatatoprovide. YousupplyvaluesforthevariablesdefinedbytheISdocumenttype.Forexample,the webMethodsEDIModuleshipswithanISdocumenttype(thewm.b2b.editn.TPA:EDITPA ISdocumenttype)touseforTPAsforpartnersexchangingEDIdocuments.ThisIS documenttypecontainsasetofvariablesthatareusedforprocessingEDIdocuments. Optionally,anexportservicethatyousupplytoexporttheTPAdata. Optionally,aninitializationservicethatyousupplytoinitializetheTPAdata(e.g.,the webMethodsEDIModulesuppliesaninitializationservicetosettheTPAvaluestoits defaultvalues).

webMethods Trading Networks Concepts Guide Version 7.1

22

2. Trading Partners

TPA Statuses
TPAshavetwotypesofstatusesagreementstatusanddatastatus. 1 Agreement status.IndicatesthestatusoftheTPAagreementbetweenthereceiverand sender.TherearethreeTPAagreementstatuses. Proposed WhentheagreementstatusisProposed,aTPAisinadraftstatus.Youdomostof themodificationtotheTPAfieldsanddatainputinthisProposedstate. Agreed AnAgreedstatusmeansthattheTPAisfinal.Whentheagreementstatusis Agreed,thedatastatusestakeaffect.Additionally,aftertheagreementstatusis Agreed,youcannotdeletetheTPAagreement. Disabled TheDisabledstatusmeanstheTPAshouldnotbeused.IfyouareusingaTPA andnolongerwanttouseit,youcandisableit.WhenyoudisableaTPA,theTPA remainsintheTradingNetworkssystem,butisconsideredinactive.Later,ifyou decidethatyouneedtheTPA,youcanchangetheagreementstatustoProposed orAgreed. webMethodscomponentsthatusetheTPAfeaturerecognizeaDisabled agreementstatusforaTPA.Forexample,ifthewebMethodsebXMLModule attemptstouseaTPAwithaDisabledstatus,itactsasifthereisnoTPA.Ifyou createanapplicationthatusesTPAs,itshouldcheckandhonortheDisabled status. 2 Data status.ThedatastatusdetermineswhetheryoucanmodifytheTPAdata,whichis datathatyousupplyfortheISdocumenttypeyoudefinefortheTPA.Thatis,the TPAdataisthedatafortheapplicationspecificvariablestousetotailorthe processingofdocumentsexchangedbetweenasenderandreceiver.TheTPAdata statuscanbe: Modifiable.YoucanchangeTPAdata;thatisyoucanchangethevaluesofthe variablesintheISdocumenttypeassociatedwiththeTPA. Non-modifiable.YoucannotchangetheTPAdata;thatisyoucannotchangethe valuesofthevariablesintheISdocumenttypeassociatedwiththeTPA. Note: ThedatastatusisonlyeffectivewhentheAgreementstatusisAgreed.Whenthe AgreementstatusisProposed,TradingNetworksallowsyoutomakeanychangesto theTPA,includingchangingtheTPAdata.

webMethods Trading Networks Concepts Guide Version 7.1

23

2. Trading Partners

webMethods Trading Networks Concepts Guide Version 7.1

24

Chapter 3. Setting Up Trading Networks to Process Documents

Overview of Items to Set Up for Processing Documents . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 26 Document Attributes . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 27 TN Document Types . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 30 Processing Rules . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 36

webMethods Trading Networks Concepts Guide Version 7.1

25

3. Setting Up Trading Networks to Process Documents

Overview of Items to Set Up for Processing Documents


TosetuphowyouwantTradingNetworkstoprocessdocuments,youdefinethe followingTradingNetworksobjects: DocumentattributesthatidentifyspecificpiecesofinformationthatyouwantTrading Networkstoextractfromdocuments,forexample,thesenderofthedocumentorthe totalamountofapurchaseorder.Formoreinformation,seeDocumentAttributes onpage 27. TNdocumenttypesthatrepresentthetypesofdocumentsthatyouexpectfordelivery toyourtradingnetwork.TNdocumenttypesaredefinitionsthatrepresentparticular categoriesofdocuments.Theyaretypicallyassociatedwithaparticularformatting styleandaparticularbusinesspurpose.TheTNdocumenttypecanrepresent documentsspecificto: Aninternetstandard,forexample,acXMLPurchaseOrder(anAribacXML purchaseorder),FIXMLQuoteRequest(aFIXMLformattedrequestfor quotation),orBiztalkEnvelope(aMicrosoftBizTalkenvelope) Acustomstandardusedspecificallyforyourtradingpartnerintegrations,for example,apurchaseorderformatthatyouandyourpartnerhaveagreedupon. InaTNdocumenttype,youspecifythedocumentattributesthatyouwanttoextract fromdocumentsthatmatchtheTNdocumenttype.Forexample,ifyouaredefininga TNdocumenttypeforapurchaseorder,youmightspecifytoextracttheattributesfor thetotalnumberofitemspurchasedandthetotalamountofapurchaseorder. Formoreinformation,seeTNDocumentTypesonpage 30. ProcessingrulesthatspecifytheactionsthatyouwantTradingNetworkstoperform forthedocument.Forexample,youmightspecifythatyouwantTradingNetworksto deliverthedocumenttoapartnerorinvokeaservicetoprocessthedocument.For moreinformation,seeProcessingRulesonpage 36. For more information about: Standardandcustomdocumentattributes,includinghowtodefinecustom attributes,seeChapter13,DefiningandManagingDocumentAttributesinthe webMethodsTradingNetworksAdministratorsGuide. HowtodefineTNdocumenttypes,seeChapter14,DefiningandManagingTN XMLDocumentTypesandChapter15,DefiningandManagingTNFlatFile DocumentTypesinthewebMethodsTradingNetworksAdministratorsGuide. Howtodefineprocessingrules,seeChapter16,DefiningandManaging ProcessingRulesinthewebMethodsTradingNetworksAdministratorsGuide.

webMethods Trading Networks Concepts Guide Version 7.1

26

3. Setting Up Trading Networks to Process Documents

Document Attributes
Documentattributesidentifyselectedcontentfromthedocumentsthatpassthroughyour tradingnetwork.Thisselectedcontentisinformationinthedocumentsthatyouare interestedin,forexample,apurchaseordernumberortheaccountnumberofa purchaser.YoualsousethedocumentattributesformonitoringbywebMethodsOptimize forB2B,forexample,acomparativeanalysisofallthepurchaseorderquantitiesbya particularcustomer.Formoreinformation,seeChapter 9,BusinessAnalysisand MonitoringofTradingNetworksTransactionData. TradingNetworksmaintainstwotypesofattributessystemattributesandcustom attributes. System attributesareTradingNetworksdefinedattributes.Thesystemattributesare: SenderID ReceiverID DocumentID UserStatus GroupID ConversationID Identificationofthesenderofadocument Identificationofthereceiverofadocument Identificationofthedocument Thestatusthatyouorapartnerassociatewiththedocument Identificationwithinadocumentthatassociatesadocument withotherdocumentsinagroup Identificationwithinadocumentthatassociatesthisdocument withotherdocumentsinthesamebusinessprocess(or conversationofdocuments) Portionofadocumentthatcontainsdatathatwasdigitally signed Portionofadocumentthatcontainsthedigitalsignatureofthe document

SignedBody Signature

Althoughyoudonotdefinethesystemattributes,ifyouwantTradingNetworksto extractasystemattributefromadocument,youmustspecifythatsystemattributein theTNdocumenttype.Formoreinformation,seeHowDocumentAttributesRelate toTNDocumentTypesonpage 28. Custom attributesareattributesthatyoudefinetoidentifyanyothercontentthatyou areinterestedinextractingfromdocuments.Forexample,toextractthepurchase ordernumberfromdocuments,youmightdefineadocumentattributenamed PO_Number.Toextractthetotalamountofapurchaseorder,youmightdefinea documentattributenamedTotal_Order_Amount.

webMethods Trading Networks Concepts Guide Version 7.1

27

3. Setting Up Trading Networks to Process Documents

WhenyouenableTradingNetworkswithBAM,youcanmonitorboth,system attributesandcustomattributes.TradingNetworksalwaysextractsthesystem, attributes,SenderID,ReceiverID,andInternalIDformonitoring. For more information about: Systemandcustomdocumentattributes,includinghowtodefinecustom attributes,seeChapter13,DefiningandManagingDocumentAttributesinthe webMethodsTradingNetworksAdministratorsGuide. EnablingBAMwithTradingNetworks,seeChapter 9,BusinessAnalysisand MonitoringofTradingNetworksTransactionData.

What You Specify to Define a Document Attribute


Thedefinitionofadocumentattributeconsistsof: Nameoftheattribute Descriptionoftheattribute Datatypeoftheattribute,whichcanbeoneof:STRING,STRINGLIST,NUMBER, NUMBERLIST,DATETIME,orDATETIMELIST.

How Document Attributes Relate to TN Document Types


Documentattributesaresimplydefinitionsofthepiecesofinformationthatyouare interestedinfromalltypesofdocuments.Afteryoudefineadocumentattribute,youcan referencetheattributeinTNdocumenttypesindicatingthatyouwantthatpieceof informationextractedfromdocumentsthatmatchtheTNdocumenttypes. Asdescribedabove,thedocumentattributedefinesthename,description,anddatatype foradocumentattribute.WhenyousetupaTNdocumenttypetoextractadocument attribute,youdefinehowtolocateanattributewithinthatspecifictypeofdocument. Differenttypesofdocumentshavedifferentformats,sothelocationofattributeswithina documentisbasedonthetypeofdocument. Intheillustrationbelow,therearethreeTNdocumenttypesandasingledocument attribute(PO_Number).EachoftheTNdocumenttypesrepresentsadifferentformatof purchaseorder.AllthreeTNdocumenttypesindicatethatTradingNetworksistoextract thePO_Numberattribute.EachTNdocumenttypespecifieswhereinthepurchaseorder tolocatethecontentthatshouldbeextractedforthePO_Numberattribute.

webMethods Trading Networks Concepts Guide Version 7.1

28

3. Setting Up Trading Networks to Process Documents

Document Attributes and How They Relate to TN Document Types


The definition of a document attribute specifies the name, description, and data type for a document Document #1 <!-- OAG --> TN Document Type Name = OAG PO . . . Attributes PO_Number . . .

The definition of a TN document type specifies how to locate the attributes in the specific type of document.

<POID>A230</POID>

Document Attribute Name = PO_Number Type = Number Description = Purchase Order Number TN Document Type Name = cXML PO . . . Attributes PO_Number . . .

Document #2 <!-- cXML --> <OrderRequestHeader orderID = P01234> . . .

Document #3 <!-- CBL --> <BuyerRefNum> <Reference> <RefNum> 100 </RefNum> </Reference> </BuyerRefNum>

TN Document Type Name = CBL PO . . . Attributes PO_Number . . .

IntheTNdocumenttype,youcanalsoindicatethatyouwantTradingNetworksto transformthevaluethatisextractedforanattribute.Youcantransformthevalueusing eitherabuiltintransformation(forexample,uppercaseaSTRINGvalue),orifyouneed morecomplextransformations,youcancreateyourowncustomtransformationservices. Additionally,whenyoudefinetheTNdocumenttype,youindicatewhetheryouwant TradingNetworkstosavetheattributevaluesthatitextractstothedatabase.Ifyousave theattributevalues,theyareavailableforyourlateruse.Bydefault,TradingNetworks alwayssavestheattributetothedatabase.

How Trading Networks Uses Document Attributes


Extractedattributescanbeusedinthefollowingways: You can select a processing rule based on the value of an extracted attribute.Forexample,you canselectoneprocessingruleifthesenderisPartnerAoranotherprocessingruleif thesenderisPartnerB.Anotherexamplemightbetoselectaprocessingruleifthe receiverisPartnerBandthecustomattributefortotalamountofapurchaseorder (Total_Order_Amountcustomattributethatyoudefine)isgreaterthan$10,000. Trading Networks requires that you extract some system attributes for normal processing.For example,ifyouwantTradingNetworkstoverifythedigitalsignatureofadocument, youmustextracttheSignedBodyandSignaturesystemattributes.Additionally,ifyou wantTradingNetworkstodeliverthedocument,youmustextracttheReceiverID

webMethods Trading Networks Concepts Guide Version 7.1

29

3. Setting Up Trading Networks to Process Documents

systemattributesoTradingNetworkscandeterminethepartnerthatistoreceivethe document. If you save attribute values to the database, you can query the database based on attribute values to locate specific documents.Forexample,youmightwanttolocatealldocumentsthat weresentbyPartnerAandhaveandforwhichthecustomattributefortotalamount ofapurchaseorder(Total_Order_Amountcustomattributethatyoudefine)isgreater than$10,000. If Trading Networks is BAM enabled, Trading Networks passes the attribute values to Optimize for monitoring:Forexample,extractingthecustomattributePO_Quantityandthesystem attributes,SenderIDandReceiverID,togenerateareportonthepurchaseorder quantitybyaparticularsenderfromaparticularreceiver. For more information about: Standardandcustomdocumentattributes,includinghowtodefinecustom attributes,seeChapter13,DefiningandManagingDocumentAttributesinthe webMethodsTradingNetworksAdministratorsGuide. HowtoextractattributesfromTNdocumenttypes,includinghowtotransform attributevaluesusingeitherthebuiltintransformationsoryourowncustom transformationservices,seeChapter14,DefiningandManagingTNXML DocumentTypesandChapter15,DefiningandManagingTNFlatFileDocument TypesinthewebMethodsTradingNetworksAdministratorsGuide. Howtodefineprocessingrulecriteriathatusesthevaluesofextractedattributes, seeChapter16,DefiningandManagingProcessingRulesinthewebMethods TradingNetworksAdministratorsGuide. Howtoquerythedatabasefordocumentsbasedonthevaluesofextracted attributes,seeChapter3,ManagingandTrackingDocumentsfromMy webMethodsandChapter8,ManagingandTrackingDocumentsfromthe ConsoleinthewebMethodsTradingNetworksUsersGuide. MonitoringtheTradingNetworksdata,seeChapter 9,BusinessAnalysisand MonitoringofTradingNetworksTransactionData. HowtodefinetheTNdocumenttypeandselectthedocumentattributesfor monitoring,seewebMethodsTradingNetworksAdministratorsGuide.

TN Document Types
TNdocumenttypesrepresentthetypesofdocumentsthatyouexpecttocomeintoyour tradingnetwork.TNdocumenttypesinclude:

webMethods Trading Networks Concepts Guide Version 7.1

30

3. Setting Up Trading Networks to Process Documents

Identification information,whichindicateshowTradingNetworksistorecognizeatype ofdocument,forexampleisthedocumentacXMLPurchaseOrder(anAribacXML purchaseorder)oracustomformatthatyouandatradingpartneruse. Extraction information, whichindicatesthedocumentattributestoextractfroman inbounddocumentthatarerequiredforfurtherprocessingormonitoring.After TradingNetworksmatchesaninbounddocumenttotheTNdocumenttype,theTN documenttypeindicatestheattributestoextractfromtheinbounddocument.For moreinformation,seeDocumentAttributesonpage 27. Pre-processing options.InaTNdocumenttype,youcanspecifypreprocessingoptions thatTradingNetworksperformsbeforeitperformstheactionsspecifiedbya processingrule.Formoreinformation,seePreprocessingActionsonpage 38. TradingNetworkssupportsTNdocumenttypesfortwocategoriesofdocuments: XMLdocuments Flatfiledocuments FormoreinformationabouthowTradingNetworksusesTNdocumenttypesatruntime, seeRecognitionProcessingonpage 55.

TN XML Document Types


TNXMLdocumenttypesdefinehowTradingNetworksrecognizesXMLdocuments,where tolocateattributeswithinanXMLdocument,andhowtopreprocesstheXML documents. TodefineTNXMLdocumenttypes,youspecifythefollowingtypesofinformation: Identification information.TradingNetworkschecksXMLdocumentsagainstthe identificationinformationtodeterminewhetherthedocumentmatchesadefinedTN XMLdocumenttype.WhenyoudefinetheidentificationinformationforaTNXML documenttype,youcanspecifyoneormoreofthefollowing: RoottagthattheXMLdocumentmusthavetomatchtheTNXMLdocument type. Identifyingqueries,whichareXQLqueriesthatTradingNetworksperforms againsttheXMLdocumenttolocatespecificnodesintheXMLdocument.The nodesmustbepresentforTradingNetworkstoconsidertheTNXMLdocument typeamatch.Optionally,youcanspecifythevaluethenodemusthave. PipelinevariablesthatmustbepresentwhenTradingNetworksisdetermining theTNXMLdocumenttypetouse.Thepipelinevariablesthatyouspecifymust existforTradingNetworkstoconsidertheTNXMLdocumenttypeamatch. Optionally,youcanspecifythevaluethepipelinevariablesmusthave. Extraction information.Specifiestheattributes(systemattributesandcustomattributes) thatyouwantTradingNetworkstoextractfromXMLdocuments.YoudefineXQL

webMethods Trading Networks Concepts Guide Version 7.1

31

3. Setting Up Trading Networks to Process Documents

queriesthatTradingNetworksusestolocatetheattributeswithintheXML documents.ForTradingNetworkstoextractavalue,thenodethattheXQLquery identifiesmustexistintheXMLdocument.Optionally,intheextractioninformation, youcanspecifythatyouwantTradingNetworkstouseabuiltintransformationor invokeacustomtransformationserviceagainsttheattributevaluetoalterthevalueof theextractedattribute.Forexample,youmightwantTradingNetworkstotransform aSTRINGvalueintoalluppercasecharacters. Namespace mappings.IftheXMLdocumentsusenamespaces,youshouldspecify namespacemappingstodescribethenamespacesthatXMLdocumentsmightuse. NamespacesareusedinanXMLdocumenttodistinguishbetweenelementsthatcome fromdifferentsources.Asetofelements(ortags)fromaspecificsourceisassignedto aspecificnamespace.EachnamespaceisassociatedwithaURI,whichisusedto uniquelyidentifythenamespace.Namespacemappingsmaptheprefixesusedby namespacestotheURIsusedbythosenamespaces.FormoreinformationaboutXML namespaces,seetheXMLNamespacespecificationathttp://www.w3.org/. WhenyoudefinenamespacemappingsinaTNXMLdocumenttype,Trading NetworksusesthenamespacemappingsyouspecifywhenapplyingXQLqueries againsttheXMLdocument.Thatis,TradingNetworksusesthenamespacemappings forboththeidentifyingXQLqueriesandtheXQLqueriestoextractattributes. Options.Youcanusetheoptionstodefineitemsforlaterprocessing.Whenspecifying theoptionsforanXMLdocument,youcanspecify: AnISdocumenttypethatdefinesthestructureoftheXMLdocumentandthat canbeusedtoparsetheXMLdocumentintoanIDataobject.TradingNetworks usestheISdocumenttypeifyouinvokethewm.tn.doc.xml:bizdocToRecordserviceto convertthedocumentcontentintheBizDocEnvelopetoanIDataobject. AnISschemathatdefinesthestructureoftheXMLdocument.TradingNetworks usesthisISschemaifyouindicateyouwanttoTradingNetworkstoperformthe preprocessingactiontovalidatethestructureoftheXMLdocument. WhetheryouwantTradingNetworkstoperformanyorallofthepreprocessing actions.PreprocessingactionsareactionsthatTradingNetworksperformsbefore usingtheprocessingruleactionstoprocesstheXMLdocument.Formore information,seePreprocessingActionsonpage 38. Note: YouspecifypreprocessingactionsinbothTNXMLdocumenttypesand processingrules.Thepreprocessingactionsinaprocessingruleindicatewhether TradingNetworksistousethesettingsfromtheTNdocumenttypeortooverride theTNdocumenttypesettings. WhetheryouwantTradingNetworkstoprocessadocumentusingaprocessing ruleorwanttopreventTradingNetworksfromperformingprocessingrule actions.Whenyoudisableprocessingrulerouting,TradingNetworksonly performsthepreprocessingactionsspecifiedintheTNdocumenttype;itdoes notsearchforaprocessingrule,nordoesitperformanyprocessingruleactions.

webMethods Trading Networks Concepts Guide Version 7.1

32

3. Setting Up Trading Networks to Process Documents

For more information about: HowtodefineTNXMLdocumenttype,seeChapter14,DefiningandManaging TNXMLDocumentTypesinthewebMethodsTradingNetworksAdministrators Guide. Howtodefinedocumentattributes,seeChapter13,DefiningandManaging DocumentAttributesinthewebMethodsTradingNetworksAdministratorsGuide

TN Flat File Document Types


TNflatfiledocumenttypesaredefinitionsthatTradingNetworksusestorecognizeflatfile documents. Flatfiledocumentspresentcomplexhierarchicaldatainarecordbasedstorageformat which,unlikeXML,doesnotembedstructuralinformationwithinthedata.Trading Networksdefinitionofaflatfileisanyfileordocumentthathasaformatthatisnon describing,thatis,adocumentthatdoesnotcontainmetadata. Inotherwords,flatfiledataisexternalizedasasetofrecords(listofrecordscontaining fieldsandcomposites)withoutanystructuralinformation.Astherecordsarenot structuredinthedocument,theapplicationreceivingtheflatfilemusthaveknowledgeof thestructureofaflatfiletoreaditscontent.Whenyouwanttoprocessaflatfile documentthroughTradingNetworks,theapplicationthatinitiallyreceivestheflatfile documentisadocumentgatewayservicethatyoucreate.

Document Gateway Services


ForTradingNetworkstoprocessaflatfiledocument,youmustcreateadocumentgateway service(alsoreferredtoasagatewayservice).Themainfunctionofthedocumentgateway serviceistoprovidehintsthatTradingNetworksusestorecognizethetypeofflatfile document;thatis,todeterminewhichTNflatfiledocumenttypetheincomingflatfile matches. DocumentgatewayservicesaretheentrypointsforflatfilesintoTradingNetworks.Thatis, ratherthansendingflatfilesdirectlytoTradingNetworks,yourtradingpartnerssendtheir flatfilestoadocumentgatewayservice.Afterthegatewayserviceexecutes,itpassescontrol toTradingNetworks. Adocumentgatewayserviceperformsthefollowing: ProvidehintstoTradingNetworkstoindicatetheTNflatfiledocumenttypetousefor theflatfiledocument.TheserviceprovidesthesehintsintheTN_parmsvariable, whichislocatedattherootofthepipeline. Specifiestheattributesandtheirvalues.BecauseTradingNetworksdoeshave knowledgeofthestructureaflatfiledocument,itcannotextractvaluesforattributes.If youwanttousedocumentattributes,thegatewayservicemustsupplythevalues.

webMethods Trading Networks Concepts Guide Version 7.1

33

3. Setting Up Trading Networks to Process Documents

Recordsthenameofthegatewayserviceinthepipeline.ThisallowsTrading Networkstobeabletoobtainthenameofthegatewayserviceandrecorditinits database.BecauseTradingNetworksrecordsthenameofthegatewayservice,you canresubmitthedocumentifnecessary. PassestheflatfiledocumenttoTradingNetworkstocontinueprocessing.

Information You Supply to Define TN Flat File Document Types


TheinformationyouprovideinaTNflatfiledocumenttypeindicateshowtomatchaflat filedocumenttoaTNflatfiledocumenttype,specifytheattributesthatTrading Networksistoassociatewiththeflatfiledocument,andspecifyoptionsfor preprocessingtheflatfile. TodefineTNflatfiledocumenttypes,youspecifythefollowingtypesofinformation: Identification information.TradingNetworkscheckspipelinehintsagainstthe identificationinformationtodeterminewhethertousetheTNflatfiledocumenttype fortheflatfiledocument.WhenyoudefinetheidentificationinformationforaTNflat filedocumenttype,youcanspecifypipelinevariablesthatmustbepresent.The pipelinevariableswillbepresentifthedocumentgatewayserviceplacestheminthe pipelinehints.Optionally,youcanspecifythevaluethepipelinevariablesmusthave. Extraction information.Specifiestheattributes(systemattributesandcustomattributes) thatyouwantTradingNetworkstoassociatewiththeflatfiledocument.Trading NetworkslooksinthepipelinefortheattributesthatyoudefineintheTNflatfile documenttype.Ifthedocumentgatewayserviceplacedtheattributewithitsvaluein thepipeline,TradingNetworkscanassociatetheattributewiththeflatfiledocument. ForTNflatfiledocumenttypes,theSenderIDandReceiverIDsystemattributesare alwaysrequired. Options.Youcanusetheoptionstodefineitemsforlaterprocessing.Whenspecifying optionsforaflatfiledocument,youcanspecify: AflatfileschemathatTradingNetworkscanusetoperformthepreprocessing actiontovalidatethestructureoftheflatfiledocument. WhetheryouwantTradingNetworkstoperformanyorallofthepreprocessing actions.PreprocessingactionsareactionsthatTradingNetworksperformsbefore usingtheprocessingruleactionstoprocesstheflatfiledocument.Formore information,seePreprocessingActionsonpage 38. Note: YouspecifypreprocessingactionsinbothTNflatfiledocumenttypesand processingrules.Thepreprocessingactionsinaprocessingruleindicatewhether TradingNetworksistousethesettingsfromtheTNdocumenttypeortooverride theTNdocumenttypesettings.

webMethods Trading Networks Concepts Guide Version 7.1

34

3. Setting Up Trading Networks to Process Documents

WhetheryouwantTradingNetworkstoprocessadocumentusingaprocessing ruleorwanttopreventTradingNetworksfromperformingprocessingrule actions.Whenyoudisableprocessingrulerouting,TradingNetworksonly performsthepreprocessingactionsspecifiedintheTNdocumenttype;itdoes notsearchforaprocessingrule,nordoesitperformanyprocessingruleactions. For more information about: HowtodefineTNflatfiledocumenttypes,seeChapter15,Definingand ManagingTNFlatFileDocumentTypesinthewebMethodsTradingNetworks AdministratorsGuide. Flatfileschemasandparsingflatfiles,seetheFlatFileSchemaDevelopersGuide.

Unknown TN Document Type


EachdocumentthatpassesthroughyoursystemshouldmatchexactlyoneTNdocument type.TodeterminetheTNdocumenttypetouseforadocument,TradingNetworkslooks atallenabledTNdocumenttypesforthattypeofdocument.Thatis: ForXMLdocuments,TradingNetworksmatchesdocumentsagainstallenabledTN XMLdocumenttypes. Forflatfiledocuments,TradingNetworksmatchestheflatfileagainstallenabledTN flatfiledocumenttypes. Anunknowndocumenttypecanoccurwhenadocument(XMLorflatfile): Does not match any TN document type. Matches more than one TN document type.Thedocumentisconsideredtobeanunknown typebecauseTradingNetworksdoesnotknowwhichofthemultiplematchingTN documenttypestouse.Inthissituation,TradingNetworkslogsamessagetothe activitylogthatidentifiesalltheTNdocumenttypesthatthedocumentmatched. WhenTradingNetworkscannotmatchadocumenttoexactlyoneTNdocumenttype: TradingNetworkscannotextractanyattributeinformationfromthedocument;aTN documenttypeidentifiestheattributeinformationtoextract. Processingruleroutingwillbeenabledforthisdocument;aTNdocumenttypeis whereroutingcanbedisabled. TradingNetworkswillstillattempttoprocessdocumentswithanunknownTN documenttypebyperformingtheactionsidentifiedintheprocessingrulethatthe documenttriggers.Youcansetupprocessingrulesthatactondocumentswithan unknownTNdocumenttype.

webMethods Trading Networks Concepts Guide Version 7.1

35

3. Setting Up Trading Networks to Process Documents

Processing Rules
ProcessingrulesspecifyhowyouwantTradingNetworkstoprocessdocuments. ProcessingrulesdefinetheactionsthatyouwantTradingNetworkstotakefora particulardocument.Forexample,youmightwantTradingNetworkstosendanalert emailmessagetoacontactandthendeliverthedocumenttothereceiverthatisidentified inthedocument. ForeachdocumentthatTradingNetworksistoprocess,itperformsaprocessingrule lookuptodeterminewhichprocessingruletouse.Toperformthelookup,Trading Networksusescriteriathatyoudefineinprocessingrules.TradingNetworksmatches informationfromthedocumentagainstthecriteriayouspecify.AfterTradingNetworks locatesamatchingprocessingrulebasedonthecriteria,ittakestheactionsthatyou specifyinthematchingprocessingrule.
Processing Rules

If the document information matches the processing rule criteria... Information from Document sender receiver document type user status errors? custom attributes Processing Criteria sender receiver document type user status errors? custom attributes

...perform the pre-processing and processing actions specified in the processing rule. Pre-processing Actions verify validate check duplication save Processing Actions Execute a service Send an alert e-mail Change the user status Deliver the document to the receiver Respond with a message

bizdoc Processing Rules

Trading Networks

Note: IfyoudonotwantTradingNetworkstoperformanyprocessingactions,youdisable processingruleroutingfordocumentsintheTNdocumenttype.Whenprocessingrule routingisdisabled,TradingNetworksdoesnotlookupaprocessingrule.Itperformsthe preprocessingactionsasdefinedintheTNdocumenttype,butdoesnotperformany processingactions. For more information abouthowtodefineprocessingrules,seeChapter16,Definingand ManagingProcessingRulesinthewebMethodsTradingNetworksAdministratorsGuides

webMethods Trading Networks Concepts Guide Version 7.1

36

3. Setting Up Trading Networks to Process Documents

Processing Rule Criteria


ThepurposeofthecriteriainaprocessingruleistoidentifythedocumentsTrading Networksshouldprocessusingtheprocessingrule.Youcandefinecriteriathatusesone ormoreofthefollowing: The sender and receiver of the document.TradingNetworksusesthevaluesofthe SenderIDand/orReceiverIDsystemattributes(whichidentifythesenderandreceiver ofthedocument)todeterminethesendingand/orreceivingpartner.Thenitmatches thesenderorreceivingpartnerfromthedocumenttothesenderandreceivercriteria youspecifyintheprocessingrule.Forexample,ifyouspecifythesendercriteriaina processingrule,TradingNetworksusesthevalueextractedfortheSenderIDsystem attributetofindtheprofileforthesendingpartner.ThenTradingNetworksmatches thatpartnertothesendercriteriaintheprocessingrule. The TN document type. TradingNetworksmatchestheTNdocumenttypeusedforthe documentagainsttheTNdocumenttypecriteriayouspecifyintheprocessingrule. Forexample,ifyouhaveaTNdocumenttypeforacXMLPurchaseOrder,youcan definecriteriatoselectaprocessingruleifthedocumentmatchedthecXMLPurchase OrderTNdocumenttype. The User Status system attribute. TradingNetworksmatchesthevalueoftheUser Status systemattributetotheuserstatuscriteriayouspecifyinaprocessingrule.For example,youmightsettheUserStatussystemattributetoPENDINGincertain circumstances,andthenyoucandefinecriteriatoselectaprocessingruleifthe User StatussystemattributeisPENDING. Whether Trading Networks encountered recognition errors.Forexample,youmightsetup processingrulecriteriatoselecttheprocessingruleonlyifTradingNetworksdidnot encountererrorsdeterminingtheTNdocumenttypetouse. The values of custom attributes.TradingNetworksmatchesthevaluesofthecustom attributesthatareassociatedwiththedocumenttothevaluesyouspecifyinthe processingrulecriteria.Forexample,ifyouhaveacustomattribute Total_Order_Amount,youcandefinecriteriatoselectaprocessingruleif Total_Order_Amountisgreaterthan$10,000. Ifyouspecifymorethanonecriterion,adocumentmustmatchallthecriteriaforTrading Networkstoselectit. FormoreinformationabouthowTradingNetworksusesprocessingrulecriteriaatrun time,seeProcessingRuleSelectiononpage 60.

webMethods Trading Networks Concepts Guide Version 7.1

37

3. Setting Up Trading Networks to Process Documents

Pre-processing Actions
ThepreprocessingactionsspecifyactionsyouwantTradingNetworkstotakebeforeit processesthedocumentusingtheprocessingactionsyouspecify.Foralistofthe processingruleactions,seeProcessingRuleActionsonpage 38.Usepreprocessing actionstoinstructTradingNetworksto: Verifythedigitalsignatureofadocument Validatethestructureofadocument DeterminewhetherthedocumenthasalreadybeenreceivedbyTradingNetworks Savethedocumentcontent,attributevalues,and/oractivityloginformationtothe database Note: YoucanspecifypreprocessingactionsinbothTNdocumenttypesandthe processingrule.Youcanusethepreprocessingactionsintheprocessingruletooverride theactionsthatarespecifiedintheTNdocumenttype. FormoreinformationabouthowTradingNetworksusespreprocessingactionsatrun time,seePreprocessingActionsonpage 61.

Processing Rule Actions


Theprocessingactions(alsoreferredtoasprocessingruleactions)specifyhowTrading Networksistoprocessadocument.AfterTradingNetworkslocatestheprocessingruleto useforadocument(usingthecriteria),TradingNetworksperformstheactionsspecified intheprocessingruletoprocessthedocument. TradingNetworkscanperformthefollowingprocessingactions: Executeaservicethatyoucreate.TradingNetworkscanexecutetheservice synchronouslyorasynchronously. Sendanalertemailmessage. ChangetheUserStatussystemattributethatisassociatedwiththedocument. Deliverthedocumenttothereceiveridentifiedinthedocument.TradingNetworks candeliverthedocumentinthefollowingways: ImmediatelyusingdeliverymethodssuchasSMTP,HTTP,FTP,orFTPSby invokingadeliveryservicethatyoucreate. Atalatertimeusingscheduleddelivery.Toscheduleadocument,Trading Networksplacesthedocumentintoascheduleddeliveryqueuethatyoudefine. Whenyoudefinethequeue,youassociatethedeliveryschedulewiththequeue. Atthetimesindicatedbythedeliveryschedule,TradingNetworksactsonthe

webMethods Trading Networks Concepts Guide Version 7.1

38

3. Setting Up Trading Networks to Process Documents

documentsthatareinthequeue.Formoreinformationaboutqueues,see ScheduledDeliveryQueuesandProcessingRulesonpage 39. Queuethedocumentforpolling.InthissituationTradingNetworksdoesnot deliverthedocument;rather,thereceiverpollsforthedocumentatalatertime andTradingNetworksreturnsthedocumentinresponsetothepolling. Formoreinformationaboutdeliveryoptions,seeChapter 6,DeliveringDocuments toPartners. Respondtothecallerbysendingamessagebacktothesenderofthedocument. FormoreinformationabouthowTradingNetworksusesprocessingactionsatruntime, seeProcessingRuleActionsonpage 63.

Scheduled Delivery Queues and Processing Rules


Ifyouwanttousescheduleddelivery,youneedtodefineallqueuesthatyouwillwantto usebeforeyoucansetupthedeliveryactionintheprocessingrules.Ascheduleddelivery queueisagroupingofdocumentsthatareintendedforoneormoretradingpartners. TradingNetworkssupportstwotypesofscheduleddeliveryqueuespublicqueuesand privatequeues. Public queuesarequeuesthatcancontaindocumentsformultiplereceivingpartners. Private queuesarequeuesthatcontainsonlydeliverytasksthatcorrespondto documentsaimedforaspecificreceivingpartner.Youdefineprivatequeuesinthe profileofthereceivingpartner. Formoreinformationaboutusingscheduleddeliverytodeliverdocuments,see ScheduledDeliveryonpage 77. For more information about: Definingprivateandpublicqueues,seeChapter17,DefiningandManaging QueuesinTradingNetworksandAppendixK,ManagingQueuesUsingthe ConsoleinthewebMethodsTradingNetworksAdministratorsGuide. Howtosetupscheduledelivery,seeChapter18,CreatingDeliveryServicesin thewebMethodsTradingNetworksAdministratorsGuide.

webMethods Trading Networks Concepts Guide Version 7.1

39

3. Setting Up Trading Networks to Process Documents

webMethods Trading Networks Concepts Guide Version 7.1

40

Chapter 4. Sending Documents to Trading Networks for Processing

Overview of Sending Documents . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 42 Sending Documents to Trading Networks . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 42 Forwarding Documents to Another Server . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 46 Sending a Document Back to the Same Server . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 48

webMethods Trading Networks Concepts Guide Version 7.1

41

4. Sending Documents to Trading Networks for Processing

Overview of Sending Documents


TostarttheruntimeprocessingofTradingNetworks,adocumentissenttoTrading Networks.ThefollowinglistssomeofthewaysadocumentcanbesenttoTrading Networks: AbackendsystemcansendadocumenttoTradingNetworks;formoreinformation, seeSendingDocumentstoTradingNetworksonpage 42. ApartnercansendadocumenttoTradingNetworks;formoreinformation,see SendingDocumentstoTradingNetworksonpage 42. ApartnersTradingNetworkssystemcandeliveradocumenttoyourTrading Networkssystem;formoreinformation,seeForwardingDocumentstoAnother Serveronpage 46. YourownTradingNetworkssystemcansendadocumentbacktoyoursystemfor processing;formoreinformation,seeSendingaDocumentBacktotheSameServer onpage 48.

Sending Documents to Trading Networks


TohaveTradingNetworksprocessbusinessdocuments,tradingpartnersandbackend systemssendbusinessdocumentstoTradingNetworks.Foratradingpartnertosend businessdocuments,itmustcreateanapplicationthatcommunicateswiththeserver.This applicationiscalledaclient.ClientsandbackendssystemscanuseHTTP,HTTPS,FTP, FTPS,orSMTPtosendthedocumentstoTradingNetworks.

Clients that Trading Partners Use to Send Documents


Foratradingpartnertosendbusinessdocuments,itmustcreateaclientthat communicateswiththeservertosendthebusinessdocumentstotheserver.Youcanuse anyofthefollowingtypesofclients: Javaclient C/C++client VisualBasicclient Excelclient Browserbasedclient

webMethods Trading Networks Concepts Guide Version 7.1

42

4. Sending Documents to Trading Networks for Processing

Service the Client Should Invoke


WhenaclientsendsadocumenttoTradingNetworks,itmustspecifytheservicethatisto acceptandprocessthedocument.ForXMLdocuments,theclientshouldinvokethe wm.tn:receiveservice.Forflatfiles,theclientshouldinvokeadocumentgatewayservice youcreated,whichinturn,invokesthewm.tn:receiveservice.Formoreinformationabout flatfiles,seeDocumentGatewayServicesonpage 33. TradingNetworksprotectsaccesstothewm.tn:receiveserviceusinganAccessControlList (ACL).TheprotectionassuresonlypartnerswithTradingNetworksadministrative authorityorpartnerauthoritycaninvokethisservice.

User Accounts for Partners


Toinvokethewm.tn:receiveservice,theclientmustsupplytheusernameandpasswordofa validMywebMethodsorIntegrationServeruseraccount.Whenusingauseraccount withTradingNetworksadministrativeauthority,TradingNetworksalwaysacceptsand processesthedocument.However,youwilltypicallynotgrantyourpartners administrativeauthority.Instead,theyhaveuseraccountsthathaveTradingNetworks partnerauthority. Whenyoucreateaprofileforapartner,youcanassociateauseraccountwiththeprofile, andthereforethepartner.Whenyoucreateaprofileusing: MywebMethods,youcanassociateoneormoreMywebMethodsuserswiththe profile.WhenyouassociateaMywebMethodsuserwithaprofile,TradingNetworks automaticallygivesthatMywebMethodsuserpartnerauthority. TradingNetworksConsole,youcanconfigureTradingNetworkssothatit automaticallycreatesanIntegrationServeruseraccountforthepartner.The IntegrationServeruseraccountthatTradingNetworkscreateshaspartnerauthority. Whenusingauseraccountwithpartnerauthority,TradingNetworksensuresthatthe userinvokingthewm.tn:receiveservicematchesthesenderspecifiedwithinthedocument beingsent.TradingNetworksusesthesenderidentifiedwithinthedocumenttolookup thesendersprofileandensuresthattheprofileisassociatedwiththeMywebMethodsor IntegrationServeruseraccountthatwasusedtosendthedocument.Iftheuseraccountis notassociatedwiththesendersprofile,TradingNetworksdoesnotprocessthe document. Formoreinformationaboutadministrativeandpartnerauthority,seeProtectingAccess toUserInterfacesonpage 116.

webMethods Trading Networks Concepts Guide Version 7.1

43

4. Sending Documents to Trading Networks for Processing

Protocols the Client Can Use


ATradingNetworksclientcansendadocumenttothewm.tn:receiveserviceusinganyof thefollowingmethods. XML document Flat File document

Method PostthedocumentviaHTTP PostthedocumentviaHTTPS SendadocumentviaFTP SendadocumentviaFTPS SendadocumentviaSMTP SubmittheXMLdocumentin the$xmldatavariable

Client Alltypesofclientsexcept browserbasedclients Alltypesofclientsexcept browserbasedclients Alltypesofclientsexcept browserbasedclients Alltypesofclientsexcept browserbasedclients Alltypesofclientsexcept browserbasedclients Alltypesofclients

Note: FormoredetailsaboutusingeachoftheabovemethodsforXMLdocuments,seethe chapteraboutpassingXMLdatatoservicesinthewebMethodsDeveloperUsersGuide. For more information about creatingclients,seethechapteraboutcreatingclientcodein thewebMethodsDeveloperUsersGuide.InthewebMethodsDeveloperUsersGuide, clientsarereferredtoasISclients.

Sending the Documents to Trading Networks


WhenaclientorbackendsystemsendsadocumenttoTradingNetworks,itinvokesone ofthefollowing: ForXMLdocuments,thewm.tn:receiveservice Forflatfiles,thedocumentgatewayserviceyoucreated,whichinturn,invokesthe wm.tn:receiveservice

webMethods Trading Networks Concepts Guide Version 7.1

44

4. Sending Documents to Trading Networks for Processing

Clients and Back-end Systems Sending Documents to Trading Networks


1 3

Client (for a Trading Partner) or back-end system

XML

Trading Networks

Flat File

document gateway service

1. Recognize the document. 2. Extract the attributes. 3. Perform pre-processing. 4. Perform processing actions.

Step
1 2

Description TheclientorbackendsystemsendsthedocumenttoTradingNetworks. Ifthedocumentisaflatfile,theclientorbackendsystemshouldinvokethe documentgatewayservice.Formoreinformation,seeDocumentGateway Servicesonpage 33. WhenTradingNetworksreceivesthedocument,itprocessesthedocumentas definedbyTNdocumenttypesandprocessingrules. TradingNetworksperformsthefollowingtaskstoprocessthedocument: 1 RecognizesthedocumentusingtheTNdocumenttypes.Ifthedocumentis aflatfile,thedocumentfirstgoestothedocumentgatewayservice,thento TradingNetworksforrecognition.Formoreinformation,seeRecognition Processingonpage 55. Extractstheattributevaluesfromthedocumentasinstructedbythe matchingTNdocumenttype.Formoreinformation,seeRecognition Processingonpage 55. Performsthepreprocessingactionsagainstthedocumentasdefinedinthe TNdocumenttypeand/orprocessingrule.Formoreinformation,seePre processingActionsonpage 61. Performstheprocessingactionsagainstthedocumentasdefinedinthe processingrule.Formoreinformation,seeProcessingRuleActionson page 63.

Formoreinformation,seeChapter 3,SettingUpTradingNetworkstoProcess DocumentsandChapter 5,TradingNetworksDocumentProcessing.

webMethods Trading Networks Concepts Guide Version 7.1

45

4. Sending Documents to Trading Networks for Processing

Forwarding Documents to Another Server


OneofyourtradingpartnersthatisusingTradingNetworksmighthavetheirTrading Networksprocessadocumentandthenuseaprocessingruletodeliverthedocumentto yourTradingNetworkssystem.Inthissituation,yourpartnersTradingNetworkssystem actsasaclienttoyourTradingNetworkssystem.
Your Partners Trading Networks System as a Client to Your Trading Networks System

Your Trading Partners Trading Networks System


(acts as a client)

XML

Trading Networks
1. Recognize the document. 2. Extract the attributes. 3. Perform pre-processing. 4. Perform processing actions.

Flat File

document gateway service

Similarly,youmightsetupyourTradingNetworkssystemtodeliveryadocumenttoa partnerssystem.Inthissituation,yourTradingNetworkssystembecomestheclientto yourpartnerssystem.


Your Trading Networks System as a Client to Your Partners Trading Networks System

Your Trading Partners Trading Networks System


1. Recognize the document. 2. Extract the attributes. 3. Perform pre-processing. 4. Perform processing actions.

XML

Your Trading Networks System


(acts as a client)

document gateway service

Flat File

Toforwardadocumenttoanotherserver,youcanuseeithertheExecute a serviceorthe Deliver Document Byprocessingactions.

webMethods Trading Networks Concepts Guide Version 7.1

46

4. Sending Documents to Trading Networks for Processing

Forwarding Documents to Another Integration Server

Trading Networks Client


1

Trading Networks
2 3
1. Recognize the document. 2. Extract the attributes. 3. Perform pre-processing. 4. Perform processing actions; deliver the document to another Integration Server using: - Execute a service processing action - Deliver Document By processing action

Trading Networks
1. Recognize the document. 2. Extract the attributes. 3. Perform pre-processing. 4. Perform processing actions.

Step
1

Description AclientorbackendsystemsendsadocumenttoTradingNetworks. Note: Intheaboveillustration,adocumentgatewayserviceisnotshown.Ifthe documentisaflatfile,itwouldbeprocessedbyadocumentgatewayservice beforebeingsenttoTradingNetworksforprocessing.

2 3

TradingNetworksprocessesthedocumentasdefinedbyTNdocumenttypes andprocessingrules. Theactionsintheprocessingruleindicatetodeliverthedocumenttoanother instanceofTradingNetworks,thatis,thetargetTradingNetworks.Youcanuse eithertheExecute a serviceortheDeliver Document Byprocessingactions: WhenyouusetheExecute a serviceprocessingaction,TradingNetworks executesaservicethatyouspecify.Toforwardthedocumentthetarget TradingNetworks,thisservicecaninvokethewm.tn:receiveserviceora documentgatewayserviceonthetargetIntegrationServer. Whenyouusethe Deliver Document Byprocessingaction,TradingNetworks sendsthedocumentbeingprocessedtothepartneridentifiedasthereceiver inthedocument.TradingNetworksusesthedeliveryinformationinthe profiletodeterminehowtosendthedocumenttothetargetTrading Networks.

TheTradingNetworksreceivesthedocumentandprocessesitasdefinedbyits TNdocumenttypesandprocessingrules.

webMethods Trading Networks Concepts Guide Version 7.1

47

4. Sending Documents to Trading Networks for Processing

Sending a Document Back to the Same Server


YoucanhaveyourownTradingNetworkssystemsendadocumentbacktoitselftohave yourTradingNetworkssystemperformfurtherprocessing.Forexample,Trading Networksreceivesadocumentfromapartner.ThedocumentisincXMLformat; however,thereceivingpartnerrequiresthedocumentinCBLformat.Whenthedocument isoriginallyreceived,theprocessingactionsconvertthedocumentfromcXMLformatto CBLformat.Afterconvertingthedocument,thedocumentcanbesenttothereceiving partner.Tosendthedocumenttothereceivingpartner,sendthedocumentbackintoyour TradingNetworkssystemforprocessing.ThisCBLdocumenttriggersadifferent processingruleandtheprocessingactionsdeliversthedocumenttothereceivingpartner.
Processing a Document Again on the Same Server

Trading Networks Client


1

Trading Networks
2
1. Recognize the document. 2. Extract the attributes. 3. Perform pre-processing. 4. Perform processing actions.

Second time, use a processing rule that delivers the document back to the receiving partner. First time, use a processing rule that sends the document back to the same server.

Step
1 2

Description Theclientorbackendsystemsendstheoriginaldocument(e.g.,cXML document)toTradingNetworksrunningonanIntegrationServer. TradingNetworksprocessesthedocumentasdefinedbyTNdocumenttypes andprocessingrules.(Forexample,convertthedocumentfromcXMLformatto CBLformat.)

webMethods Trading Networks Concepts Guide Version 7.1

48

4. Sending Documents to Trading Networks for Processing

Step
3

Description Additionally,theprocessingactionsincludelogictosendthedocumentbackto thesameTradingNetworksforfurtherprocessing(e.g.,todeliverittothe receivingpartner).TosendthedocumentbacktothesameTradingNetworks: ForanXMLdocument,usethewm.tn.doc.xml:routeXmlserviceratherthanthe wm.tn:receiveservice. Foraflatfile,usethewm.tn.doc.ff:routeFlatFileserviceratherthanthe wm.tn:receiveservice. TradingNetworksdoesnotchecktheidentityofthesenderagainsttheISuser accountinvokingthewm.tn.doc.xml:routeXml or wm.tn.doc.ff:routeFlatFile service.(That is,TradingNetworksdoesnotchecktoensurethattheuserinvokingtheoneof theseserviceshasTradingNetworkspartnerauthorityandthatthesender identifiedwithinthedocumentisassociatedwiththepartnerthatsentthe document.)

TradingNetworksprocessesthedocumentagain;thistimeselectingadifferent TNdocumenttypeandprocessingruleforthedocument.(Forexample,this timeTradingNetworksmightselectaprocessingrulethatindicatesthatthe documentistobedeliveredtothereceivingpartner.)

webMethods Trading Networks Concepts Guide Version 7.1

49

4. Sending Documents to Trading Networks for Processing

webMethods Trading Networks Concepts Guide Version 7.1

50

Chapter 5. Trading Networks Document Processing

Overview of How Trading Networks Processes a Document . . . . . . . . . . . . . . . . . . . . . . . . . . . 52 Processing of Documents in Trading Networks . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 53 Recognition Processing . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 55 Processing Rule Selection . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 60 Pre-processing Actions . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 61 Processing Rule Actions . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 63 Large Document Handling . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 67

webMethods Trading Networks Concepts Guide Version 7.1

51

5. Trading Networks Document Processing

Overview of How Trading Networks Processes a Document


TradingNetworksusestheinformationyouspecifyatdesigntimetoprocessadocument atruntime.Ituses: Senders profilestoensuretheusersendingthedocumentisanactivepartnerinyour network Receivers profiles toobtaininformationspecifictothereceivingpartnerforprocessing document(e.g.,thepartnersHTTPhostnameandportnumberifdeliveringa documentviaHTTP) TN document typestorecognizethetypeofdocumentthatwassentandtodetermine documentattributestoassociatewiththedocument Processing rulestodeterminetheactionsyouwantTradingNetworkstoperform againsttheinbounddocument TheruntimeprocessingthatTradingNetworksperformsforaninbounddocumentcan bedividedintofourareas: Recognition processing,whichisdeterminingtheTNdocumenttypethatmatchesthe inbounddocumentusingtheidentificationinformationthatyoudefinedinTN documenttypes,andafterlocatingthematchingTNdocumenttype,obtainingthe valuesofthedocumentattributesthatyouspecifiedintheTNdocumenttype. Processing rule selection,whichisdeterminingtheprocessingruletouseforthe inbounddocumentbasedonthecriteriathatyoudefinedinprocessingrules. Pre-processing actions,whichisperformingthepreprocessingactionsthatyoudefined intheTNdocumenttypeand/orprocessingrule. Processing actions,whichisperformingtheprocessingactionsthatyoudefinedinthe processingrule.

webMethods Trading Networks Concepts Guide Version 7.1

52

5. Trading Networks Document Processing

Processing of Documents in Trading Networks


ThefollowingillustrateshowTradingNetworksprocessesaninbounddocument.Seethe tablebelowthediagramformoreinformation.
How Trading Networks Processes Documents
3
Recognize TN Document Type and Extract Attributes

XML

4
TN document type bizdoc

Flat File

document gateway service

5
Select the Processing Rule to Use

6
Perform Pre-processing Actions - Verify - Validate - Check for duplicate - Save

7
Perform Processing Actions - Execute a service - Send an alert e-mail - Change the user status - Deliver the document - Respond with a message

processing rules

bizdoc

Step
1

Description TradingNetworksissentadocument(forexampleanXMLdocumentoraflat file)toprocess.ForinformationabouthowtosendadocumenttoTrading Networks,seeChapter 4,SendingDocumentstoTradingNetworksfor Processing. Ifthedocumentisaflatfile,thedocumentisfirstsenttoadocumentgateway service.ThedocumentgatewayserviceprovidesrecognitionhintsthatTrading NetworksusestohelpselectthecorrectTNdocumenttypeinthenextstep.For moreinformation,seeDocumentGatewayServicesonpage 33.

webMethods Trading Networks Concepts Guide Version 7.1

53

5. Trading Networks Document Processing

Step
3

Description TradingNetworksperformsrecognitionprocessing.Inrecognitionprocessing, TradingNetworksrecognizesthetypeofdocumentusingTNdocumenttypes thatyousetup. FormoreinformationaboutTNXMLdocumenttypes,seeTNXML DocumentTypesonpage 31. FormoreinformationaboutTNflatfiledocumenttypes,seeTNFlatFile DocumentTypesonpage 33. IfTradingNetworkscannotdeterminethetypeofdocument,itconsidersthe TNdocumenttypeunknown.Formoreinformation,seeUnknownTN DocumentTypeonpage 35. IfTradingNetworksdeterminesthetypeofdocument,itextractsspecificpieces ofinformationfromthedocumentbasedonthedocumentattributesyou specifyintheTNdocumenttype.Formoreinformationaboutdocument attributes,seeDocumentAttributesonpage 27andHowDocument AttributesRelatetoTNDocumentTypesonpage 28. Formoreinformationaboutthisstep,seeRecognitionProcessingonpage 55.

TheoutputoftheTradingNetworksrecognitionprocessingisaBizDocEnvelope. ABizDocEnvelopecontainstheoriginaldocument,theextractedattribute values,andadditionalinformationthatTradingNetworksrequiresforrouting andprocessingthedocument.Inotherwords,theBizDocEnveloperepresentsa routableTradingNetworkstransaction.TradingNetworksplacesthe BizDocEnvelopeinthepipelineinthebizdocvariable. Note: WhenyouenableaTNdocumenttypeformonitoring,TradingNetworks createsahashmapwithintheBizDocEnvelope,andstoresthemonitoring attributesinit.Theseattributevaluesarethenusedtocreateevents.Formore information,seeMonitoringTradingNetworksTransactionDataonpage 102. Note: YoucandefineaTNdocumenttypetoindicatethatyouwanttodisable processingrulerouting.IftheTNdocumenttypethatmatchedtheincoming documentindicatesthatprocessingruleroutingisdisabled,TradingNetworks performsthepreprocessingactionsdefinedbytheTNdocumenttype.After that,TradingNetworksdoesnotperformaprocessingrulelookup,nordoesit performanyprocessingruleactions.However,ifthedocumentispartofa businessprocess,TradingNetworkswillpassthedocumenttotheProcess Engine.Formoreinformation,seeChapter 7,SendingDocumentstoBusiness ProcessesforProcessing.

webMethods Trading Networks Concepts Guide Version 7.1

54

5. Trading Networks Document Processing

Step
5

Description TradingNetworksperformsprocessingruleselection.Inthisstep,Trading Networksusestheprocessingrulecriteriatolocatetheprocessingruletouse fortheinbounddocument.Formoreinformation,seeProcessingRule Selectiononpage 60. TradingNetworksperformspreprocessingactionsthatyoudefineineitherthe TNdocumenttypeortheprocessingrule.Formoreinformation,seePre processingActionsonpage 61. TradingNetworksperformstheactionsyouspecifyintheprocessingrule.For moreinformation,seeProcessingRuleActionsonpage 63. Note: IfTradingNetworkssuccessfullyextractedtheConversationIDsystem attributefromadocument,TradingNetworkspassesthedocumenttothe ProcessEngineforthedocumenttobeprocessedinabusinessprocess.You definetheactionstakeninthebusinessprocessbycreatingaprocessmodel.For moreinformation,seeChapter 7,SendingDocumentstoBusinessProcesses forProcessing.

Recognition Processing
WhenTradingNetworksreceivesaninbounddocument,thefirststepisrecognition processing;thatis,determiningtheTNdocumenttypetouse. AfterdeterminingtheTNdocumenttype,TradingNetworksusesthematchingTN documenttypetodeterminethedocumentattributevaluestoassociatewiththe documentandtheinitiallistofpreprocessingactionstoperformagainstthedocument. Note: YoucanspecifypreprocessingactionsinbothTNdocumenttypesandthe processingrule.Youcanusethepreprocessingactionsintheprocessingruletooverride theactionsthatarespecifiedintheTNdocumenttype. ThefinalstepofrecognitionprocessingistoformaBizDocEnvelopethatcontainsthe originaldocument,theextractedattributevalues,andadditionalinformationthatTrading Networksrequiresforroutingandprocessingthedocument.TheBizDocEnvelopeis passedtootherprocessinginthebizdocvariableinthepipeline. RecognitionprocessingvariesbasedonwhethertheinbounddocumentisanXML documentoraflatfiledocument.

webMethods Trading Networks Concepts Guide Version 7.1

55

5. Trading Networks Document Processing

Recognition of XML Documents


WhenTradingNetworksreceivesanXMLdocument,itusestheidentification informationintheTNXMLdocumenttypetodeterminethematchingTNXML documenttype.Theidentificationinformationcanbetheoneormoreofthefollowing: Root tag of the XML document.Ifyouusetheroottagforidentification,Trading NetworksonlyusestheTNXMLdocumenttypeiftheroottagoftheinboundXML documentmatchestheroottagthatyouspecifyintheidentificationinformationof theTNXMLdocumenttype. Identifying XQL queries.Ifyouuseidentifyingqueries,TradingNetworksperformsthe XQLqueryagainsttheinbounddocument.TradingNetworksonlyusestheTNXML documenttypeifthenoderepresentedbytheXQLqueryisintheinboundXML document.Additionally,ifyouspecifyavaluefortheidentifyingquery,Trading NetworksalsoensuresthatthevalueofthenoderepresentedbytheXQLquery matchesthevalueyouspecifiedintheidentificationinformation;ifnot,Trading NetworkswillnotusetheTNXMLdocumenttypefortheinboundXMLdocument. Pipeline values that must be present.TradingNetworksinspectsthepipelineforthe variablesthatyouspecifiedintheTNXMLdocumenttype.TradingNetworksonly usestheTNXMLdocumenttypeifthevariablesyouspecifyexist.Additionally,ifyou specifyavalueforthepipelinevariables,TradingNetworksalsoensuresthatthe valueofthepipelinevariablematchesthevalueyouspecifiedintheidentification information;ifnot,TradingNetworkswillnotusetheTNXMLdocumenttypeforthe inboundXMLdocument AfterdeterminingtheTNXMLdocumenttypetouse,TradingNetworksextractsthe valuesofthedocumentattributesassociatedwiththeTNXMLdocumenttypeby executingtheXQLqueriesforthedocumentattributes. For more information abouthowtodefineTNXMLdocumenttype,seeChapter14, DefiningandManagingTNXMLDocumentTypesinthewebMethodsTrading NetworksAdministratorsGuide.

Recognition of Flat Files


Aflatfiledocumentisfirstsenttoadocumentgatewayservice;thenthedocument gatewayservicepassesthedocumenttoTradingNetworks.

Document Gateway Services During Flat File Recognition


Forflatfiles,processingbeginswithadocumentgatewayservicethatyoumustcreate. Yourdocumentgatewayservicemustplacerecognitionhintsinthepipelineinthe TN_parmsvariable,whichmustbeintherootofthepipeline. TherecognitionhintsthedocumentgatewayserviceplacesintheTN_parmsvariablecan be:

webMethods Trading Networks Concepts Guide Version 7.1

56

5. Trading Networks Document Processing

PipelinevariablesthatyouuseintheidentificationinformationofTNflatfile documenttypes Optionally,thenameoftheTNflatfiledocumenttypeyouwantTradingNetworksto usefortheflatfile Additionally,thedocumentgatewayservicecanplaceattributesalongwiththeirvaluesin thepipeline.Becausetheattributesareinthepipeline,TradingNetworkscanincludethe attributesintheBizDocEnvelopeifinstructedtodosobythematchingTNflatfile documenttype. Thevaluesthatyourdocumentgatewayserviceplacesinthepipelinecanbehardcoded, extractedfromthecontentoftheflatfile,orderivedbysomeothermeans. ThefollowingdiagramshowshowaflatfiledocumentflowsthroughTradingNetworks andhowTradingNetworksperformsdocumentrecognitiononthatflatfile.
TN Flat File Document Type Runtime Overview

Trading Networks
3
bizdoc tn:receive

4
Recognize TN Document Type and Extract Attributes

5
Continue with Trading Networks processing

TN document type

document gateway service


Flat File Document

Integration Server

Step
1

Description AusersendsaflatfiledocumenttoaTradingNetworksdocumentgateway service. Note: TradingNetworksconsidersincomingdocumentswiththetext/plain contenttypeasflatfiledocumentsbydefault.Youcanregisterothercontent typesasflatfiledocumentsaswell.Usethetn.ff.contenttypespropertyinthe properties.cnffiletoregisteradditionalflatfilecontenttypes.Formore information,seetheFlatFilePropertiesintheTradingNetworksproperties onlinehelp.

webMethods Trading Networks Concepts Guide Version 7.1

57

5. Trading Networks Document Processing

Step
2

Description Theflatfiledocumentpassesthroughthedocumentgatewayservice,which providesinformationhintsneededbyTradingNetworksforflatfiledocument recognition. Note: BecauseTradingNetworkslooksforthesehintsinTN_parms, applicationsthatwanttopassdataintoTradingNetworksshouldplacethe dataintheTN_parmsvariable,whichislocatedattherootofthepipeline. Thedocumentgatewayserviceperformsthefollowing: Specifiesvaluesforatleastoneofthefollowingsystemattributes: SenderID,ReceiverID,GroupID,ConversationID,DocumentID,and DoctypeIDorDoctypeNameIDintheTN_parmsvariableinthepipeline. Thesecouldbehardcodedinthegatewayservice,derivedfromthe documentcontent,orderivedbysomeothermeans. Optionally,addscustom(userdefined)attributestothepipelineinthe TN_parmsvariable. Invokesthewm.tn:receiveorwm.tn.doc.ff:routeFlatFileservice.

3 4

Thewm.tn.receive servicerecognizestheflatfiledataandcreatesabizdocfromit. Thewm.tn.receive serviceinvokestheTradingNetworksrecognitionprocess, whichdeterminestheTNflatfiledocumenttypetouseforthefile. Note: IfyouspecifythedocumenttypeIDorthedocumenttypename,(i.e.,the gatewayservicesetsthevariableDoctypeIDorthevariableDoctypeName withinTN_parms),TradingNetworkswillnotattempttodeterminewhichTN flatfiledocumenttypetouse.Instead,TradingNetworksskipsthisstepand willusetheTNflatfiledocumenttypespecifiedbyDoctypeIDorDoctypeName. TradingNetworkscompletesthebizdocbyfillinginattributevalues.TheTN documenttypehascertaincustomattributesassociatedwithit.Ifthereisa variableinthepipelineforacustomattribute(setbythegatewayservice), TradingNetworkssetsthevalueofthatattributeinthebizdoc. TheTradingNetworksrecognitionprocessreturnsabizdocandinformation aboutthesenderandreceiver.TradingNetworksaddsthebizdoctothe pipeline.

webMethods Trading Networks Concepts Guide Version 7.1

58

5. Trading Networks Document Processing

Step
5

Description Atthispoint,TradingNetworkshandlestheflatfilebizdocjustlikeabizdoc formedfromanXMLdocument. Ifprocessingruleroutingisenabled,TradingNetworkscontinueswiththe preprocessingactionsandtheactionsspecifiedintheprocessingrules. IftheTNdocumenttypedisabledprocessingrulerouting,Trading NetworksperformsthepreprocessingactionsdefinedbytheTN documenttype.Afterthat,TradingNetworksdoesnotperforma processingrulelookup,nordoesitperformanyprocessingruleactions. However,ifthedocumentispartofabusinessprocess,TradingNetworks willpassthedocumenttotheProcessEngine.Formoreinformation,see Chapter 7,SendingDocumentstoBusinessProcessesforProcessing.

Trading Networks Processing During Flat File Recognition


WhenTradingNetworksreceivesaflatfile,itusestheidentificationinformationintheTN flatfiledocumenttypetodeterminethematchingTNflatfiledocumenttype. IfyourdocumentgatewayserviceplacesinthepipelinethenameoftheTNflatfile documenttypethatyouwanttousefortheflatfile,TradingNetworksdoesnotsearch foramatchingTNflatfiledocumenttype;ratheritusestheTNflatfiledocument typeyouspecify. IfyoudonotplaceinthepipelinethenameoftheTNflatfiledocumenttypetouse, TradingNetworksdeterminestheTNflatfiledocumenttypetouse. TodeterminetheTNflatfiledocumenttypetouse,TradingNetworksinspectsthe pipelineforthevariablesthatyouspecifiedintheidentificationinformationofyour TNflatfiledocumenttypes.TradingNetworksonlyusesaTNflatfiledocumenttype ifthevariablesyouspecifyinaTNflatfiledocumenttypeexistinthepipeline. Additionally,ifyouspecifyavalueforthepipelinevariables,TradingNetworksalso ensuresthatthevalueofthepipelinevariablematchesthevalueyouspecifiedinthe identificationinformation;ifnot,TradingNetworkswillnotusetheTNflatfile documenttypefortheinboundflatfile. AfterdeterminingtheTNflatfiledocumenttypetouse,TradingNetworksobtainsthe valuesofthedocumentattributesassociatedwiththeTNflatfiledocumenttype.Todoso, foreachattributeidentifiedintheTNflatfiledocumenttype,TradingNetworkschecks thepipelinefortheattribute.Ifyourdocumentgatewayserviceplacedavalueforthe attributeinthepipeline,TradingNetworksobtainsthevalueforthatattributeand includesitintheBizDocEnvelopefortheflatfile. For more information abouthowtodefineTNflatfiledocumenttype,seeChapter15, DefiningandManagingTNFlatFileDocumentTypesinthewebMethodsTrading NetworksAdministratorsGuide.

webMethods Trading Networks Concepts Guide Version 7.1

59

5. Trading Networks Document Processing

Processing Rule Selection


Todeterminetheprocessingruletouse,TradingNetworksmatchesinformationfromthe inbounddocumentagainstthecriteriayouspecifyinprocessingrules.Theinformation fromthedocumentthatyoucanuseasprocessingrulecriteriais: Senderidentifiedintheinbounddocument Receiveridentifiedintheinbounddocument TNdocumenttypeTradingNetworksisusingfortheinbounddocument ValueoftheUserStatussystemattributeofthedocument WhetherTradingNetworksencounterederrorsduringrecognitionprocessing(e.g., senderidentifiedinthedocumentdoesnothaveaprofileinyourTradingNetworks systemorTradingNetworkswasunabletoextractanattributethatyoumarkedas required) ValuesofthecustomattributevaluesthatTradingNetworksextractedfromthe document TradingNetworksusesallthecriteriayouspecifyinaprocessingruletodetermine whethertheinbounddocumentmatches.Allprocessingrulecriteriamustmatchfor TradingNetworkstoselecttheprocessingrule.Forexample,youmightsetupthe followingcriteria: Criterion Sender Receiver TN Document Type User Status Recognition Errors Value(s) Anysender IndustrialSteelCompany UnitedSteel cXMLOrderRequest Needsapproval hasnoerrors To match... Thesendercanbeanyvalue ThereceivermustbeIndustrial SteelCompanyorUnitedSteel TheTNdocumenttypemustbe cXMLOrderRequest TheuserstatusmustbeNeeds approval Thedocumentcannothave recognitionerrors

Ifadocumentmatchesmorethanoneprocessingrule,TradingNetworksusesthefirst processingruleitencounters.Asaresult,theorderinwhichyoumaintainyourprocessing rulesisimportantbecauseTradingNetworkschecksforamatchingprocessingruleinthat order.Keepruleswithspecificcriteriabeforeruleswithgeneralcriteria.Youshouldalso setupadefaultprocessingrulethatyouwantTradingNetworkstousewhenadocument doesnotmatchanyoftheotherprocessingrules.Placethedefaultprocessingrulelastin thelist.

webMethods Trading Networks Concepts Guide Version 7.1

60

5. Trading Networks Document Processing

For more information abouthowtodefineprocessingrulecriteriaandhowtomaintainthe orderofyourprocessingrules,seeChapter16,DefiningandManagingProcessing RulesinthewebMethodsTradingNetworksAdministratorsGuide.

Pre-processing Actions
Afterselectingtheprocessingrule,TradingNetworkshasthelistofpreprocessingactions specifiedintheTNdocumenttypeandthelistofpreprocessingactionsspecifiedinthe selectedprocessingrule. Note: Thepreprocessingactionsintheprocessingrulescanoverridethepreprocessing actionsspecifiedintheaTNdocumenttype. Eachpreprocessingactionintheprocessingrule,canindicateoneofthefollowing: UsethesettingintheTNdocumenttype PerformthepreprocessingactionregardlessofthesettingintheTNdocumenttype NotperformtheactionregardlessofthesettingintheTNdocumenttype Thefollowinglistthepreprocessingactions.TradingNetworksperformsthepre processingactionsintheorderspecified. Verify Digital Signature.ForthispreprocessingactionTradingNetworksverifiesthe digitalsignatureoftheinbounddocument.Thispreprocessingactionverifies: Thedigitalsignaturetoassurethatthesignedbodyoftheinbounddocumenthas arrivedunchanged. Thesenderiswhoitclaimstobebymatchingthecertificatefromthedigital signaturetothecertificatethatTradingNetworkshasonfileforthepartner. Validate Structure.ForthispreprocessingactionTradingNetworksvalidatesthe structureofthedocumentagainstanISschema.TradingNetworksassuresthatthe documentmatchesthestructureidentifiedbytheISschema(usingthe pub.schema:validatebuiltinservice). Check for Duplicate Document.Forthispreprocessingaction,TradingNetworks determineswhetherthereisaduplicateofthedocument;thatis,ifithasalready receivedthedocument.YoucanhaveTradingNetworksdeterminewhetherthe

webMethods Trading Networks Concepts Guide Version 7.1

61

5. Trading Networks Document Processing

documenthasaduplicateusingabuiltinduplicationcheckthatTradingNetworks providesorusingacustomduplicatecheckservicethatyoucreate. Built-in services.TradingNetworkschecksthedocumentbeingprocessedagainst documentsithasinitsdatabase.ThebuiltinduplicationchecksthatTrading Networksprovidesare: Document ID only.TradingNetworksassuresthatitdoesnotalreadyhavea documentwithsamedocumentIDinitsdatabase. Document ID and sender.TradingNetworksassuresthatitdoesnotalready haveadocumentwithsamedocumentIDandsenderinitsdatabase. Document ID, sender and receiver.TradingNetworksassuresthatitdoesnot alreadyhaveadocumentwiththesamedocumentID,sender,andreceiverin itsdatabase. Document ID, sender and document type.TradingNetworksassuresthatitdoes notalreadyhaveadocumentwiththesamedocumentID,sender,andTN documenttypeinitsdatabase. Custom services.Ifyouwanttouseanothermethodtodeterminewhethera documentisaduplicate,youcancreateanduseaduplicationcheckservice. TradingNetworkssavestheresultsoftheduplicationchecktothepipeline.Asa result,thisinformationisavailableforuseintheprocessingactionsthatyoudefinein theprocessingrule.Additionally,TradingNetworksusestheresultsofthe duplicationcheckintheSave Document to Databasepreprocessingaction. Save Document to Database.ForthispreprocessingactionTradingNetworkssavesa copyofthedocumentcontent,attributes,and/oractivityloginformationtothe database.YoucaninstructTradingNetworkstousetheresultsoftheduplication checkforthispreprocessingaction;thatis,youcaninstructTradingNetworkstoonly saveinformationtoitsdatabaseiftheinbounddocumentisnotaduplicate. Certaindeliveryoptionsrequiresavingthedocumentcontenttothedatabase,for example,ifyouwanttodeliveradocumentviaaqueue.Ifyoudonotselecttosave thedocumentcontentandTradingNetworksistouseadeliveryoptionthatrequires documentcontenttobesaved,TradingNetworkswillautomaticallysavethe document. RegardlessofwhetherTradingNetworkscanperformaspecifiedpreprocessingactionor iferrorsresultfromapreprocessingaction,TradingNetworkscontinuesperformingthe restofthepreprocessingactions.Italsoperformstheprocessingactionsthataredefined intheprocessingrule.IfTradingNetworksisunabletoperformapreprocessingactionor errorsresult,TradingNetworksrecordstheinformationtoitsactivitylog.

webMethods Trading Networks Concepts Guide Version 7.1

62

5. Trading Networks Document Processing

For more information about: HowtodefinehowtodefinepreprocessingactionsinTNdocumenttypes,see Chapter14,DefiningandManagingTNXMLDocumentTypesandChapter15, DefiningandManagingTNFlatFileDocumentTypesinthewebMethodsTrading NetworksAdministratorsGuide. Howtodefinepreprocessingactionsinprocessingrules,seeChapter16,Defining andManagingProcessingRulesinthewebMethodsTradingNetworks AdministratorsGuide.

Processing Rule Actions


Afterperformingthepreprocessingactions,TradingNetworksperformstheactionsthat youdefinedintheselectedprocessing.Theprocessingactions(alsoreferredtoasprocessing ruleactions)specifyhowTradingNetworksistoprocesstheinbounddocument.Ifyou selectmorethanoneoftheprocessingactions,TradingNetworksperformstheactionsin theorderlistedbelow: Action1:ExecuteaServiceProcessingAction Action2:SendanAlertEmailProcessingAction Action3:ChangeUserStatusProcessingAction Action4:DelivertheDocumenttotheReceiverProcessingAction Action5:RespondwithaMessageProcessingAction IfTradingNetworksencountersanerrorperformingoneoftheactions,itwillcontinueto attempttheotheractions.Forexample,iftheservicespecifiedintheruledoesnotexist, TradingNetworkswillreceiveanerrorattemptingtoinvoketheservice.Inthissituation, TradingNetworkslogstheerrorintheactivitylogandcontinues,attemptingtosendthe alertemailmessageanddeliverthedocumenttothereceiver. For more information abouthowtodefineprocessingactionsinprocessingrules,see Chapter16,DefiningandManagingProcessingRulesinthewebMethodsTrading NetworksAdministratorsGuide.

webMethods Trading Networks Concepts Guide Version 7.1

63

5. Trading Networks Document Processing

Pipeline Information that You Can Use in Processing Actions


Beforedefiningtheprocessingactionsyouwanttouse,itisusefultoknowwhat informationisinthepipelineduringprocessing. Ifyouselectoneofthefollowingactions,youmightwanttousethepipelineinformation: Processing action Execute a service Use for pipeline variables Youcanusedatainthepipelineinyourservice.Forexample, youmightwanttousetheresultsoftheCheck Duplication of Documentpreprocessingactionandperformonetypeof processingifthepreprocessingactionindicatedthedocument wasaduplicateanddifferentprocessingifthedocumentisnot aduplicate. Youcanincludeinformationthatisinthepipelineinthebody oftheemailmessage.Forexample,ifyouwanttosendan emailmessagethatreferstothetypeofdocument,youcan includethenameoftheTNdocumenttype. Ifyouuseacustomdeliveryservicethatyoucreate,your deliveryservicecanuseinformationinthepipeline,for exampletoobtainthedocumentcontentfromthe BizDocEnvelopeinthebizdocvariable. Youcanincludeinformationthatisinthepipelineina messagethatTradingNetworksistoreturntothecaller.

Send an Alert e-mail

Deliver Document by

Respond with message

ThefollowingillustratestheinformationthatTradingNetworksplacesinthepipeline whenadocumentisrecognized.
Information in the Pipeline During Processing

Variable bizdoc

Description ContainstheBizDocEnvelopethatTradingNetworkscreatesduring recognitionprocessing.TheBizDocEnvelopecontainstheoriginaldocument contentandtheextractedattributevalues.Thisvariableadherestothe wm.tn.rec:BizDocEnvelopeISdocumenttype. Containsinformationaboutthepartnerthatisidentifiedasthesenderinthe document.Thisvariableadherestowm.tn.rec:ProfileSummaryISdocumenttype.

sender

webMethods Trading Networks Concepts Guide Version 7.1

64

5. Trading Networks Document Processing

Variable receiver

Description Containsinformationaboutthepartnerthatisidentifiedasthereceiverin thedocument.Thisvariableadherestowm.tn.rec:ProfileSummaryISdocument type.

ToseetheactualstructureofeachoftheseISdocumenttypes,usethewebMethods DevelopertoviewtheISdocumenttypes.AlltheISdocumenttypesarelocatedinthe wm.tn.rec folderthatisintheWmTNpackageandeachisdescribedinthewebMethods TradingNetworksBuiltinServicesReference. Note: Thebizdocvariableisaninstanceofcom.wm.app.tn.doc.BizDocEnvelope.Thesenderand receivervariablesareinstancesofcom.wm.app.tn.profile.ProfileSummary. InadditiontotheinformationthatTradingNetworksnormallyplacesinthepipeline whenexecutingaprocessingrule,iftheprocessingrulespecifiestheExecute a service actionandalsoindicatesthatTradingNetworksistoinvoketheservicesynchronously, thepipelinewillcontainanyinformationplacedinitbytheserviceaswell.Thepipeline willalsocontaininformationfromagatewayservice,ifagatewayservicewasusedfora flatfile.

Execute a Service Processing Action


UsetheExecute a serviceactiontohaveTradingNetworksinvokeaservicethatyouspecify. Theservicecanperformanyactionyouwant.Forexample,youcanexecuteaserviceto sendthedocumenttoabackendsystemforprocessingortoupdatedatainaninternal systembasedonthevaluesofattributesextractedfromthedocument.Youcanhave TradingNetworksinvoketheserviceoneofthefollowingways: Synchronous.TradingNetworksinvokestheservicesynchronouslyasingletime. Beforeperformingtherestoftheprocessingactions,TradingNetworkswaitsforthe servicetocompleteandthenmergestheresultsfromtheserviceintothepipeline. Thisallowsyoutousetheserviceresultsinoutputtemplatesorinotherprocessing actions.Iftherearenosubsequentprocessingactions,TradingNetworkswaitsforthe servicetocompletebeforereturningtothecallerthatsentthedocumentfor processing. Asynchronous.TradingNetworksinvokestheserviceasynchronouslyasingletime. TradingNetworksprocessestheremainingprocessingactionsimmediately.The resultsoftheservicearenotavailableinthepipelinefortheremainingprocessing actions.Iftherearenosubsequentprocessingactions,TradingNetworksimmediately returnstothecallerthatsentthedocumentforprocessing. Service Execution Task.TradingNetworksusesaserviceexecutiontasktoexecutethe serviceasynchronously.Byusingaserviceexecutiontask,TradingNetworksusesits reliableexecutionfeature.ThereliableexecutionfeatureallowsTradingNetworksto automaticallyretryfailedservices.IfTradingNetworksattemptstoexecuteaservice

webMethods Trading Networks Concepts Guide Version 7.1

65

5. Trading Networks Document Processing

andtheservicefails,TradingNetworksattemptstoexecutetheservicesubsequent timesuntiltheservicesucceedsoruntilTradingNetworksreachesthemaximum retrylimit.IfTradingNetworkshasreachedthemaximumretrylimitandtheservice hasnotsuccessfullyexecuted,TradingNetworksmarkstheserviceexecutiontaskas failed. YoudefinethesystemwideparametersthatTradingNetworksusestodetermine howmanytimestoattempttoreexecuteafailedserviceandhowoftentoattemptthe retries(howoftentowaitbetweentheattemptstoretryaserviceafterafailed attempt).

Send an Alert E-mail Processing Action


UsetheAlert e-mailactiontosendanemailmessagetoaspecifiedcontact.Recipientsof theemailmessagecanbe: Oneofthecontactsdefinedinthesendersprofile Oneofthecontactsdefinedinthereceiversprofile ThewebMethodssystemadministrator Anotheremailaddressthatyouspecify WhenyouusetheAlert e-mailaction,youspecifytherecipientthatistoreceivetheemail message,thesubjectlinefortheemailmessage,andthebody(orcontent)oftheemail message.

Change User Status Processing Action


UsetheUser StatusactiontochangethevalueoftheUserStatussystemattributethatis associatedwithadocument.Theuserstatusisastatusthatyoucanassociatewitha document. TheUser Statusactionisusedtoassignastatustoadocumentthatyouwillusewhen performingdocumentqueriesorgeneratingreports.Forexample,youmightrequirethat purchaseordersbeapproved.Inthiscase,youcansendanalertemailmessagetothe personresponsibleforapprovingthepurchaseorderandsettheuserstatustopending approval.Todeterminethepurchaseordersthatarewaitingforapproval,userscan querydocuments,searchingfortheuserstatuspendingapproval.

webMethods Trading Networks Concepts Guide Version 7.1

66

5. Trading Networks Document Processing

Deliver the Document to the Receiver Processing Action


WhenaprocessingruleincludestheDeliver Document Byprocessingaction,Trading Networksattemptstodeliveradocumenttothereceiverthatisidentifiedinthe document.TradingNetworksdeliversthedocumentusingthedeliverymethodyou specifyintheprocessingrule.Youcanspecifyoneoffourwaystodeliveradocument: Immediate delivery Scheduled delivery Queued for polling Preferred protocol TradingNetworksautomaticallyusesreliabledeliveryifyousavethedocumentcontent. ReliabledeliveryisafeatureofTradingNetworkswhereTradingNetworksattemptsto deliveradocumenttoapartnersubsequenttimesbasedonsettingsyoudefine. Formoreinformationaboutthisprocessingaction,seeChapter 6,DeliveringDocuments toPartners.

Respond with a Message Processing Action


UsetheRespond withactiontohaveTradingNetworksreturnaspecifiedmessagetothe callerthatsentthedocumenttobeprocessed.WhenyouusetheRespond withaction,you mustspecifythemessageyouwantTradingNetworkstoreturnandthecontenttypeof themessage.Forexample,youmightusethisactionandreturnanacknowledgementthat indicatesthatyoureceivedthedocument.

Large Document Handling


Asinstalled,TradingNetworksactsonalldocumentsinthesamemannerregardlessof theirsize.Thatis,TradingNetworksreceivesthedocumentandkeepsthedocument contentinmemoryduringprocessing.However,ifyoureceivelargedocuments,Trading Networkscanencounterproblemswhenworkingwiththesedocumentsbecausethey constrainthesystemsmemory.Thesememoryconstraintproblemscanoccur: WhenTradingNetworksattemptstoexecuteanXQLqueryagainstanXML document;forexamplewhenTradingNetworksfirstreceivesanXMLdocumentand usestheidentifyingqueriestomatchanXMLdocumenttoaTNXMLdocumenttype andXQLqueriestoextractdocumentattributesfromanXMLdocument. WhenTradingNetworksprocessesthedocumentusingsignatureverification, documentvalidation,ortheactionsdefinedbyprocessingrules. IfsomeorallofthedocumentsthatyouneedTradingNetworkstoprocessencounter problemsduetomemoryconstraints,youcansetupTradingNetworkstohandlelarge documentsinadifferentmanner.Thatis,youcanhaveTradingNetworkswritelarge

webMethods Trading Networks Concepts Guide Version 7.1

67

5. Trading Networks Document Processing

documentcontenttoharddiskdrivespace(referredtoastspace)andkeepareferenceto thelargedocumentcontentinmemoryratherthaninthedocumentcontentitself.

How Trading Networks Handles Large Documents Differently


WhenTradingNetworksreceivesadocument,itdetermineswhetherthedocumentis largeornot.YoudefinehowTradingNetworksdetermineswhetheradocumentislarge bysettingaconfigurationproperty.Youspecifyanumberofbytesabovewhicha documentshouldbeconsideredlarge. Ifadocumentcontainsagreaternumberofbytesthanthevalueyouconfigure,Trading Networksprocessesthedocumentasalargedocument.Thatis,TradingNetworksdoesnot attempttoreadthedocumentcontentintomemory.Rather,itwritesthedocument contenttodiskandstoresonlyareferencetothedocumentcontentinmemory. WhenTradingNetworksneedstoaccessthedocumentcontentduringprocessing,it checkstodeterminewhetherthedocumentcontentisinmemoryorinharddiskdrive space.Ifthedocumentcontentisondisk(tspace),itaccessesthedocumentcontentfrom disk.TradingNetworkseitherusesaJavaInputStreamtoreadthedocumentcontentorit retrievesacertainnumberofbytesofthedocumentcontent. Thedocumentcontentremainsondiskuntilbothofthefollowingoccur: Theservicethatprocessesthedocument(andallservicesinvokedfromthatservice) complete. Thetimetoliveperiodhasexpired.Yousetthetimetoliveperiodusingthe IntegrationServerwatt.server.tspace.timeToLiveproperty. For more information about: HowtoconfigureTradingNetworkstohandlelargedocuments,seeChapter3, ConfiguringwebMethodsTradingNetworksinthewebMethodsTradingNetworks AdministratorsGuideandtheonlinehelpforTNPropertiespage,whichyouaccess viatheServerAdministrator. AreasofTradingNetworksthatbehavedifferentlywhenyouareworkingwith largedocuments,seeAppendixF,LargeDocumentHandlinginthewebMethods TradingNetworksAdministratorsGuide.

Items You Must Set Up Differently for Large Documents


IfyousetupTradingNetworkstohandlelargedocumentsdifferently,youmustdothe followingdifferently: Ensure the XQL queries you specify for TN document types only access the part of the XML document that Trading Networks reads.WhenTradingNetworksworkswithXML documents,itonlyreadsacertainnumberofbytesofXMLdocumenttouseforXQL

webMethods Trading Networks Concepts Guide Version 7.1

68

5. Trading Networks Document Processing

queriesinTNdocumenttypes.YouconfigurethenumberofbytesthatTrading Networksreads. Ensure IS clients do not use the $xmldata variable to send large XML documents to Trading Networks.Formoreinformationaboutclients,seeClientsthatTradingPartnersUse toSendDocumentsonpage 42. Code 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.Thisaffects: ServicesyoucreatetobeinvokedbytheExecute a Serviceprocessingaction. Immediatedeliveryservicesyouregistertoaddadditionimmediatedelivery methods.Formoreinformation,seeAddingYourOwnImmediateDelivery Methodsonpage 76. Scheduleddeliveryservicesthatyouregistertousewithscheduleddelivery queues.Formoreinformation,seeScheduledDeliveryServicesonpage 80. For more information about: HowtodefineTNXMLdocumenttypes,seeChapter14,DefiningandManaging TNXMLDocumentTypesinthewebMethodsTradingNetworksAdministrators Guide. HowtocreateservicestobeinvokedbytheExecute a Serviceprocessingaction,see Chapter16,DefiningandManagingProcessingRulesinthewebMethodsTrading NetworksAdministratorsGuide. Howtocreatedeliveryservices,seeChapter18,CreatingDeliveryServicesinthe webMethodsTradingNetworksAdministratorsGuide. AreasofTradingNetworksthatbehavedifferentlywhenyouareworkingwith largedocuments,seeAppendixF,LargeDocumentHandlinginthewebMethods TradingNetworksAdministratorsGuide.

webMethods Trading Networks Concepts Guide Version 7.1

69

5. Trading Networks Document Processing

webMethods Trading Networks Concepts Guide Version 7.1

70

Chapter 6. Delivering Documents to Partners

Overview of Delivering Documents . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 72 How Trading Networks Determines Delivery Method Information . . . . . . . . . . . . . . . . . . . . . . . . 73 Immediate Delivery . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 75 Scheduled Delivery . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 77 Queuing Documents for Polling . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 82

webMethods Trading Networks Concepts Guide Version 7.1

71

6. Delivering Documents to Partners

Overview of Delivering Documents


WhenaprocessingruleincludestheDeliver Document Byprocessingaction,Trading Networksdeterminesthedeliverymethodtousetodeliverthedocumenttothereceiving partner;thereceivingpartnerisidentifiedinthedocumentbytheReceiverID. TradingNetworkscandeliverdocumentsusingoneofthefollowingdeliveryoptionsthat youspecifywiththeDeliver Document Byprocessingactioninaprocessingrule: Immediate Delivery.TradingNetworksattemptstodeliveradocumentdirectlytothe receivingpartner.TradingNetworksprovidesmanybuiltinimmediatedelivery methods.Additionally,youcanaddimmediatedeliverymethodsifthebuiltinones donotmeetyourneeds.Formoreinformation,seeImmediateDeliveryonpage 75. Scheduled Delivery.TradingNetworksqueuesdocumentstobedeliveredatscheduled times.YoudefinescheduleddeliveryqueuesinTradingNetworks.Whenyoudefine thequeue,youassociatebothascheduleandascheduleddeliveryservicewiththe queue.Atthetime(s)thescheduleindicates,TradingNetworksinvokesthescheduled deliveryservicetoactonthedocumentsinthequeuetodeliverthem.Trading Networksprovidesonebuiltinscheduleddeliveryservice.Youcanaddadditional scheduleddeliveryservicestomeetyourneeds.Formoreinformation,see ScheduledDeliveryonpage 77. Queued for polling. TradingNetworksplacesthedocumentinaninternallydefined queue.Thereceivingpartnerlaterpollsfordocuments,andTradingNetworksreturns allthedocumentsinthequeueforwhichthatpartneristhereceiver.Formore information,seeQueuingDocumentsforPollingonpage 82. Receivers Preferred Protocol.TradingNetworkslooksupthereceiversprofileanduses thedeliverymethodthatisidentifiedintheprofileasthepreferreddeliverymethod. Thepreferreddeliverymethodcanbeanyoftheimmediatedeliverymethods, scheduleddelivery,orqueuedforpolling. Whenusingimmediatedeliveryorscheduleddelivery,youcantakeadvantageofthe TradingNetworksreliabledeliveryfeature.ReliabledeliveryisafeatureofTrading NetworkswhereTradingNetworksattemptstoredeliveradocumenttoapartneroneor moretimesifpreviousattemptstodeliverthedocumentfails.Formoreinformation,see ReliableDeliverywithImmediateDeliveryonpage 76andReliableDeliveryand ScheduledDeliveryonpage 81. For more information aboutqueuesinTradingNetworks,seeChapter17,Definingand ManagingQueuesinTradingNetworksandAppendixK,ManagingQueuesUsing theConsoleinthewebMethodsTradingNetworksAdministratorsGuide.

webMethods Trading Networks Concepts Guide Version 7.1

72

6. Delivering Documents to Partners

How Trading Networks Determines Delivery Method Information


Dependingonthedeliverymethod,TradingNetworksmightrequireadditional informationfromthereceivingpartnersprofilebeforeitcandeliverthedocument.The followinglistssomereasonsTradingNetworksneedstoaccessthereceiversprofilefor additionalinformation: When the Deliver Document By processing rule action indicates to use the Receivers Preferred Protocol,TradingNetworksmustdeterminethedeliverymethodthatisdesignatedas thepreferredprotocol. To deliver the document using an immediate delivery method,TradingNetworksrequires informationthatisspecifictothereceivingpartnerbeforeitcandeliverthedocument. Forexample,ifthedeliverymethodisPrimary HTTP,TradingNetworksneedsto determinethehostnameandportnumbertousetosendthedocumentviaHTTP. To deliver the document using the scheduled delivery method, Receivers queue,Trading Networksneedstodeterminethequeuethatisassociatedwiththereceivingpartner. ForTradingNetworkstoobtaininformationfromthereceiversprofile,itmustfirst determinethepartnerthatisthereceiver.Afteritdeterminesthereceivingpartner, TradingNetworkslooksuptheinformationitrequiresfromthereceiversprofile.For example,theillustrationbelowshowshowTradingNetworksobtainsinformationfrom thereceiversprofile,soitcandeliveradocumentusingHTTP.Seethetablebelowthe diagramformoreinformation.
How the Deliver Document By Action Works
ReceiverID information: <DUNS>123456789</DUNS> Primary HTTP-host: TN01 port: 5555 location: /invoke/wm.tn/receive

DUNS: 123456789 Profile Profile Profile Profile Profile

4
http://TN01:5555/invoke/wm.tn/receive

3
Processing Rule Deliver Document By:

Primary HTTP

Trading Networks

webMethods Trading Networks Concepts Guide Version 7.1

73

6. Delivering Documents to Partners

Step
1

Description TradingNetworksreceivesadocumentandextractstheReceiverIDattribute fromthedocument.Intheaboveillustration,thevalueoftheReceiverID attributeis123456789andisfoundwithinthe<DUNS>tag. TradingNetworksmatchesthevalueoftheReceiverIDattributetotheexternal IDinformationstoredforpartnersinthepartnerprofiles.Theprofilethat containsthematchingexternalIDinformationistheprofileforthereceiving partner.Inthisillustration,thematchingprofileisforapartnerthathasthe DUNSnumber123456789. TradingNetworkslooksupthedeliverymethodspecifiedontheDeliver Document Byactionoftheprocessingruleinthereceivingpartnersprofileto obtaindeliveryinformationthatisspecifictothatpartner. Inthisillustration,thePrimary HTTPinformationdefinedinthematching partnerprofileindicatesthatTradingNetworksistodeliverthedocumentto thehostname TN01atport5555specifyingthelocation/invoke/wm.tn/receive.

TradingNetworksusesthedeliveryinformationspecifiedintheprofileto deliverthedocument.Inthisillustration,TradingNetworksdeliversthe documenttothereceiverattheURL http://TN01:5555/invoke/wm.tn/receive.

For more information abouthowtodefineexternalIDsanddeliverymethodinformationin profiles,seeChapter9,DefiningandManagingYourProfile(YourEnterprise), AppendixH,ManagingYourProfileUsingtheConsole,Chapter10,Definingand ManagingPartnerProfiles,andAppendixI,ManagingPartnerProfilesUsingthe ConsoleinthewebMethodsTradingNetworksAdministratorsGuide.

When Delivery Information Cannot Be Determined


Attimes,TradingNetworksmightbeunabletodeterminetherequireddelivery information.Forexample: Thematchingprofiledoesnotcontaininformationforthedeliverymethodthatis specifiedintheprocessingrule.Forexample,theprocessingrulespecifiesthe immediatedeliverySecondary HTTPS,butthematchingprofiledoesnotcontain informationforthisdeliverymethod.Or,theprocessingrulespecifiestodelivertothe receiversqueue,butnoqueueisdefinedinthepartnersprofile. Thedeliverymethodinformationfromthematchingprofileisnotvalid. ThereceiversprofilestatusisInactive,meaningTradingNetworkscannotdeliver documentstothispartneruntilthepartnerisactive.

webMethods Trading Networks Concepts Guide Version 7.1

74

6. Delivering Documents to Partners

Inthesesituations,TradingNetworkslogstheerrortoitsactivitylogandqueuesthe documentforpolling.Formoreinformation,seeQueuingDocumentsforPollingon page 82.

Immediate Delivery
Foranimmediatedelivery,TradingNetworksattemptstoimmediatelydelivera documentdirectlytothereceivingpartner.
Delivering Documents with an Immediate Delivery Method

Processing Rule Deliver Document By:

Primary HTTP

Deliver to receiving partner using immediate delivery method

Trading Networks TradingNetworksprovidesmanybuiltinimmediatedeliverymethods.Additionally,you canaddimmediatedeliverymethodsifthebuiltinonesdonotmeetyourneeds.

Immediate Delivery Methods Provided with Trading Networks


Thefollowingimmediatedeliverymethodsareprovidedoutofthebox: Primary E-mail Primary FTP Primary FTPS Primary HTTP Primary HTTPS Secondary E-mail Secondary FTP Secondary FTPS Secondary HTTP Secondary HTTPS

EachimmediatedeliverymethodthatTradingNetworksprovidesisassociatedwitha builtinimmediatedeliveryservicethatTradingNetworksprovides.Animmediatedelivery serviceisaservicethatactsonasingledocumenttodeliverthedocumenttoasingle partner.TradingNetworksinvokesthedeliveryservicetodeliveradocumenttoatrading partner.

webMethods Trading Networks Concepts Guide Version 7.1

75

6. Delivering Documents to Partners

Adding Your Own Immediate Delivery Methods


Ifyouneedtodeliverdocumentsviaamethodthatisnotprovidedbyoneofthebuiltin immediatedeliverymethods,youcanaddorregisteranewimmediatedeliveryservice. Forexample,youmightwanttocreateanimmediatedeliveryservicethatdeliversa messageintoamessagequeuingsystem. Whenyouregisteranewimmediatedeliveryservice,you,ineffect,addanewimmediate deliverymethod.Youassignthedeliveryservicethatyoucreateadisplaynamethat TradingNetworksusestoidentifythedeliveryservice.Forexample,youmightaddthe servicenamedTNDeliveryMethods:MsgQueueandassignitthedisplaynameofMessage Queue.Afteryouregisteranewimmediatedeliveryservice,theTradingNetworkslists thedisplayname(e.g.,MessageQueue)withtheotherimmediatedeliverymethods availablewiththeDeliver Document ByprocessingactionontheProcessing Rulesscreen.Asa result,thenewimmediatedeliverymethodisavailableforyoutoselectwhenyoudefine processingrules. For more information abouthowtocreateimmediatedeliveryservicesandregisterthem, seeChapter18,CreatingDeliveryServicesinthewebMethodsTradingNetworks AdministratorsGuide.

Reliable Delivery with Immediate Delivery


ReliabledeliveryisafeatureofTradingNetworkswhereTradingNetworksattemptsto redeliveradocumenttoapartneroneormoretimesifpreviousattemptstodeliverthe documentfails. Tokeeptrackoftheattemptstoredeliveradocument,TradingNetworksestablishesa deliverytask.Whencreatingthedeliverytask,TradingNetworksusesthereliabledelivery settingsfromthereceivingpartnersprofiletoestablishtheparametersforthedelivery task.Theseparametersinclude: Howmanytimestotrytoredeliveradocumenttothepartner Howlongtowaitbetweenattemptstoredeliveradocument TradingNetworkstaskmanagerchecksfordeliverytasksthatareeligibletoberetriedand retriesthem,updatingthetaskstatustoindicatewhetherthedeliverywassuccessfulor notandthenumberoftimeslefttoretry.Ifthetaskmanagerretriesthedeliverythe maximumnumberoftimesandthedeliveryisstillunsuccessful,itupdatesthedelivery taskstatustoFAILEDandnolongerattemptstoretrydelivery.Ifyoudeterminethe reasonforfailureandcorrecttheproblem,youcanrestartthedeliverytaskandthetask managerwillstartattemptingtodeliverthedocumentagain.

webMethods Trading Networks Concepts Guide Version 7.1

76

6. Delivering Documents to Partners

DeliverytasksremainintheTradingNetworkssystemuntilyoudeletethemoruntilthe documentwithwhichthedeliverytaskisassociatedisarchivedordeleted.Youcanview informationaboutdeliverytasksin: MywebMethodsontheMonitoring>Integration>B2B>Taskspage TradingNetworksConsoleontheTasksscreen For more information abouthowtoviewandrestarttasks,seeChapter4,ManagingTasks fromMywebMethodsandChapter9,ManagingDeliveryTasksfromtheConsolein thewebMethodsTradingNetworksUsersGuide.

Using Reliable Delivery for an Immediate Delivery


Whenusinganimmediatedeliverymethodtodeliveradocumenttoatradingpartner, TradingNetworksautomaticallyusesreliabledeliveryifthepreprocessingactionSave Document to DatabaseindicatesthatTradingNetworksistosavethedocumentcontent.You donotexplicitlyspecifythatyouwantTradingNetworkstousereliabledeliveryfora document. Note: IfTradingNetworksisnotinstructedtosavethedocumentcontent,itonly attemptstodeliverthedocumentasingletime.Iftheattempttodeliverthedocument fails,thedocumentisnotdelivered.ThereisnowaytohaveTradingNetworks attempttodeliverthedocumentagainbecauseitdoesnothaveacopyofthe documentcontent.

Scheduled Delivery
Scheduleddeliveryisawaytobatchmultipledocumentsthatareactedon(delivered)at scheduledtimes.WhentheDeliver Document Byprocessingactionindicatesascheduled deliverymethod,TradingNetworkscreatesadeliverytaskforthedocumentandplacesthe deliverytaskinthequeueidentifiedwiththeDeliver Document Byprocessingaction.The queueisassociatedwithascheduleandascheduleddeliveryservice.Atthetimesthe scheduleindicates,TradingNetworksinvokesthescheduleddeliveryservicetoactonthe documentsinthequeuetodeliverthem. Usescheduleddeliverywhenitismoreefficienttodeliverabatchofdocumentsatatime ratherthandeliverthemimmediatelyastheyarrive.Forexample,ifyouwanttodeliver documentsviaFTP,youmightwanttousescheduleddelivery,soyouonlyopena connectiononetime,deliverallthedocumentsinthequeue,thenclosetheconnection, ratherthandeliveringthedocumentswithanimmediatedeliverymethodthatrequires theconnectiontobeopenedandclosedforeachdocumentbeingdelivered. Thefollowingdiagramillustratesscheduleddelivery.Seethetablebelowthediagramfor additionalinformation.

webMethods Trading Networks Concepts Guide Version 7.1

77

6. Delivering Documents to Partners

Delivering Documents with a Scheduled Delivery Method

1
processing rules

bizdoc

2
delivery task

Create a delivery task for the document. (The document is contained in the bizdoc.).

scheduled delivery queue delivery task delivery task delivery task Scheduled delivery service retrieves the document content from the delivery task and delivers it to the receiving partner

scheduled delivery service

Trading Networks

Step
1

Description TradingNetworksreceivesadocument,andtheprocessingruleforthe documentincludestheDeliver Document Byprocessingactionandindicates scheduleddelivery. TradingNetworksestablishesadeliverytaskforthedocument.Thedelivery taskincludestheBizDocEnvelope,whichincludesthecontentofthedocument. TradingNetworksplacesthedeliverytaskinthescheduleddeliveryqueuethat isidentifiedwiththeDeliver Document Byprocessingaction. Whenthescheduleassociatedwiththescheduleddeliveryqueueindicates, TradingNetworksinvokesthescheduleddeliveryservicethatisassociated withthescheduleddeliveryqueue.Thescheduleddeliveryserviceactsoneach deliverytaskinthequeue. Thescheduleddeliveryserviceattemptstodeliverthedocumenttothe receivingpartnerandindicateswhetherthedeliverywassuccessfulornot.The statusofthedeliverytaskisupdatedaccordingly.Formoreinformation,see ReliableDeliveryandScheduledDeliveryonpage 81.

webMethods Trading Networks Concepts Guide Version 7.1

78

6. Delivering Documents to Partners

Scheduled Delivery Queues


Ascheduleddeliveryqueueisaqueuethatyoudefineandthatyouusetobatchdocuments thatyouwanttodeliveratscheduledtimes.Whenyoudefineaqueue,youspecify: ThescheduleddeliveryservicethatTradingNetworksistoinvoketodeliverthe documents AdeliveryschedulethatindicateswhenTradingNetworksistoinvokethescheduled deliveryservicetodeliverthedocuments Note: Ascheduleddeliveryqueueisnotaqueueinthetraditionalsense.Itisasetofrows intheTradingNetworksdatabase.Eachqueueddeliverytaskthatisassociatedwitha documentisarowinthesametableoftheTradingNetworksdatabase. Therearetwotypesofscheduleddeliveryqueues:publicqueuesandprivatequeues. Public queueisaqueuethatyoudefinetoschedulethedeliveryofdocumentsthatare aimedatmultipledifferentreceivingpartners.Whenyoudefineapublicqueue,the nameofthepublicqueueisaddedtothelistofqueuesyoucanselectwhenspecifying ascheduleddeliverymethodwiththeDeliver Document Byprocessingaction. Private queueisaqueuethatyoudefinetoschedulethedeliveryofdocumentsthatare aimedatonespecifictradingpartner.Youdefineaprivatequeueintheprofileofthe partnertoreceivethedocuments.Tousethisqueue,youselectReceivers Queueforthe scheduleddeliverymethodofthe Deliver Document Byprocessingaction.Whenthe Deliver Document ByprocessingactionindicatesReceivers Queue,TradingNetworks looksupthereceiversprofileandplacesthedeliverytaskforthedocumenttobe scheduledinthequeueidentifiedinthereceiversprofile. Note: Whendefiningaqueueinapartnersprofile,ratherthancreatingaprivate queue,youcanalternativelyspecifyapublicqueue.Inthissituation,whenTrading NetworksencountersReceivers QueuefortheDeliver Document Byprocessingaction,it looksupthereceiversprofiletodeterminewhetherthereceiversqueueisactuallya publicqueue,andplacesthedeliverytaskinthepublicqueue. For more information about: Howtodefineprivateandpublicqueues,seeChapter17,DefiningandManaging QueuesinTradingNetworksandAppendixK,ManagingQueuesUsingthe ConsoleinthewebMethodsTradingNetworksAdministratorsGuide. Selectingaqueueforscheduleddeliveryinaprocessingrule,seeChapter16, DefiningandManagingProcessingRulesinthewebMethodsTradingNetworks AdministratorsGuide.

webMethods Trading Networks Concepts Guide Version 7.1

79

6. Delivering Documents to Partners

Scheduled Delivery Services


Ascheduleddeliveryserviceisaservicethatactsonmultipledocumentstodeliverthose documentstooneormorepartners.Youassociateascheduleddeliveryservicewitha scheduleddeliveryqueue.Youcanusethesamescheduleddeliveryserviceformultiple queues.TradingNetworksinvokesthescheduleddeliveryserviceatthetimesdictatedby thedeliveryschedulethatisalsoassociatedwiththequeue. Whenthescheduleddeliveryserviceisinvoked,itactsonallofthedeliverytasksinthe queuethathavetheQUEUEDstatus.TheseQUEUEDdeliverytasksincludeallofthe deliverytasksalreadyinthequeuewhentheserviceisinvokedandanynewtasksadded tothequeuebeforethedeliveryserviceterminates.Eachdeliverytaskisassociatedwitha documentthatneedstobedelivered. Whenthescheduleddeliveryserviceisinvoked,itbeginsreadingdeliverytasksfromthe queue.Whenthescheduleddeliveryservicereadsadeliverytaskfromthequeue,thetask isnotactuallyremovedfromthequeue.Instead,itstaskstatusischangedtoidentifythe stageofdelivery. Afterascheduleddeliveryserviceattemptstodeliveradocument,itreportswhetherthe deliverywassuccessfulornot.TheTradingNetworkstaskmanagerusesthisoutcome (successorfail)toupdatethestatusofthedeliverytaskaccordingly.

Scheduled Delivery Services Provided with Trading Networks


Asinglescheduleddeliveryservice,thewm.tn.transport:batchFtpservice,whichusesFTPto deliverdocumentstoasingledestinationisprovided.Thisserviceopensaconnectionone time,deliversallthedocuments,andthenclosestheconnection.Youcanusethis scheduleddeliveryserviceforthequeuesyoudefine. For more information aboutthewm.tn.transport:batchFtpservice,seethewebMethodsTrading NetworksBuiltinServicesReference.

Adding Your Own Scheduled Delivery Services


Ifyouwanttodeliverbatchesofdocumentsusingmethodsthataredifferentfromthat providedbythebuiltinwm.tn.transport:batchFtpservice,youcancreateyourownscheduled deliveryservicesandregisterthemwithTradingNetworks. Whenyouregisteryourownscheduleddeliveryservice,youassignthedeliveryservicea displayname.TradingNetworksusesthedisplaynametoidentifytheavailable scheduleddeliveryservicesinMywebMethodsandtheTradingNetworksConsole.Asa result,whenyoucreateapublicorprivatequeue,youcanassociatethescheduled deliveryservicesthatyoudefinewithaqueue. For more information abouthowtocreateandregisterascheduleddeliveryservice,see Chapter18,CreatingDeliveryServicesinthewebMethodsTradingNetworks AdministratorsGuide.

webMethods Trading Networks Concepts Guide Version 7.1

80

6. Delivering Documents to Partners

Reliable Delivery and Scheduled Delivery


TradingNetworksautomaticallyusesreliabledeliveryforascheduleddeliverymethod. WhenTradingNetworksestablishesthedeliverytaskthatisplacesinthescheduled deliveryqueue,itusesthereliabledeliverysettingsfromthereceivingpartnersprofileto establishtheparametersforthedeliverytask.Specifically,itusesasettingfromthe receivingpartnersprofiletodefinehowmanytimesitshouldattempttoredelivera documentthatisscheduledfordelivery. Note: Forscheduleddelivery,TradingNetworksdoesnotusethereliabledelivery parameterthatindicateshowlongtowaitbetweenretryattempts.Thisisnotnecessary becauseTradingNetworksretriesthedeliverybasedonthedeliveryschedulethatis associatedwiththescheduleddeliveryqueue. Afterascheduleddeliveryserviceattemptstodeliveradocument,itmustreportwhether thedeliverywassuccessfulornot.TheTradingNetworkstaskmanagerusesthisoutcome (successorfail)toupdatethestatusofthedeliverytaskaccordingly.Ifadocumentcannot bedelivered,forexamplebecausethereceivingpartnersserverisnotavailable,thetask managerleavesthedeliverytaskwiththeQUEUEDstatus,andasaresult,atthenext scheduledtime,thedeliverytaskwillbeavailableagainforthescheduleddeliveryservice toattempttodeliverthedocumentagain. TheTradingNetworkstaskmanagerkeepstrackofthenumberoftimesthedeliveryhas beenattempted.Ifthemaximumretrylimitisreachedandthescheduleddeliveryservice stillreportsthatitwasunabletodeliverthedocument,thetaskmanagermarksthe deliverytaskasFAILED.Asaresult,atthenextscheduledtime,thescheduleddelivery servicewillnotbegiventhatdeliverytasktoworkwith. Aswithdeliverytasksforimmediatedelivery,thedeliverytasksremainintheTrading Networkssystemuntilyoudeletethemoruntilthedocumentthatthedeliverytaskis associatedisarchivedordeleted.Youcanviewinformationaboutdeliverytasksin: MywebMethodsontheMonitoring>Integration>B2B>Tasks TradingNetworksConsoleontheTasksscreen For more information abouthowtoviewandrestarttasks,seeChapter4,ManagingTasks fromMywebMethodsandChapter9,ManagingDeliveryTasksfromtheConsolein thewebMethodsTradingNetworksUsersGuide.

webMethods Trading Networks Concepts Guide Version 7.1

81

6. Delivering Documents to Partners

Queuing Documents for Polling


PollingisawaythattradingpartnerscanobtaindocumentswithouthavingTrading Networksdeliverdocumentsdirectlytothepartner,forexample,becauseoffirewall constraints. WhentheDeliver Document ByprocessingactionindicatesQueue for polling,Trading Networkssavesthedocumenttothedatabaseandsetsthedocumentsprocessingstatusto POLLABLE.ForTradingNetworkstoqueuedocuments,itmustsavethedocumenttothe database.Asaresult,TradingNetworksalwayssavesthedocumenttothedatabase regardlessofwhetherinstructedtodosobytheSave Document to Databasepreprocessing action.TradingNetworksthenwaitsforthereceivingpartnertopollforthedocuments. Topollfordocuments,thereceivingpartnerdeterminesthepollingmethod(e.g.,HTTP) tousetoaccessyoursystemtoretrieveitsdocuments.Todoso,thereceivingpartner looksupyourenterprisesprofileonitssystem.Thedeliverymethodinformationinyour profileonthereceivingpartnerssystemshouldidentifythepollingmethodtouseand howoftentopollfordocumentsonyoursystem. Usingthepollingmethod,thereceivingpartnerasksforeachdocumentinturn.In response,yoursystemdeliversthedocumenttothereceivingpartner.Thereceiving partnerreturnsastatusforthedocumentwhetherthedocumentwasacceptedor acceptedwitherrors.YourTradingNetworkssystemupdatestheprocessingstatusofthe documentonyoursystemaccordingly,eithersettingittoACCEPTEDor ACCEPTED W/ ERRORS.
Polling for Documents
1. Request list of queued documents

Trading Networks

2. Request a document 3. Indicate the document from Step 2 was received

Receiving partner

The receiving partner repeats Steps 2-3 for each document in the list.

Note: WhenthedeliverymethodisQueue for polling,TradingNetworksdoesnotusereliable deliverybecauseTradingNetworksdoesnotdeliverthedocument.Itsendsthedocument inresponsetoarequestfromthepartnerthatistoreceivethedocument.

webMethods Trading Networks Concepts Guide Version 7.1

82

6. Delivering Documents to Partners

When Trading Networks Uses Queue for Polling


TradingNetworksusestheQueue for pollingdeliverymethodwhentheDeliver Document By processingactionindicatesoneofthefollowing: Queue for pollingselection Receivers Preferred Protocolselectionandthepreferredprotocolinthereceiversprofile isQueue for polling WhenTradingNetworksisunabletoobtaindeliveryinformationforadelivery methodfromthereceivingpartnersprofile.Forexample,theDeliver Document By processingactionindicatestheimmediatedeliverymethodSecondary HTTPS,butthe profiledoesnotcontaindeliveryinformationfortheSecondary HTTPSdelivery method.Or,anotherexampleiswhenthescheduleddeliverymethodisReceivers Queue,butnoqueueisdefinedinthereceivingpartnersprofile.

webMethods Trading Networks Concepts Guide Version 7.1

83

6. Delivering Documents to Partners

webMethods Trading Networks Concepts Guide Version 7.1

84

Chapter 7. Sending Documents to Business Processes for Processing

Overview of Sending Documents to Business Processes . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 86 How You Define the Business Process . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 86 Conversation IDs for Trading Networks Documents . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 87 How Documents Are Passed to a Business Process . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 88

webMethods Trading Networks Concepts Guide Version 7.1

85

7. Sending Documents to Business Processes for Processing

Overview of Sending Documents to Business Processes


Inadditiontousingprocessingrules,orasanalternative,youcandefineabusinessprocess (alsocalledaconversation)thatdescribesmultiplestepsrequiredtoprocessdocuments. Useabusinessprocesswhenyouwanttoprocessdocumentsusingamultistepbusiness processthatinvolvesinteractionamongsystems,people,andtradingpartners.Abusiness processcanbefullyautomated(involveonlyinteractionamongcomputersystems)or includevaryingdegreesofhumaninteraction(forexample,reviewandapprovalsteps).

How You Define the Business Process


YoudefinetheactionsthattakeplaceinabusinessprocessbyusingwebMethods Designertodesignaprocessmodel.Aprocessmodelisadiagramthatshowsthestepsin thebusinessprocess. TohandledocumentssentbyTradingNetworks,theprocessmodeldescribeshowto processaconversationofrelateddocumentsthatallcontainthesameconversationID. Theprocessmodelcanincludestepstowaitforactionsrequiredbyahuman.Anexample ofabusinessprocessmightbethefulfillmentofapurchaseorderthatincludesapurchase orderdocument,humaninteractiontodeterminewhethertoapprovethepurchaseorder, andeitheranorderacknowledgment(ACK)documentoranordernegative acknowledgement(NACK)document. Yousetpropertiesforeachstepintheprocessmodeltofurtherdefinetheactionstotake forastep.Forexample,youcansetastepspropertiestoidentifyaservicetoinvoke. webMethodsDesignerisadesigntimetoolonly.Beforetheprocessmodelcanbe executed,youmustcreateruntimeelementsforaprocessmodel.Thisiscalledbuilding anduploadingtheprocessmodel.Whenyoubuildanduploadtheprocessmodel,Designer generatestriggers,flowservices,etc.basedonthestepsinyourprocessmodelandsaves theseruntimeelementsintheIntegrationServerandinMywebMethodsServer. AtruntimetheProcessEngine,whichisafacilityoftheIntegrationServer,managesthe executionofbusinessprocesses.TheProcessEngineexecutesthebusinessprocessby usingtheappropriateruntimeelementsthatweregeneratedfromaprocessmodel. Typically,abusinessprocessstartsbasedonthearrivalofadocument.Itisthe responsibilityoftheProcessEnginetodeterminetheactionstotakeforaspecific document.TheProcessEnginedeterminestheprocessmodeltouseforthedocumentand definesanewinstanceoftheprocesstogoverntheactionstotakeforthebusinessprocess. Whenasubsequentdocumentforthebusinessprocessarrives,itistheProcessEngine thatdeterminesthecorrectrunninginstanceofaprocessandrejoinsthebusinessprocess bypassingitthedocumentthatjustarrived. ThewaytheProcessEnginedeterminesthedocumentsthatbelongtoasingleinstanceof abusinessprocessisthroughtheconversationID.Alldocumentsinthesameinstanceofa businessprocesssharethesameconversationID.SowhentheProcessEnginereceivesa

webMethods Trading Networks Concepts Guide Version 7.1

86

7. Sending Documents to Business Processes for Processing

document,itdetermineswhetherithasarunningbusinessprocessthatusesthe conversationID.Ifitdoes,theProcessEnginepassesthedocumenttotherunning businessprocesstorejointherunningbusinessprocess.Ifthereisnorunningbusiness processesthatusesthatconversationID,theProcessEnginesearchesforaprocessmodel thathasthefirststepthatwaitsforthedocument,andiffound,startsanewinstanceof theprocessmodel. AstheProcessEnginemanagestheexecutionofabusinessprocess,itlogsitsprogress andstatustotheProcessAuditLogdatabase.Youcanviewtheprogressandstatusfrom MywebMethodsusingwebMethodsMonitor. For more information about: Howtocreateprocessmodels,seethewebMethodsDesigneronlinehelp. Howtomonitorrunningbusinessprocesses,seethewebMethodsMonitorUsers Guide.

Conversation IDs for Trading Networks Documents


TheconversationIDthatbusinessprocessesuseistheTradingNetworksConversationID systemattribute.YourTNdocumenttypemustextractthissystemattributeifyouwantto processdocumentsusingabusinessprocess. TradingNetworksdetermineswhethertopassadocumenttotheProcessEnginebasedon whetherithasextractedavaluefortheConversationID systemattribute.IfTrading NetworkshasavaluefortheConversationID systemattribute,itpassesthedocumentto theProcessEngine,whichinturnprocessesthedocumentbasedonthestepsinabusiness process.Formoreinformation,seeHowDocumentsArePassedtoaBusinessProcess below. For more information about: Documentattributes,seetheChapter13,DefiningandManagingDocument AttributesinthewebMethodsTradingNetworksAdministratorsGuide. HowtoinstructTradingNetworkstoextractattributesandassociatethemwith documents,seeChapter14,DefiningandManagingTNXMLDocumentTypes andChapter15,DefiningandManagingTNFlatFileDocumentTypesinthe webMethodsTradingNetworksAdministratorsGuide.

webMethods Trading Networks Concepts Guide Version 7.1

87

7. Sending Documents to Business Processes for Processing

How Documents Are Passed to a Business Process


TradingNetworksdoesitsownprocessing(documentrecognitionandperformingthe preprocessingactionsandactionsdefinedbyaprocessingrule).Then,ifTrading NetworkswasinstructedtoextracttheConversationIDsystemattributeandithasa value,TradingNetworkspassesthedocumenttotheProcessEngine.Foradocumentto beusedinabusinessprocess,thedocumentmustbesenttotheProcessEngine. Note: IfTradingNetworksistopassthedocumentontotheProcessEngine,Trading Networksalwayssavestheattributesandactivityloginformationforthedocument regardlessofthesettingoftheSave Document to Databasepreprocessingaction. ThefollowingdiagramillustratesTradingNetworkspassingadocumenttotheProcess Engine.Formoreinformation,seethetableafterthediagram.
Processing documents using a business process
1
Recognize TN Document Type and Extract Attributes

2
TN document type bizdoc

3
Select the Processing Rule to Use

4
Perform Pre-processing Actions - Verify - Validate - Check for duplicate - Save

5
Perform Processing Actions - Execute a service - Send an alert e-mail - Change the user status - Deliver the document - Respond with a message

processing rules

Process Engine

bizdoc

webMethods Trading Networks Concepts Guide Version 7.1

88

7. Sending Documents to Business Processes for Processing

Step
1

Description WhenTradingNetworksreceivesadocumentanddeterminestheTN documenttypetouseforthedocument.TheTNdocumenttypeshouldinstruct TradingNetworkstoextracttheConversationIDsystemattribute. TradingNetworkscreatestheBizDocEnvelopeforthedocument.The BizDocEnvelopecontainstheoriginaldocument,theextractedattributevalues, andadditionalinformationthatTradingNetworksrequiresforroutingand processingthedocument. Note: YoucandefineaTNdocumenttypetoindicatethatyouwanttodisable processingrulerouting.IftheTNdocumenttypethatmatchedtheincoming documentindicatesthatprocessingruleroutingisdisabled,TradingNetworks performsthepreprocessingactionsdefinedbytheTNdocumenttype.After that,TradingNetworksdoesnotperformaprocessingrulelookup,nordoesit performanyprocessingruleactions.BecausetheConversationIDwas extracted,TradingNetworksimmediatelypassesthedocumenttotheProcess Engine,whichisdescribedinstep 6 .

TradingNetworksperformsprocessingruleselection.Inthisstep,Trading Networksusestheprocessingrulecriteriatolocatetheprocessingruletouse fortheinbounddocument.Formoreinformation,seeProcessingRule Selectiononpage 60. TradingNetworksperformspreprocessingactionsthatyoudefineineitherthe TNdocumenttypeortheprocessingrule.Formoreinformation,seePre processingActionsonpage 61. IfTradingNetworksistosendadocumenttotheProcessEngine,italways savestheattributesandactivityloginformationtoitsdatabase.

5 6

TradingNetworksperformstheactionsyouspecifyintheprocessingrule,if any.Formoreinformation,seeProcessingRuleActionsonpage 63. BecausetheConversationIDsystemattributecontainsavalue,Trading NetworkspassesthedocumenttotheProcessEngine.TheProcessEngine either: Starts a new business process basedonaprocessmodelthatyouhave designediftheConversationIDdoesnotmatchthatofanyrunning businessprocess. or Rejoins a running business processifitdeterminesthattheConversationID matchesthatofacurrentlyrunningbusinessprocess.

webMethods Trading Networks Concepts Guide Version 7.1

89

7. Sending Documents to Business Processes for Processing

webMethods Trading Networks Concepts Guide Version 7.1

90

Chapter 8. Tracking and Viewing Run-Time Information in Trading Networks

Run-time Information that You Can Track . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 92 Viewing Documents . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 93 Viewing Tasks . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 94 Viewing the Activity Log . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 96 Viewing the Server Log . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 96 Using Trading Networks Web Manager . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 97

webMethods Trading Networks Concepts Guide Version 7.1

91

8. Tracking and Viewing Run-Time Information in Trading Networks

Run-time Information that You Can Track


TradingNetworksgivesyouvisibilityintoyournetworktotrackruntimeinformation aboutthedocumentsthatyourTradingNetworkssystemhassent/received,deliveryand serviceexecutiontasksthathavebeenrun/started,andactivitylogentriesrelatingtothe server.YoucanuseMywebMethodsandtheTradingNetworksConsoletoquery runtimeinformationthatTradingNetworkshassavedtoitsdatabase;.Notethat runtimemonitoringisdeprecatedintheConsole. Thefollowingtableliststheruntimeinformationyoucanview,alongwiththeMy webMethodspagesandTradingNetworksConsolescreenstousetoviewthe information: Trading Networks Console Screen Transaction Analysis

My webMethods page Monitoring > Integration > B2B > Transactions

To view: Informationaboutthedocumentsthat TradingNetworkshassavedtoitsdatabase: Attributesthathavebeenextractedfrom documents Contentofdocumentsthathavepassed throughyoursystem StatusofdocumentsthatTrading Networksisintheprocessofdelivering Inadditiontoviewingthisinformation, TradingNetworksalsoprovidesfeaturesyou canusetoresubmitandreprocess documents. Formoreinformation,seeViewing Documentsonpage 93.

Monitoring > Integration > B2B > Tasks

Task

Theprogressandstatusofeachdeliverytask andserviceexecutiontask.Inadditionto viewingthisinformation,TradingNetworks alsoprovidesfeaturesyoucanusestop, restart,anddeletetasks.Formore information,seeViewingTasksonpage 94. Auditinformationoftheactivitythathas occurredinyourTradingNetworkssystem. Formoreinformation,seeViewingthe ActivityLogonpage 96.

Monitoring > Integration > B2B > Activity Log

Activity Log

Ifyouplantousethesamequerymultipletimes,youcansavethequerysettings.When youwanttousethesamequeryagain,yousimplyselectthatsavedquery.

webMethods Trading Networks Concepts Guide Version 7.1

92

8. Tracking and Viewing Run-Time Information in Trading Networks

Note: MywebMethodsandTradingNetworksdonotsharequeries.Queriesyousavein oneoftheuserinterfacescannotbeusedintheotheruserinterface. For more information about: HowtosavesearchesinMywebMethods,seetheGettingStartedwithMy webMethods. HowtoperformqueriesinTradingNetworksConsole,seeChapter12,Queriesin TradingNetworksConsoleinthewebMethodsTradingNetworksUsersGuide.

Viewing Documents
YoucanviewinformationaboutthedocumentsthatTradingNetworkshassavedtoits database.Youcan: Manageandtrackdocumentsthathaveflowedthroughyourtradingnetwork: Viewdocumentattributesanddocumentcontent. Viewrelateddocuments,whichareotherdocumentsthataresomehowrelatedtoa document.TradingNetworksautomaticallyrelatesdocumentsthatarepartofa businessprocess(orconversation).Formoreinformationaboutprocesses,see Chapter 7,SendingDocumentstoBusinessProcessesforProcessing. Additionallyyoucanexplicitlyrelatedocumentstooneanotherusingthe wm.tn.doc:relateDocumentsbuiltinservice. Manageandtrackthedeliveryofdocuments: Viewtheprocessingstatusofdocumentstodeterminewhethertheyhavebeen delivered,arestillintheprocessofbeingdelivered,orifthedeliveryfailed. Viewpollabledocumentsthatarequeuedforatradingpartner. Viewdocumentsthatarescheduledfordelivery. Addorupdatecommentsthatareassociatedwithadocument.Thisfeatureisonly availableviaMywebMethods. Viewtasks(deliverytasksandserviceexecutiontasks)thatareassociatedwiththe document. ViewactivitylogentriesthatareassociatedwiththeprocessingthatTrading Networkshasperformedagainstadocument.

webMethods Trading Networks Concepts Guide Version 7.1

93

8. Tracking and Viewing Run-Time Information in Trading Networks

For more information abouthowtosearchfordocumentsanddisplayinformationabout them,seeChapter3,ManagingandTrackingDocumentsfromMywebMethodsand Chapter8,ManagingandTrackingDocumentsfromtheConsoleinthewebMethods TradingNetworksUsersGuide.

Resubmitting and Reprocessing Documents


YoucanhaveTradingNetworksprocessadocumentagain,ifnecessary.Forexample,you mightwanttoprocessadocumentagainifthedocumentdidnotmatchanyofyourTN documenttypesorifthedocumenttriggeredthewrongprocessingrule.Inthistypeof situation,youcouldaddanappropriateTNdocumenttypeorcorrectyourprocessing rules,thenprocessthedocumentagain.ForTradingNetworkstobeabletoprocessa documentagain,thecontentofadocumentmustbesavedinthedatabase. Therearetwowaysyoucanprocessadocumentagain:resubmitorreprocess. Resubmit.TradingNetworkssendsthedocumentbacktorecognitionprocessingasa newdocument.Asaresult,TradingNetworksdeterminestheTNdocumenttypefor thedocument,extractsthedocumentattributes,selectsaprocessingrule,and processesthedocument.FormoreinformationabouthowTradingNetworks performsthesetasks,seeChapter 5,TradingNetworksDocumentProcessing. Reprocess.TradingNetworkssendsthedocumentbacktoprocessingruleselection. Asaresult,TradingNetworksusestheTNdocumenttypeitalreadyhassavedforthe documentaswellasthedocumentattributesitalreadyhassavedforthedocument.It simplyselectsanewprocessingruleandprocessesthedocumentagain.Formore informationabouttheseactions,seeProcessingRuleSelectiononpage 60,Pre processingActionsonpage 61,andProcessingRuleActionsonpage 63. For more information abouthowtoreprocessandresubmitdocuments,seeChapter3, ManagingandTrackingDocumentsfromMywebMethodsandChapter8, ManagingandTrackingDocumentsfromtheConsoleinthewebMethodsTrading NetworksUsersGuide.

Viewing Tasks
Youcanviewinformationspecificallyabouttasks.Additionally,whileviewing documents,youcanviewtasksthatareassociatedwithaspecificdocument. Note: IfyouareusinganOEMversionoftheproduct,theTasksscreenisnotavailable throughtheTradingNetworksConsole.Toviewtasks,useMywebMethods.

webMethods Trading Networks Concepts Guide Version 7.1

94

8. Tracking and Viewing Run-Time Information in Trading Networks

TradingNetworksusestwotypesoftasks:deliverytasksandserviceexecutiontasks. Delivery tasks.TradingNetworkscreatesdeliverytaskstokeeptrackofitsattemptsto deliverdocumentswhenitisusingreliabledelivery.Formoreinformationabout deliverytasksandreliabledelivery,seeReliableDeliverywithImmediateDelivery onpage 76andReliableDeliveryandScheduledDeliveryonpage 81. Service execution tasks.TradingNetworkscreatesaserviceexecutiontaskwhenyou usethe Execute a Serviceprocessingactionandselectservice execution tasktoindicate howTradingNetworksistoexecutetheservice.Formoreinformation,seeExecutea ServiceProcessingActiononpage 65. Youcanviewdetailsforatask,whichincludesthenumberoftimesthatTradingNetworks hasattemptedtoretrythetask;thatis,foradeliverytaskthenumberoftimesTrading Networkshasattemptedtoretrydeliveringadocumentandforaserviceexecutiontask thenumberoftimesTradingNetworkshasattemptedtoretrytheservice. For more information abouthowtosearchforandviewtaskinformation,seeChapter4, ManagingTasksfromMywebMethodsandChapter9,ManagingDeliveryTasks fromtheConsoleandChapter10,ManagingServiceExecutionTasksfromthe ConsoleinthewebMethodsTradingNetworksUsersGuide.

Stopping, Restarting, Reassigning, and Deleting Tasks


Youcanmanagetasksby:stopping,restarting,and/ordeletingthem. Stopping a task.Ifyouwanttostopanimmediatedeliveryofadocumentorstopthe executionofaservice,youcanstoptheassociateddeliverytaskorserviceexecution task.Forexample,youmightwanttostopadeliverytaskifthereceiverofthe documentcannotreceivethedocumentatthepresenttime.Youmightwanttostopa serviceexecutiontaskifyouneedtoaltertheservicethatistobeinvoked. Note: Youcannotstopanindividualdeliverytaskforascheduleddelivery.Tostop deliverytasksforscheduleddelivery,youcandisableorsuspendthequeueinwhich thedeliverytaskresides. Restarting a task.Ifyoupreviouslystoppedatask,youcanrestartit.Additionally,ifa taskfailed(e.g.,TradingNetworkswasunabletodeliveradocumentandthe maximumretrylimitwasreached),youcanrestartthetask.Whenyourestartatask, TradingNetworksresetstheretrycounttozero.Asaresult,afterrestartingthetask, TradingNetworkswillattempttoretrythetaskuptothemaximumnumberof allowedretries. Reassigning a task. Ifyouhaveaclusteredenvironment(thatis,multipleIntegration Serversthatshareasingledatabase),youcanreassignatasktoanotherserverinthe cluster.

webMethods Trading Networks Concepts Guide Version 7.1

95

8. Tracking and Viewing Run-Time Information in Trading Networks

Deleting a task.Youcanmanuallydeletetaskswhenyounolongerneedtheminthe system. Note: TradingNetworksautomaticallydeletestaskswhenthedocumentwithwhich thetaskisassociatedisarchivedordeleted. For more information abouthowtostop,restart,anddeletetasks,seeChapter4, ManagingTasksfromMywebMethods;Chapter9,ManagingDeliveryTasksfrom theConsole;andChapter10,ManagingServiceExecutionTasksfromtheConsolein thewebMethodsTradingNetworksUsersGuide.

Viewing the Activity Log


TheactivitylogisalogthatTradingNetworksmaintainstorecordtheactivitythatoccurs: WhenyouperformadministrativeactionsforyourTradingNetworkssystem Whilemanagingyourpartners Whiledocumentsarebeingreceived,processed,anddelivered Note: TradingNetworksonlyrecordsactivitylogentrieswhiledocumentsarebeing received,processed,anddeliveredifinstructedtodosobytheSave Document to Databasepreprocessingaction.Formoreinformationaboutthispreprocessing action,seePreprocessingActionsonpage 61. Youcanviewallactivitylogentriesorsearchforspecificentries. For more information abouthowtoviewtheactivitylog,seeChapter5,Managingthe ActivityLogfromMywebMethodsandChapter11,ManagingtheActivityLogfrom theConsoleinthewebMethodsTradingNetworksUsersGuide.

Viewing the Server Log


TheserverlogisalogthatIntegrationServermaintainstorecordinformationabout operationsanderrorsthatoccuronIntegrationServer,suchasthestartingofIntegration ServersubsystemsandtheloadingofpackagesbelongingtotheIntegrationServer, includingTradingNetworks.TradingNetworkswriteslogentriesdirectlytotheserver log.YoucontrolserverloggingusingtheServerAdministrator;youcanactivateor deactivateloggingandspecifythelogginglevel(theamountofdetail)youwanttowrite tothelog. For more information aboutworkingwithloggingdata,seethewebMethodsLoggingGuide.

webMethods Trading Networks Concepts Guide Version 7.1

96

8. Tracking and Viewing Run-Time Information in Trading Networks

Using Trading Networks Web Manager


TradingNetworksWebManagerisanotherTradingNetworksspecificuserinterfacethat youuseviaaWebbrowser.TradingNetworksWebManagerisdeprecated. WebManagerprovidessomeofthefunctionalitythatisavailablethroughMy webMethodsandtheTradingNetworksConsole.Forexample,youcanuseWebManager toviewprofiles,searchfordocuments,andcheckthestatusofdocuments. For more information aboutWebManager,seethe6.5versionofthewebMethodsTrading NetworksWebManagerAdministratorsGuide,whichisavailableonwebMethods Advantage.

webMethods Trading Networks Concepts Guide Version 7.1

97

8. Tracking and Viewing Run-Time Information in Trading Networks

webMethods Trading Networks Concepts Guide Version 7.1

98

Chapter 9. Business Analysis and Monitoring of Trading Networks Transaction Data

Overview of the Analysis of Trading Networks Transaction Data . . . . . . . . . . . . . . . . . . . . . . . 100 Architecture and components . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 100 Design Time Actions . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 102 Monitoring Trading Networks Transaction Data . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 102

webMethods Trading Networks Concepts Guide Version 7.1

99

9. Business Analysis and Monitoring of Trading Networks Transaction Data

Overview of the Analysis of Trading Networks Transaction Data


BusinessActivityMonitoring(BAM)allowsyoutoanalyzerealtimeinformationabout theperformanceofyourbusiness,includingthevolumeofbusinessactivityandits responsiveness,seriouserrorsthatmighthaveoccurred,andotherkeyperformance indicators(KPIs).Usingthisactionabledata,youcaneliminateproblemsandtake advantageofbusinessopportunities. Forsimilarpurposes,youcanmonitorTradingNetworksB2B(BusinesstoBusiness) transactions.Youcanthenview,monitorandanalyzebasedonthemonitoringdata.For example,youcanviewthepurchaseorderorinvoicetrendofaparticularcustomerfroma particularregionandthenanalyzeifthatcustomerprovesbeneficialfortheenterpriseor not. FormoreinformationonBAM,seethewebMethodsOptimizeforProcessAdministrators Guide. TradingNetworksusesthemonitoringcapabilitiesofOptimizetoanalyzeandmonitorits transactiondata.YouindicatewhatdatayouwanttomonitorbyconfiguringtheTN documenttypesandselectingtherequireddocumentattributes.Theinformationthatthe systemusesforanalysisandmonitoringisthevaluesoftheseattributes. Afteranalysis,youviewthedataasgraphs,reports,andsoon,usingMywebMethods.

Architecture and components


WhenyouwanttoenableBAMforTradingNetworksdata,youmusthavethefollowing additionalcomponentsinyournetwork: webMethodsBroker webMethodsOptimizeforB2B ThefollowingdiagramshowsthecomponentsthatarerequiredforBAMonTrading Networks:

webMethods Trading Networks Concepts Guide Version 7.1

100

9. Business Analysis and Monitoring of Trading Networks Transaction Data

Trading Networks Integration Server

Broker

Optimize for B2B

Document

Optimizes database

My webMethods Server

Trading Networks:Extractsthedocumentattributesfromeverydocumentitreceives. Theseextracteddocumentattributesincludetheonesrequiredformonitoringandfor furtherprocessing.Afterthedocumentprocessing,TradingNetworkssendsthe monitorableattributevaluesaseventstoOptimizeforB2Bforanalysis.Aneventisthe datathatTradingNetworkssendstoOptimizeformonitoring. Broker:ActsasanintermediarywhilepassingthedatafromTradingNetworksto Optimize.BrokerusesaJMS(JavaMessagingService)Queuetopassthedatato Optimize. Optimize:TradingNetworksusesOptimizeforitsmonitoringcapabilitiesandtodefine andmanagetheKPIsrequiredforanalysisandmonitoring.OptimizeforB2B subscribestotheeventsfromBrokerandanalyzesthemusingoneofitsAnalytic Engines.ThisanalyzeddataissavedtoOptimizeforB2Bsdatabase. My webMethods Server:IstheruntimecontainerforfunctionsthatwebMethods componentsmakeavailable.TradingNetworksadministratorsuseMywebMethods toconfigureTradingNetworkstoenableBAM.MywebMethodsalsopresentsthe analyzeddataasgraphs,reports,andsoonbyretrievingitfromOptimizeforB2Bs database. For more information about: webMethodsBroker,seethewebMethodsBrokerAdministratorsGuide. webMethodsOptimizeforB2B,seethewebMethodsOptimizeforProcess AdministratorsGuideandthewebMethodsOptimizeforProcessUsersGuide. MywebMethodsServer,seetheGettingStartedwithMywebMethods.

webMethods Trading Networks Concepts Guide Version 7.1

101

9. Business Analysis and Monitoring of Trading Networks Transaction Data

Design Time Actions


TomonitortheTradingNetworkstransactiondata,youmustdothefollowingactionsat designtime. 1 Initialize Integration Server and Trading Networks for BAM. InitializeIntegrationServerbysettingtheserverconfigurationproperty watt.server.optimize.monitoring=trueintheIntegrationServersconfig.cnf file.SettingthispropertycreatesaBrokerandaJMS(JavaMessagingSystem) QueuefactoryrequiredtopasstheeventstoOptimize. InitializeTradingNetworksforBAMbysettingthewattproperty tn.bam.monitoring.enable=trueintheTradingNetworkspropertiesfile. SettingthispropertyallowsyoutomonitortheTradingNetworkstransaction dataandthusconfiguretheTNdocumenttypesformonitoring. 2 Configure the TN document type by selecting the document attributes you want to monitor.The valuesofonlythosedocumentattributesthatyouselectareextractedformonitoring. Youcanmonitorbothsystemattributesandcustomattributes. Create the event map for the TN document type you are configuring.Thatis,youmust associateeachdocumentattributeyouindicateasafact,dimension,ortransaction. Theeventmapdefineswhateachdocumentattributeinaneventmeans. Deploy the event map to Optimize for B2B.ThissavestheTNdocumenttypeconfiguration anddeploystheeventmapdetailstoOptimizeforB2B. DefinetheKPIhierarchiesandtheindividualKPIs.KPIisamonitoritemthat analyzesthefactsusingthedimensions.KPIhierarchyillustratestherelationships betweenKPIs.YoumapeachKPIwithaKPIhierarchy.BasedontheseKPIs,Optimize analyzesthedataandsavesittoitsdatabase. For more information about: InitializingTradingNetworksandIntegrationServer,seethewebMethods TradingNetworksAdministratorsGuide. ConfiguringtheTNdocumenttypes,seethewebMethodsTradingNetworks AdministratorsGuide.

4 5

Monitoring Trading Networks Transaction Data


AfterallthenecessaryconfigurationsasmentionedinsectionDesignTimeActionson page 102arecomplete,atruntime,theprocessingofthedatarequiredformonitoringis doneasfollows: 1 Aftertherecognitionofadocument,TradingNetworkscreatesaBizDocEnvelopethat containstheoriginaldocument,theextractedattributevalues,andadditional informationrequiredforroutingandprocessingthedocument.TradingNetworks

webMethods Trading Networks Concepts Guide Version 7.1

102

9. Business Analysis and Monitoring of Trading Networks Transaction Data

thenchecksifthatTNdocumenttypeandTradingNetworksitselfareenabledfor BAM.Ifyes,TradingNetworkscollectsalltheattributevaluesformonitoringand storesinahashmapwithintheBizDocEnvelopeuntilthedocumentprocessingis complete. Afterthedocumentprocessingiscomplete,TradingNetworksonceagain synchronizestheactualattributevaluestotheonesexistinginthehashmap.Thisis necessarybecausetheattributevaluesstoredintheBizDocEnvelopemightget updatedeitherduringanyoftheserviceexecutiontasks(bothSynchronous/ Asynchronous)orduetoanyotherservicesinTradingNetworks. TradingNetworksthenmapstheattributestotheeventmapsasconfiguredduring thedesigntime,andcreatesevents. FormoreinformationabouttheBizDocEnvelopeandthedocumentprocessingin TradingNetworks,seeProcessingofDocumentsinTradingNetworkson page 53. 2 TheeventsarethenpassedtowebMethodsBroker.AJavaMessagingSystem(JMS) providedbyBrokercollectsalltheseeventsusingaDCA. Ifanerroroccurswhilepassingtheevents,anexceptionisthrown.Thisexceptionwill beloggedasawarningintheActivityLogassociatedwiththatdocument. Note: WhenTradingNetworkspassestheeventtoBrokerduringthedocument processingdependsontheprocessingruleactionsdefinedfortheTNdocumenttype. FormoreinformationaboutwhenTradingNetworkspassestheeventstoBroker,see StagesatWhichtheEventsarePassedtotheBrokeronpage 103. 3 webMethodsOptimizeforB2BsubscribestotheeventsfromtheBrokersJMSqueue andfeedsthemtoitsAnalyticEngine.TheAnalyticEngineanalyzestheseeventsand savesthedatatoOptimizeforB2Bsdatabase. Duringmonitoring,MywebMethodsServerretrievestherequireddatafrom OptimizeforB2Bsdatabaseatruntimeandallowstheusertoviewthedataina presentableformatsuchasgraphs,reports,andsoon. Note: YoucanalsouseInformaticasDashboardtoanalyze,monitorandviewthedata. ThisispossiblebecausetheschemadefinedforanalysisiscommonforbothMy webMethodsServerandDashboard.

Stages at Which the Events are Passed to the Broker


Aftercompletingtheprocessingofadocument,TradingNetworkscollectsthe monitorableattributevaluesandcreateseventstobepassedtotheBroker.Ifthe documentprocessingfailsandthedocumentisreprocessed,duplicateeventsmightget

webMethods Trading Networks Concepts Guide Version 7.1

103

9. Business Analysis and Monitoring of Trading Networks Transaction Data

passedtoBroker.Toavoidthis,basedonthedeliverymethodyouchooseforaTN documenttype,theeventsarepassedtotheBrokerasfollows: Ifyouchoosetoturnofftheroutingforthedocument,theeventispassed immediatelyafterthedocumentprocesscompletion. IfyouusetheExecute a Serviceprocessingaction,whentheeventispassedisbasedon howtheserviceisinvoked: Synchronous:Theeventispassedonlyaftertheexecutionoftheserviceis completeandtheprocessingofthedocumentissuccessful. Asynchronous or Reliable Execution:Theeventispassedaftertheexecutionofthe serviceiscompleteirrespectiveofthedocumentprocessingstatus. IfyouusetheDeliver Document Byprocessingaction,theeventispassedonlywhenthe documentprocessingstatusiscomplete. Note: WhenaTNdocumenttypehasbothExecute a ServiceandDeliver Document Bytasks associatedwithit,thenwhileconfiguringtheTNdocumenttypeformonitoringyoumust selecteitherofthetasksintheSend BAM Event Afteroption.Dependingonthis,Trading NetworkspassestheeventstotheBrokerafterthechosentaskiscompleteandthus avoidsduplicateeventsbeingpassed.FormoreinformationaboutconfiguringtheTN documenttypeformonitoring,seetheChapter5,SettingUpAnalysisofTrading NetworksTransactionDatainthewebMethodsTradingNetworksAdministratorsGuide.

webMethods Trading Networks Concepts Guide Version 7.1

104

Appendix A. Glossary for Trading Networks

activity log AlogthatTradingNetworksmaintainstorecordtheactivitythatoccurswithinthe TradingNetworkssystem.TradingNetworksrecordsentries,forexample,whenyou managetradingpartnerinformation,whenitprocessesdocuments,andwhenyouperform administrativetasks. activity class AclassificationthatidentifiestheTradingNetworksfunctionassociatedwithanentryin theactivitylog.Forexample,TradingNetworkssetstheactivityclasstoRecognitionwhen addingentriesrelatedtousingtheTNdocumenttypestorecognizeadocument. ambiguous document AdocumentthatmatchesmultipleTNdocumenttypes.(Comparewithunknowndocument.) attribute Seedocumentattribute. BAM (Business Activity Monitoring) Allowsyoutoanalyzerealtimeinformationabouttheperformanceofyourbusiness, includingthevolumeofbusinessactivityanditsresponsiveness,seriouserrorsthatmight haveoccurred,andotherKPIs.Usingthisactionabledata,youcaneliminateproblems andtakeadvantageofbusinessopportunities. bizdoc ThenameofthevariableinthepipelinethatcontainstheBizDocEnvelope. BizDocEnvelope ABizDocEnveloperepresentsaroutableTradingNetworkstransaction.Itcontainsthe contentofadocumentthatTradingNetworksisprocessingandincludesadditional informationthatTradingNetworksrequiresforroutingandprocessingthedocument.Itis inthepipelineinthebizdocvariableandconformstotheISdocumenttype wm.tn.rec:BizDocEnvelope. Broker SeewebMethodsBroker. business process Amultistepinteractionamongparticipatingsystems,people,andtradingpartners.A businessprocesscanbefullyautomated(involveonlyinteractionamongcomputer systems)orincludevaryingdegreesofhumaninteraction(forexample,reviewand approvalsteps).Itcanbebrieforlongrunning.Somebusinessprocessestranspireover daysorweeks.(Comparewithconversation.) conversation Aspecificcaseofabusinessprocessthatinvolvesaseriesofrelateddocumentsbeing exchangedbytwoormoretradingpartners.Alldocumentsfromaspecifictradingpartner

webMethods Trading Networks Concepts Guide Version 7.1

105

A. Glossary for Trading Networks

containthesameConversationID.Youmodelaconversationbycreatingaprocessmodel usingwebMethodsDesigner. Conversation ID Asystemattributethatidentifiesavaluewithinadocumentthatiscommontoalldocuments thatarepartofthesamebusinessprocess.(Aorsameconversationofdocuments.) custom attribute Adocumentattributethatyoudefinetoidentifyinformationwithinadocumentthatisof interesttoyou.(Contrastwithsystemattribute.) deliver SendinganoutbounddocumentfromTradingNetworkstothetradingpartnerthatisthe receiverofthedocument. delivery method Amethodfordeliveringadocumenttoatradingpartner,e.g.,HTTP,HTTPS,FTP,FTPS, email(SMTP).TradingNetworkssupports,immediatedeliverymethods,scheduleddelivery methods,andqueueforpolling. delivery task AtaskthatTradingNetworksestablishestokeeptrackoftheattemptstoredelivera documentwhenitisusingreliabledelivery. dimension Whiledefininganeventmap,youdefineadocumentattributeasadimensionthathasa valuethatisnotmeasurable,forexample,region,department,andsoon.Youuse dimensionstoanalyzeafact. document Abusinessdocument(e.g.,purchaseorder,acknowledgement,confirmation)sentto TradingNetworks.Thedocumentcanbeinanyformat(XML,EDI,etc.)TradingNetworks providesoutoftheboxsupportforXMLandflatfiledocuments.ThewebMethodsEDI ModuleisnecessaryforEDIdocuments. document attribute ATradingNetworksobjectthatdefinesapieceofinformationwithinadocumentthatisof interest.Forexample,documentattributesinapurchaseordermightbethepurchaseorder number,theaccountnumberofthepurchaseorderandthetotalpurchaseamount. Documentattributescanbeeitherasystemattributes(thosethatareprovidedwithTrading Networks)orcustomattributes(thosethatyoudefineforyourenterprise). document gateway service Aservicethatyoucreateandthatistheentrypointforprocessingaflatfile.Theserviceyou createplacesinformationinthepipelineforTradingNetworkstousetodeterminetheTN flatfiledocumenttypetouseforaflatfile.Theservicecanalsoplacedocumentattributes alongwiththeirvaluesinthepipeline.Afterthedocumentgatewayserviceexecutes,itpasses controltoTradingNetworks.

webMethods Trading Networks Concepts Guide Version 7.1

106

A. Glossary for Trading Networks

Document ID Asystemattributeforanidentifierinadocumentthatistypicallyauniquevaluethat distinguishesadocumentfromotherversionsofthesamedocument. document type SeeTNdocumenttypeorISdocumenttype. document validation Theprocessofverifyingthestructureandcontentofanindividualdocumentbyvalidating itagainstaschema. Enterprise partner Thepartnerthathoststhetradingnetwork.OnyourTradingNetworkssystem,thiswould typicallybeyourcorporation.(Alsoknownasthehub,localpartner,orsponsor.)(Contrast withspoke.) event ThedatathattradingnetworkpassestotheBrokeratruntime,afterthedocument processingiscomplete.Itcontainsthedocumentattributesvaluesformonitoring,theevent mapandthetimestampdataofthedocument. event map Theknowledgeofwhateachdocumentattributeinaneventmeans.Aneventmap associatesbusinessdata,suchasdimensions,withaparticulartransaction. extended fields Fieldswithinaprofilethatyoudefineforyourenterprise.Createextendedfieldstomaintain informationabouttradingpartnersthatisnotcoveredbythestandardfields. external ID type Atypeofidentifierinadocumentusedtoidentifythesenderorreceiverofthedocument. Forexample,thesendermightberepresentedbytheDUNSnumberforthesenders corporation. external ID ThevalueoftheexternalIDtypewithinadocument.Forexample,iftheexternalIDtypeisa DUNSnumber,theexternalIDistheactualvalueoftheDUNSnumber. fact Ameasurableattributevaluethatyoucanusetoanalyzethetradingnetworktransactions1 data,forexample,quantity,cost,andsoon. flat file Anyfileordocumentthathasaformatthatisnondescribing,thatis,adocumentthatdoes notcontainmetadata.Aflatfiledocumentpresentshierarchicaldatainarecordbased storageformat,whichunlikeXML,doesnotembedstructuralinformationwithinthe data. flat file dictionary Acollectionofrecorddefinitions,fielddefinitions,andcompositedefinitionsthatcanbe usedinmultipleflatfileschemas.

webMethods Trading Networks Concepts Guide Version 7.1

107

A. Glossary for Trading Networks

flat file schema Ablueprintthatcontainstheconstraintstowhichaflatfiledocumentshouldconformto beconsideredvalid. gateway service Seedocumentgatewayservice. Group ID Asystemattributeforanidentifierinadocumentthatiscommontoalldocumentsinagroup ofdocuments. hub Thepartnerthathoststhetradingnetwork.(AlsoknownastheEnterprisepartner,local partnerorsponsor.)(Contrastwithspoke.) IData object Thecollectionofname/valuepairsonwhichaserviceoperates.AnIDataobjectcancontain anynumberofelementsofanyvalidJavaobjects,includingadditionalIDataobjects.(Also calledanISdocument.) identifying query AnXQLquerythatisspecifiedinaTNXMLdocumenttypeandthatTradingNetworks usestomatchaninboundXMLdocumenttoaTNXMLdocumenttype.TradingNetworks performstheidentifyingquerytoensurethenodethattheXQLqueryrepresentsisinan XMLdocument.Ifthenodeispresentandallotheridentifyinginformationmatchesthe inboundXMLdocument,TradingNetworksdeterminesthattheinboundXMLdocument matchestheTNXMLdocumenttypethatcontainstheidentifyingquery.Alternatively,ifthe nodeisnotpresent,TradingNetworksdeterminesthattheinboundXMLdocumentdoes notmatchtheTNXMLdocumenttype. immediate delivery method AdeliverymethodwhereTradingNetworksattemptstoimmediatelydeliveradocument directlytothereceivingpartner.TradingNetworksprovidesmanybuiltindelivery methods,suchas,PrimaryHTTP,SecondaryHTTP,PrimaryEmail,etc. IS document type AnelementintheIntegrationServersnamespacethatcontainsasetoffieldsusedto definethestructureandtypeofdatainanISdocument(IDataobject). IS schema TheblueprintormodeldocumentthatyouvalidateanXMLdocumentagainst.The schemadefineswhatcanandcannotbecontainedintheXMLdocumentsitisvalidated against. Java Messaging System (JMS) AmessagingsystemthatactsasmediumtopassalltheeventsstoredinBrokerbythe tradingnetworktoOptimize. local partner Thepartnerthathoststhetradingnetwork.(Alsoknownasthe Enterprisepartner,hubor sponsor.)(Contrastwithspoke.)

webMethods Trading Networks Concepts Guide Version 7.1

108

A. Glossary for Trading Networks

KPI Keyperformanceindicator.Ameasurementofabusinessactivitythatisimportanttothe successofanorganization.KPIsmonitormetricsquantitativebusinessandsystemdata suchasrevenue,volumeoforders,queuelength,andcycletime.KPIshelpanswer questionssuchasHowmanyordersover$10,000arestuckinthisprocess?AKPI definesawaytoaggregateeventdata. KPI Hierarchy Anorderedrankingofdimensions.Ahierarchyprovidesadditionalwaystoslicedatainto smallercomponents.Forexample,asaleshierarchymightconsistoftwodimensions: regionandsalesperson. My Enterprise partner Oldtermforthepartnerthathoststhetradingnetwork;nowknownasthe Enterprise partner.(SeeEnterprisepartner.) My webMethods Awebbased,administrationandmonitoringuserinterfaceformanagingyour webMethodscomponents.YoucanuseittomonitorTradingNetworkstransactions, serviceexecutiontasks,deliverytasks,andtheactivitylog.Additionally,youcanuse webMethodstomanageprofiles,profilegroups,andTradingNetworksqueues. My webMethods Server TheruntimecontainerforfunctionsthatwebMethodscomponentsmakeavailablevia MywebMethods.Forexample,TradingNetworksmakesthefunctionstomonitorand managetransactionsavailable. Optimize SeewebMethodsOptimizeforB2B. partner Seetradingpartner. pipeline Thegeneraltermusedtorefertothedatastructureinwhichinputandoutputvaluesare maintained.Thepipelinestartswiththeinputtoaserviceandcollectsinputsandoutputs fromsubsequentservices.Whenaserviceexecutes,ithasaccesstoalldatainthepipeline. private queue Ascheduleddeliveryqueuethatyoudefinetoschedulethedeliveryofdocumentsthatare aimedatonespecifictradingpartner.Youdefineaprivatequeueintheprofileofthepartner toreceivethedocuments.(Contrastwithpublicqueue.) process Seebusinessprocess. Process Engine AfacilityoftheIntegrationServerthatmanagestheexecutionofbusinessprocesses(or conversations).Youmodelabusinessprocess(orconversation)byusingwebMethods Designertocreateaprocessmodel.

webMethods Trading Networks Concepts Guide Version 7.1

109

A. Glossary for Trading Networks

process model Diagramsthatillustrateanddefinetheactionstoperformforabusinessprocessor conversation.YoucreateprocessmodelsusingwebMethodsDesigner. process run time OldtermfortheProcessEngine. processing rule ATradingNetworksobjectthatcontainsasetofactionsthatdeterminehowTrading Networksistoprocessaninbounddocumentandcriteriathatindicateswhentoselecta processingruleforanincomingdocument. profile ATradingNetworksobjectthatcontainsasummaryofinformationaboutacorporation thatispartofatradingnetwork.AprofilecontainsstandardfieldsthatTradingNetworks providesandextendedfieldsthataresitedefined. profile fields Fieldsinaprofile.Eachprofilefieldrepresentsinformationthatyoucollectandmaintainfor tradingpartnersinthetradingnetwork.Therearetwotypesofprofilefields:standardfields andextendedfields. public queue Ascheduleddeliveryqueuethatyoudefinetoschedulethedeliveryofdocumentsthatare aimedatmultipletradingpartners.(Contrastwithprivatequeue.) queue for polling AdeliverymethodwhereatradingpartnerscanobtaindocumentswithouthavingTrading Networksdeliverdocumentsdirectlytothetradingpartner,forexample,becauseoffirewall constraints.TradingNetworkssavesthedocumentstoitsdatabaseinaninternallydefined queue.Atalatertime,thereceivingpartnerpollsfordocuments,andTradingNetworks returnsallthedocumentsinthequeueforwhichthattradingpartneristhereceiver. ReceiverID Asystemattributethatidentifiesthetradingpartnerthatistoreceiveadocument.The ReceiverIDisanexternalID(i.e.,thevalueofanexternalIDtype). reliable delivery AfeatureofTradingNetworkswhereTradingNetworksattemptstoredeliveradocument toatradingpartneroneormoretimesifpreviousattemptstodeliverthedocumentfails.For animmediatedeliverymethod,TradingNetworksautomaticallyusesreliabledeliverywhen thepreprocessingactionSave Document to DatabaseindicatesthatTradingNetworksisto savethedocumentcontenttoitsdatabase.Forascheduleddeliverymethod,Trading Networksalwaysusesreliabledelivery. reliable execution AfeatureofTradingNetworkswhereTradingNetworksattemptstoreexecuteaservice ifpreviousattemptstoexecutetheservicefails.TradingNetworksusesreliableexecution whenyouselectservice execution taskasthemethodforhowTradingNetworksisto asynchronouslyexecuteaservicefortheExecute a Serviceprocessingaction.Seealso serviceexecutiontask.

webMethods Trading Networks Concepts Guide Version 7.1

110

A. Glossary for Trading Networks

scheduled delivery method AdeliverymethodwhereTradingNetworksbatchesmultipledocumentsinascheduled deliveryqueue.Thedocumentsinthequeueareactedonatscheduledtimestodeliverthem. scheduled delivery queue Agroupingofdocumentsthatareintendedforoneormoretradingpartners.Trading Networkssupportstwotypesofscheduleddeliveryqueues:publicqueueandprivatequeue. schema SeeflatfileschemaorISschema. SenderID Asystemattributethatidentifiesthetradingpartnerthatsentadocument.TheSenderIDisan externalID(i.e.,thevalueofanexternalIDtype). service execution task AtaskthatTradingNetworksestablishestokeeptrackoftheattemptstoreexecutea servicewhenusingreliableexecution.TradingNetworkscreatesaserviceexecutiontask whenyouselectservice execution taskasthemethodforhowTradingNetworksisto asynchronouslyexecuteaservicefortheExecute a Serviceprocessingaction. signature Asystemattributethatidentifiestheportionofadocumentthatcontainsthedigital signatureforthedocument. SignedBody Asystemattributethatidentifiestheportionofadocumentthatcontainsthedatathatwas digitallysignedtocreatethedigitalsignature. spoke Atradingpartnerthatisamemberofatradingnetwork,butisnotthehostofthenetwork. (Contrastwithhub.) standard fields Fieldswithinaprofilethatareprovidedoutofthebox.Thestandardfieldstypically incorporatemostoftheinformationthatsiteswanttocollectaboutatradingpartner.See alsoprofilefields. system attribute AdocumentattributethatisprovidedwithTradingNetworksoutofthebox. tasks Seedeliverytaskandserviceexecutiontask. TN document type ATradingNetworksobjectthatdefineshowTradingNetworksistorecognizeadocument andinitialactionstotakeonarecognizeddocument.TradingNetworksrecognizesthe documentbyusingidentificationinformationintheTNdocumenttype.Theactions specifiedinaTNdocumenttypeindicatethedocumentattributesthatTradingNetworksisto extractfromthedocument(includinginformationaboutXMLnamespacesthedocuments mightuse)andspecifyoptionsforpreprocessingthedocument(whichinclude

webMethods Trading Networks Concepts Guide Version 7.1

111

A. Glossary for Trading Networks

verification,validation,andwhethertosavethedocumentattributes,documentcontent, andlogentriesforthedocumenttothedatabase). TN flat file document type ATNdocumenttypethatTradingNetworksuseswhenrecognizingflatfiledocuments.To matchaflatfiletoaTNflatfiledocumenttype,TradingNetworksreliesoninformation providedbyadocumentgatewayservice. TN XML document type ATNdocumenttypethatTradingNetworksuseswhenrecognizingXMLdocuments. TPAs SeeTradingPartnerAgreement(TPA). trading network Asystemoforganizationsthatareconnectedtosharebusinessinformation.The organizationsinatradingnetworkarestrategicpartners,buyers,suppliers,and marketplaces.Theysharebusinessinformationbyexchangingdocuments,forexample, purchaseorders,orderstatuses,purchaseorderacknowledgements,invoices,aswellas domainspecificbusinessdocuments. Trading Partner Agreement (TPA) ATradingNetworksobjectthatyoucanusetotailorhowdocumentsareexchanged betweentwotradingpartners. trading partner Anorganizationinyourtradingnetwork,forexample,astrategicpartner,marketplaces, buyer,orsupplier.Eachtradingpartnerrequiresaprofile.Youcanexchangebusiness documentswiththetradingpartnersinyournetworktorelaymissioncriticalproduction information.(Alsoknownaspartners.) transactions1 ThedocumentsthathavepassedthroughTradingNetworks. transaction2 Whiledefininganeventmap,youdefineadocumentattributeasatransaction,ifitsvalue isneitherafactnoradimension.Youdonotusethisdataforanalysisbutjustasareference point.Forexample,orderID. unknown document AdocumentthatdoesnotmatchanyTNdocumenttype.(Comparewithambiguous document.) unknown partner Atradingpartner(senderorreceiver)ofadocumentisconsideredunknownifTrading Networksisunabletodeterminethesenderorreceiver;thatismatchthesenderor receivertoaprofileintheTradingNetworkssystem. User Status Asystemattributethatcontainsastatusthatausercanassociatewithadocument,e.g., NeedsApproval.

webMethods Trading Networks Concepts Guide Version 7.1

112

A. Glossary for Trading Networks

webMethods Broker TheprimarymessagebackboneproductinawebMethodsintegrationenvironment. webMethodsBrokerfacilitatesasynchronous,messagebasedcommunicationusingthe publishandsubscribemodel. Whenyouenablemonitoringontradingnetworkstransactiondata,Brokeractsasan intermediarywhilepassingeventsfromatradingnetworktoOptimize.ItusesaJava MessagingSystem(JMS)queuethatpublishestheeventstotheOptimize. webMethods Optimize for B2B WhenyouenableBAMonTradingNetworkstransactiondata,Optimizesubscribesthe eventsfromtheJavaMessagingSystem(JMS)queueoftheBroker,analyzesthembasedon thedefinedKPIs,andsavesthemtoitsdatabase.Atruntime,MywebMethodsServer retrievesthisdatatoviewormonitorthedatainagraphicaloratabularformat. Web Manager ATradingNetworksspecificuserinterfacethatyouuseviaaWebbrowser.Thisuse interfaceisdeprecated. XML EXtensibleMarkupLanguage,auniformmethodfordescribingandexchangingdatathat isflexible,extensible,andeasytoimplement.ItisasimplifieddialectoftheStandard GeneralizedMarkupLanguage(SGML). XQL XMLQueryLanguage.AlanguageusedtoretrieveinformationfromanXMLdocument.

webMethods Trading Networks Concepts Guide Version 7.1

113

A. Glossary for Trading Networks

webMethods Trading Networks Concepts Guide Version 7.1

114

Appendix B. Security within Trading Networks

Overview of Security Features . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 116 Communicating Securely Using SSL . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 116 Protecting Access to User Interfaces . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 116 Protecting Partner Profile Passwords . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 118 Protecting Access to Trading Networks Processing . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 119 Certificates for Verifying, Signing, Encrypting, and Decrypting Documents . . . . . . . . . . . . . . . 120

webMethods Trading Networks Concepts Guide Version 7.1

115

B. Security within Trading Networks

Overview of Security Features


TradingNetworksincludessecurityfeaturesfor: CommunicatingSecurelyUsingSSL ProtectingAccesstoUserInterfaces ProtectingPartnerProfilePasswords ProtectingAccesstoTradingNetworksProcessing CertificatesforVerifying,Signing,Encrypting,andDecryptingDocuments

Communicating Securely Using SSL


BecauseTradingNetworksrunsintheIntegrationServer,ittakesadvantageof IntegrationServerfeatures,suchasitssupportofSecureSocketsLayer(SSL)forsecure communications.ToenableTradingNetworkstoactasanSSLclientconnectingtoa remotesecureserver,specifyanSSL ClientcertificateinyourEnterpriseprofileoryour partnersprofile. WhenusingSSLconnectionsthatrequireclientsideauthentication,TradingNetworks looksatthesendersprofiletoseeifitcontainsthespecificprivatekeytousetoconnectto thereceiver(theremotesecureserver).IfTradingNetworks: Findsasetofcertificatestouseforthatspecificreceiver,itusestheprivatekeyfrom thatcertificateset Doesnotfindasetofcertificatestouseforthatspecificreceiver,itusesthedefault privatekeyspecifiedinthesendersprofile. Doesnotfindadefaultprivatekeyspecifiedinthesendersprofile,itusesthedefault certificatesspecifiedintheIntegrationServer.

Protecting Access to User Interfaces


Topreventunauthorizedaccesstotheuserinterfaces,auserisauthenticatedbefore allowingaccesstoMywebMethods,TradingNetworksConsoleandTradingNetworks WebManager.Allcomponentsareusername/passwordprotected.

Access to My webMethods for Trading Networks Actions


TradingNetworksactionsthatyouaccessfromMywebMethodsareprotectedby rolebasedaccess.Thatis,toviewTradingNetworksdata(e.g.,informationaboutadelivery task)andtoperformactionsagainstthatdata(e.g.,restartatask),youmustbeamember

webMethods Trading Networks Concepts Guide Version 7.1

116

B. Security within Trading Networks

ofaroletowhichthatpermissionhasbeengranted.Therearetwoaspectstorolebased access: Datapermissions,whichidentifiesadatasetofprofiles,transactions,tasks,andactivity logentriesalongwiththeactionsarolecanperformagainstthatTradingNetworks dataset.Usingdatalevelsecurity,youcangrantrolesthefollowingpermissions: View/editprofilesettingsofexistingprofiles. Reprocesstransactions Resubmittransactions Edituserstatusattributefortransactions Editcommentfortransactions Viewcontentoftransactions Editcontentandresubmittransactions View,restart,stop,delete,orreassigntasks View/deleteactivitylogentries Generalfunctionalpermissions,whichgrantsarolethepermissiontoperformTrading NetworksactionsagainstotherTradingNetworksdata.Usinggeneralfunctional permissions,youcangrantrolesthefollowingpermissions: Managepublicqueues Manageprofilegroups Createnewprofiles Deleteexistingprofiles Manageextendedprofilefields AddexternalIDtypes ViewSQLassociatedwithaqueryperformedinMywebMethods ManageTradingNetworksBusinessActivityMonitoring(BAM)configuration Viewuserpreferences Edituserpreferences ViewTradingNetworksconfigurationproperties EditTradingNetworksconfigurationproperties Queryexpiringpartnercertificates

webMethods Trading Networks Concepts Guide Version 7.1

117

B. Security within Trading Networks

For more information aboutsettinguprolebasedaccess,seeChapter4,Configuring MywebMethodstoWorkwithTradingNetworksinthewebMethodsTrading NetworksAdministratorsGuide.

Access to Trading Networks User Interfaces


FortheTradingNetworksspecificuserinterfaces(i.e.,theConsoleandWebManager),a usermustprovideausername/passwordwithTradingNetworksadministrativeauthority toaccessTradingNetworksforadministrativeuse,suchastoconfigurethesystemorto updateprofiles,TNdocumenttypes,andprocessingrules.Apartnermusthavepartner authoritytoaccesstheTradingNetworksWebManagertoviewinformationinapartners system.

Protecting Partner Profile Passwords


AllpasswordscontainedinpartnerprofilesaresecurelymanagedbytheIntegration ServersPasswordManager.Whenyoucreateapartnerprofile,TradingNetworkscreates ahandleforthepasswordandpassesboththepasswordanditshandletotheIntegration ServersPasswordManager.ThePasswordManagerencryptsthepasswordandstoresthe passwordanditshandleintheISrepository.TheTradingNetworksdatabasestoresonly thehandle. Whenyouneedtodisplayorupdateanexistingprofile,TradingNetworksreadsthe appropriatehandleinitsdatabaseandasksthePasswordManagertoreturnthe password.ThePasswordManagerobtainsthepasswordfromtheIntegrationServer repository,decryptsit,andreturnsittoTradingNetworks.Ifthepasswordisalready cachedintheTradingNetworksdatabase,thisprocessisnotnecessary. Note: Passwordsusedinscheduleddeliveryqueues(publicandprivate)arestoredinthe TradingNetworksdatabaseinbinaryencodedform(notincleartext).Itisnotpossiblefor TradingNetworkstoencryptpasswordsusedinscheduleddeliveryqueues;because tradingpartnersareallowedtocreatecustomscheduleddeliveryservices,Trading Networkscannotanticipatewhichuserdefinedinputvariablemightbeapassword. Forinformationaboutcreatingpartnerprofilepasswords,seeChapter10,Definingand ManagingPartnerProfilesandAppendixI,ManagingPartnerProfilesUsingthe ConsoleinthewebMethodsTradingNetworksAdministratorsGuide.

webMethods Trading Networks Concepts Guide Version 7.1

118

B. Security within Trading Networks

Protecting Access to Trading Networks Processing


WhentradingpartnerswanttoconnecttoyourTradingNetworkssystem,forexampleto sendadocumentforprocessing,accesscanbeprotectedviaauseraccount(user name/password)orx.509v3clientcertificates.Apartnermusthavepartnerauthorityto accessyourTradingNetworkssystemtoexchangedocuments.Whenyoudefineaprofile forapartner,youcanassociateoneormoreMywebMethodsorIntegrationServeruser accountswithaprofile.Yourpartnercanusetheuseraccount(s)toaccessyoursystem. Formoreinformation,seeUserAccountsforPartnersonpage 43. WhenyourTradingNetworkssystemneedstoconnecttoapartnerssystem,forexample todeliveradocument,itcanuseauseraccount(username/password)orx.509v3client certificatesascredentialsthatthepartnerssystemusesforauthentication.Ifyourpartner requiresauthenticationusingusername/password,yourTradingNetworkssystem maintainstheusernameandpassworditneedstosupplywhenconnectingtothatpartner inthepartnersprofileonyoursystem.Ifapartnerrequiresauthenticationusingclient certificates,yourIntegrationServersystemmaintainstheclientcertificateitneedsto supplywhenconnectingwiththatpartner.

Access Control Lists


WhenaclientsendsadocumenttoTradingNetworks,theclientmustspecifytheservice thatistoacceptandprocessthedocument.Whenyousendadocument,specifythe wm.tn:receiveservice.Formoreinformation,seeSendingDocumentstoTrading Networksonpage 42. TradingNetworksprotectsaccesstothewm.tn:receiveserviceusinganAccessControlList (ACL).TheprotectionassuresonlyclientswithTradingNetworksadministrative authorityorpartnerauthoritycaninvokethisservice.Clientsmustidentifytheusername andpasswordfortheiruseraccountwheninvokingthewn.tn:receiveservice. IftheuseraccountthatsendsthedocumenthasTradingNetworksadministrative authority,TradingNetworksalwaysprocessesthedocument.Whentheuseraccounthas partnerauthority,TradingNetworksensuresthattheuserinvokingthewm.tn:receive servicematchesthesenderspecifiedwithinthedocumentbeingsent.Thatis,Trading Networksusesthesenderidentifiedwithinthedocumenttolookupthesendersprofile andensuresthattheprofileisassociatedwiththeMywebMethodsorIntegrationServer useraccountthatwasusedtosendthedocument.Iftheuseraccountisnotassociated withthesendersprofile,TradingNetworksdoesnotprocessthedocument.

webMethods Trading Networks Concepts Guide Version 7.1

119

B. Security within Trading Networks

Certificates for Verifying, Signing, Encrypting, and Decrypting Documents


Youcanuseasinglesetofcertificatesforallpartners,oryoucanuseauniquesetof certificatesforeachsender/receiverpair(orselectedpairs).Forexample,youcanuseone setofcertificatesforsendingdocumentsfromAtoB,andadifferentsetofcertificatesfor sendingdocumentsfromCtoA. Whenyoudefineyourprofileandtheprofilesofyourtradingpartners,youspecifythe followingkindsofcertificatesinthefollowingprofiles: Specify this certificate ... Verify

In this profile ... sendersprofile

Description Whenapartnersendsadocumenttoyou,Trading Networkslooksatthesendersprofiletoseeifit containsthespecificpubliccertificatetouseto verifythedocument. Whenyousignadocumenttosendtoapartner, TradingNetworkslooksatyourprofiletoseeifit containsthespecificprivatekeytousetosignthe document. Whenyouencryptadocumenttosendtoapartner, TradingNetworkslooksatthereceiversprofileto seeifitcontainsthespecificpubliccertificatetouse toencryptthedocument. Whenapartnersendsanencrypteddocumentto you,TradingNetworkslooksatyourprofiletoseeif itcontainsthespecificprivatekeytousetodecrypt thedocument.

Sign

sendersprofile

Encrypt

receiversprofile

Decrypt

receiversprofile

Thefollowingtablesummarizesallscenariosofcertificateusage: Sender A A B B A A B Receiver B B A A B B A Operation Sign Verify Sign Verify Encrypt Decrypt Encrypt Profile used A A B B B B A

webMethods Trading Networks Concepts Guide Version 7.1

120

B. Security within Trading Networks

Sender B A B

Receiver A B A

Operation Decrypt SSLAuth SSLAuth

Profile used A A B

Verifying Digital Signatures


TradingNetworkssupportsx.509v3certificatesforverifyingthedigitalsignatureof documentssentbyapartner.TradingNetworksverifiesthedigitalsignatureto: Assurethatthedocumentshavearrivedunchanged Verifythatthesenderiswhoitclaimstobe TradingNetworksverifiesadigitalsignaturewheninstructedtodosobytheVerify Digital Signaturepreprocessingaction.Formoreinformation,seePreprocessingActionson page 61.

Actions You Must Take to Verify Digital Signatures


Toverifythedigitalsignature,youmust: Save the partners Verify certificate in the partners profile.TradingNetworksmusthave accesstothepartnerscertificates.WhenyouaddaVerifycertificate,Trading NetworksstoresthecertificateintheTradingNetworksdatabase. Note: Ifyouincludetheprivatekeyinthiscertificateinformation,TradingNetworks canalsousethiscertificateinformationtodigitallysigndocumentsonbehalfofthe partner.Youmighthavetheprivatekeyiftheprofiledescribesaninternalgroup,for exampleadepartmentwithinyourcorporation. Set up your TN document type to extract the following system attributes: Signaturethatidentifiestheportionofthedocumentthatcontainsthedigital signature.Thesignaturemustbeabase64encodedPKCS#7detacheddigital signature.Thesignaturecancontaininformationforoneormoresigners. SignedBodythatidentifiestheportionofthedocumentthatwasdigitallysigned. Use the Verify Digital Signature pre-processing action.WhenyousetuptheTNdocument typeorprocessingrule,besuretospecifythatyouwantTradingNetworkstoverity thedigitalsignature.

webMethods Trading Networks Concepts Guide Version 7.1

121

B. Security within Trading Networks

How Trading Networks Verifies Digital Signatures


Whenapartnersendsadocumenttoyou,TradingNetworkslooksatthepartnersprofile toseeifitcontainsthespecificpubliccertificatetousetoverifythedocument.IfTrading Networks: Findsasetofcertificatestouseforthatspecificreceiver,itusestheappropriate certificateinthatset Doesnotfindasetofcertificatestouseforthatspecificreceiver,itusesthedefaultset ofcertificatesspecifiedinthepartnersprofile. Toverifythatthedocumentarrivedunchangedfromthepartnertoyou,Trading Networksinvokesthepub.security.pkcs7:verifyservice.TradingNetworkspassesthisservice thevalueoftheSignedBodyandSignaturesystemattributesthatitextractedfromthe document.Formoreinformationaboutthisservice,seethewebMethodsIntegrationServer BuiltInServicesReference. TradingNetworkscanonlyverifyinformationonitselfbecauseTradingNetworksdoes nothavethecertification/verificationforthepartner.TradingNetworksensuresthatthe CAthatsignedthecertificateisincludedinthelistoftrustedCAcertificatesthatthe IntegrationServermaintains. Toassurethatthesignedbodyhasnotchanged,TradingNetworksverifiesthedigital signature,whichisthevalueoftheSignaturesystemattribute.Toverifythatthesenderis whoitclaimstobe,TradingNetworksmatchesthecertificatefromthedigitalsignatureto theVerifycertificatethatTradingNetworkshasonfileforthepartner. Formoreinformationonsecurity,includingtrustedCAcertificatesandmapping certificatestouseraccounts,seethechapteraboutsecurityinformationinthewebMethods IntegrationServerAdministratorsGuide.

Digitally Signing Documents


TradingNetworkssupportsx.509v3certificatesfordigitallysigningdocumentsthatyou, theownerofthecertificates,wanttosendtotradingpartners.Todigitallysigna document,invokethebuiltinservicewm.tn.doc:sign.Formoreinformationonthisservice, seethewebMethodsTradingNetworksBuiltinServicesReference. Whenyouinvokethisservice,TradingNetworkslocatesthesenderandreceiverto retrievethecorrectsignedcertificatefromtheTradingNetworksdatabase.Theownerof thecertificateisthesenderandthereceiveristhetradingpartner.YoucansetupTrading Networkstousealternatecertificatesfordifferentpartners. YoucanalsospecifyadefaultSigncertificatebyprovidingthecertificateinformationin theownersprofile.IfadefaultSigncertificateisdefined,thenTradingNetworkswilluse thisdefaultSigncertificatewhenapartnerspecificSigncertificateisnotavailable.

webMethods Trading Networks Concepts Guide Version 7.1

122

B. Security within Trading Networks

How Trading Networks Signs Documents


Whenyousignadocumenttosendtoapartner,TradingNetworkslooksatyourprofileto seeifitcontainsthespecificprivatekeytousetosignthedocument.IfTradingNetworks: Findsasetofcertificatestouseforthatspecificreceiver,itusestheappropriate certificateinthatset Doesnotfindasetofcertificatestouseforthatspecificreceiver,itusesthedefaultset ofcertificatesspecifiedinyourprofile.

Encrypting and Decrypting Data


TradingNetworksmaintainsx.509v3certificatestousefor: Encryptingdocumentsthatarebeingsenttopartners Decryptingencrypteddocumentsreceivedfrompartners TradingNetworksdoesnothavethebuiltinabilitytoencryptoutgoingdocumentsand decryptinbounddocuments.ThecertificateinformationthatTradingNetworksmaintains isforotherwebMethodscomponents(e.g.,webMethodsRosettaNetModule)thattake advantageofthisfeature.

Encrypt Certificates
IfyouareusinganotherwebMethodscomponentthatrequiresEncryptcertificates,savea partnersEncryptcertificateinthepartnersprofile.Youcanalsoaddyourown functionalitythattakesadvantageofthiscertificateinformation.Youcanobtainthe certificationinformationbyusingbuiltinservices. TradingNetworksdoesnotchecktoseeiftheCAthatsignedtheEncryptcertificateisin thelistoftrustedCAsthatthewebMethodsIntegrationServermaintains. Note: Ifyouincludetheprivatekeyinthiscertificateinformation,thiscertificate informationcanalsobeusedtodecryptdocumentsthatwereencryptedwiththepartners publickey.Youmighthavetheprivatekeyiftheprofiledescribesaninternalgroup,for exampleadepartmentwithinyourcorporation. How Trading Networks Encrypts Documents Whenyouencryptadocumenttosendtoapartner,TradingNetworkslooksatthe partnersprofiletoseeifitcontainsthespecificpubliccertificatetousetoencryptthe document.IfTradingNetworks: Findsasetofcertificatestouseforthatspecificreceiver,itusestheappropriate certificateinthatset

webMethods Trading Networks Concepts Guide Version 7.1

123

B. Security within Trading Networks

Doesnotfindasetofcertificatestouseforthatspecificreceiver,itusesthedefaultset ofcertificatesspecifiedinthepartnersprofile.

Decrypt Certificates
IfyouareusinganotherwebMethodscomponentthatrequiresDecryptcertificates,save yourDecryptcertificateintheownersprofile.BecauseyoucanstoreDecryptcertificates intheownersprofile,youcansetupalternateDecryptcertificatesfordifferentpartners. YoucanalsospecifyadefaultDecryptcertificatebyprovidingthecertificateinformation intheownersprofile.IfadefaultDecryptcertificateisdefined,thenTradingNetworks willusethisdefaultDecryptcertificatewhenapartnerspecificDecryptcertificateisnot available. TradingNetworksdoesnotchecktoseeiftheCAthatsignedtheDecryptcertificateisin thelistoftrustedCAsthatthewebMethodsIntegrationServermaintains. How Trading Networks Decrypts Documents Whenapartnersendsanencrypteddocumenttoyou,TradingNetworkslooksatyour profiletoseeifitcontainsthespecificprivatekeytousetodecryptthedocument.If TradingNetworks: Findsasetofcertificatestouseforthatspecificreceiver,itusestheappropriate privatekeyinthatset Doesnotfindasetofcertificatestouseforthatspecificreceiver,itusesthedefaultset ofprivatekeysdefinedintheDefaultprofileforpartners.

webMethods Trading Networks Concepts Guide Version 7.1

124

You might also like