Você está na página 1de 290

Front cover

Implementing WebSphere Business Integration Express for Item Synchronization ynchronization


Establish connectivity and execute item synchronization Establish a foundation for supply chain initiatives Automate item management

Lee Gavin Geert Van de Putte Suresh Addala Rajaraman Hariharan Daniel Max Kestin Pushkar Suri Kiran Tatineni

ibm.com/redbooks

International Technical Support Organization Implementing WebSphere Business Integration Express for Item Synchronization May 2004

SG24-6083-00

Note: Before using this information and the product it supports, read the information in Notices on page ix.

First Edition (May 2004) This edition applies to Version 4, Release 3, of IBM WebSphere Business Integration Express for Item Synchronization (product number 5724-F81).
Copyright International Business Machines Corporation 2004. All rights reserved. Note to U.S. Government Users Restricted Rights -- Use, duplication or disclosure restricted by GSA ADP Schedule Contract with IBM Corp.

Contents
Notices . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . ix Trademarks . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . x Preface . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . xi The team that wrote this redbook. . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . xi Become a published author . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . xiii Comments welcome. . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . xiv Part 1. Overview . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 1 Chapter 1. UCCnet. . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 3 1.1 The challenge . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 4 1.2 What is UCCnet. . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 4 1.3 Some important terms . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 5 1.3.1 GLOBALregistry and Item Registry. . . . . . . . . . . . . . . . . . . . . . . . . . . 5 1.3.2 Global Location Number (GLN). . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 6 1.3.3 Global Trade Item Number (GTIN) . . . . . . . . . . . . . . . . . . . . . . . . . . . 7 1.3.4 Target Market (TM) . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 10 1.3.5 UCCnet Key . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 10 1.4 Current item exchange . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 10 1.5 UCCnet proposed scenario . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 11 1.6 UCCnet messages . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 12 1.6.1 RCIR: Register Catalogue Item Registry . . . . . . . . . . . . . . . . . . . . . 12 1.6.2 CI: Catalogue Item Document. . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 13 1.6.3 CIP: Catalogue Item Publication . . . . . . . . . . . . . . . . . . . . . . . . . . . . 13 1.6.4 CIN: Catalogue Item Notification. . . . . . . . . . . . . . . . . . . . . . . . . . . . 13 1.6.5 CIC: Catalogue Item Confirmation . . . . . . . . . . . . . . . . . . . . . . . . . . 13 1.6.6 Query messages . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 13 1.7 UCCnet message structure . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 14 1.7.1 Envelope: transport layer . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 14 1.7.2 Transaction: Command layer . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 15 1.8 End-to-End flow. . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 17 1.9 Advantage of Item Synchronization. . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 21 Chapter 2. AS2 communications . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 23 2.1 Overview . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 24 2.2 What is EDIINT? . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 24 2.3 AS1 and AS2 specifications . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 25 2.4 What kind of data can you send with AS2? . . . . . . . . . . . . . . . . . . . . . . . . 26

Copyright IBM Corp. 2004. All rights reserved.

iii

2.5 UCCnet supports the AS2 protocol . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 26 Chapter 3. WebSphere Business Integration Express for Item Synchronization . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 27 3.1 Features . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 28 3.2 Technical overview and components . . . . . . . . . . . . . . . . . . . . . . . . . . . . 28 3.3 Collaboration components. . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 29 Chapter 4. iSoft Peer-to-Peer Agent. . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 31 4.1 Communication features . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 32 4.2 Data integrity and security characteristics . . . . . . . . . . . . . . . . . . . . . . . . . 33 4.3 Administration features . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 34 4.4 Load-balancing and multi-machine setup . . . . . . . . . . . . . . . . . . . . . . . . . 36 Chapter 5. Business case and scenario . . . . . . . . . . . . . . . . . . . . . . . . . . . 39 5.1 Scenario overview . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 40 5.2 Business process overview . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 43 5.3 Technical process overview . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 44 5.3.1 ItemAdd workflow (add a new item to UCCnet) . . . . . . . . . . . . . . . . 44 5.3.2 CatalogueItemNotification_Add workflow . . . . . . . . . . . . . . . . . . . . . 45 5.3.3 CatalogueItemConfirmation workflow . . . . . . . . . . . . . . . . . . . . . . . . 47 5.3.4 Sending email through UCCnet_processWorklist collaboration object subdiagrams . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 47 5.4 Component overview. . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 48 Part 2. Install and configure . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 51 Chapter 6. About some of the key components . . . . . . . . . . . . . . . . . . . . . 53 6.1 What are collaborations?. . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 54 6.1.1 What collaborations are installed? . . . . . . . . . . . . . . . . . . . . . . . . . . 54 6.2 What are business objects? . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 56 6.2.1 Application-Specific and Generic Business Objects . . . . . . . . . . . . . 56 6.2.2 What are the key business objects? . . . . . . . . . . . . . . . . . . . . . . . . . 57 6.3 What are connectors? . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 61 6.4 What are maps? . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 62 6.4.1 What do they do in the solution?. . . . . . . . . . . . . . . . . . . . . . . . . . . . 62 6.5 What are relationships?. . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 64 6.5.1 Where are they used. . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 64 6.6 Other tables of interest . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 66 6.6.1 Audit Log Table . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 67 Chapter 7. WebSphere BI Express installation and verification . . . . . . . . 69 7.1 JDK . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 70 7.2 DB2 V8.1 . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 70

iv

Implementing WebSphere BI Express for Item Synchronization

7.3 7.4 7.5 7.6 7.7

WebSphere MQ V5.3.1 . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 70 WebSphere Application Server Express V5.0.2 . . . . . . . . . . . . . . . . . . . . 70 Microsoft Visual Studio C++ . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 70 WebSphere Business Integration Express . . . . . . . . . . . . . . . . . . . . . . . . 71 Installation verification . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 81 7.7.1 Review initial start-up of the InterChange Server . . . . . . . . . . . . . . . 82 7.7.2 Perform WebSphere MQ configuration . . . . . . . . . . . . . . . . . . . . . . . 84 7.7.3 Start the InterChange Server and register it . . . . . . . . . . . . . . . . . . . 85 7.7.4 Review deployed components . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 89 7.7.5 Switching to Design mode for the ICS . . . . . . . . . . . . . . . . . . . . . . . 91 7.8 ICS monitor in WebSphere Application Server Express . . . . . . . . . . . . . . 92 Chapter 8. WebSphere BI Express configuration. . . . . . . . . . . . . . . . . . . . 95 8.1 Set-up the audit and logging service . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 96 8.2 Load relationship tables . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 97 8.3 Create meta-objects . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 98 8.4 Create and configure connectors . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 102 8.4.1 JTextRWLConnector. . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 103 8.4.2 ISoft Connector . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 107 8.4.3 PortConnector . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 110 8.5 Create and configure the collaboration objects . . . . . . . . . . . . . . . . . . . . 111 8.5.1 UCCnet_ItemSync collaboration object . . . . . . . . . . . . . . . . . . . . . 112 8.5.2 ItemCommandRouter collaboration object . . . . . . . . . . . . . . . . . . . 119 8.5.3 UCCnetXSD_CIN_Dispatcher collaboration object. . . . . . . . . . . . . 125 8.5.4 UCCnetXSD_CIN_Dispatcher_forRWL collaboration object . . . . . 131 8.5.5 UCCnet_processWorklist collaboration object . . . . . . . . . . . . . . . . 134 8.5.6 UCCnet_requestWorklist collaboration object. . . . . . . . . . . . . . . . . 143 8.5.7 Update Maps. . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 147 8.5.8 Deploying objects . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 148 8.6 Unit Test . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 153 Chapter 9. Configuration for integration of back-end system . . . . . . . . 163 9.1 Create application tables and event tables . . . . . . . . . . . . . . . . . . . . . . . 164 9.2 Create and test the database trigger. . . . . . . . . . . . . . . . . . . . . . . . . . . . 164 9.2.1 Create the Application-Specific Business Object . . . . . . . . . . . . . . 167 9.3 Build a map for transforming the ASBO into a GBO . . . . . . . . . . . . . . . . 173 9.4 Testing the map. . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 179 9.5 Create the JDBC connector . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 182 9.6 Deployment of the changed and new objects . . . . . . . . . . . . . . . . . . . . . 186 9.7 Validation using the Test Connector . . . . . . . . . . . . . . . . . . . . . . . . . . . . 189 9.8 Validation using the JDBC Connector . . . . . . . . . . . . . . . . . . . . . . . . . . . 193 Chapter 10. Configure the AS2 connection . . . . . . . . . . . . . . . . . . . . . . . 197 10.1 Install iSoft for supplier . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 198

Contents

10.1.1 Run Buildcfg5 . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 198 10.1.2 p2pagent.cfg . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 199 10.1.3 Generate keys. . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 202 10.2 Install iSoft for test receiver . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 203 10.3 Unit test for send RCIR and receive MDN. . . . . . . . . . . . . . . . . . . . . . . 205 Chapter 11. Final configuration and test from end-to-end . . . . . . . . . . . 211 11.1 Processing messages from UCCnet . . . . . . . . . . . . . . . . . . . . . . . . . . . 212 11.2 Process the response from UCCnet . . . . . . . . . . . . . . . . . . . . . . . . . . . 212 11.3 Test the Catalogue Item Notification . . . . . . . . . . . . . . . . . . . . . . . . . . . 214 11.3.1 Create the map . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 215 11.3.2 Modify the connector . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 216 11.3.3 Modify the collaborations . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 217 11.4 Test the Catalog Item Confirmation. . . . . . . . . . . . . . . . . . . . . . . . . . . . 220 11.5 End-to-end simulation . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 220 Part 3. Appendixes . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 225 Appendix A. Getting started with UCCnet . . . . . . . . . . . . . . . . . . . . . . . . 227 A.1 Prerequisites . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 228 A.1.1 System requirements . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 228 A.1.2 Software requirements . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 228 A.2 Configuring your user account . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 228 A.3 Obtain and register your own digital certificates . . . . . . . . . . . . . . . . . . . 228 A.3.1 Import your digital certificate into SYNCpoint . . . . . . . . . . . . . . . . . 229 A.3.2 Bind your userid to certificate . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 229 A.4 Obtain UCCnets public key digital certificate . . . . . . . . . . . . . . . . . . . . . 229 A.5 Subscribe your user IDs to relevant events . . . . . . . . . . . . . . . . . . . . . . 230 A.5.1 Subscribe retailer to publication information . . . . . . . . . . . . . . . . . . 230 A.5.2 Subscribe supplier to authorization information . . . . . . . . . . . . . . . 239 Appendix B. Our sample messages . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 247 Sample message texts . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 248 Appendix C. Additional material . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 259 Locating the Web material . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 259 Using the Web material . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 259 System requirements for downloading the Web material . . . . . . . . . . . . . 260 How to use the Web material . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 260 Abbreviations and acronyms . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 261 Related publications . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 263 IBM Redbooks . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 263

vi

Implementing WebSphere BI Express for Item Synchronization

Online resources . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 263 How to get IBM Redbooks . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 264 Help from IBM . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 264 Index . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 265

Contents

vii

viii

Implementing WebSphere BI Express for Item Synchronization

Notices
This information was developed for products and services offered in the U.S.A. IBM may not offer the products, services, or features discussed in this document in other countries. Consult your local IBM representative for information on the products and services currently available in your area. Any reference to an IBM product, program, or service is not intended to state or imply that only that IBM product, program, or service may be used. Any functionally equivalent product, program, or service that does not infringe any IBM intellectual property right may be used instead. However, it is the user's responsibility to evaluate and verify the operation of any non-IBM product, program, or service. IBM may have patents or pending patent applications covering subject matter described in this document. The furnishing of this document does not give you any license to these patents. You can send license inquiries, in writing, to: IBM Director of Licensing, IBM Corporation, North Castle Drive Armonk, NY 10504-1785 U.S.A. The following paragraph does not apply to the United Kingdom or any other country where such provisions are inconsistent with local law: INTERNATIONAL BUSINESS MACHINES CORPORATION PROVIDES THIS PUBLICATION "AS IS" WITHOUT WARRANTY OF ANY KIND, EITHER EXPRESS OR IMPLIED, INCLUDING, BUT NOT LIMITED TO, THE IMPLIED WARRANTIES OF NON-INFRINGEMENT, MERCHANTABILITY OR FITNESS FOR A PARTICULAR PURPOSE. Some states do not allow disclaimer of express or implied warranties in certain transactions, therefore, this statement may not apply to you. This information could include technical inaccuracies or typographical errors. Changes are periodically made to the information herein; these changes will be incorporated in new editions of the publication. IBM may make improvements and/or changes in the product(s) and/or the program(s) described in this publication at any time without notice. Any references in this information to non-IBM Web sites are provided for convenience only and do not in any manner serve as an endorsement of those Web sites. The materials at those Web sites are not part of the materials for this IBM product and use of those Web sites is at your own risk. IBM may use or distribute any of the information you supply in any way it believes appropriate without incurring any obligation to you. Information concerning non-IBM products was obtained from the suppliers of those products, their published announcements or other publicly available sources. IBM has not tested those products and cannot confirm the accuracy of performance, compatibility or any other claims related to non-IBM products. Questions on the capabilities of non-IBM products should be addressed to the suppliers of those products. This information contains examples of data and reports used in daily business operations. To illustrate them as completely as possible, the examples include the names of individuals, companies, brands, and products. All of these names are fictitious and any similarity to the names and addresses used by an actual business enterprise is entirely coincidental. COPYRIGHT LICENSE: This information contains sample application programs in source language, which illustrates programming techniques on various operating platforms. You may copy, modify, and distribute these sample programs in any form without payment to IBM, for the purposes of developing, using, marketing or distributing application programs conforming to the application programming interface for the operating platform for which the sample programs are written. These examples have not been thoroughly tested under all conditions. IBM, therefore, cannot guarantee or imply reliability, serviceability, or function of these programs. You may copy, modify, and distribute these sample programs in any form without payment to IBM for the purposes of developing, using, marketing, or distributing application programs conforming to IBM's application programming interfaces.

Copyright IBM Corp. 2004. All rights reserved.

ix

Trademarks
The following terms are trademarks of the International Business Machines Corporation in the United States, other countries, or both: Eserver Eserver Redbooks (logo) ibm.com DB2 IBM MQSeries Redbooks WebSphere

The following terms are trademarks of other companies: Microsoft, Windows, Windows NT, and the Windows logo are trademarks of Microsoft Corporation in the United States, other countries, or both. Java and all Java-based trademarks and logos are trademarks or registered trademarks of Sun Microsystems, Inc. in the United States, other countries, or both. UNIX is a registered trademark of The Open Group in the United States and other countries. Other company, product, and service names may be trademarks or service marks of others.

Implementing WebSphere BI Express for Item Synchronization

Preface
IBM WebSphere Business Integration Express for Item Synchronization is designed for mid-market suppliers pursuing supply chain integration through the UCCnet GLOBALregistry. This IBM Redbook will help you install, tailor and configure the new WebSphere Business Integration Express for Item Synchronization.

The team that wrote this redbook


This redbook was produced by a team of specialists from around the world working at the International Technical Support Organization, Raleigh Center.

The Team:(back) Kiran, Raja, Suresh, Daniel (front) Pushkar, Lee, Geert

Copyright IBM Corp. 2004. All rights reserved.

xi

Lee Gavin is a Consulting IT Architect at the International Technical Support Organization, Raleigh Center. She writes extensively and teaches IBM classes worldwide on all areas of the WebSphere MQ Family, Business Integration, and Business Process Management. Geert Van de Putte is an IT Specialist at the International Technical Support Organization, Raleigh Center. He is a subject matter expert in messaging and business integration and has seven years of experience in the design and implementation of WebSphere MQ-based application integration solutions. He has published several Redbooks about messaging and business integration solutions. Geert has also taught several classes about messaging, business integration, and workflow. Before joining the ITSO, Geert worked at IBM Global Services, Belgium, where he designed and implemented EAI solutions for customers in many industries. Geert holds a Master of Information Technology degree from the University of Ghent in Belgium. Suresh Addala is an EAI Consultant working with Miracle Software Systems, Inc. He started his career as a Java programmer developing J2EE-based applications. His current expertise is in IBM Business Integration tools such as WebSphere BI. He has a good knowledge of other EAI tools such as WebMethods and Mercator. He was a member of the quality team tasked with achieving ISO9001-2000 certification for the company. He holds a Bachelor's degree in Engineering from Nagarjuna University, India. Rajaraman Hariharan is a Solutions Architect in the Distribution Sector working for the IBM Software Group. Rajaraman brings strong skills in Java and IBM middleware products including the WebSphere Business Integration Message Broker and the WebSphere Interchange Server. He is skilled in IBM solutions in the Retail domain. His recent engagements include store to enterprise integration and item synchronization. He is involved in architecting solutions and products for customers in the Retail Industry. Rajaraman holds a bachelor's degree in Computer Science and Technology from Pondicherry Engineering College, India. Daniel Max Kestin is an Advisory IT Specialist for IBM Global Services working in the US EAI national practice. He has 10 years of experience programming and teaching the Java and C programming languages. His areas of expertise include WebSphere MQ, WebSphere MQ Integrator, Java application development, and UNIX shell scripting. His past projects have focused on the needs of customers in the Banking, Insurance, Government, Education, and Retail industries. He is certified by IBM as a System Administrator for WebSphere MQ 5.3 and a Specialist for WebSphere MQ Integrator. Daniel graduated from Columbia University in New York City with a degree in Computer Science. Pushkar Suri is a Solutions Architect at Netcom Systems, Edison, NJ. He has more than seven years of experience in developing J2EE-based applications. He

xii

Implementing WebSphere BI Express for Item Synchronization

holds a degree Masters degree in Computer Applications from JNU, India. His areas of expertise include developing e-business applications.He is a co-author of the IBM Redbook B2B Solutions Using WebSphere Business Connection, SG24-6197-00, and the Redpaper Implementation of iSoft and Integration with an EAI solution, REDP-3625-00. He is a Sun-certified Programmer for Java 1.4. He is also an IBM-certified Enterprise Developer for IBM WebSphere Application Server. Kiran Tatineni holds a Bachelors degree from Nagarjuna University, India, and is now a EAI consultant with Miracle Software Systems, Inc. He has over four years of experience in the design and implementation of various EAI/EDI tools such as WebSphere Interchange Server, WebSphere Data InterChange, MQ Workflow, and WebSphere MQSeries. He has a working knowledge of EDI and XML and other AS2 engines such as iSoft and WebSphere Business Integration Connect. Thanks to the following people for their contributions to this project: Margaret Ticknor International Technical Support Organization, Raleigh Center Jay Curtiss, Steve Liu, and Steve Lindauer IBM Raleigh All those Business Partners who attended the workshop

Become a published author


Join us for a two- to six-week residency program! Help write an IBM Redbook dealing with specific products or solutions, while getting hands-on experience with leading-edge technologies. You'll team with IBM technical professionals, Business Partners and/or customers. Your efforts will help increase product acceptance and customer satisfaction. As a bonus, you'll develop a network of contacts in IBM development labs, and increase your productivity and marketability. Find out more about the residency program, browse the residency index, and apply online at:
ibm.com/redbooks/residencies.html

Preface

xiii

Comments welcome
Your comments are important to us! We want our Redbooks to be as helpful as possible. Send us your comments about this or other Redbooks in one of the following ways: Use the online Contact us review redbook form found at:
ibm.com/redbooks

Send your comments in an Internet note to:


redbook@us.ibm.com

Mail your comments to: IBM Corporation, International Technical Support Organization Dept. HZ8 Building 662 P.O. Box 12195 Research Triangle Park, NC 27709-2195

xiv

Implementing WebSphere BI Express for Item Synchronization

Part 1

Part

Overview

Copyright IBM Corp. 2004. All rights reserved.

Implementing WebSphere BI Express for Item Synchronization

Chapter 1.

UCCnet
Today's suppliers, consumer packaged goods companies, manufacturers, and wholesalers face many challenges. Each year, 20,000 new food and non-food Universal Product Code (UPC) items are created, and it typically takes 10 to 30 days to get these new items and price changes to market. Data elements that describe these individual items may change up to four times per year. Furthermore, nearly three out of five orders placed need to be revisited and reworked before completion. To meet these escalating data demands on suppliers, UCCnet has implemented multi-industry standards for product identification and related electronic communications. A subsidiary of the Uniform Code Council Inc., UCCnet is a neutral industry organization that implements these standards by requiring its community of trading partners to provide standardized item data in particular formats to its registry.

Copyright IBM Corp. 2004. All rights reserved.

1.1 The challenge


For suppliers to work effectively with UCCnet, they must be able to synchronize their enterprise item data with UCCnet's GLOBALregistry quickly and easily, without the need to rewrite or replace existing systems. They must also be able to get up and running on UCCnet's GLOBALregistry quickly with minimal disruption to their current business processes and enterprise systems. Now, many suppliers are being required by their customers to maintain item data on UCCnet's GLOBALregistry as a condition of doing business, further increasing the urgency to implement an item synchronization solution. Built to meet UCCnet standards, IBM WebSphere Business Integration Express for Item Synchronization is a mid-market solution that automates item synchronization business processes using proven WebSphere Business Integration technology. This UCCnet certified solution provides a cost-effective, easy-to-use approach to accelerating a supplier's transition to automated item synchronization.

1.2 What is UCCnet


UCCnet is a subsidiary of Uniform Code Council (UCC). UCC is a not-for-profit organization that uses industry standards to synchronize the item information between trading partners. This service aims at dramatically reducing the inefficiencies of item information exchange between the trading partners by providing a global repository for storing item information. UCCnet is a third-party external exchange that provides product registry services that enable synchronized item and location data between trading partners. This exchange has brought new opportunities for manufacturers and retailers. UCCnet can facilitate both the exchange of standards-compliant data and end-to-end business process management. The suppliers who are subscribed to UCCnet add their item catalogs to UCCnets GLOBALregistry and indicate which of their retailers should receive this information when it is published. UCCnet then updates these retailers with the suppliers item information. In this way, the retailers synchronize their product data both inside and outside of their enterprises. This synchronized data enables trading partners to reduce the costs and delays associated with incorrect supply-chain information. UCCnet provides a universal foundation for electronic commerce, ensuring the integrity of fast, clean business transactions across the Internet, backed with the trustmark of the UCC. Through its support of the global EAN.UCC standards, UCCnet delivers an open platform for collaborative commerce services, including

Implementing WebSphere BI Express for Item Synchronization

standards-compliance verification, and synchronization of product information. It also provides registry and lifecycle management of synchronized products, user locations, and user trade capabilities. UCCnet has been developed to provide an essential backbone that links trade exchange members, peer-to-peer partners, industry-driven e-marketplaces, and alliance partners to one open and seamless repository of information. Today approximately 1500 retail and supplier companies currently subscribe to UCCnet, including: Approximately 30 national and international and smaller regional retailers Approximately 1470 large and small suppliers

1.3 Some important terms


Important Note: First, we need to make a distinction here between UCCnet and UCCnet Services. UCCnet is the organization and UCCnet Services the product/service. When we are sending and receiving messages, it is to/from UCCnet Services. We refer to all of the sending and receiving of messages in this redbook as to/from UCCnet for the sake of brevity only. Before we move on, it is worth taking the time to explain some of the key terms that are used by UCCnet and are important for our item synchronization solution. We need to be familiar with these terms and what they represent to understand the entire item synchronization process.

1.3.1 GLOBALregistry and Item Registry


The UCCnet GLOBALregistry provides for registration and storage of all item information, including attributes of that item. Additionally, it is a repository of standards-compliant data. Each item will be checked for strict adherence to the global standards established by EAN.UCC. The GLOBALregistry can almost be thought of as a thin-registry of EAN.UCC standards-compliant item data with up to 35 defined attributes. The Item Registry is a full registry of standards-compliant item data with up to 151 trade item attributes (35 of which are stored in the GLOBALregistry).

Chapter 1. UCCnet

1.3.2 Global Location Number (GLN)


This is a globally unique (13 digit) number. It is the global standard used by UCCnet and identifies a user to UCCnet based on physical locations, legal entities, and functional entities, as follows: A physical location is something such as a store location, a warehouse or distribution point, a plant, and so on. A legal entity can be a company or a subsidiary or division of a company. A functional entity can be something such as a business unit or department within a legal entity (such as the sales department) Companies assign GLNs on a needs basis, that is, only business units or departments within an organization that require one will have one--not necessarily all departments.

What makes a GLN?


Of the 13 digits that make up a GLN, digits 1 to 12 are the EAN.UCC company prefix with a location reference and the 13th digit is a check digit (created using a modulus 10 calculation). Most companies have a single UCC company prefix, but some companies may have more than one. An EAN.UCC company prefix is normally created by adding a leading 0 to a UCC company prefix. The location reference is allocated by the owner of the EAN.UCC company prefix to uniquely identify to them, a location within the company. For the use in our redbook scenario, we have GLNs for the ITSO that contain location references to one of the IBM EAN.UCC company prefixes. See Figure 1-1 on page 7 for an example. Important: The GLNs that you see in this redbook were created for the sole use of this redbook project and the redbook team and, as such, may not be used for any other purpose. When testing your solution with UCCnet, please ensure that you substitute your own company GLN.

Implementing WebSphere BI Express for Item Synchronization

Large Corporation EAN.UCC Company Prefix 0011111

Large Corporation Sales Division GLN 0011111000010

Large Corporation Warehouse No 1 Division GLN 0011111000034

Large Corporation Warehouse No 2 Division GLN 0011111000065

Figure 1-1 GLN example

When any information is exchanged with the UCCnet GLOBALregistry, the GLN will uniquely identify where the data is coming from (or going to in the case of Catalog Item Notification). For more information on GLN and how a GLN is obtained, see Appendix A, Getting started with UCCnet on page 227 or go to the following Web site: GLN Introduction
http://uc-council.org/reflib/01801/index.html

1.3.3 Global Trade Item Number (GTIN)


A Global Trade Identification Number (GTIN) is a globally unique number that defines trade items (products and services) within the EAN.UCC system. The term GTIN is a relatively new term. However, the concept of a GTIN and the standard for the numbering is not. One of the key benefits of the use of GTINs is that it allows for unique identification of all trade items at a global level and at all levels of packaging. All trade item data will be sent and received in a consistent format and structure that enables system-to-system interaction, and thus automation.

Chapter 1. UCCnet

A GTIN is stored as a 14 digit number. However, the basis for this number may be any one of the family of the EAN/UPC standard data structures. Table 1-1 shows how each of the structures would be translated to a GTIN.
Table 1-1 GTINs and structures Structure EAN/UCC-8 EAN-12 EAN/UCC-13 EAN/UCC-14 Current content XXXXXXXC XXXXXXXXXXXC XXXXXXXXXXXXC XXXXXXXXXXXXXC Proposed GTIN 000XXXXXXXXXXC 0XXXXXXXXXXXC 0XXXXXXXXXXXXXC XXXXXXXXXXXXXC

The make up of these are as follows: right-justified and zero-filled to the left to create the 14 digits.

EAN/UCC-8
Seven digits that represent the EAN.UCC Company Prefix and Item Reference number One digit that is the check digit

UCC-12
Six digits that represent the UCC Company Prefix Five digits that represent the Item Reference number One digit that is a check digit or Seven digits that represent the UCC Company Prefix Four digits that represent the Item Reference number One digit that is a check digit or Eight digits that represent the UCC Company Prefix Three digits that represent the Item Reference number One digit that is a check digit or Nine digits that represent the UCC Company Prefix Two digits that represent the Item Reference number One digit that is a check digit

Implementing WebSphere BI Express for Item Synchronization

EAN/UCC-13
Twelve digits that represent the EAN.UCC Company Prefix and the Item Reference number One digit that is the check digit

EAN/UCC-14
One digit that indicates packaging level (Indicator digit) Twelve digits that represent the EAN.UCC Company Prefix and Item Reference number One digit that is the check digit Note: The Item Reference is the number assigned by the owner of the EAN.UCC Company Prefix to uniquely identify a trade item within the company.

A GTIN example
Lets take an example where a company is already using unique UPCs. (In these examples, n represents the check digit). Each: UPC-12 Case: UPC-12 Pallet: UPC-12 01234568881N 01234568882N 01234568883N

In this case what is needed, is to simply add 00 to create unique GTINs. Each: GTIN Case: GTIN Pallet: GTIN 0001234568881N 0001234568882N 0001234568883N

Note: The check digit does not change in this case, the company is using the same UPC on multiple levels of the hierarchy. Each: UPC-12 Case: UPC-12 Pallet: UPC-12 01234569999N 01234569999N 01234569999N

Chapter 1. UCCnet

What would be needed here is the use the Indicator digit to make unique GTINs Each: GTIN Case: GTIN Pallet: GIN 0001234569999N 301234569999N 701234569999N

Note: In this case, the check digit on the case and pallet would change due to the added Indicator digit. A good GTIN calculator can be found at:
http://www.uc-council.org/ean_ucc_system/education_support/cdc.html

1.3.4 Target Market (TM)


The target market is the ISO country code (such as 840 for the United States), and it indicates where the product is available.

1.3.5 UCCnet Key


The key information that must be sent to UCCnet to uniquely identify each item is a combination of the GTIN:GLN:TM. This is a unique key, if you will, to each individual item in the registry. It also enables a GTIN to be added multiple times (for example: for a different target markets like the United States and Australia) or for a different warehouse location (for example: using different GLNs for the same corporation but individual warehouse locations). The GTIN always remains the same for the same item, but the combination of the three key values allows for maximum flexibility.

1.4 Current item exchange


Figure 1-2 on page 11 illustrates how suppliers and retailers currently exchange item information.

10

Implementing WebSphere BI Express for Item Synchronization

Figure 1-2 Current item exchange

The supplier and retailer represent the trading data differently in their back-end systems. Any change in the item catalog on the suppliers end, for example an item added into the supplier catalog or an item change, has to be manually exchanged with the retailer. This data has to be converted into the retailer specific format, either prior to dispatch by the supplier or by the retailer on receipt of the data. In many cases, this may be a manual task. As a result, the whole process is not only time consuming, but it can lead to errors or discrepancies due to multiple format representations of the data or simply due to human error. The use of inaccurate trading data costs the retail industry tens of billions of dollars annually in supply-chain errors, bottlenecks, and time-to-market delays.

1.5 UCCnet proposed scenario


UCCnet offers a single, standards-based registry to publish and access product information. For suppliers and retailers, this eliminates the need for sending or receiving product information in partner-specific format to or from each of their trading partners. Also UCCnet acts as the single point of contact for each of the suppliers and retailers for all of their trading partners that have subscribed to UCCnet. In this way, the supplier does not have to exchange the item information individually with each of its retailers. To implement UCCnet supply-side transactions, data needs to be extracted from the back-end systems and sent to the UCCnet GLOBALregistry via XML or via the secured transport protocols such as HTTPS or AS2. WebSphere Business

Chapter 1. UCCnet

11

Integration Express provides an item-synchronization solution to connect these back-end business processes with the UCCnet global repository. Thus, any item change in these processes is automatically propagated and updated in the UCCnet GLOBALregistry. See Figure 1-3.

Figure 1-3 Proposed Item Exchange

1.6 UCCnet messages


There are many different types of message passed between suppliers, retailers, and UCCnet as part of the Item Synchronization process. We will briefly describe each of them here so that you are familiar with the terms as they appear in the solution.

1.6.1 RCIR: Register Catalogue Item Registry


Adds products to the GLOBALregistry Adds products to the ITEMregistry

12

Implementing WebSphere BI Express for Item Synchronization

Allows for changes and corrections Permits performance of Data Validation before items are added

1.6.2 CI: Catalogue Item Document


Used to further describe the trade item as defined by EAN.UCC. It includes attributes that extend beyond the 35 attributes supported in the GLOBALregistry Only GTINs that have been successfully registered in the GLOBALregistry are eligible for inclusion on the CI document The CI is validated against the GLOBALregistry to ensure the CI attributes match the RCIR If there is a modification to a catalogue item, UCCnet will manage the communication to the Retailer

1.6.3 CIP: Catalogue Item Publication


Schema-based XML document submitted to UCCnet from a Data Source Trading Partner listing the specific GLN that should receive notification of item-related event actions (such as changes, corrections, delete, and adds) taken on GTINs within the global registry

1.6.4 CIN: Catalogue Item Notification


Means for source organizations to notify recipient organizations of the status of item information in the GLOBALregistry, as well as additional attributes (trade item extensions and industry specifics)

1.6.5 CIC: Catalogue Item Confirmation


Means for recipient organizations to communicate action taken to the source organization.

1.6.6 Query messages


Worklist Retrieval Only place to collect the elements other than the 35 in the GLOBALregistry

Chapter 1. UCCnet

13

GTIN Query Retrieves the 35 elements defining the GTIN from the GLOBALregistry Other Queries Organizations

1.7 UCCnet message structure


Now we move on to the structure of the UCCnet messages. All UCCnet messages are XML (either schema or DTD). For our solution in this redbook, we have chosen to use schema (XSD)-based messages. There are three layers in an XML document, as follows: Transport: How does the message get from A to B? Command: What function needs to be performed when the message arrives? Document/Data: What information does the command act upon?

1.7.1 Envelope: transport layer


messageHeader (See Example 1-1.) elements to, from, messageIdentifier, userId, password, representingParty
Example 1-1 messageHeader <?xml version="1.0" encoding="UTF-8" ?> - <uccnet:envelope communicationVersion="2.2" xmlns:uccnet="http://www.uccnet.org/schemas/2.2/uccnet" xmlns:eanucc="http://www.uc-council.org/smp/schemas/1.3/eanucc" xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance" xsi:schemaLocation="http://www.uccnet.org/schemas/2.2/uccnet ../../schema/uccnet/2.2/Envelope.xsd"> - <messageHeader> - <messageIdentifier> <value>RCIR-MSGID-001</value> </messageIdentifier> <userId>RCIRUSER001</userId> - <representingParty> <gln>0101010101010</gln>

14

Implementing WebSphere BI Express for Item Synchronization

</representingParty> </messageHeader>

body (See Example 1-2.) Either a response or a transaction element.


Example 1-2 body <?xml version="1.0" encoding="UTF-8" ?> - <uccnet:envelope communicationVersion="2.2" ... - <messageHeader> .... </messageHeader> - <body> - <transaction> - <entityIdentification> <uniqueCreatorIdentification>RCIR-TXID-001</uniqueCreatorIdentification> - <globalLocationNumber> <gln>0101010101010</gln> </globalLocationNumber> </entityIdentification> -<command> .... </command> </transaction> </body> </uccnet:envelope>

1.7.2 Transaction: Command layer


entityIdentification Who created the transaction, including GLN uniqueCreatorIdentification: acts as a transaction ID command queryCommand, notifyCommand See Figure on page 16.
Example 1-3 Transaction <transaction> <entityIdentification> <uniqueCreatorIdentification>99</uniqueCreatorIdentification> <globalLocationNumber>

Chapter 1. UCCnet

15

<gln>4134456747001</gln> </globalLocationNumber> </entityIdentification> <command> ... </command> </transaction>

Command layer: Register command


registerHeader entityIdentification, used to acknowledge the command registerCommandListEnum (ADD, DELETE, CHANGE...). registerOperand registerCatalogueItem (for Add, Change, and Correct commands) or registerCatalogueItemKey (for Delete command) or registryCatalogueItemQuery (for Query command). See Example 1-4.
Example 1-4 Register command - <command> - <uccnet:registerCommand xmlns:uccnet="http://www.uccnet.org/schemas/2.2/uccnet"> - <registerCommandHeader type="ADD"> - <entityIdentification> <uniqueCreatorIdentification>RCIR-ADDID-001</uniqueCreatorIdentification> - <globalLocationNumber> <gln>0101010101010</gln> </globalLocationNumber> </entityIdentification> </registerCommandHeader> - <registerCommandOperand> + <eanucc:registryCatalogueItem ... </registerCommandOperand> </uccnet:registerCommand> </command>

Document layer: UCCnetRegistryCatalogueItem


informationProviderOfTradeItem Mandatory element, can be same as item brand owner. brandownerOfTradeItem

16

Implementing WebSphere BI Express for Item Synchronization

Mandatory element, containing GLN and name of brand owner. dataPool catalogueItemClassification Mandatory element, for example a UDEX classification. itemDescription brandName, descriptionShort, additionalItemDescription. isTradeItemInformationPrivate Controls whether an item is visible to the public or to subscribers only productType Case, display, pallet, etc. eanuccType and eanuccCode Case code number (UN), UPC-12, EAN.UCC-13...). unitIndicator isTradeItemAConsumerUnit isTradeItemAnOrderableUnit effectiveDate Measurements quantityOfNextLowerLevelTradeItem netContent (and unitOfMeasure) height, width, depth (and unitOfMeasure) netWeight, grossWeight (and unitOfMeasure) volume (and unitofMeasure)

1.8 End-to-End flow


Finally for our UCCnet overview, we see the end-to-end flow for the item-synchronization process from the UCCnet perspective. For this flow, we assume that both supplier and retailer are using schema processing, as shown in Figure 1-4 on page 18.

Chapter 1. UCCnet

17

RCIR
GTIN/GLN/TM 35 attrs

Data validation 1

2
Data provider Supplier

UCCnet GLOBALregistry

registration response

Figure 1-4 RCIR: Item registration

1. The supplier sends a correctly-formatted RCIR message to UCCnet that includes the key values of GTIN/GLN/TM. 2. The message is received and validated by UCCnet through its validation engine. Then, the valid item data is added to the registry. 3. A RCIR Response message is sent to the supplier with the outcome of the RCIR from Step One. See Figure 1-5 on page 19.

18

Implementing WebSphere BI Express for Item Synchronization

CIN
GTIN/GLN/TM 151 attrs list of GLNs

1
1-n

UCCnet Router 2 verify existance

Data provider Supplier

3 4

UCCnet GLOBALregistry

CIN

notification response

recipients need to subscribe to GTIN, Category or GLN/Category

Recipient Worklists

Figure 1-5 Catalogue Item Notification

1. After the item has been added to the GLOBALregistry, one or more Catalogue Item Notification (CIN) messages are sent to UCCnet. Each of these messages contains the GLN of the subscribing retailer and the item details such as GTIN and UDEX category. 2. At UCCnet the router will verify that the item exists with the GLOBALregistry. 3. The retailers whose GLN is in the CIN from the supplier will be forwarded a CIN from UCCnet. 4. A CIN Response message will be sent from UCCnet to notify that the CIN has been sent to the recipients. See Figure 1-5. Important: Only GTINs that have been successfully added to the GLOBALregistry and RCIR are eligible for Catalogue Item processing.

Chapter 1. UCCnet

19

3
CIC Status: Data provider Supplier

UCCnet Router 4 2

Accept, Synchronise Reject, Review

CIC Status

UCCnet GLOBALregistry

Data Recipient Retailer


Figure 1-6 Catalogue Item confirmation

1. When a recipient organization (the retailer) has taken action with the item data that was sent in the CIN, it will send a Catalogue Item Confirmation (CIC) to UCCnet to indicate the status of the processing of that item. Statuses may be any of the following: Review The addition of the item is currently being reviewed by the retailer. Accepted The item has been accepted by the retailer but has not yet been synchronized. Synchronised The item has been accepted by the retailer and will be synchronized in their systems. Rejected The item is rejected and no further information is required.

20

Implementing WebSphere BI Express for Item Synchronization

2. UCCnet will verify with the GLOBALregistry that the GTIN in the CIC is valid and exists. 3. UCCnet will send a CIC Notification to the supplier.

1.9 Advantage of Item Synchronization


Lets reviews some of the advantages of using UCCnet to synchronize item data: Enable rapid entry into new global markets. Reduces losses due to purchase order/invoice discrepancies, product delivery errors, and time-to-market delays Improves business processes by preserving data integrity across the organizations entire global supply chain by enabling internal and external systems with the same accurate information Provides cost-effective means to electronically trade and communicate industry-compliant data and best business practice Improves customer service

Chapter 1. UCCnet

21

22

Implementing WebSphere BI Express for Item Synchronization

Chapter 2.

AS2 communications
This chapter provides an overview of the AS2 specification and discusses the function of AS2 in securely exchanging business documents over the Internet.

Copyright IBM Corp. 2004. All rights reserved.

23

2.1 Overview
Applicability Statement 2 (AS2) is a draft standard from the Internet Engineering Task Force for securely exchanging business documents over the Internet, with guarantees in place to ensure that a document is not lost. AS2 provides the instructions for software at one company to send any type of document (called a payload) to software at another company using HTTP. If you host a Web site and can browse other Web sites, you have all the connectivity required to use AS2. AS2 offers options for security ranging from sending data over a secure connection (HTTP/S) to package encryption (using a digital certificate to completely encrypt the business document). A document also can be digitally signed, letting a receiver be confident that the document is valid. The fastest way to send a document is to deliver it directly to the recipient with no intermediate routing or mailboxing, and this is exactly what AS2 specifies. AS2-capable software at the sender establishes a connection over the Internet to the receiver's AS2 software and sends the document. The receiver then gives the sending system a receipt. Because large e-commerce networks use service providers that have long guaranteed reliable document exchange, delivery has seldom been a worry for EDI managers. But as small companies begin exchanging documents over the Internet, all bets are off. Therefore, a system of receipts is needed. Fortunately, AS2 offers flexible yet standard receipts usable under many circumstances.

2.2 What is EDIINT?


EDI over the Internet (EDIINT) is a working group of the Internet Engineering Task Force (IETF) that is chartered with creating specifications for transporting EDI or XML documents over the Internet in a secure (digitally signed and encrypted), highly-reliable manner. Initially IETF focused on technologies needed to transfer existing EDI documents between existing EDI Trading Partners without the use of Value Added Networks (VANs) for the domestic and international user. Security is an issue for any organization transmitting data electronically. Business data exchanged via the Internet typically includes sensitive information, such as inventory or sales figures, intended for a specific person at a specific organization. For this reason, it is important that data transmissions address privacy, access control, and data integrity.

24

Implementing WebSphere BI Express for Item Synchronization

2.3 AS1 and AS2 specifications


Applicability Statement 1 (AS1) and Applicability Statement 2 (AS2) are the current specifications developed by EDIINT for securely transporting data between organizations via the Internet. AS1 and AS2 simplify communication by reducing the number of technologies an organization must support and manage. If every large organization used a different data transport standard, it would be cost prohibitive for their smaller business partners to exchange data with them electronically. AS1 and AS2 allow organizations to implement one solution for data exchange with all business partners who are using an AS1 or AS2 solution. The AS1/AS2 standards benefit the user by significantly reducing traditional communications costs associated with EDI. A side benefit has also been the decrease in turn-around time for business transactions using AS1/AS2. With AS1,this centered around the transfer time for e-mail. With AS2, this time has been reduced to nearly instantaneous with direct HTTP transfers (depending upon file size). The cost of implementing AS2 is the cost of a Web server. Most AS2 applications can co-exist with other Web applications (depending upon load and transaction volume). AS2 essentially creates a wrapper around EDI flat files that enables sending them over the Internet instead of over an expensive VAN. In addition, AS2 provides security and encryption around the HTTP packets. AS2 is an adjustment of AS1 so that it is capable of using HTTP instead of SMTP.It is not a replacement or a new specification as such. AS1 specifies the packaging of the data along with an initial transport mechanism (SMTP). AS2 extends the AS1 specification by adding another transport (HTTP). AS2 also broadens the specification by specifically acknowledging the usefulness of the specifications for alternate data types. AS1 and AS2 have two security options: Secure MIMEv3 PGPMIME AS2 also supports the use of HTTPS (SSL/TLS) for secure channel connections. Documents sent using AS1/AS2 may use any combination of signed and/or encryption using standard PKCS#7 functions in a number of vendor libraries. AS2 testing has used for up to: 1024 bit keys for Public Key encryption 128 bit keys for Symmetric encryption SHA1 and MD5 for hashing Triple-DES (3DES) for encryption

Chapter 2. AS2 communications

25

AS2 will support larger keys and other algorithms as they become readily available.

2.4 What kind of data can you send with AS2?


Although the AS1/AS2 specifications were originally developed around EDI, they are not payload-specific. This is a transport specification and any data may be transmitted using this framework as long as the appropriate MIME content-type is used. In many cases, this may literally be plain-text. The AS1 specification, while not ruling out other data, does not specify the data type. AS2 specifically includes XML data. Furthermore, testing, for both AS1 and AS2, have included a variety of data types (X12, EDIFACT, XML, MSWord, and so on). AS2 can seamlessly and transparently integrate into an existing system infrastructure in the same manner as adding a new VAN in historic EDI software.

2.5 UCCnet supports the AS2 protocol


Any Alliance Partner or Trading Partner that wishes to send XML messages to UCCnet via EDIINT must do so using a UCC-Certified AS2 Solution. UCCnet will only support solutions that have been tested and certified for interoperability through the Uniform Code Council Program. The Uniform Code Council in co-operation with the Drummond Group, Inc. performs the EDIINT certification.

26

Implementing WebSphere BI Express for Item Synchronization

Chapter 3.

WebSphere Business Integration Express for Item Synchronization


IBM WebSphere Business Integration Express for Item Synchronization is designed for mid-market suppliers pursuing supply chain integration through the UCCnet GLOBALregistry. Suppliers with simple product data management systems and requirements that do not need any process customization to the basic item synchronization process can use WebSphere Business Integration Express for Item Synchronization. The solution helps reduce the time and costs associated with item management.

Copyright IBM Corp. 2004. All rights reserved.

27

3.1 Features
The solution allows suppliers to send and receive item data to and from the UCCnet GLOBALregistry. The suppliers can synchronize data from internal systems with the UCCnet GLOBALregistry, allowing item information changes to occur throughout the suppliers trading network. In addition to these benefits, this product sets an integration foundation that accommodates future supply chain integration initiatives.

3.2 Technical overview and components


The Express solution includes: 1. InterChange Server Express Provides multi-threaded and concurrent business logic execution and assures data integrity. 2. Item Synchronization collaboration Provides a common process for communicating product information to trading partners through the UCCnet GLOBALregistry (We will discuss the collaboration components a little later in the following chapters.) 3. Toolset Express Includes Business Object Designer Express, Map Designer Express, Connector Configurator Express, and Relationship Designer Express Provides a graphical interface to manage your system 4. Adapters Used to connect to the back-end systems and the gateway The following adapters are available with the Toolset Express: i. Adapter for JText ii. Adapter for Java Database Connectivity (JDBC) iii. Adapter for XML iv. Adapter for WebSphere MQ v. Adapter for Java Message Service (JMS) vi. Adapter for Email vii. Adapter for Web Services viii.Adapter for iSoft Peer-to-Peer Agent.

28

Implementing WebSphere BI Express for Item Synchronization

WebSphere Business Integration Express for Item Sync includes an entitlement to three instances of any of the above technology adapters. An AS2 channel product is used as the Gateway to communicate with UCCnet. The AS2 channel product is iSoft Peer-to-Peer Agent Express. Together, these components provide the business process integration and connectivity for enterprise applications. They also allow for integration with the UCCnet GLOBALregistry.

3.3 Collaboration components


In Section 1.8, End-to-End flow on page 17, we discuss the document flow between suppliers, UCCnet, and retailers. The Item Synchronization collaboration consists of a number of collaboration templates that work together to enable supply-side trading partners to automatically add, update, de-list, or withdraw items from UCCnet when changes occur in their enterprise data store. When an update is made in the supplier system, item data will be automatically validated, reformatted, and sent to UCCnet. Suppliers communicate their new or updated information to subscribing trading partners through UCCnet.

Chapter 3. WebSphere Business Integration Express for Item Synchronization

29

30

Implementing WebSphere BI Express for Item Synchronization

Chapter 4.

iSoft Peer-to-Peer Agent


iSofts Peer-to-Peer Agent, hereafter referred to as P2PAgent, enables you to exchange documents between trading partners over the Internet in a secure and reliable way. In this section, we describe the main features and components of the P2PAgent program.

Copyright IBM Corp. 2004. All rights reserved.

31

4.1 Communication features


Because the main task of the P2PAgent is to move data from one company to an external trading partner, the communication features are an important aspect of the product. The P2PAgent program can accept data from internal applications in a number of ways. A more traditional way of passing data to the agent is by delivering files in a given directory. The agent can filter through these files using a number of selection criteria to determine what to do with a given file. Also, when a file has been sent, you can choose to rename the file or delete it. Simply preserving the file could result in the file being sent multiple times. The file system can also be used to store received files. You can configure the agent in such a way that the original file name (as it was named by the sender) is preserved, or that the file name is being generated. This last option can avoid files being overwritten accidentally. A more recent addition to the product is support for WebSphere MQ. The P2PAgent can retrieve messages from an inbox queue. It considers each message as a separate entity that should be sent to the correct destination trading partner. Also, when the agent receives documents from trading partners, the agent can store the received document as a single message in a queue. By default, such a message will be prefixed by an MQRFH2 header that contains metadata information, such as the trading partner that had sent the document and the target trading partner ID. The MQRFH2 header is constructed in such a way that this information is also available to JMS clients in the form of message properties. Further internal data delivery mechanisms include support for SMTP and HTTP. A received document or a received receipt can be delivered as an e-mail to a configured e-mail address using an SMTP server. HTTP communication for sending documents is used, for example, in a multi-machine setup of iSofts P2PAgent. However, if your internal applications can hand over EDI documents using HTTP, then they can hook into the P2PAgent directly. Since the P2PAgent program is an AS2 client program, the agent supports HTTP and HTTPS for sending and receiving documents through the Internet. The agent is also an AS1 client, which means that it needs to support SMTP for sending and receiving documents as an e-mail attachment. Figure 4-1 on page 33 summarizes the support for the different techniques to move data to and from the agent.

32

Implementing WebSphere BI Express for Item Synchronization

File System

Internet

HTTP(s) SMTP

WebSphere MQ P2P Agent HTTP

e-mail

Figure 4-1 Inbound and outbound communication options

4.2 Data integrity and security characteristics


Since the P2PAgent program is designed to move business critical data over a public network, it is required that the agent support several techniques to protect your data. If configured to do so, the agent will encrypt the data using the certificate of the target partner. This means that only the target partner can read the document, since only the target partner is supposed to have access to the private key to decrypt the document. As such, this guarantees confidentiality. The agent supports the encryption algorithms RC2 and Triple DES. For additional data integrity, you can request to use base64 encoding. As a receiver of a document, you want to be sure that the document has been sent by the trading partner that you expect. The sending partner can digitally sign the document using its private key. As a receiver, you can verify the signature using the certificate of the sender. The agent supports two digital signature algorithms: SHA-1 and MD5. Both can be combined with base64 encoding, if requested. As a sender of a document, you want to have proof that the receiver has received the document and that only he has received it. The sender can request a receipt, sometimes referred to as an MDN (message disposition notification). Receipts

Chapter 4. iSoft Peer-to-Peer Agent

33

can be delivered asynchronously or synchronously and can be signed and encrypted using the same technologies that are available for sending documents. The status of a document, including several statistics, can be generated by the P2PAgent in the form of a notice. Again, this notice can be a message in a queue or a file in a named directory. Any errors can be reported in a daily log file. Alternatively, an error for a given document can result in an error file or message specifically tied to that document. The error document can contain, for example, HTTP error codes. The P2PAgent can also be configured to try to send a document several times, for example three times at an interval of one minute. If the agent has tried to send a document the maximum allowed number of times, the document can be stored in a separate location: a given directory or queue. This feature is sometimes referred to as the recycle feature. The message or file contains nothing but the original document, while the error itself is stored in the error message or file. The advantage of this separation is that the recycled document can be used without any alteration in a back-up transmission system, such as a VAN.

4.3 Administration features


Configuring and managing a P2PAgent configuration can be done in a variety of ways. The simplest form is to use the interactive session when the agent is started. The agent runs in a command window and commands can be entered at the prompt. Example 4-1 shows the console view of the P2PAgent. After start-up, the user has executed the status command for which you can see the output in the lower part of the example. This output also shows us what different options can be configured and tuned. We will introduce and use some of them throughout this redbook. For a complete reference, please consult the product documentation.
Example 4-1 Agent startup :\iSoft_Advanced>p2pagent_odbc_ibm_unlimited.exe iSoft(R) Peer-to-Peer Agent(TM) for MQSeries(R) (C) Copyright 2001-2002 iSoft Corp. Build: 3.1.2002.10.30.1 [Nov 27 2002 15:06:36] IBM Unlimited Edition Authorized License 2003.02.05 15:30:09.521 POPT OK Error path set to [error] 2003.02.05 15:30:09.521 POPT OK Inbound errant will be stored 2003.02.05 15:30:09.531 POPT OK Log path set to [log] 2003.02.05 15:30:09.531 POPT OK Trace set to WRITE_FILE 2003.02.05 15:30:09.541 POPT OK Notice path set to [mq://FMCQM/notices] 2003.02.05 15:30:09.541 POPT OK Notices will be written to file

34

Implementing WebSphere BI Express for Item Synchronization

2003.02.05 15:30:09.561 [mq://FMCQM/workorders] 2003.02.05 15:30:09.561 2003.02.05 15:30:09.571 2003.02.05 15:30:09.581 2003.02.05 15:30:09.591 [mq://FMCQM/receipts] 2003.02.05 15:30:09.611 2003.02.05 15:30:09.621 2003.02.05 15:30:09.621 2003.02.05 15:30:09.631 2003.02.05 15:30:09.711 status ok Build: Host: Control IP:

POPT OK Work-order path set to POPT POPT POPT POPT POPT POPT POPT POPT HPIM OK OK OK OK OK OK OK OK OK Work-order searching enabled Work-order file-spec set to [wo] PKI path set to [pki] Async. receipt path set to First-receive interval set to [300000ms] Mailbox host set to [mq://FMCQM] Mailbox address set to [0.0.0.0] Mailbox port set to [0] HTTP inbound service started

3.1.2002.10.30.1 vdputteg 9.24.104.115:3501 --Config------------Partner-Pairs: 2 Key-Pairs: 3 Inbound Ctlrs: 1 Outbound Txns: 0 Transports: 0 Trace Level: 3 Buffer Size: 4096 Peer Group: 0 Role:

Data Source: SMTP Host: SMTP User:

NONE NONE NONE

--Services-------Serialize: ON Outbound: ON Control: OFF Work-Orders: ON Beacon: OFF Router: OFF Web-UI: OFF PKI Admin: OFF

--Timeouts----------------------Connect: 30.000s First-Receive: 300.000s Next-Receive: 90.000s First-Send: 30.000s Next-Send: 90.000s Resend Wait: 60.000s Beacon Wait: 20.000s Work Order Interval: 10.000s Stop Thread: 10.000s

--Options--------Local Config: YES Show Trace: YES Write Trace: YES Fast Write: NO Notices: FILE

--Locations---------------------------------------------Error Path: error Log Path: log Notice Path: mq://FMCQM/notices PKI Path: pki Receipt Path: mq://FMCQM/receipts Work-Order Path: mq://FMCQM/workorders

For settings and commands that you need to execute every time at start-up of the agent, you should use the configuration file, which is named by default p2pagent.cfg. We will use the configuration file often when implementing an iSoft solution in this redbook. Some packages of the iSoft product provide a command line utility, called buildcfg, that will quickly generate such a configuration file by asking the end user to answer some simple questions. This utility only builds a starting configuration file. It is very probable that you will need to edit this file to optimize the final configuration.

Chapter 4. iSoft Peer-to-Peer Agent

35

Series of commands that you execute from time to time but are not required to be executed during the start-up of the agent can be stored in a work order file. You can then use the batch command to execute the commands whenever this is appropriate. Work order files also can be executed automatically. The agent can be configured to monitor a directory for files with a given extension. (The default extension is .wo.) When such a file is dropped in the correct directory, the agent will read it and execute the commands. Example 4-2 shows a sample work order file. It has an XML format where individual commands are the data values of a command XML element. The actual command can be any command that is supported by the agent. The actual command does not look any different from what you would have typed in an interactive session.
Example 4-2 Sample work order file <xml> <command> send http QA_a QA_b -fNedi\edifile.x12 -r1 -cE</command> </xml>

In addition to file-based work orders, you can use a message queue. However, the contents of the message should not be in the XML format that is shown in Example 4-2. The contents of the message should be the command text only, without the xml and command tags. Unfortunately, the response or output of the command is not sent back as a reply message. The output of the command is shown in the console view and in the log file, if activated. Web-based status reporting can be turned on by executing the command start GUI. The P2PAgent will then listen on port 80 for any HTTP requests. If a request is received, it responds with the output of the status command. The standard product does not offer a complete Web-based administration tool. However, this functionality is available as an add-on product.

4.4 Load-balancing and multi-machine setup


For environments where many documents need to be sent and received, a single machine might not be sufficient to handle all the workload. iSofts P2PAgent provides a solution to this problem. The task of sending and receiving documents can be split into three different roles: The Transport role: This is the task of encrypting, decrypting, signing and verifying signatures, as well as sending and receiving documents. Encryption and digital signature algorithms are mathematically-intensive operations. Therefore, it is useful if these tasks can be spread over multiple machines.

36

Implementing WebSphere BI Express for Item Synchronization

The Router role: This is the role that can perform software-based load sharing between multiple computers that provide the Transport role. The Router provides a single point-of-entry for data of a given Internet protocol. The actual processing of the incoming data is then delegated to one of the computers performing the Transport role. Figure 4-2 graphically shows this inbound load-sharing technique.

Transport

Transport

Transport

Router

Internet

Figure 4-2 Inbound load sharing as provided by iSofts P2PAgent

The Admin role: This is the role that performs the outbound distribution in addition to other services. Documents that have been prepared for sending to trading partners are distributed by the Admin role to the computers that provide the Transport role. In addition to this outbound load sharing, the Admin role also provides administration services to manage trading partner relationships, for example. Figure 4-3 on page 38 graphically shows how the different roles work together. The EDI Generator role, for example, could be provided by WebSphere Data Interchange.

Chapter 4. iSoft Peer-to-Peer Agent

37

EDI Generator

Admin

Transport

Transport

Transport

Internet

Figure 4-3 Outbound load sharing as provided by iSofts P2PAgent

In this redbook, we will focus on an implementation of iSofts P2PAgent where all roles are performed by a single computer. For more information about setting up a multi-machine implementation of the P2PAgent, please refer to the product documentation of iSofts P2PAgent.

38

Implementing WebSphere BI Express for Item Synchronization

Chapter 5.

Business case and scenario


In this chapter we discuss the scenario that we will be building. We provide an overview of the business process involved and the flow of the data between our different participants and UCCnet itself.

Copyright IBM Corp. 2004. All rights reserved.

39

5.1 Scenario overview


This scenario presents a fictitious supplier that is thinking of starting out with UCCnet. Its long-term goal is to register all of its catalogue items with UCCnet for synchronization with its retail trading partners. The supplier has decided to register its catalog items (that is, the products it manufactures and markets) with UCCnet to reduce cost and minimize the time required to bring products to market. The result of this is to make the products more attractive and more accessible to other potential retailers and to give it an edge over the many other small businesses in the market space in which they compete. The supplier has decided to use the WebSphere Business Integration Express for Item Synchronization because it meets its needs as a smaller business by providing the function it requires out of the box. The team producing this redbook will build a simple solution that shows the basic configuration and tailoring of the product, complete with unit testing that will enable the supplier to make actual connection to UCCnet easier at a later date should they decide to go down this path. Figure 5-1 on page 41, Figure 5-2 on page 42, and Figure 5-3 on page 43 illustrate the expected data flow between the supplier, UCCnet, and the retailer. The configuration and unit testing for the supplier will be described in the following chapters. Figure 5-1 on page 41 illustrates catalog item registration.

40

Implementing WebSphere BI Express for Item Synchronization

RCIR
GTIN/GLN/TM 35 attrs

Data validation 1

2
Data provider Supplier

UCCnet GLOBALregistry

registration response

Figure 5-1 Catalog item registration

Figure 5-2 on page 42 illustrates catalog item notification.

Chapter 5. Business case and scenario

41

CIN
GTIN/GLN/TM 151 attrs list of GLNs

1
1-n

UCCnet Router 2 verify existance

Data provider Supplier

3 4

UCCnet GLOBALregistry

CIN

notification response

recipients need to subscribe to GTIN, Category or GLN/Category

Recipient Worklists

Figure 5-2 Catalog item notification

Figure 5-3 on page 43 illustrates catalog item confirmation.

42

Implementing WebSphere BI Express for Item Synchronization

3
CIC Status: Data provider Supplier

UCCnet Router 4 2

Accept, Synchronise Reject, Review

CIC Status

UCCnet GLOBALregistry

Data Recipient Retailer

Figure 5-3 Catalog item confirmation

5.2 Business process overview


The supplier holds the Item data in an ERP application. The following are the steps involved in registering new item information: 1. The supplier registers the new GTIN/GLN/TM combination with UCCnet GLOBALregistry in the form of a Register Catalogue Item Register Add (RCIR_ADD). 2. UCCnet sends a response to the supplier with the result of the RCIR operation in the form of a message containing an RCIR_RESPONSE. 3. The supplier publishes the item information to UCCnet in the form of one or more Catalogue Item Notification (CIN) messages. 4. UCCnet sends a CIN to each of the subscribing retailers. 5. The retailer authorizes (or otherwise) the item information and sends a Catalogue Item Confirmation (CIC) to UCCnet.

Chapter 5. Business case and scenario

43

6. UCCnet sends a response to the supplier in the form of a message containing the CIC information from the retailer.

5.3 Technical process overview


Now we can outline each of the stages of the processing for adding a new item to UCCnet. Each stage is referred to as a workflow in this instance.

5.3.1 ItemAdd workflow (add a new item to UCCnet)


The following steps occur in the ItemAdd workflow: 1. An event occurs in the supplier ERP system that provides the item data to the connector. (In this example, we use the JDBC Connector that polls for new item events.) 2. The JDBC Connector converts the input from the supplier into an application-specific business object. 3. The JDBC Connector passes the application-specific business object to the InterChange Server. 4. The mapping services of the InterChange Server are called and mapping is performed to transform the application-specific business object into a generic ItemBasic business object (with a Create verb). 5. The UCCnet_ItemSync collaboration object accepts the object on its From port and checks that required fields contain information. (This check verifies that item data exists for fields required by UCCnet.) 6. If all required fields are complete, the collaboration object continues processing it. If all required fields are not complete, the collaboration object aborts processing and sends an email to a configured address (in our scenario, a Port connector). 7. The UCCnet_ItemSync collaboration object adds an entry for the new item to the PROCESSED_GTIN table, setting the value for the withdrawn field for this entry to N. 8. The UCCnet_ItemSync collaboration object adds an entry to the audit_log table to identify the ItemAdd transaction processed. 9. The UCCnet_ItemSync collaboration object delivers the ItemBasic business object to the ItemCommandRouter collaboration object. 10.The ItemCommandRouter collaboration object receives the business object and determines that it represents an item to be added to UCCnet. Then, it passes the business object to the TO_RCIR port.

44

Implementing WebSphere BI Express for Item Synchronization

11.The ItemBasic business object is converted into an application-specific business object by the CwItemBasic_to_UCCnetXSD_envelope_ registerCommand_itemAddChange map. 12.Once the conversion is complete, the business object is passed to UCCnet through the AS2 channel connector (in our scenario, the iSoft P2P Agent Connector). 13.The connector sends the business object to the Data Handler for XML, which produces the ItemAdd XML message in UCCnet format. 14.The connector then passes the message to the AS2 channel server (in our scenario, the iSoft P2P Agent Express). 15.The AS2 channel server creates the digest. Then, it encrypts and then transmits the ItemAdd message to UCCnet. 16.An RCIR_ADD_Response notification is generated by UCCnet to indicate a successful ItemAdd. This notification is returned to the AS2 channel server. 17.The AS2 channel server delivers the notification to the AS2 channel connector. 18.The AS2 channel connector sends the notification to the Data Handler for XML, which converts it into a UCCnetXSD_envelope business object. The business object contains the entire UCCnet notification, including each individual data instance and the commands related to it. 19.The business object is passed to the InterChange Server. 20.The mapping services are invoked. The application-specific business object is converted to a UCCnetGBO_envelope business object by passing through the UCCnetXSD_envelope_to_UCCnetGBO_envelope map. 21.The generic business object is passed to a UCCnet_processWorklist collaboration object. 22.The UCCnet_processWorklist collaboration object receives the business object on its From port, identifies it as an RCIR_ADD_RESPONSE notification, and dispatches it to its RCIR_ADD_RESPONSE subdiagram.

5.3.2 CatalogueItemNotification_Add workflow


As a result of the ItemAdd workflow, UCCnet has been updated with the new item information. Now, the supplier's demand-side trading partners must be made aware that the item is available. This on-going process is referred to as the CatalogueItemNotification_Add workflow. The RCIR_ADD_RESPONSE subdiagram does the following:

Chapter 5. Business case and scenario

45

1. It retrieves the ItemBasic business object for the received message (using the DestinationAppRetrieve port (We use the JDBC connector to retrieve the item data from our ERP application.) 2. It logs the notification in the audit_log table 3. It sends the ItemBasic business object out through its CIN_DISPATCHER port to the UCCnetXSD_CIN_Dispatcher collaboration object 4. The UCCnetXSD_CIN_Dispatcher collaboration object receives the ItemBasic business object on its From port 5. It maps the ItemBasic business object to a UCCnetXSD_envelope business object using the map defined in its collaboration parameters. 6. The collaboration object uses the category code from the new UCCnetXSD_envelope to retrieve the GLNs of any trading partners that subscribe to the category found in the CIN_DISPATCHER_GLN_FILE property. 7. The collaboration object sends a CatalogueItemNotification_ADD (CIN_ADD) business object out to the AS2 connector for each GLN found in the GLN subscription file. 8. At this point, the trading partners can respond to UCCnet with any of the following Catalogue Item Confirmation responses: REVIEW This state is used to tell parties that an item is being reviewed by the retailer. REJECTED This state is used to tell parties that an item is rejected and that no additional information is requested at this time. ACCEPTED This state is used to tell initiators that an items has been accepted by the retailed, but has not yet been synchronized. This is similar to the UCCnet Pre-Authorization. SYNCHRONISED This state is used to tell initiators that an item has been accepted by the retailer and will be synchronized. This is similar to the UCCnet Authorization. The rest of this example assumes that a demand-side trading partner has responded with a SYNCHRONISED response. 9. UCCnet performs a compliance check on the data and, if all the data exists in the appropriate format, generates a SYNCHRONISED notification to indicate a successful receipt.

46

Implementing WebSphere BI Express for Item Synchronization

10.The notification is returned to the AS2 channel server. 11.The AS2 channel server delivers the notification to the AS2 channel connector. 12.The AS2 channel connector sends the notification to the Data Handler for XML, which converts it into a UCCnetXSD_envelope business object. This business object contains the entire UCCnet notification, including each individual data instance and the commands related to it. 13.The business object is delivered to the InterChange Server. 14.The mapping services are invoked and the application specific business object is converted to a UCCnetGBO_envelope business object by passing it through the UCCnetXSD_envelope_to_UCCnetGBO_envelope input map. 15.The business object is delivered to the UCCnet_processWorklist collaboration object. 16.The UCCnet_processWorklist collaboration object receives the object on its From port, identifies it as a CATALOGUE_ITEM_CONFIRMATION response, and dispatches it to its CATALOGUE_ITEM_CONFIRMATION subdiagram.

5.3.3 CatalogueItemConfirmation workflow


The CATALOGUE_ITEM_CONFIRMATION subdiagram carries out the following tasks: 1. It sends an email to the recipients defined by the UCCnet_processWorklist_ AUTHORIZATION_RESPONSESObject business object, which is an instance of the Notify_by_eMail collaboration template. (In our scenario, we bind to a Port connector.) 2. It logs the event in the audit_log table. In this way the Item Synchronization is achieved between the supplier and the retailer.

5.3.4 Sending email through UCCnet_processWorklist collaboration object subdiagrams


Although we are not using the sending email functions, it is worth describing the process. A UCCnet_processWorklist collaboration object contains several subdiagrams that respond to specific types of workflow processing. Several of these subdiagrams include functionality that sends an email to a set of configured addresses by instantiating a collaboration object based on the Notify_by_eMail collaboration template, an example of this is the CATALOGUE_ITEM_

Chapter 5. Business case and scenario

47

CONFIRMATION, which instantiates a collaboration object called


UCCnet_processWorklist_CATALOGUE_ITEM_CONFIRMATION. Objects based on the Notify_by_eMail collaboration template can be configured to contain the email message, subject, and recipients specific to their processing situation through its EMAIL_MESSAGE, EMAIL_SUBJECT, and EMAIL_NOTIFICATION_RCPTS configuration properties, respectively. These properties can also contain the names of files, which permits messages, subjects, and recipients to be shared among multiple collaboration objects. Also, more than one recipient can be specified to receive email through use of a comma-delimited list. Finally, email message and subject text can be constants that contain variables. The Notify_by_eMail collaboration object substitutes data from the business object into these variables dynamically.

5.4 Component overview


We use Microsoft Windows 2000 Professional Server to simulate the Item Catalog function of an ERP system for the supplier. WebSphere Business Integration Express is installed as the only broker, along with the JText, JDBC, and iSoft P2P Adapters. The JDBC Adapter is used to communicate with a representative back-end system. The iSoft P2P Adapter passes information to the iSoft P2P Agent Express that, in turn, passes equivalent XML messages to UCCnet via AS2. The JText Adapter is used for initiating the sending of worklist request to UCCnet. Note: The distinction between an adapter and a connector is worth mentioning here. You sometimes see the terms adapters and connectors being used apparently interchangeably. However, the difference is that an adapter is a component that comes with the product. A connector is a configured instance of one type of adapter. So, the JDBC adapter is a component, but the JDBC connector is a configured, runnable instance of a JDBC adapter. See Figure 5-4 on page 49 for an illustration of supplier components.

48

Implementing WebSphere BI Express for Item Synchronization

Supplier
UCCnet Global Registry AS2 iSoft P2P Agent Express JText Adapter

P2P Agent Adapter

WebSphere Business Integration Express

JDBC Adapter

Existing Systems

Figure 5-4 Supplier components

Chapter 5. Business case and scenario

49

50

Implementing WebSphere BI Express for Item Synchronization

Part 2

Part

Install and configure

Copyright IBM Corp. 2004. All rights reserved.

51

52

Implementing WebSphere BI Express for Item Synchronization

Chapter 6.

About some of the key components


In this chapter, we discuss the key components of the item synchronization solution using the InterChange Server. We give a high-level overview of some of these components, as follows: What collaborations are and which collaborations are key What business objects are and which are the key business objects What are connectors and what do they do What are maps and what do they do What relationships are and what they are used for in this solution Other tables of interest

Copyright IBM Corp. 2004. All rights reserved.

53

6.1 What are collaborations?


Within the InterChange Server, collaborations contain the business processing logic to be performed on business objects. They control what data will be sent from applications (for event processing) and what data will be sent to receiving applications. Collaborations are comprised of Java code that represents the business logic. Collaboration objects, which are the runtime components, reference collaboration templates. The templates consist of the following: Scenarios (processing logic for different conditions, such as update, create and so on). Ports that determine where the processing is coming from and going to. Properties that control the processing logic, such as filtering attributes, processing for error conditions, and so on. The runtime objects, when created, put the actual values to the ports, such as which connector will send and/or receive the processing and whether the collaboration passes on to another down stream collaboration (known as collaboration grouping).

6.1.1 What collaborations are installed?


A number of collaboration templates are provided as part of the item synchronization solution. These templates are instantiated as collaboration objects to provided the logic and process for the solution. The main templates are: 1. UCCnet_ItemSync collaboration template An object based on the UCCnet_ItemSync collaboration template performs processing to add, update, delist, or withdraw an item in response to events that occur in an ERP application. A process flow is initiated in the collaboration object when it receives a triggering business object, containing the data for the event, from a connector for the ERP application. The collaboration object checks that fields required by UCCnet to contain information are not NULL. It also updates relational tables provided with the item synchronization solution that track audit log entries, trading partners, and all published items. 2. UCCnet_requestWorklist collaboration template An object based on the UCCnet_requestWorklist collaboration template sends query commands to UCCnet via a connector, depending on the connectivity type used:

54

Implementing WebSphere BI Express for Item Synchronization

A UCCnet_requestWorklist collaboration object is triggered when it receives a UCCnetGBO_envelope business object from the JTextRWL Connector. The JTextRWLConnector sends this triggering business object after it polls an input file folder and discovers an XML message that contains a UCCnet worklist query command. (The mechanism by which the UCCnet worklist query command is placed in the input file folder is independent of the collaboration template and must be set up by the user--more on this in later chapters.) 3. UCCnet_processWorklist collaboration template An object based on the UCCnet_processWorklist collaboration template processes the notifications that a UCCnet_requestWorklist collaboration object requested from UCCnet. This collaboration object is triggered when it receives a UCCnetGBO_envelope business object from an AS2 channel connector. 4. UCCnetXSD_CIN_Dispatcher collaboration template An object based on the UCCnetXSD_CIN_Dispatcher collaboration object fulfills one of the following two tasks: It processes an ItemBasic business object received from the UCCnet_processWorklist collaboration object as part of an item-add or item-change request. It processes an ItemBasic business object received from the ItemCommandRouter collaboration object as part of an item-delist or item-withdraw request. Note: This collaboration template is used only if you are implementing a solution with the schema-based XML definition (as we are in the redbook). As objects based on this template can receive a triggering object from one of two collaboration objects, you must create two collaboration objects from this template--more on this in the following chapters. 5. ItemCommandRouter collaboration template An object based on the ItemCommandRouter collaboration template is used to process ItemBasic business objects received from objects based on the ItemSync collaboration template. It processes an object in one of two ways: For item-add and item-update requests, the collaboration object sends an RCIR through the AS2 channel connector. For item-delist and item-withdraw requests, the collaboration object passes the business object to a UCCnetXSD_CIN_Dispatcher collaboration object for further processing.

Chapter 6. About some of the key components

55

Note: This collaboration template is used only if you are implementing a solution with the schema-based XML definition.

6.2 What are business objects?


Collaborations and connectors interact by sending and receiving business objects through the InterChange Server. A business object reflects a data entity, a collection of data that can be treated as an operative unit. For example, a data entity can be the equivalent to a customer, an order, or, in the case of the item synchronization solution, an item from a catalog (inclusive of all of the entitys fields). The entity would typically be used in an application or over the Web to contain business information. A business object is a self-describing unit that contains a type (its name), processing instructions (a verb), and data (attribute values). Business Object Type Each business object has a type name that identifies it within the InterChange Server. For example, the type might be Customer, Employee, or Catalog_Item. Business Object Verbs A business object verb specifies an action in relation to the attribute values. The verb can indicate various types of actions, depending on the role of the business object (for example: create, update, and delete). Attribute Values Attribute values represent data fields associated with the data entity, such as Last Name, First Name, Employee ID, ProductID, and UPCEAN Code Some attributes, instead of containing data, contain child business objects or arrays of child business objects. Many of the UCCnet message structures are extremely complex and contain many levels of child business objects within child business objects: these are known as hierarchical business objects.

6.2.1 Application-Specific and Generic Business Objects


The InterChange Server includes two kinds of business objects: Application-specific An application-specific business object reflects data entity attributes and the data model of a specific application or other programmatic entity.

56

Implementing WebSphere BI Express for Item Synchronization

Generic A generic business object contains a set of business-related attributes that are common across a wide range of applications, not tied to any specific application's data model. When the connector agent (through its application-specific component) detects an application event such as an update, it retrieves the appropriate data entity from the application and transforms it into an application-specific business object. After the connector agent has built an application-specific business object, it sends the business object to the connector controller in the InterChange Server. The connector controller exchanges business objects between collaborations and the connector agent. Collaborations are generally application-neutral, so the business object that a connector controller exchanges with a collaboration must be a generic business object. The use of generic business objects enhances the reusability of the collaboration because its business logic is not bound to specific versions of specific applications.

6.2.2 What are the key business objects?


Many business objects are provided with the solution that define the complex message structures required for UCCnet processing. The definition and creation of application-specific business objects are the responsibility of the user and will be dependant on an organizations data schemas. We will show some simple application-specific business objects in the following chapters to allow you to get started. The main business objects provided for UCCnet include the following: 1. ItemBasic business object This business object is used to trigger UCCnet_ItemSync, ItemCommandRouter, and UCCnetXSD_CIN_Dispatcher collaboration objects. It contains data attributes that are common across all of the logical organizations that use the item data. A UCCnet_ItemSync collaboration object uses the ItemBasic business object to compare the data it contains with the local information stored about (1) items processed by the solution and (2) trading partners who are sources or targets of retail item data. An ItemCommandRouter collaboration object uses the ItemBasic business object to determine how to route the data the business object holds.

Chapter 6. About some of the key components

57

A UCCnetXSD_CIN_Dispatcher collaboration object uses the ItemBasic business object to build CatalogueItemNotification messages to send to trading partners. 2. UCCnetGBO_envelope business object When a UCCnet_processWorklist collaboration object exchanges data with an AS2 channel connector, the data must be mapped between the business object used by the connector and the UCCnetGBO_envelope business object used by the collaboration object. A UCCnet_requestWorklist collaboration object uses this business object to exchange messages between the JTextRWL connector and an AS2 channel connector. A UCCnet_processWorklist collaboration object uses this business object to exchange messages with the AS2 channel connector. A UCCnetXSD_CIN_Dispatcher collaboration object uses this business object to exchange messages between an ItemCommandRouter collaboration object and an AS2 channel connector. 3. UCCnetDTD_envelope business object This business object is the result of an ItemBasic business object being converted by an AS2 channel connector when the DTD XML definition type and iSoft connectivity are used. Unlike the UCCnetGBO_envelope business object, it does not contain default values for the XMLDeclaration and DocType attributes and does not contain the TPIRouteInfo child business object. Before this business object is processed by the collaboration objects included with the solution, it must first be transformed into a UCCnetGBO_envelope business object by passing through the UCCnetDTD_envelope_to_UCCnetGBO_envelope map. (Because our solution is using XSD processing, we will not be using this business object). 4. UCCnetXSD_envelope business object This business object is the result of an ItemBasic business object being converted by an AS2 channel connector when the XSD XML definition type and iSoft connectivity are used. Unlike the UCCnetGBO_envelope business object, it does not contain default values for the XMLDeclaration and DocType attributes and does not contain the TPIRouteInfo child business object. Before this business object is processed by the collaboration objects included with the solution, it must first be transformed into a UCCnetGBO_envelope business object by passing through the UCCnetXSD_envelope_to_UCCnetGBO_envelope map. As mentioned earlier, these business objects are very complex and contain many child objects, as a user, you will probably be most concerned with the mapping

58

Implementing WebSphere BI Express for Item Synchronization

your own data to the complex ItemBasic business objects. (See Figure 6-1 on page 60.)

Chapter 6. About some of the key components

59

Figure 6-1 XSD envelope business object and some of the child business objects

60

Implementing WebSphere BI Express for Item Synchronization

There are other business objects provided for this solution (such as business objects for use with TPI processing). However, because we are not using this product in our solution, they are not discussed here.

6.3 What are connectors?


A connector mediates between an application and one or more collaborations. A connector can be specific to an application (such as SAP R/3 or iSoft Peer-to-Peer Agent), to a data format or protocol (such as XML or EDI), or to a technology component (such as JDBC). See 3.2, Technical overview and components on page 28 for the connectors that are packaged as part of the item-synchronization solution. A connector's communications with collaborations can take two forms:

Application event notifications, in which connectors for specific applications


pass to collaborations

Request processing, in which connectors perform on behalf of collaborations.


Most connectors share certain common behaviors, differing only in the manner in which they interact with applications and with application-specific business objects. A connector is composed of two major components: 1. Connector Controller The connector controller interacts directly with collaborations and runs as a component within the InterChange Server process. 2. Connector Agent A client connector framework runs as a separate process from the InterChange Server and, together with an application-specific component, interacts directly with an application. For our purposes, the client connector framework and the application-specific component are together referred to as the connector agent. Each connector agent is unique, because it communicates with its application according to the application's interfaces. If there is an application programming interface (API), the connector can use it. However, a connector for an application without an API can use whatever method the application provides, such as user exits or SQL (in the case of a JDBC connector). To detect application events in which collaborations are interested, a connector polls the application or uses the application's event callback notification

Chapter 6. About some of the key components

61

mechanism, if there is one. A connector can also interact with the application at the command of a collaboration or to verify the results of its previous requests.

6.4 What are maps?


Data mapping is the process of converting business objects from one type to another. Data mapping is required whenever the InterChange Server sends data between a source and a destination that does not share the source's data model exactly. Unlike custom application integration solutions that map data directly from one application to another, InterChange server collaborations generally use the generic business object between the application-specific data models. The generic business object serves as a common, cross-application data set. If you change applications in the future, you only need to get a new connector and map the new application-specific business object to the generic business object. Collaborations then continue to work as they did previously. Whenever a collaboration transfers a business object across dissimilar applications, mapping transforms the business object to and from the common data set. Business object transformation takes place: From application-specific to generic when business objects pass from connectors to collaborations From generic to application-specific when business objects pass from collaborations to connectors Each connector controller manages the mapping of business objects that pass between its connector agent and the InterChange Server. To actually perform data mapping, however, the system invokes the use of the mapping services that invoke the maps. A connector controller invokes the mapping function when it receives business objects that require mapping. A map contains the Java code that specifies how to transform attributes from one or more source business objects to one or more destination business objects. You need a map for every business object that you intend to transfer between different applications. When you modify business objects, you might also need to modify the associated maps. You typically create one map for each source business object you want to transform.

6.4.1 What do they do in the solution?


In the item synchronization solution, many maps are provided that perform the transformation of data from the ItemBasic format to the various UCCnet-required

62

Implementing WebSphere BI Express for Item Synchronization

formats. Maps are also provided to perform mapping between the UCCnet GBO formats and the UCCnet envelope formats. As with the business objects, mapping operations can be very complex. Many maps will call a sub-map to perform the mapping required for a child business object. See Figure 6-2.

Figure 6-2 Some of the supplied maps

Also, as with the business objects, no maps are provided to map application data to the ItemBasic object and vice versa. As the user, you must analyze your data

Chapter 6. About some of the key components

63

and create maps that will perform these mapping activities before the collaborations continue. We cover this in later chapters.

6.5 What are relationships?


A relationship definition establishes an association between two or more data entities in the InterChange Server system. Relationship definitions within maps are most often used for transforming business object attributes in which the data has a similar purpose but is represented differently in each application. Most maps use one or a few relationship definitions. There are two types of relationships: Identity relationships Identity relationships are used when different applications uniquely identify the same identity (for example, a customer number in an ERP system and a customer number in a CRM system). Identity relationships are also known as dynamic relationships because the data is generally created and updated dynamically by the responsible application. Furthermore, the relationship data is usually updated dynamically via map calls (when a new identity is created by the application, for example). Lookup relationships Lookup relationships are used when data meaning the same thing is stored as different values in different systems. For example, a country in an ERP system may be stored by name but may be stored by the ISO country code in a CRM system. The lookup relationship allows for semantic resolution of these values. Lookup relationships are also known as static relationships because the data values are usually loaded once. Then, those values are normally static. A relationships is stored as (1)a series of database tables in the repository (one for each participant or participating system) and (2) a stored procedure that controls the access and actions performed on these tables (such as update, insert, and so on).

6.5.1 Where are they used


Within the item synchronization solution, there are nine relationships.These relationships provide for the transformation of some of the values required by UCCnet. These values include fields such as unit of weight, unit of measure, and so on.

64

Implementing WebSphere BI Express for Item Synchronization

All of these relationships are implemented as static (lookup) relationships and the lookup of these relationship tables is performed as part of the mapping functions between the generic item business object and the UCCnet envelope business objects. The creation and population of these relationships is part of the post installation configuration. It is discussed in the 8.2, Load relationship tables on page 97. See Figure 6-3.

Figure 6-3 Relationships

Of these nine relationships: Two have a single participant and are used as a look-up only. These are processed GTINs and trading partner information. Seven have two participants and are used for data transformation. The table names indicate the name of the relationship and the name of the participant, as in the following examples: LIUT_UCCNET_T Contains lookup values for unit of length, height, and weight as known by UCCnet

Chapter 6. About some of the key components

65

LIUT_SAP_T Contains lookup values as they relate to an ERP or customer application. The name SAP does not imply that you must have an SAP system: it is merely a reference to an ERP system. The data in these tables is an indicative sample only, and each customer must populate these tables with his own data after analysis of his values and the UCCnet equivalent has been performed. This can be done by using the Relationship Manager or by inserting values using your favorite DB2 tool. In the solution, the relationships in Table 6-1are used in the mapping operations:
Table 6-1 Relationships Relationship name GTIN LiUT PrTyNT SiUT TPTable UDEX UpcTyT VoUT WeUT Usage Processed GTIN Unit Of Length Weight Height Primary Unit of Measure Size Unit Trading Partner Product Hierarchy (UDEX category) UPC Type (Bar Code Id) Unit of Volume Unit of Weight

6.6 Other tables of interest


As mentioned in the previous section, there are some tables that are defined as relationships but only have one participant (that is, one table). These two tables are the following: PROCESSED_GTIN table The PROCESSED_GTIN table is a relational table provided with the item synchronization solution. It maintains the complete list of the supplier's items that exist in the UCCnet repository by using each item's GTIN as the primary key. This table permits a UCCnet_processWorklist collaboration object to process incoming INITIAL_ITEM_LOAD_REQUEST commands without the need to communicate with the back-end ERP system.

66

Implementing WebSphere BI Express for Item Synchronization

The UCCnet_ItemSync and UCCnet_processWorklist collaborations both interact with this table. A UCCnet_ItemSync collaboration object updates the table each time it processes an ItemBasic business object. The collaboration object performs this processing only if all of the fields for which UCCnet requires data are complete. TRADING_PARTNER table The trading_partner table, or GLN table, is a relational table provided with the item synchronization solution. It maintains the complete list of trading partners by using the Global Location Number (GLN) of each as the key. The table is configured for all of correct columns as part of the post-installation activities that we cover later in this book. After these columns are in place, the table must be populated manually through methods provided by the individual database. We also cover this in the following chapters.

6.6.1 Audit Log Table


Another table that is provided is the audit_log table. It is used to track the events associated with UCCnet activities to support complete end-to-end auditing. This audit support provides irrefutable documentation that transmissions have occurred between trading partners. It also provides a profile of which trading partners are participating in the trading community and with which products that participation is associated. The audit service is composed of four components: 1. An audit_log table that receives log entries from each participant component in the solution. 2. A logging framework that is utilized by IBM WebSphere Business Integration Collaborations and Adapters to log critical events to the audit_log table. 3. An audit log merge process that periodically sweeps the TPI server log for new entries, which are added to the unified audit_log table. The iSoft Peer-to-Peer Agent logs are not swept for new entries, so we will not be using this in our solution. 4. A report generation facility to support data analysis and visualization. UCCnet_ItemSync and UCCnet_processWorklist collaboration objects use the audit_log table. The Configurator of the audit service is outlined in later chapters. Now that we have an overview of the terminology and the basics of the solution, we move on to installing and configuring the solution.

Chapter 6. About some of the key components

67

68

Implementing WebSphere BI Express for Item Synchronization

Chapter 7.

WebSphere BI Express installation and verification


This chapter describes the installation procedures to configure the supplier-side server for the solution. We used the following products: JDK 1.3.1 DB2 V8.1 with Fix Pack 2 WebSphere MQ V5.3.1 with CSD4 WebSphere Application Server Express v5.0.2 Microsoft Visual Studio C++ iSoft P2P Agent Express WebSphere Business Integration Express V4.3. Once all of the required software is in place, we carry out some verification activities prior to moving on to the actual solution configuration of the products.

Copyright IBM Corp. 2004. All rights reserved.

69

7.1 JDK
Install the JDK according to the product instructions.

7.2 DB2 V8.1


Install DB2 V8.1 according to the product instructions. Install Fix Pack 2 according to the product installation instructions. Choose a Typical install with an install path of c:\SQLLIB.

7.3 WebSphere MQ V5.3.1


Install WebSphere MQ according to the product installation instructions. Install CSD04 according to the product installation instructions. Choose a Custom install to ensure that all Java components are included.

7.4 WebSphere Application Server Express V5.0.2


Install WebSphere Application Server Express according to the product installation instructions. Choose a Typical install with an install path of c:\IBM\WebSphere\ Express502.

7.5 Microsoft Visual Studio C++


Before we are ready to install WebSphere Business Integration Express, we need to install a C++ compiler in order to compile DB2 stored procedures, which the application creates to store the relationships for its translation maps. We have chosen to install the Microsoft Visual Studio C++ compiler. Install the C++ product according to the product installation instructions. Choose a Typical install. See Example 7-1.
Example 7-1 Typical install Path C:\Program Files\Microsoft Visual Studio\Common\Tools;C:\Program Files\Microsoft Visual Studio\VC98\bin;c:\jdk131\bin;C:\Program Files\Microsoft Visual Studio\Common\MSDev98\Bin;c:\jdk131\bin

70

Implementing WebSphere BI Express for Item Synchronization

Include C:\Program Files\Microsoft Visual Studio\VC98\include Lib C:\Program Files\Microsoft Visual Studio\VC98\lib

Important: When the compiler is installed, many environment variables are stored for the user who installed the product. Edit the systems environment variables.Copy the user variable for administrator contents of Include, path and lib to the corresponding system variable. The new system values for Include, path, and lib should include the setting for Visual C++ so that DB2 can use c++ utilities for compiling stored procedure and so forth. Restart DB2 and related db2 processes so that these changes are in effect.

7.6 WebSphere Business Integration Express


We are now ready to install WebSphere Business Integration Express. 1. Click Launchpad to begin the installation. See Figure 7-1.

Figure 7-1 Launchpad

Chapter 7. WebSphere BI Express installation and verification

71

2. Click Software Prerequisites, to make sure that all the required components are installed. See Figure 7-2. Note: As part of the setup here, we install WebSphere MQ V5.3 and CSD4 (one version higher than the recommended), so we ignore the Not Installed error message.

Figure 7-2 Software prerequisites

3. Select the Database Setup to configure the application database, and click Continue. See Figure 7-3 on page 73.

72

Implementing WebSphere BI Express for Item Synchronization

Figure 7-3 Database Setup

4. Enter the value for the DB2 compiler path. (For our installation, it is where we stored the vcvars32.bat file during the C++ compiler installation). 5. Ensure that the Use the default value for DB2_SQLROUTINE_COMPILE_COMMAND box is checked. See Figure 7-4 on page 74.

Chapter 7. WebSphere BI Express installation and verification

73

Figure 7-4 Database Setup

6. Click Continue. The processing may take a few minutes because a Windows user (smbadmin) and a DB2 database (SMB_DB) are being created. 7. After the database configuration has completed, select Install Product. See Figure 7-5 on page 75.

74

Implementing WebSphere BI Express for Item Synchronization

Figure 7-5 Install Product

Note: This error message can be ignored because it relates to the WebSphere MQ CSD3 not being installed. SInce we have already installed CSD4, we ignore the prerequisites and launch the installation. 8. Click Ignore prerequisites. 9. Select Launch Installation to continue. See Figure 7-6 on page 76.

Chapter 7. WebSphere BI Express installation and verification

75

Figure 7-6 Welcome screen

10.When you see the Welcome screen, click Next to continue. See Figure 7-7.

Figure 7-7 Accept license agreement

11.Accept the license agreement and click Next to continue. See Figure 7-8 on page 77.

76

Implementing WebSphere BI Express for Item Synchronization

Figure 7-8 Installation path

12.Select the type of installation required (Custom) and click Next to continue. See Figure 7-9 on page 78.

Chapter 7. WebSphere BI Express installation and verification

77

Figure 7-9 Select custom installation

13.Select Custom and click Next to continue. See Figure 7-10.

Figure 7-10 Select required adapters

78

Implementing WebSphere BI Express for Item Synchronization

14.Select the Adapters required for your installation. We choose: iSoft JDBC JText 15.Click Next to continue and verify the selected components. See Figure 7-11.

Figure 7-11 Verify components

16.Verify the components for installation and click Next to continue. This next stage may take a while because (1) the product is being installed and (2) there are also InterChange Server Express deployments going on under the covers. We check the outcome of these deployments as part of the verification process. See Figure 7-12 on page 80.

Chapter 7. WebSphere BI Express installation and verification

79

Figure 7-12 Summary information

17.Read the summary information and click Next to continue. See Figure 7-13.

Figure 7-13 Restart your machine

18.Select Yes to restart the computer.

80

Implementing WebSphere BI Express for Item Synchronization

The installation of WebSphere BI Express is complete after your machine has restarted. We will now move on to verify that the installation has completed successfully.

7.7 Installation verification


We will now review the installed components and verify that all of the installation and behind the scenes deployment has been successful. Important: Before we continue, the userid smbadmin is created as part of the installation of this product for all repository database accesses. Before continuing, carefully check that this userid is part of the Windows Administrators group and that there is no password expiry enabled.

19.Start the System Manager using the following path: IBM WebSphere Business Integration Express for Item Sync Toolset Express Administrative System Manager. 20.The Studio might open in the Resource perspective instead of the System Manager perspective. If so, select Window Open Perspective Other and select System Manager perspective from the presented list of available perspectives. See Figure 7-14.

Figure 7-14 Open the System Manager perspective

Chapter 7. WebSphere BI Express installation and verification

81

7.7.1 Review initial start-up of the InterChange Server


Before starting the InterChange Server, we are going to review the log file that was generated during the first start-up of the InterChange Server, which is done under the covers during the installation of WebSphere BI Express. 1. Open an Explorer window and browse to the folder C:\IBM\WebSphereItemSync. 2. Locate the file InterChangeSystem.log and open it in Notepad or WordPad. 3. Verify that the creation of the repository went well and that the ICS has reached its ready state without any major errors. If you browse the log file, you will see that the name of the InterChange Server that is started is WebSphereICS. You will also see the creation of all of the repository tables and a number of deployment sessions for repository objects. Important: If you need to run multiple InterChange Servers on the same subnet, it will be necessary to change the name of the InterChange Server prior to registering it because each ICS must have a unique name. We will discuss this more as we go along. 4. Open the file deploy.log in the folder C:\IBM\WebSphereItemSync\bin and confirm your findings. The log file indicates that a number of relationships have been deployed. This means that stored procedures are generated and deployed in DB2 and that tables have been created. 5. Open the following folder: C:\SQLLIB\FUNCTION\ROUTINE\ sqlproc\ SMB_DB\SMBADMIN. 6. This should contain a number of C files, SQC files, DLLs, and log files. The deployment of an ICS relationship results in the generation of the C and SQC file and the compilation of a DLL. 7. Open a log file (in this folder) to verify that the compilation ran successfully. If relationship deployment problems arise due to an incorrect set-up of Visual C++, this log file is likely the only place where you are going to find information about the failure. 8. Start the DB2 Control Center in the Start Programs folder General Administration Tools and expand the tree structure on the left to locate the stored procedures (shown in Figure 7-15 on page 83). Verify that the stored procedures exist with the correct schema of SMBADMIN.

82

Implementing WebSphere BI Express for Item Synchronization

Figure 7-15 Locate stored procedures

9. Switch to the folder Tables, as shown in Figure 7-16, and verify that tables exist for the deployed stored procedures. You can right-click on these tables to get a snapshot of the records in those tables. However those tables should be empty at this time.

Figure 7-16 Locate tables associated with stored procedures

Chapter 7. WebSphere BI Express installation and verification

83

7.7.2 Perform WebSphere MQ configuration


While the installation procedure seems to launch an MQ configuration script, it does not really do that. It merely prepares the script with default values. We still need to run the script. 1. Open the properties of the short-cut Configure Queue Manager in the Start Programs folder InterChange Server Express within the WebSphere BI folder. The properties of that short-cut will provide you the name of the queue manager that needs to created. This name of the queue manager is also set in the ICS configuration file InterchangeSystem.cfg. Verify that the names match. Note: There is no need to use this default name. However, if you are going to change the queue manager name, ensure that all shortcuts and other references to the queue manager are correct. We found the long queue manager name to be quite cumbersome, so for our installation we have given the queue manager the same name as the name we will be using for the ICS, which is SUPPLIER. Accordingly, we have changed the shortcut parameter and the QUEUE_MANAGER value in the InterchangeSystem.cfg file 2. Run the configuration script when you have reviewed it. This will set up a number of basic queues and a SVRCONN channel. 3. When the script has completed, start the WebSphere MQ Services application and review that the queue manager start-up is set to Automatic. 4. If there is no listener task configured, add it by right-clicking the queue manager in the left pane and selecting New -> Listener. Set port number and the protocol to TCP. Also, make sure that the start-up of the listener is set to Automatic. See Figure 7-17 on page 85. Note: The suggested port number is 1414 (the default known port for WebSphere MQ). However, if you have other queue managers, running it is likely that either this port is in use already or your site standards dictate that the default listener port not be used. For our installation, we use port 1420. Accordingly, we have updated the PORT value in the InterchangeSystem.cfg file.

84

Implementing WebSphere BI Express for Item Synchronization

Figure 7-17 WebSphere MQ services window

7.7.3 Start the InterChange Server and register it


Note: Remember that the first start-up of the ICS was under the default name of WebSphereICS. If you are changing the name of your ICS as we are, first you must ensure the you change the shortcut to the start up. In this case, this involves modifying the file start_server.bat and start_server_service.bat files (in the bin directory) because it is there that the ICS name is hard-coded as the variable SERVERNAME. We also modified this bat file to insert a couple of statements at the very beginning to copy the InterChangeSystem.log to InterChangeSystem.log.OLD and delete the InterChangeSystem.log. This ensures that we have a clean log that shows only the activity since the current start. See Example 7-2.
Example 7-2 Save ICS log copy /Y c:\IBM\WebSphereItemSync\InterChangeSystem.log c:\IBM\WebSphereItemSync\InterChangeSystem.log.OLD del c:\IBM\WebSphereItemSync\InterChangeSystem.log pause

1. Start the InterChange Server. This will open a console window for the ICS itself and for the Transient Name Server, which is the Object Request Broker (ORB) client. 2. Since the default configuration is not generating log messages to the console, you will need to open the InterChangeSystem.log file to find out if the server is in the ready status. 3. Switch now to the System Manager. Locate the pane InterChange Servers. Right-click the empty folder Server Instances and select Register Server. See Figure 7-18 on page 86.

Chapter 7. WebSphere BI Express installation and verification

85

Figure 7-18 Register Server

4. In the next window, you can either type in the name of your ICS (for example, SUPPLIER) or click Browse button to let Studio find it. Set the field User Name to admin. The password is the word null. 5. Select the option to Save userid/password information and click Finish. See Figure 7-19.

Figure 7-19 Register new server

86

Implementing WebSphere BI Express for Item Synchronization

6. If all goes well, the pane InterChange Servers should now show your ICS and indicate that it is running in Production mode and that Studio is connected to it. See Figure 7-20.

Figure 7-20 Connected to server

7. Right-click the ICS name and select Edit Configuration. A new editor pane will appear, as shown in Figure 7-21 on page 88. Select the tab Trace/Log levels and mark the check boxes to write trace and log messages To Console.

Chapter 7. WebSphere BI Express installation and verification

87

Figure 7-21 ICS configuration editor

8. Select the tab WebSphere MQ and review the parameters. Check that the parameters are as you expect for your queue manager/port and hostname. See Figure 7-22 on page 89.

88

Implementing WebSphere BI Express for Item Synchronization

Figure 7-22 MQ parameters

9. Select File Save to save the changes and to deploy them to the server.

7.7.4 Review deployed components


1. Select the tab InterChange Server Component Management of the pane InterChange Servers now. Expand the tree structure (as shown in Figure 7-23 on page 90).

Chapter 7. WebSphere BI Express installation and verification

89

Figure 7-23 InterChange Server Component Management

2. From here, you can see that no connectors or collaborations are currently deployed to the server. This window also allows you to stop/start maps, relationships, connector controllers and collaborations. 3. Switch back to the view InterChange Servers. Right-click your ICS and select Shutdown Gracefully to stop the ICS. See Figure 7-24.

Figure 7-24 Shut down the InterChange Server

90

Implementing WebSphere BI Express for Item Synchronization

7.7.5 Switching to Design mode for the ICS


In anticipation of deployment operations in the next sections, we are required to run the ICS in design mode. Perform the following steps: 1. Right-click the short-cut InterChange Server Express on your desktop and click Properties. See Figure 7-25.

Figure 7-25 ICS properties

2. In the field Target, add the keyword -design as shown in Figure 7-25. Click OK. 3. Restart the InterChange Server. 4. Verify that the logging is now performed to the console as well. When you see the ready message in the console window, switch back to the System Manager. Right-click the ICS in the InterChange Serverspane and select Connect. Verify user ID and password and click OK. 5. When connected, the mode should now be design, as shown in Figure 7-26 on page 92.

Chapter 7. WebSphere BI Express installation and verification

91

Figure 7-26 ICS running in design mode

7.8 ICS monitor in WebSphere Application Server Express


We now need to install the Web-based System Monitor in the WebSphere Application Server Express. Perform the following steps: 1. Open a command window and change to the directory C:\IBM\WebSphereItemSync\bin. 2. Type the following command:
cwdashboard.bat C:/IBM/WebSphere/Express502/AppServer <your hostname> C:/IBM/WebSphereItemSync C:/sqllib/java

3. When this step completes, start the application server by entering the command below.
C:\IBM\WebSphere\Express502\AppServer\bin\startServer.bat ICSMonitor

4. When the server is started, access the monitor by opening a browser and entering the following URL:
http://<your hostname>:7089/ICSMonitor

See Figure 7-27 on page 93.

92

Implementing WebSphere BI Express for Item Synchronization

Figure 7-27 ICS monitor logon

5. Provide the name of the server and the password and click Login. The explorer will now show the System Overview pane, as shown in Figure 7-28 on page 94.

Chapter 7. WebSphere BI Express installation and verification

93

Figure 7-28 ICS monitor System Overview

Some of the views in the monitor require that you have the SVG Viewer plug-in installed. This can be downloaded from the Adobe Web site.

94

Implementing WebSphere BI Express for Item Synchronization

Chapter 8.

WebSphere BI Express configuration


In this chapter, we continue on and start to configure the various components of the solution. We configure the collaborations, meta-objects, and connectors. We also perform some simple testing of this configuration before moving on to adding our own back-end applications.

Copyright IBM Corp. 2004. All rights reserved.

95

8.1 Set-up the audit and logging service


The WebSphere Business Integration Express for Item Sync system uses a database table called audit_log to track events associated with UCCnet activities.To enable the audit and logging services we need to create the table required and add some additional configuration information to the InterChange System configuration. 1. In WordPad open the file audit_log.sql located in the folder C:\IBM\WebSphereItemSync\collaborations\dependencies\UCCnet\db2. This file contains SQL statements to create DB2 resources for the auditing features of WebSphere BI Express. 2. While there are many ways to execute these statements, it is probably easiest to pass this file to the DB2 command processor. However, this command processor requires a semi-colon at the end of each command. Edit the audit_log.sql file to add semi-colons and save it. 3. Open a DB2 command window by selecting Start Programs IBM DB2 Command Line Tools Command Window. 4. Change to the directory C:\IBM\WebSphereItemSync\collaborations \dependencies\UCCnet\db2. 5. Type the commands in Example 8-1:
Example 8-1 Audit_log connect commands db2 connect to smb_db user smbadmin using smbP4$$word db2 -tvf audit_log.sql db2 connect reset

6. Verify the output to make sure that the DB2 objects were created. 7. In WordPad, open the file InterchangeSystem.UCCnet in the folder C:\IBM\WebSphereItemSync\samples\UCCnet. You need to edit the values of four properties in this file: a. USER_NAME: Change the value attribute from crossworlds to smbadmin. b. DRIVER: Change the value attribute from com.ibm.crossworlds.jdbc. sqlserver.SQLServerDriver to COM.ibm.db2.jdbc.app.DB2Driver. c. DATA_SOURCE_NAME: Change the value attribute from jdbc:ibm-crossworlds:sqlserver://HostName:1433;DatabaseName=CWRep ository to jdbc:db2:SMB_DB. d. PASSWORD: Change the value attribute from admin to smbP4$$word.

96

Implementing WebSphere BI Express for Item Synchronization

e. Save your changes and copy the whole contents of this file to the clipboard. 8. Make a backup of the file InterChangeSystem.cfg and then open this file in WordPad. 9. Scroll to the bottom of this file and paste the clipboard before the closing XML tag: </cw:ServerConfig>. 10.Save the configuration file and restart the InterChange Server.

8.2 Load relationship tables


We are using the XML schema message formats for UCCnet for our installation (as opposed to the DTD formats). One of the reasons for this is that the schema-based message model is the stated future direction for UCCnet messages. From now on, in all places where a choice between DTD and schema is allowed for, we will be using schema. (Most of the objects will be readily identified by the use of XSD somewhere in the object name.) Because the deployment of relationships is performed during the installation of the product, we can now also load these tables with values. To load them with the sample values, perform the following steps: Note: As we have mentioned, these are sample values only and may not necessarily be correct or relevant for your installation. After loading the tables, you should check the values and make any modifications to them that may be necessary. 1. Open the file InitializeRelationshipTablesForXSD.sql and add semi-colons to each SQL command. Save the file and close the editor. 2. Open a DB2 Command Window and change to the directory C:\IBM\WebSphereItemSync\collaborations\dependencies\UCCnet\db2 3. Execute the commands in Example 8-2:
Example 8-2 smb_db commands db2 connect to smb_db user smbadmin using smbP4$$word db2 -tvf InitializeRelationshipTablesForXSD.sql db2 connect reset

Chapter 8. WebSphere BI Express configuration

97

8.3 Create meta-objects


Important: This configuration was done for Version 4.3. If you are using Version 4.3.1 you may find that most of this meta-object configuration is already there. If is a good idea, however, to review these next sections and ensure that you are familiar with the configuration settings for the meta-objects nonetheless. 1. In an editor open the file CwConnEnv.bat in the folder C:\IBM\WebSphereItemSync\bin. 2. Locate the SET command for the environment variable DATAHANDLER and verify that the jar file CwXMLDataHandler.jar is listed as the first jar file. If not, correct it. (It is probably about half way through the command string. Cut it and paste it to the front). 3. Save and close the file. 4. Switch to the System Manager and expand the tree structure in the pane WebSphere Business Integration System Manager to locate the business object MO_DataHandler_DefaultXMLConfig. Double-click this business object to open it in the Business Object Designer. See Figure 8-1.

Figure 8-1 List of business objects in System Manager

98

Implementing WebSphere BI Express for Item Synchronization

5. Select File Save as and save the business object with the name MO_DataHandler_UCCnetXMLConfig. Check the window that the object is saved in the project ItemSyncLibrary. 6. Change the default value of the attributes listed in Table 8-1.
Table 8-1 Attributes and values for MO_DataHandler_UCCnetXMLConfig Attribute name BOPrefix DTDPath Value UCCnetXSD c:\Envelope.xsd This must be the full path to the XML structure document false true true

Validation DefaultEscapeBehaviour IgnoreUndefinedElements

7. Save the business object and close it. 8. Open the business object MO_DataHandler_Default and save it as MO_DataHandler_UCCnet_envelope. 9. Delete all attributes except the ones shown in Figure 8-2. Change the Type value for attribute text_xml to MO_DataHandler_UCCnetXMLConfig. See Figure 8-2.

Figure 8-2 The business object MO_DataHandler_UCCnet_envelope

10.Save and close the business object. 11.Open the business object MO_JTextConnector_Default in the Business Object Designer and save it as MO_JTextRWLConnector_Default.

Chapter 8. WebSphere BI Express configuration

99

12.Change the Type values for the EventDataHandler and the OutputDataHandler as shown in Figure 8-3.

Figure 8-3 The business object MO_JTextRWLConnector_Default

13.Provide folder names for the attributes OutputDir, EventDir, and ArchiveDir, making sure that the names are shorter than the indicated maximum length. We used: c:\UCCnet\JTextRWL\<out / archive / event> Note: This is different in Version 4.3.1. Please review the product documentation. 14.Set the attributes OutputExt and EventExt to xml. Set the attribute EndBODelimiter to EOF. Tip: Click the top of the Name column to sort the attributes in name order. Drag the end of the default column to resize it. 15.Save and close the business object. 16.Create the folder names using the Windows Explorer. 17.Perform similar steps to create the business object MO_JTextISoftConnector_Default, shown in Figure 8-4 on page 101. Again ,we used the same naming convention as above with JTextISoft and the connector name. See Figure 8-4 on page 101.

100

Implementing WebSphere BI Express for Item Synchronization

18.Also, create also the folders that you use. Important: Regardless of which version you are using, you need to complete this step because it is not done automatically for you.

Figure 8-4 The business object MO_JTextISoftConnector_Default

19.Create the new business object MO_ISoftAdapterConfig by right-clicking the folder Business Objects in the System Manager and selecting Create New Business Object. 20.Make sure that the project ItemSyncLibrary is selected. See Figure 8-5 on page 102.

Chapter 8. WebSphere BI Express configuration

101

Figure 8-5 Create new business object

21.Add the attributes as shown in Figure 8-6. The value in the field App Spec Info is:
OutputQueue=queue://<queue manager name>/<queue name>;DataEncoding=Text

For our configuration, this is:


OutputQueue=queue://SUPPLIER/OUTBOX;DataEncoding=Text

Figure 8-6 The business object MO_ISoftAdapterConfig

22.Save and close the business object. 23.Using WebSphere MQ Explorer, create the local queue that you used in the business object MO_ISoftAdapterConfig (making the default persistence YES).

8.4 Create and configure connectors


A number of connectors are required for runtime and/or development and testing purposes. The following instructions will guide you in the creation and configuration of those connectors.

102

Implementing WebSphere BI Express for Item Synchronization

8.4.1 JTextRWLConnector
This is the connector used for the Request Work List function. It is a JText connector. For this connector, we need to first create a new short-cut in the Start Programs folder. 1. Using Explorer, go to the following folder:

C:\Documents and Settings\All Users\Start Menu\Programs\IBM WebSphere Business Integration Express for Item Sync \Adapters\Connectors
2. Copy the existing short-cut JText Connector and paste it as JTextRWLConnector. 3. Open the properties of this new short-cut. 4. Update the field Target to reflect the name of this connector (JTextRWL) and the name of your ICS (SUPPLIER in our case), as shown in Figure 8-7. The value in the field Target should then be like this:
C:\IBM\WebSphereItemSync\connectors\JText\start_JText.bat JTextRWL SUPPLIER

Figure 8-7 Properties of the short-cut to start the JTextRWL connector

Chapter 8. WebSphere BI Express configuration

103

5. Switch back to the System Manager. Right-click the folder Connectors in the ICL ItemSyncLibrary and select Create New Connector. 6. The tool Connector Configurator Express will start and present you the new connector window. Set the name to JTextRWLConnector (one word, case sensitive) and select JText for template name. See Figure 8-8.

Figure 8-8 Create new connector

7. After clicking OK, the Connector Configurator Express shows the standard properties for this connector. 8. Update the properties shown in Figure 8-9 on page 105, as follows: AgentTraceLevel to 5 ControllerTraceLevel to 5 LogAtInterChangeEnd property to true This will provide maximum tracing capabilities at runtime for debugging purposes.

104

Implementing WebSphere BI Express for Item Synchronization

9. Update the property MessageFileName to: C:\IBM\WebSphereItemSync\connectors\messages\JTextConnector.txt Note: It is worth mentioning again here that everything in your configuration is case sensitive. (Remember that this is all a Java application under the covers.)

Figure 8-9 Standard properties of the JTextRWL connector

10.Add business objects on the tab Supported Business Objects, as shown in Figure 8-10 on page 106. Mark required Agent Support as shown. Note: Agent Support indicates that this is to be a Business Object known to the Connector Agent. That is, the part of the connector that recognizes ASBOs (Application Specific Business Objects) and the meta-objects required to serialize and de-serialize the data streams for processing. The GBO is used at the Connector Controller end and, as such, does not require Agent Support.

Chapter 8. WebSphere BI Express configuration

105

Figure 8-10 Supported business objects for the JTextRWL connector

11.Select File Save To Project before switching to the tab Associated Maps. 12.Select Explicit Binding and then select the maps from the drop-down listbox, as shown in Figure 8-11 on page 107. 13.At this point also set the logging and tracing to go to both the console and a file, we choose, as follows:
C:\IBM\WebSphereItemSync\connectors\JText\JTextRWL.log

for both the log and trace output.

106

Implementing WebSphere BI Express for Item Synchronization

Figure 8-11 Associated maps for the JTextRWL connector

14.Save the connector to the project and save it to file as well. Save the cfg file in the folder C:\IBM\WebSphereItemSync\connectors\JText.

8.4.2 ISoft Connector


1. In System Manager, right-click the folder Connectors in the ICL ItemSyncLibrary and select Create New Connector. 2. The tool Connector Configurator Express will start and present you the new connector window. Set the name to ISoftConnector (one word, case sensitive) and select iSoft for template name. See Figure 8-12 on page 108.

Chapter 8. WebSphere BI Express configuration

107

Figure 8-12 Create iSoft connector

3. After you click OK, the Connector Configurator Express shows the standard properties for this connector. 4. Update the fields AgentTraceLevel and ControllerTraceLevel to provide maximum tracing at runtime. Also set the LogAtInterChangeEnd to true and the logging and tracing to both console and file. 5. Update the field MessageFileName to
C:\IBM\WebSphereItemSync\connectors\messages\ISoftConnector.txt

6. Now switch to the tab Connector-Specifc Properties. The adapter uses a number of queues for its internal processing. Change the queue names to refer to the queue manager you are using (for example, SUPPLIER) instead of the default name crossworlds.queue.manager. 7. Create these queues.

108

Implementing WebSphere BI Express for Item Synchronization

In the Additional Materials is a file named iSoftQueues.tst. You can use this file to create the queues from a command window as follows:
runmqsc SUPPLIER <iSoftQueues.tst

8. Set the field DataHandlerConfigMO to the name of the meta-object that we created earlier: MO_DataHandler_UCCnet_envelope. 9. Change the field ConfigurationMetaObject to the name of meta-object created before: MO_ISoftAdapterConfig. 10.Verify that a property UseDefaults exists and has the value True. Note: This value will ensure that if we have allocatted any default values to properties in our meta-object definitions that they will be used if any mandatory value is not passed. 11.Switch now to the tab Supported Business Objects and add business objects to this tab, as shown in Figure 8-13. Check Agent Support for the business objects as indicated.

Figure 8-13 Supported business objects for the iSoft connector

12.Save the connector to the project and switch then to the tab Associated Maps. 13.Select Explicit Binding and chose the maps as shown in Figure 8-14 on page 110.

Chapter 8. WebSphere BI Express configuration

109

Figure 8-14 Associated maps for the iSoft connector

14.Save the connector to the project and save it to a file as well as to the folder C:\IBM\WebSphereItemSync\connectors\iSoft.

8.4.3 PortConnector
A Port connector is a null connector that can be used for testing during collaboration development, as a stub or driver for instance. It is also a connector that can be used to bind unused ports on a collaboration. We will now create and configure a Port connector. 1. Repeat the same steps to create a PortConnector (using the Port connector template). 2. Set the trace levels appropriately. 3. The Port connector requires Agent Support for the business objects ItemBasic and UCCnetGBO_envelope. 4. Save the connector to the project and to a file in the folder C:\IBM\WebSphereItemSync\connectors\.

110

Implementing WebSphere BI Express for Item Synchronization

8.5 Create and configure the collaboration objects


We will now create and configure the collaboration objects from the templates. The objects and the templates they are based on are shown in Table 8-2:
Table 8-2 Collaboration templates and objects created Collaboration Template UCCnet_ItemSync ItemCommandRouter UCCnetXSD_CIN_Dispatcher UCCnetXSD_CIN_DISPATCHER UCCnet_requestWorklist UCCnet_processWorklist Collaboration Object UCCnet_ItemSyncObject ItemCommandRouterObject UCCnetXSD_CIN_DispatcherObject UCCnetXSD_CIN_Dispatcher_forRWLObject UCCnet_requestWorklistObject UCCnet_processWorklistObject

We will not be creating the email collaborations. Where these collaborations would normally be used, we will bind with a Port connector. See Figure 8-15.

Item.Verb

ItemSync
Item, delist and withdraw

ItemCommandRouter

Item, add, update

UCCnet_XSD_CIN_Dispatcher_forIRC

connector

connector

Figure 8-15 Flow of collaborations

Chapter 8. WebSphere BI Express configuration

111

The figure above shows the basic flow from a back-end application to UCCnet as it works through a series of collaborations. As can be seen, the first of the collaborations that must be processed as part of the item synchronization process is the ItemSync itself. This is where we will commence building the collaboration objects.

8.5.1 UCCnet_ItemSync collaboration object


See Figure 8-16 for illustration of the UCCNet_ItemSync collaboration flow.

From ItemBasic.Create

Validate fields, send e-mail if validation fails


PROCESSED_GTIN

Update table

Add entry to audit table Hand off to ItemCommandRouter


Audit log table

To
Figure 8-16 Flow of UCCnet_ItemSync collaboration

1. From the System Manager, right-click on the Collaboration Objects folder in the ItemSyncLibrary ICL 2. Select Create New Collaboration Object. See Figure 8-17 on page 113.

112

Implementing WebSphere BI Express for Item Synchronization

Figure 8-17 Select template

3. Select the UCCnet_ItemSync template. 4. Enter a Collaboration Object name of UCCnet_ItemSyncObject. 5. Click Next. See Figure 8-18 on page 114.

Chapter 8. WebSphere BI Express configuration

113

Figure 8-18 Select binding type

6. On this screen, we select the binding type for the ports. 7. Set the binding types as shown in Table 8-3:
Table 8-3 Port binding types Port DestinationAppRetrieve From To Binding Type Connector Connector Collaboration

8. Click Next. See Figure 8-19 on page 115.

114

Implementing WebSphere BI Express for Item Synchronization

Figure 8-19 Set the trace properties

9. Set the trace levels to their maximum values. 10.Click Next. See Figure 8-20 on page 116.

Chapter 8. WebSphere BI Express configuration

115

Figure 8-20 Set collaboration properties

11.Set the collaboration properties as shown in Table 8-4:


Table 8-4 Collaboration properties Property GTinDB_PASSWORD JDBC_URL GTinDB_USER JDBC_DRIVER SEND_EMAIL_TO Value smbP4$$word jdbc:db2:smb_db smbadmin COM.ibm.db2.jdbc.app.DB2Driver an email address (not being used in our solution)

116

Implementing WebSphere BI Express for Item Synchronization

Property SUPPLIER_NAME

Value ITSOSUPPLY2 (for the trading partner lookup substitute your UCCnet user identifier)

12.Click OK. 13.You are now be able to see the collaboration object ready to have the ports bound. See Figure 8-21.

Figure 8-21 Collaboration object

14.Right-click on each port in turn and select Bind Port. See Figure 8-22 on page 118.

Chapter 8. WebSphere BI Express configuration

117

Figure 8-22 Binding ports

15.A pop-up box appears to allow you to select the connector or collaboration you wish to bind to. Note: You will only see the connectors that have the correct business object support. See Figure 8-23.

Figure 8-23 All ports bound

16.Bind the ports as shown in Table 8-5 on page 119:

118

Implementing WebSphere BI Express for Item Synchronization

Table 8-5 Port bindings Port From Bind With Port Connector (this is for unit testing purposes only - we will rebind the port to an actual application connector after initial testing) Leave for the time being. We will get back to it later. Port

To DestinationAppRetrieve

17.We need to come back and bind the To port after we have created the ItemCommandRouter object.

8.5.2 ItemCommandRouter collaboration object


The collaboration flow for the ItemCommandRouter object is illustrated in Figure 8-24.

Item.Verb

ItemSync
Item, delist and withdraw

ItemCommandRouter

Item, add, update

UCCnet_XSD_CIN_Dispatcher_forIRC

connector

connector

Figure 8-24 Collaboration flow

As can be seen from Figure 8-24, from the ItemSync collaboration, processing continues to another collaboration, which is the ItemCommandRouter collaboration. See Figure 8-25 on page 120.

Chapter 8. WebSphere BI Express configuration

119

From

Verify command, if Add send to TO_RCIR port

TO_RCIR

XML Data Handler

connector

Figure 8-25 ItemCommandRouter collaboration

1. Create another new Collaboration object, as shown in Figure 8-26 on page 121.

120

Implementing WebSphere BI Express for Item Synchronization

Figure 8-26 Select template

2. Click the ItemCommandRouter template. 3. Enter a Collaboration Object name of ItemCommandRouterObject. 4. Click Next. See Figure 8-27 on page 122.

Chapter 8. WebSphere BI Express configuration

121

Figure 8-27 Select binding type

5. Set the binding types as shown in Table 8-3 on page 114:


Table 8-6 Port binding types Port ToRCIR From ToCIN Binding Type Connector Collaboration Collaboration

6. Click Next.

122

Implementing WebSphere BI Express for Item Synchronization

7. Set the trace levels to their maximum levels. 8. Click Next twice. 9. Click OK. 10.You are now be able to see the collaboration object ready to have the ports bound. 11.Right-click on each port in turn and select Bind Port. See Figure 8-28.

Figure 8-28 Binding ports

12.A pop-up box appears to allow you to select the connector or collaboration you wish to bind to.

Chapter 8. WebSphere BI Express configuration

123

Note: You will only see the collaboration objects that are available for connection and the ports on the collaboration that can be used. See Figure 8-29.

Figure 8-29 All ports bound

Bind the ports as shown in Table 8-7:


Table 8-7 Port bindings Port From ToCIN ToRCIR Bind With Uccnet_ItemSyncObject -> To port Leave for the time being - we will get back to it iSoft Connector

Note: A reminder of some terminology here. RCIR stands for Register Catalogue Item Registry. This is a request that will be sent to UCCnet to register a new item. In this case, we will be sending to a port (the iSoft connector for instance) to enable our AS2 channel to send the request to UCCnet. The CIN is a Catalogue Item Notification. 13.We need to come back and revisit the ToCIN port after we have created the UCCnetXSD_CIN_Dispatcher collaboration object. 14.Go back to the UCCnet_ItemSyncObject and check that the To port is now bound to the ItemCommandRouter collaboration.

124

Implementing WebSphere BI Express for Item Synchronization

8.5.3 UCCnetXSD_CIN_Dispatcher collaboration object


The collaboration flow for the UCCNetXSD_CIN_Dispatcher object is illustrated in Figure 8-30.

Item.Verb

ItemSync
Item, delist and withdraw

ItemCommandRouter

Item, add, update

UCCnet_XSD_CIN_Dispatcher_forIRC

connector

connector

Figure 8-30 Collaboration flow

We now come to the third collaboration for the initial ItemBasic flow. See Figure 8-31 on page 126.

Chapter 8. WebSphere BI Express configuration

125

From

Use Category field and locate GLNs of subscribers Send a CIN_ADD for each GLN

File

To

CIN_DISPATCHER_GLN_PROPERTY

Figure 8-31 UCCnetXSD_CIN_Dispatcher

1. Create another new Collaboration object. See Figure 8-32 on page 127.

126

Implementing WebSphere BI Express for Item Synchronization

Figure 8-32 Select template

2. Select the UCCnetXSD_CIN_Dispatcher template. Note: This is different in Version 4.3.1 - please review the product doumentation. 3. Enter a Collaboration Object name of UCCnetXSD_CIN_DispatcherObject. 4. Click Next. See Figure 8-33 on page 128.

Chapter 8. WebSphere BI Express configuration

127

Figure 8-33 Select binding type

5. Set the binding types as shown in Table 8-8:


Table 8-8 Port binding types Port To From DestinationAppRetrieve Binding Type Connector Collaboration Connector

6. Click Next.

128

Implementing WebSphere BI Express for Item Synchronization

7. Set the trace levels to their maximum levels. 8. Click Next. See Figure 8-34.

Figure 8-34 Collaboration properties

Note: This is different in Version 4.3.1. Please review the product doumentation. 9. Set the collaboration properties as shown in Table 8-9:
Table 8-9 Collaboration properties Property CIN_DISPATCHER_GLN_FILE Value c:\UCCnet\gln_subsc.txt (this file is part of the additional materials and should be copied to this directory). If you are using v4.3.1 you will see the file referred to as dispatcher_gln_file.txt. More on this file later.

Chapter 8. WebSphere BI Express configuration

129

Property SUPPLIER_NAME

Value ITSOSUPPLY2 (this is our UCCnet user id)

10.Click OK. 11.You are now be able to see the collaboration object ready to have the ports bound. 12.Right-click on each port in turn and select Bind Port. 13.A pop-up box will appear to allow you to select the connector or collaboration you wish to bind to. Note: You will only see the collaboration objects that are available for connection and the ports on the collaboration that can be used. See Figure 8-35.

Figure 8-35 All ports bound

14.Bind the ports as shown in Table 8-10. 15.Go back to the CommandRouter object and confirm that the ToCIN port is bound to this collaboration.
Table 8-10 Port bindings Port From DestinationAppRetrieve To Bind With UCCnetCommandRouterObject -> ToCIN port Port Connector iSoft Connector

130

Implementing WebSphere BI Express for Item Synchronization

8.5.4 UCCnetXSD_CIN_Dispatcher_forRWL collaboration object


1. Create another new Collaboration object, as shown in Figure 8-36.

Figure 8-36 Select template

2. Select the UCCnetXSD_CIN_Dispatcher template. Note: This is different in Version 4.3.1. Please review the product doumentation.

3. Enter a Collaboration Object name of UCCnetXSD_CIN_Dispatcher_ forRWLObject. 4. Click Next. 5. Set the binding types as shown in Table 8-11 on page 132:

Chapter 8. WebSphere BI Express configuration

131

Table 8-11 Port binding types Port To From DestinationAppRetrieve Binding Type Connector Collaboration Connector

6. Click Next. 7. Set the trace levels to their maximum levels. 8. Click Next. See Figure 8-37.

Figure 8-37 Collaboration properties

9. Set the collaboration properties as shown in Table 8-12 on page 133:

132

Implementing WebSphere BI Express for Item Synchronization

Table 8-12 Collaboration properties Property CIN_DISPATCHER_GLN_FILE Value c:\UCCnet\gln_subsc.txt (this file is part of the additional materials and should be copied to this directory) ITSOSUPPLY2 (this is our UCCnet user id)

SUPPLIER_NAME

10.Click OK. 11.You are now be able to see the collaboration object ready to have the ports bound. 12.Right-click on each port in turn and select Bind Port. 13.A pop-up box sappear to allow you to select the connector or collaboration you wish to bind to. Note: You only see the collaboration objects that are available for connection and the ports on the collaboration that can be used. See Figure 8-38.

Figure 8-38 All ports bound

14.Bind the ports as shown in Table 8-13 on page 134:

Chapter 8. WebSphere BI Express configuration

133

Note: You notice that we are looking at the collaboration in the tree view now. Once the graphical view starts to become very cluttered, it is easier to bind the ports from the tree view. The process is the same as in the graphical view.
Table 8-13 Port bindings Port From Bind With UCCnet_ProcessWorklistObject (We will come back and bind this after we have created the object.) Port Connector iSoft Connector

DestinationAppRetrieve To

8.5.5 UCCnet_processWorklist collaboration object


The UCCnet_processWorklist collaboration deals with messages that have been received from UCCnet. It may perform two different types of processing. See Figure 8-39 on page 135 for an overview of Process Worklist functions.

134

Implementing WebSphere BI Express for Item Synchronization

Request Worklist

connector

Dispatcher connector Process Worklist Notify by email

connector

connector

Figure 8-39 Different functions of Process Worklist

See Figure 8-40 on page 136 for an illustration of RCIR_ADD_RESPONSE processing.

Chapter 8. WebSphere BI Express configuration

135

From

Message contains RCIR_ADD_RESPONSE

Subflow RCIR_ADD_RESPONSE Audit table Write to audit table Get complete ItemBasic
Application

DestinationAppRetrieve

Send to dispatcher
CIN_DISPATCHER

Figure 8-40 RCIR_ADD_RESPONSE processing

In the case of something like an RCIR_ADD_RESPONSE, the processing of the message will be carried out and further dispatching of messages will take place. In the case of a CIC_Response (as shown in Figure 8-41 on page 137), processing of the message is completed and a notification is sent to a user via an email (if required).

136

Implementing WebSphere BI Express for Item Synchronization

From

Message contains CIC_RESPONSE


Accept, Synchronise

Subflow CATALOGUE_ITEM_CONFIRMATION Send e-mail(s)


addresses stored in a specific BO

Audit table

Write to audit table

Figure 8-41 CIC_RESPONSE processing

Perform the following steps: 1. Create another new Collaboration object. See Figure 8-42 on page 138.

Chapter 8. WebSphere BI Express configuration

137

Figure 8-42 Select template

2. Select the UCCnet_ProcessWorklist template. 3. Enter a Collaboration Object name of UCCnet_processWorklistObject. 4. Click Next. See Figure 8-43 on page 139.

138

Implementing WebSphere BI Express for Item Synchronization

Figure 8-43 Select binding type

5. Set the binding types shown in Table 8-14:


Table 8-14 Port bindings Port Bind with Connector Connector Connector Collaboration

From INITIAL_ITEM_LOAD_REQUEST ITEM_ADD_CHANGE ALL other ports

Chapter 8. WebSphere BI Express configuration

139

Note: This is different in Version 4.3.1. Please review the product doumentation. Normally these other ports would be bound to the email connector. We override this in the steps to follow to use a Port connector (because we are not using the email function for this exercise). We will simply feed back the response through a test. 6. Click Next. 7. Set the trace levels to their maximum levels. 8. Click Next. See Figure 8-44.

Figure 8-44 Collaboration properties

9. Set the collaboration properties as shown in Table 8-15 on page 141:

140

Implementing WebSphere BI Express for Item Synchronization

Table 8-15 Collaboration properties Property DB_USER JDBC_DRIVER DB_PASSWORD SEND_EMAIL_TO JDBC_URL SUPPLIER_NAME DTD_URL Value smbadmin COM.ibm.db2.jdbc.app.DB2Driver smbP4$$word an email address jdbc:db2:smb_db ITSOSUPPLY2 (our UCCnet user ID) DOCTYPE envelope SYSTEM http://www.uccnet.net/xmlschema/2. 2/Envelope.xsd

10.Click OK. 11.You are now be able to see the collaboration object ready to have the ports bound. 12.Right-click on each port in turn and select Bind Port. 13.A pop-up box will appear to allow you to select the connector or collaboration you wish to bind to.

Chapter 8. WebSphere BI Express configuration

141

Note: Now this really is a very busy collaboration. Use the tree view! See Figure 8-45.

Figure 8-45 All ports bound

14.Bind the ports as shown in Table 8-16: Note: You notice that we are looking at the collaboration in the tree view now. Once the graphical view starts to become very cluttered, it is easier to bind the ports from the tree view. The process is the same as in the graphical view.
Table 8-16 Port bindings Port From Bind With ISoftConnector

142

Implementing WebSphere BI Express for Item Synchronization

Port ITEM_ADD_CHANGE NEW_ITEM_PUBLICATION_REQUEST INITIAL_ITEM_LOAD_REQUEST CIN_DISPATCHER All other ports

Bind With ISoftConnector iSoft Connector iSoft Connector UCCnetXSD_CIN_Dispatcher_forRWLOb ject -> From port Port Connector

15.Remember to go back and check the binding for the remaining port on the RWL Dispatcher.

8.5.6 UCCnet_requestWorklist collaboration object


Figure 8-46 illustrates the collaboration flow for the UCCNet_requestWorklist object.

Request Worklist

connector

Dispatcher connector Process Worklist Notify by email

connector

connector

Figure 8-46 Worklist processing

1. Create another new Collaboration object. See Figure 8-47 on page 144.

Chapter 8. WebSphere BI Express configuration

143

Figure 8-47 Select template

2. Select the UCCnet_requestWorklist template. 3. Enter a Collaboration Object name of UCCnet_requestWorklistObject. 4. Click Next. See Figure 8-48 on page 145.

144

Implementing WebSphere BI Express for Item Synchronization

Figure 8-48 Select binding type

5. Set the binding types as shown in Table 8-17:


Table 8-17 Port binding types Port From To Binding Type Connector Connector

6. Click Next. 7. Set the trace levels to their maximum levels. 8. Click Next. See Figure 8-49 on page 146.

Chapter 8. WebSphere BI Express configuration

145

Figure 8-49 Collaboration properties

9. Set the collaboration properties as shown in Table 8-18:


Table 8-18 Collaboration properties Property SET_UNIQUE_IDS DTD_URL Value ALL (sets our UCCnet message IDs) DOCTYPE envelope SYSTEM http://www.uccnet.net/xmlschema/2.2/En velope.xsd

10.Click OK. 11.You will now be able to see the collaboration object ready to have the ports bound. 12.Right-click on each port in turn and select Bind Port. See Figure 8-50 on page 147.

146

Implementing WebSphere BI Express for Item Synchronization

Figure 8-50 All ports bound

13.Bind the ports as follows:


Table 8-19 Port bindings Port From To Bind With JTextRWLConnector ISoftConnector

This completes the configuration of the collaboration objects. We now move on to modifying some of the hard-coded maps values prior to deploying the new objects that we have created and verifying that all of our configuration is correct.

8.5.7 Update Maps


You will notice that in the maps such as the following:
CwItemBasic_to_UCCnetXSD_envelope_registerCommand_itemAddChange CwItemBasic_to_UCCnetXSD_envelope_notifyCommand_catalogueItem

there is a hardcoded user ID. This value must be changed to reflect your organizations own UCCnet user ID. See Figure 8-51 on page 148. Note: This is different in Version 4.3.1. Please review the product documentation.

Chapter 8. WebSphere BI Express configuration

147

Figure 8-51 Map value

14.Edit the value in each of these maps in turn and enter the value of your UCCnet user ID. 15.Save and compile the changes. See Figure 8-52.

Figure 8-52 New map value

8.5.8 Deploying objects


We can now deploy our new and changed objects and run some initial unit testing. The workspace contains a single ICL (Integration Component Library) that we have added to. The original contents of the ICL were deployed during the product install. Therefore, we only need to deploy the new or changed objects. Only a user project may be deployed. Perform the following steps: 1. Create a new User Project named Deployed_ItemSyncLibrary

148

Implementing WebSphere BI Express for Item Synchronization

By giving the project this name, it should be fairly evident which ICL we have deployed objects from as we progress (since there may be many on a large project). See Figure 8-53.

Figure 8-53 New user project

2. Source this user project from the ItemSync. 3. Go to the server view and right-click on the ICS name. 4. Click Add New User project. 5. Select the new Deployed_ItemSyncLibrary project. See Figure 8-54 on page 150.

Chapter 8. WebSphere BI Express configuration

149

Figure 8-54 Add project

6. Right-click on the server and select Validate Projects. 7. Click Deployed_ItemSyncLibrary. See Figure 8-55.

Figure 8-55 Validate project

8. Click Finish. Note: Be patient. This may take a while to process because all project dependencies will be checked.

150

Implementing WebSphere BI Express for Item Synchronization

9. You receive a pop-up when the process has completed. What you expect is a message indicating success, as shown in Figure 8-56.

Figure 8-56 Success

10.Now right-click on the server again and click Deploy Projects. 11.Select the Deployed_ItemSyncLibrary project. 12.Using the drop-down list, select only the two maps that we modified and the newly created business objects. (These are the meta-objects and the config objects that we created.) Select the Compile option. See Figure 8-57.

Figure 8-57 Deploy

13.Click Next. 14.Select our project as where would like to replace the duplicate objects. See Figure 8-58 on page 152.

Chapter 8. WebSphere BI Express configuration

151

Figure 8-58 Overwrite duplicates

15.Click Finish. This will begin the deployment session. 16.Once the deploy has completed (according to the ICS log), select Deploy Projects again. 17.Using the drop-down list, select the connectors and collaboration objects (all of them, because they are all new). See Figure 8-59 on page 153.

152

Implementing WebSphere BI Express for Item Synchronization

Figure 8-59 Deploy

18.Click Finish.
O

Note: You will notice here that you do not receive a message about overwriting duplicate objects because the server has no prior knowledge of these objects. They are new. 19.Once you have received a message indicating a successful deploy, shutdown and restart the InterChange Server. We have now completed the basic configuration of the objects that are not application-specific. The last thing we need to do is to verify the configuration we have built using a series of Test Connectors and test data.

8.6 Unit Test


First we must populate the TRADING_PARTNER table that is used to fill values for our GLN and partner IDs. Perform the following steps: 1. Open a DB2 command Window or Command Center session.

Chapter 8. WebSphere BI Express configuration

153

2. Connect to the smb_db database as smbadmin. See Figure 8-60.

Figure 8-60 Connect to database

3. Insert a row onto the TRADING_PARTNER table as follows, where GLN_CODE is your UCCnet GLN. See Example 8-3.
Example 8-3 Populate trading partner table insert into trading_partner (GLN_CODE,TRADING_PARTNER_NAME,TRADING_PARTNER_CONTACT,TRADING_PARTNER_TYPE) values('7789333002006', 'ITSOSUPPLY2', '918912760079', 'SOURCE')

4. Verify your results by checking the contents of the database. 5. Change the shortcut for the iSoft connector to point to your InterChange server. (Remember that when the product was installed the default ICS name was used in all of the shortcuts that were created.) 6. Start the iSoft Connector.

154

Implementing WebSphere BI Express for Item Synchronization

7. Start a Test Connector. 8. Create a new profile for the Port Connector. See Figure 8-61.

Figure 8-61 Create profile

9. Enter the details for the configuration file (the InterChange Server configuration file when using a Port Connector) and the server. See Figure 8-62.

Figure 8-62 Enter details

10.Connect to the server. See Figure 8-63 on page 156.

Chapter 8. WebSphere BI Express configuration

155

Figure 8-63 Connect to server

11.Select the ItemBasic business object to send. See Figure 8-64 on page 157.

156

Implementing WebSphere BI Express for Item Synchronization

Figure 8-64 Select ItemBasic

12.Load a business object with test data. See Figure 8-65 on page 158. Note: In the additional materials there is a file named ItemBasic.bo. This is a sample business object which may be used for unit test purposes.

Chapter 8. WebSphere BI Express configuration

157

Figure 8-65 Load business object

13.Open the Test Connector dialog box. See Figure 8-66 on page 159.

158

Implementing WebSphere BI Express for Item Synchronization

Figure 8-66 Test data

14.Enter an instance name. 15.Select Request Mode Synchronous. 16.Select Request Send. 17.Select the UCCnet_ItemSyncObject collaboration. See Figure 8-67 on page 160.

Chapter 8. WebSphere BI Express configuration

159

Figure 8-67 Sent business object

18.Wait to see a response from the server, as shown in Figure 8-67. 19.Check the InterChange Server log for any errors. 20.Verify that the message has gone to the iSoft OUTBOX queue. See Figure 8-68 on page 161. Note: We used RFHUTIL as the tool to check the contents of the queue because it shows XML data in a friendly and readable format. This tool can be found in the Additional Materials.

160

Implementing WebSphere BI Express for Item Synchronization

Figure 8-68 Select queue

21.Check the contents of the message on the queue. It should look similar to that shown in Figure 8-69 on page 162.

Chapter 8. WebSphere BI Express configuration

161

Figure 8-69 Message data

We have now completed the basic configuration for the collaborations. In the next chapter, we move on to configuring the objects to link in our back-end application to the solution.

162

Implementing WebSphere BI Express for Item Synchronization

Chapter 9.

Configuration for integration of back-end system


In this chapter, we configure the objects required to access the data from our back-end system. In our scenario, the item catalog is stored in a DB2 database. We will create or configure the following: Business objects for the item catalog Maps to map from our application data format to the generic ItemBasic business object Triggers to enable event delivery from our application data store Connectors for delivery of the data to the collaborations Once all the application side pieces are in place, we can again unit test this portion of the solution.

Copyright IBM Corp. 2004. All rights reserved.

163

9.1 Create application tables and event tables


Event delivery to the InterChange Server may be accomplished in a variety of ways. For a database application such as ours, which has no API, a database trigger mechanism is a good mechanism to use. We now create the tables required to handle event processing. We also create our application, which is a DB2 database called SUPPLIER. 1. Open a DB2 command window by selecting Start Programs IBM DB2 Command Line Tools Command Window. 2. Locate the ddl files in Appendix C, Additional material on page 259. 3. Edit each of the ddl files to add the correct password for the db2admin user. 4. Type the following command to create the application database and tables:
db2 -tvf database.ddl

5. Next, we create the event tables that are used by the JDBC Connector to detect events in the application table. Type the command:
db2 -tvf eventtables.ddl

Attention: The database design for our scenario uses the UPC.EAN code as the item number (and therefore key). We do this intentionally because the UPC.EAN code from the GBO will be used as the key value for the destination app retrieve downstream in the CIN processing.

9.2 Create and test the database trigger


1. Now, we define the trigger on the application table so that the database system generates an event when a new record is inserted in the table. Start the DB2 Control Center by selecting Start Programs IBM DB2 General Administration Tools Control Center. 2. Expand the tree structure in the left pane. You should now find two databases. SMB_DB is the repository for the WebSphere BI Express product. SUPPLIER is the application database created in the previous section. Expand the tree structure for database SUPPLIER, and locate the folder Triggers for this database. 3. Right-click the folder Triggers and click Create. 4. This will bring up a new window (see Figure 9-1 on page 165). Set the field Trigger schema to SMBADMIN. Set the Table or view schema to SMBADMIN as well. 5. Select the table ITEM_CATALOG and name the trigger ITEM_CREATE.

164

Implementing WebSphere BI Express for Item Synchronization

6. Select After as the value for Time of trigger action. See the configured dialog box in Figure 9-1.

Figure 9-1 Create trigger: Step 1

7. Click Triggered action, shown in Figure 9-2 on page 166. Set the correlation name to n. 8. Edit the triggered action field. The SQL statement is shown below in Example 9-1.
Example 9-1 Triggered action BEGIN ATOMIC INSERT INTO smbadmin.xworlds_events ( connector_id, object_key, object_name, object_verb, event_priority, event_status, event_time, event_comment) VALUES ('', n.PRODUCTID, 'SUPPLIER_ITEM_CATALOG','Create',0,0, CURRENT TIMESTAMP, 'Item Create'); END;

Chapter 9. Configuration for integration of back-end system

165

Figure 9-2 Create trigger: Step 2

9. Click OK to complete this step. 10.To test the generation of events by the trigger, open a DB2 command window again and type the following SQL commands:
Example 9-2 Testing trigger db2 connect to supplier user smbadmin using smbP4$$word db2 insert into ITEM_CATALOG (productid,Unitof_wgt,description,descriptionshort,upceancode) values(12345678901234,'1','First item description','FID','12345678901234') db2 select * from xworlds_events

Note: The second command should be typed on a single line. The output of the select should have an event record. If the events table does not contain an event record, the trigger has not worked.

166

Implementing WebSphere BI Express for Item Synchronization

9.2.1 Create the Application-Specific Business Object


We now need to create the ASBO that defines the ITEM_CATALOG records. We do this using the Object Discovery Agent (ODA) for JDBC. 1. In Notepad, open the file start_JDBCODA.bat located in the folder C:\IBM\WebSphereItemSync\ODA\JDBC. 2. Locate the SET statement for the environment variable DRIVERPATH. Add C:\<DB2 Root directory> \Java\DB2java.zip to the definition of the environment variable:
set DRIVERPATH=C:\SQLLIB\Java\DB2Java.zip;"%CROSSWORLDS%"\lib...

3. Locate the SET statement for the environment variable DRIVERLIB. This environment variable should have the value C:\<DB2 Root directory>\bin.
set DRIVERLIB=C:\SQLLIB\bin

4. Save the file and close the editor. 5. Now, start the JDBC ODA by selecting Start Programs IBM WebSphere BI Express... Adapters Object Discovery Agents JDBC Object Discovery Agent. This will start a console window. 6. Start the System Manager now. Right-click the folder Business Objects in the ICL ItemSyncLibrary and click Create New Business Object. 7. A New Business Object window will appear. Click Cancel and then select File New Using ODA. 8. A new wizard will start. Click Find Agents to populate the list of available agents. See Figure 9-3 on page 168.

Chapter 9. Configuration for integration of back-end system

167

Figure 9-3 Create business object: Step 1

9. Once the JDBCODA is found, select it and click Next. 10.In the next step, we need to provide some database access parameters. Set the following: a. UserName: smbadmin b. Password: smbP4$$word c. Database URL to jdbc: db2:supplier d. DatabaseDriver: COM.ibm.db2.jdbc.app.DB2Driver 11.To be able to use these settings in the future without retyping them, provide a name for this connection profile and click Save. 12.Click Next to continue. See Figure 9-4 on page 169.

168

Implementing WebSphere BI Express for Item Synchronization

Figure 9-4 Create business object: Step 2

13.The ODA will now connect to the database and retrieve the available tables. Expand the schema SMBADMIN and select the table ITEM_CATALOG. Click Next to continue. See Figure 9-5 on page 170.

Chapter 9. Configuration for integration of back-end system

169

Figure 9-5 Create business object: Step 3

14.In the next step, the wizard will ask to confirm your selection. Click Next again. See Figure 9-6 on page 171.

170

Implementing WebSphere BI Express for Item Synchronization

Figure 9-6 Create business object: Step 4

15.The fifth step provides some options to control the generation of the business object. Set the BO Prefix field to SUPPLIER_. 16.Verify that the verbs are selected and set the support for stored procedures to No. Click Next again. See Figure 9-7 on page 172.

Chapter 9. Configuration for integration of back-end system

171

Figure 9-7 Create business object: Step 5

17.In the last step, make sure that the ICL ItemSyncLibrary is selected. 18.Since we do not need the ODA after this, select the option to shut down the ODA. 19.Click Finish. See Figure 9-8 on page 173.

172

Implementing WebSphere BI Express for Item Synchronization

Figure 9-8 Create business object: StepS 6

20.You are now again in the Business Object Designer. Locate the generated object and review the characteristics.You can close the Business Object Designer now.

9.3 Build a map for transforming the ASBO into a GBO


We now build a map that transforms the application object (ASBO) to the generic object that will be used by the collaboration processing. 1. Switch back to the System Manager. Right-click the folder Maps in the ICL ItemSyncLibrary and select Create New Map. The new map wizard will start, as shown in Figure 9-9 on page 174. Click Next.

Chapter 9. Configuration for integration of back-end system

173

Figure 9-9 Create new map: Step 1

2. The next step allows you to select the source business object, which is SUPPLIER_ITEM_CATALOG, as shown in Figure 9-10 on page 175. Click Next to continue. See Figure 9-10 on page 175.

174

Implementing WebSphere BI Express for Item Synchronization

Figure 9-10 Create business object - step 2

3. The next step allows you to select the target business object, which is the generic business object of the ItemSync collaboration: ItemBasic. Click Next to continue. Figure 9-11 on page 176.

Chapter 9. Configuration for integration of back-end system

175

Figure 9-11 Create business object: Step 3

4. During the next step, you are asked to provide a name for this map. Good practice is to use a name that reflects the business objects that are involved and the direction of the map. 5. Also verify also the Mapping Direction. This is a map from an ASBO to a GBO. 6. Click Finish to complete the wizard. See Figure 9-12 on page 177.

176

Implementing WebSphere BI Express for Item Synchronization

Figure 9-12 Create business object: Step 4

7. The Map Designer will now open the map in the Diagram view (as shown in Figure 9-13 on page 178). Another way of looking at a map is the Table view. Note: Mapping statements are created by dragging the source element and dropping it on the target element. This creates the blue connector and sets the Rule to Custom. You need to change the Rule to Move. Target attributes that are filled in by assignment to a constant are created by selecting Set Value as a rule, without any drag-and-drop.

Chapter 9. Configuration for integration of back-end system

177

Figure 9-13 Map diagram

Using this method (or the table method if you are more comfortable with it), create the map statements in the Diagram view as specified in the Table view below in Figure 9-14 on page 179.

178

Implementing WebSphere BI Express for Item Synchronization

Figure 9-14 Map table

Note: Many of the values that we have hard coded here relate to relationship lookups that will be performed downstream. We have merely included a small subset of the ItemBasic values to enable mapping to occur and the minimum requirements for UCCnet to be met. 8. When the map statements are added, select File Save To Project. If you are asked to compile the map, please do so. If the Map Designer complains about the order of the map statements and offers to correct it, allow the Map Designer to reorder the map statements.

9.4 Testing the map


1. Switch now to the Test view within the Map Designer. Note: Maps can be called in a number of contexts. In our simple scenario, the map will be called during event delivery from the JDBC connector to the ICS. That is, when our event tables created previously are polled by the connector and a new event is found, it will be delivered to the ICS by the connector. 2. Select EVENT_DELIVERY as the calling context.

Chapter 9. Configuration for integration of back-end system

179

3. Provide some values for each field of the source object. (We have provided a sample business object in the Additional Materials section: SUPPLIER_ITEM_CATALOG.bo). 4. Click Save To to save this test business object into a file for future use. See Figure 9-15.

Figure 9-15 Populating a source business object

5. Start a test of the map by clicking the black triangle icon in the tools bar now. 6. You will be prompted to provide information about the server where you want to perform the map test (as shown in Figure 9-16 on page 181). 7. This implies that the ICS must be running for this step. Start the ICS if it is not running and wait until you see the ready message before clicking Connect in Figure 9-16 on page 181.

180

Implementing WebSphere BI Express for Item Synchronization

Figure 9-16 Connection parameters for the map test

8. When the map test is completed, verify the result in the right pane (as shown in Figure 9-17 on page 182). 9. Click Save To to store this business object in a folder for future use.

Chapter 9. Configuration for integration of back-end system

181

Figure 9-17 Completed mapping

10.Save the map to the project and compile it. Then, you can close the Map Designer tool.

9.5 Create the JDBC connector


Perform the following steps: 1. Switch back to the System Manager. Right-click the Connectors folder in the ICL ItemSyncLibrary and select Create New Connector. 2. The Connector Configurator will start by presenting the New Connector window, shown in Figure 9-18 on page 183. 3. Set the name to JDBCConnector and select the JDBC template. Click OK.

182

Implementing WebSphere BI Express for Item Synchronization

Figure 9-18 New connector

4. The Connector Configurator will now show the standard properties of the connector. Change the values for AgentTraceLevel and ControllerTraceLevel. Change the name of the MessageFileName, as shown in Figure 9-19 on page 184. Also, change the value of LogAtInterchangeEnd to true.

Chapter 9. Configuration for integration of back-end system

183

Figure 9-19 Standard properties for the JDBCConnector

5. Select the tab Connector-specific properties. Complete the fields ApplicationUserName and ApplicationPassword with the values smbadmin and smbP4$$word respectively. 6. Fill in the field DatabaseURL with the value jdbc:db2:SUPPLIER. 7. Select the DB2 as the RDBMSVendor value from the drop-down listbox. 8. Set the attribute JDBCDriverClass to the value COM.ibm.db2.jdbc .app.DB2Driver. See Figure 9-20 on page 185.

184

Implementing WebSphere BI Express for Item Synchronization

Figure 9-20 Connector-specific properties for the JDBC connector

9. Switch to the tab Supported Business Objects and add ItemBasic and SUPPLIER_ITEM_CATALOG. Check Agent Support for the ASBO. 10.Save the connector to the project now before switching to the tab Associated Maps. See Figure 9-21.

Figure 9-21 Supported business objects

Chapter 9. Configuration for integration of back-end system

185

11.Since we have developed only the map from the ASBO to the GBO, we can only add that map to the connectors configuration. See the dialog box in Figure 9-22.

Figure 9-22 Associated maps

12.Save the connector to the project and to the configuration file in the JBDC folder within the connectors directory. 13.Close the Connector Configurator.

9.6 Deployment of the changed and new objects


Now that we have a JDBC connector, we should update our collaboration object. 1. Open the collaboration object UCCnet_ItemSyncObject and select the tree view. Right-click the From port and select Bind Port. Select JDBCConnector in the presented list. See Figure 9-23 on page 187.

186

Implementing WebSphere BI Express for Item Synchronization

Figure 9-23 Updated collaboration

2. Right-click the user project Deployed_ItemSyncLibrary and select Update project. Select the new objects to be added to this user project: The business object SUPPLIER_ITEM_CATALOG The map SUPPLIER_ITEM_CATALOG_to_ItemBasic The JDBCConnector See Figure 9-24 on page 188.

Chapter 9. Configuration for integration of back-end system

187

Figure 9-24 Update project

3. Switch to the Component View and stop the UCCnet_ItemSyncObject collaboration. 4. Right-click the server instance and select Deploy Project. 5. Select only those objects that are changed or that are new. Then, deploy them. Note: If you see errors or warnings in the InterChange Server log during this process, it may be worthwhile to deploy each of the objects individually to ensure that all dependencies are OK. Deploy the business object, followed by the map, followed by the connector, followed by the collaboration. 6. Restart the InterChange Server.

188

Implementing WebSphere BI Express for Item Synchronization

9.7 Validation using the Test Connector


We now need to validate that the data can be received by the JDBC connector and successfully passed into the ItemSync collaboration. We have already shown that the data will be passed from the ItemBasic business object to the OUTBOX of the iSoft connector. However, we need to validate that the mapping from ASBO to GBO can also be successfully passed into this process. 1. Start the iSoft connector. 2. Start a Test connector. 3. From the Test connector select File Create/Select profile. 4. Create a profile for the JDBC connector as shown in Figure 9-25.

Figure 9-25 New profile

5. Connect to the ICS using this profile. See Figure 9-26 on page 190.

Chapter 9. Configuration for integration of back-end system

189

Figure 9-26 Connect to server

6. From the drop-down box, select the SUPPLIER_ITEM_CATALOG business object. 7. Load (or manually create) the SUPPLIER_ITEM_CATALOG business object that was used for the map test. 8. Give the business object a name (Test in our example below). See Figure 9-27 on page 191.

190

Implementing WebSphere BI Express for Item Synchronization

Figure 9-27 ASBO ready to send

9. Select synchronous mode and send the business object. 10.When prompted for the collaboration, we select the UCCnet_ItemSyncObject collaboration from the drop-down list. See Figure 9-28.

Figure 9-28 Select collaboration

11.The business object is sent to the ICS for processing and the ItemCommandRouterObject will eventually send the UCCnet envelope message to the OUTBOX queue for the iSoft connector as before. 12.Check the contents of the queue for a message that contains the data that we have sent in our business object. As before, use RFHUTIL to check that the message looks similar to Figure 9-29 on page 192.

Chapter 9. Configuration for integration of back-end system

191

Figure 9-29 UCCnet message on outbox queue

Note: If you do not have a message on the queue, check the log and trace file for each of the connectors and also the InterChange Server. (When we turned on the LogAtInterchangeEnd property on for the connectors, it resulted in a great deal of useful trace information in the ICS log). 13.Start the Web system monitor application, if it is not already running. 14.Select the Collaboration Overview and check that the Total Flows counter on the ItemCommandRouterObject has been incremented.

192

Implementing WebSphere BI Express for Item Synchronization

Note: Another place to check now is the audit_log table in the smb_db. 15.Using your favorite DB2 command or administration utility, select all of the rows from the audit_log table. We have not discussed the audit logging in any detail thus far. We can see from the rows in the audit_log table that there are four log entries created for the trip from the inbound connector to the iSoft outbox. The status entries for these are: a. InitCollaboration b. ItemAdd c. ADD d. Success If you have any status of Exception, check the ICS and connector logs. 16.Still looking at DB2 tables, select all rows from the PROCESSED_GTIN table. This table shows the list of GTINs that have been added.

9.8 Validation using the JDBC Connector


Now that we have verified that the mapping is working properly from ASBO to GBO, we have to verify that when using the actual connector we can process events that have been generated and, in fact, successfully generate the events in the first place and have them picked up by the connector. To start with, we process the event message that we generated in 9.2, Create and test the database trigger on page 164. Perform the following steps: 1. Shut down the test connector. 2. Before starting the JDBC Connector, change the shortcut that starts the JDBC Connector to point to the correct ICS. See Figure 9-30 on page 194.

Chapter 9. Configuration for integration of back-end system

193

Figure 9-30 Connector shortcut

3. Open the file start_JDBC.bat in the directory C:\IBM\WebSphereItemSync \connectors\JDBC. 4. Edit the JDBCDRIVERPATH to be c:\SQLLIB\Java\DB2Java.zip. 5. Edit the java.library.path to include c:\SQLLIB\bin as the first library in the concatenation. 6. Save the file and close it. 7. Start the JDBC Connector. 8. The row in the event table will be processed. 9. Check the following to verify that it has been processed correctly: a. Select all rows from the xworlds_events table in the SUPPLIER database. This table should now be empty. b. Select all rows from the audit_log table in the SMB_DB database. There should be a set of audit records for this event. (You will notice that the ADD and Success status messages indicate a verb_name of update. This is because we used the same product_id in this test as we had used in an

194

Implementing WebSphere BI Express for Item Synchronization

earlier test and consequently the collaboration changed the Create verb to an Update. This is the correct and expected behavior). c. Check the contents of the message in the OUTBOX queue. d. Refresh the view of the Collaboration Statistics in the System Monitor. The counter for the ItemCommandRouterObject will have been incremented. Note: You will notice that now the counter for the UCCnetItemSyncObject has also been incremented because we are using the actual connector. If this test has not worked, check the logs for the connectors and the ICS before moving on to our final unit test for this section. We have seen that events in the table can be processed by the connector. Finally, we will trigger an event and allow the entire process through to the outbox to run unassisted. 1. Using a DB2 command line utility, insert a row into the ITEM_CATALOG table of the SUPPLIER database. (This equates to an actual application creating a new catalog item entry.) 2. Use a new value for the UPCEANCODE so we can track it, as shown in Example 9-3:
Example 9-3 Insert UPCEANCODE value db2 insert into ITEM_CATALOG (ProductId,Unitof_wgt,description,descriptionshort,upceancode) values(11111111111100,'1','Full Unit Test Item','TEST','11111111111100')

3. Check in the same sources as the last test to validate the processing of the new catalog item. Note: The values that we have used in this sample for the UPCEANCODE (which will be the UCCnet GTIN) are not necessarily valid values. You will need to use the GTIN calculator to obtain a correct GTIN.

Chapter 9. Configuration for integration of back-end system

195

196

Implementing WebSphere BI Express for Item Synchronization

10

Chapter 10.

Configure the AS2 connection


Now that we have configured the components to take our application data and transform it into a format that will be usable by UCCnet, we have to put the configuration in place that will allow us to send our data to UCCnet and receive the resulting responses and worklists. For this we use the iSoft P2PAgent Express (we will refer to this as iSoft from now on). In this chapter we will: Configure iSoft for local operations Configure an AS2 connection to emulate the sending to UCCnet via iSoft. Verify the implementation of the AS2 communications.

Copyright IBM Corp. 2004. All rights reserved.

197

10.1 Install iSoft for supplier


First we need to install the P2P Agent. 1. Create an iSoft directory on your machine (we used c:\iSoft_Express). 2. Locate the WinExp ZIP file 3. Extract the ZIP file to the iSoft_Express directory.

10.1.1 Run Buildcfg5


For the unit testing of our AS2 connectivity we will install another instance of iSoft and send data to ourselves. We will configure our supplier instance first.Mak We now need to run the configuration tool (buildcfg5) to set up our base configuration. 1. Open a command window and change to the directory C:\iSoft_Express 2. Type buildcfg5 to start the configuration tool.
Example 10-1 Buildcfg5 C:\iSoft_Express>buildcfg5 Installing in - C:\iSoft_Express **************************************************************************** You need to specify the platform that the p2pAgent will run on. My platform type is (1) Windows based (2) UNIX or LINUX based **************************************************************************** Enter your platform type ( 1 or 2 ) >> 1 **************************************************************************** Your AS2 name is a case sensitive alphanumeric string with no spaces allowed. AS2 Names that will be used for Wal-mart are limited to 32 Characters. **************************************************************************** Enter your AS2 name >> ITSO **************************************************************************** The external address is the Internet address used by your trading partners to send messages to you. Firewalls can affect the address that is required. Make sure that you fully understand how your firewall is configured. My external address type is (1) IP address (2) A DNS resolveable URL **************************************************************************** Enter your External Address Type ( 1 or 2 ) >> 1 Enter your external address URL >> 127.0.0.1 **************************************************************************** The internal address is the actual address of the machine running the p2pAge My internal address type is (1) IP address (2) A DNS resolveable URL

198

Implementing WebSphere BI Express for Item Synchronization

**************************************************************************** Enter your Internal Address Type ( 1 or 2 ) >> 1 Enter your internal port number (ie 4080) >> 4080 Enter your internal address URL >> 127.0.0.1 **************************************************************************** The notification address is the IP address that will receive notifications. My notification address type is (1) IP address (2) A DNS resolveable URL (3) Email address **************************************************************************** Enter your Notification Address Type ( 1 or 2 or 3) >> 1 Enter your notification address URL >> 127.0.0.1 **************************************************************************** Identify the certificate that will be used for iSoft Testing. Enter the first part of the file name that contains your Public\Private keys. This name cannot contain any spaces and should describe the trading pair rela Example: YourName-iSoft ( You to ISOFT trading relationship ) **************************************************************************** Enter the certificate name for use with iSoft Testing >> ITSO-UCCNET **************************************************************************** Identify the certificate that will be used for Wal-Mart. Enter the first part of the file name that contains your Public\Private keys. This name cannot contain any spaces and should describe the trading pair rela Example: YourName-Walmart ( You to Walmart trading relationship ) **************************************************************************** Enter the certificate name for use with Walmart >> ITSO-UCCNET **************************************************************************** The following questions provide additional data contained in the certificate. **************************************************************************** Enter your two letter State Code >> NC Enter your City (Spaces not allowed) >> Raleigh Enter your Organization (Spaces not allowed) >> ITSO

3. We use 1 as the address type and the localhost IP address. 4. Use ITSO-UCCNET for our certificate names (we will generate these later).

10.1.2 p2pagent.cfg
Now that we have some basic values in our configuration files, it becomes much clearer what the purpose of each piece of configuration is used for. Before moving on and completing the configuration, take a minute to look over the current configuration files as they are.To complete the configuration tasks. 1. Open the p2pagent.cfg file 2. Edit the configuration file so that it looks as follows:

Chapter 10. Configure the AS2 connection

199

Example 10-2 ITSO to UCCnet config <xml> # configuration settings <command>set -eperror -ef</command> <command>set -lplog -lf</command> <command>set -npnotice -nf-</command> <command>set -opworkorder -oswo</command> <command>set -pppki</command> <command>set -rpreceipt</command> <command>set -tr300s</command> <command>set -m6</command> <command>set -bhmq://SUPPLIER</command> # # UCCNET <command>addpair ITSO UCCNET http://127.0.0.1:5080/ http://127.0.0.1:4080/ ITSO mq://SUPPLIER/OUTBOX</command> <command>addpair UCCNET ITSO http://127.0.0.1:4080/ * UCCNET mq://SUPPLIER/MQCONN.IN</command> # # UCCNET certificates and keys <command>importkey ITSO UCCNET E -fCpki\ITSO-UCCNET.cer -fKpki\ITSO-UCCNET.prv</command> <command>importkey ITSO UCCNET J -fCpki\UCCNET-ITSO.cer</command> <command>importkey UCCNET ITSO E -fCpki\ITSO-UCCNET.cer -fKpki\ITSO-UCCNET.prv</command> <command>importkey UCCNET ITSO J -fCpki\UCCNET-ITSO.cer</command> # # start services <command>start http://127.0.0.1:4080/</command> # </xml>

3. Delete the stanzas for iSoft Testing and iSoft certificates and keys. 4. For our test, we will send to a partner named UCCNET. (This is not the real UCCnet AS2 name, but it will make life easier when changing the configuration files for an actual test run to UCCnet.) Change the words Wal-Mart to UCCNET.

5. Change:
ITSO inbox\08925485US00

to
ITSO mq://SUPPLIER/OUTBOX

200

Implementing WebSphere BI Express for Item Synchronization

This will enable the agent to pick up messages from our queues to send to UCCnet. 6. Replace the Wal-Mart AS2 name (08925485US00) with UCCNET. 7. Replace the IP address (161.165.202.30)with the localhost IP address. 8. Replace the second instance of inbox (UCCNET inbox\UCCNET) with the location that we expect our inbound documents to be sent in the form:
UCCNET mq://SUPPLIER/MQCONN.IN

(This is the inbound event queue for our iSoft connector). 9. Change the certificate names as shown above. We will be generating these on both ends. Note: In the real world, when starting initial testing with the UCCnet Test Registry, a testing certificate (UCCnetTestReg.cer) will be used to verify communications with UCCnet.This is provided by the UCCnet Help Desk when you register. 10.We also need to add some additional commands to facilitate processing. In the configuration setting stanza at the top, add another command in the form:
<command>set -bhmq</command>

This identifies that the outbox will be an MQ queue:


<command>set -m6</command>

This sets the trace level so that we can trace errors and warnings. 11.Save and close this file. 12.Create a workorder file named SendToUCCnet.wo with the following text:
<xml> <command>send http ITSO UCCNET -de -dsMAILBOXID=OUTBOX -tC30 -tE20041231000000 -n1 -sC -r1 -e -oZ</command> </xml>

Where: http is the protocol. ITSO is our AS2 name. UCCNET is our receiver. -de is external data access type. -ds are the mailbox parameters. -tC specifies the number of seconds between retries. -tE specifies the expiry time of a message.

Chapter 10. Configure the AS2 connection

201

-n specifies the number of send attempts. -sC specifies to send a signed certificate. -r requests an unsigned MDN. -e requests Triple DES encryption of data. -oZ requests ZLIB compression of data. 13.Save and close this file.

10.1.3 Generate keys


We now need to edit the configuration for key creation and export. Perform the following steps: 1. Open the file addkeys2.wo. 2. Edit this file to change 08925485US00 to UCCNET. 3. Save and close this file. 4. Open the file exportkeys2.wo. 5. Modify this file to export the keys that you created with addkeys2. 6. Save and close this file. 7. Start the iSoft Agent:
p2pagent_odbc_exp

8. Add the keys at the command line by entering:


batch addkeys2.wo

9. You will receive the following message:


PAKC OK Keypair Generated

Tip: If you receive an error when generating keys, such as Unknown Relationship check that the names for yourself and the receiver match those in the P2PAgent.cfg. You may also use the listpairs command to see what the agent has been started up with. 10.Now, export the keys by entering:
batch exportkeys2.wo

11.You will receive the following message:


POKC OK Key-pair exported

202

Implementing WebSphere BI Express for Item Synchronization

12.Shutdown the P2P Agent from the command line with the shutdown command. 13.Copy the two keys that were created (.cer and .prv) to the pki directory.

10.2 Install iSoft for test receiver


Now we can create another instance of the P2P Agent for testing our send and receive. This could be achieved in a number of ways. However, we replicate the software in another directory to keep it simple. Perform the following steps: 1. Create an iSoft directory on your machine (such as c:\iSoft_UCCnet). 2. Locate the WinExp ZIP file. 3. Extract the ZIP file to the iSoft_UCCnet directory. 4. Run the Buildcfg5 utility and edit for the following configuration: UCCNET as the AS2 name ITSO as the partner Local host IP addresses 5080 as the UCCNET port 4080 as the ITSO port Certificate names to be UCCNET-ITSO (for UCCNET to ITSO) and ITSO-UCCNET (for ITSO to UCCNET) The inboxes should be as shown in Example 10-3:
Example 10-3 UCCnet to ITSO config <xml> # configuration settings <command>set -eperror -ef</command> <command>set -lplog -lf</command> <command>set -npnotice -nf-</command> <command>set -opworkorder -oswo</command> <command>set -pppki</command> <command>set -rpreceipt</command> <command>set -tr300s</command> <command>set -m6</command>

# ITSO-UCCNET <command>addpair UCCNET ITSO http://127.0.0.1:4080/ inbox</command>

UCCNET

Chapter 10. Configure the AS2 connection

203

<command>addpair ITSO UCCNET http://127.0.0.1:5080/ http://127.0.0.1:4080/ ITSO inbox\ITSO</command> <command>importkey UCCNET ITSO E -fKpki\UCCNET-ITSO.prv</command> <command>importkey UCCNET ITSO J <command>importkey ITSO UCCNET E -fKpki\UCCNET-ITSO.prv</command> <command>importkey ITSO UCCNET J -fCpki\UCCNET-ITSO.cer -fCpki\ITSO-UCCNET.cer</command> -fCpki\UCCNET-ITSO.cer -fCpki\ITSO-UCCNET.cer</command>

# # start services <command>start http://127.0.0.1:5080/</command>

5. Update the workorder file (addkeys2.wo) to change the AS2 name to the UCCnet AS2 name. 6. Make the same change to the exportkeys2.wo file. 7. Start the iSoft Agent (from a command prompt) as follows:
p2pagent_odbc_exp

8. Add the keys as follows at the command line of the iSoft Agent:
batch addkeys2.wo

9. Export the keys as follows at the command line of the iSoft Agent:
batch exportkeys2.wo

10.Shutdown the iSoft Agent as follows at the command line of the iSoft Agent:
shutdown

11.Copy the certificates created to the PKI directory. 12.Create a workorder file named SendToITSO.wo with the following command:
Example 10-4 Create workorder file SendToITSO.wo <xml> <command>send http UCCNET ITSO -de -fPoutbox\ITSO -fSxml -fE.sent -tC30 -tE20041231000000 -n1 -sC -r1 -e -oZ</command> </xml>

13.Save and close this file. See Example 10-5.


Example 10-5 iSoft agent commands 2003.11.19 2003.11.19 2003.11.19 2003.11.19 09:20:11.074 09:20:11.074 09:20:11.084 09:20:11.084 POPT POPT POPT POPT OK OK OK OK Error path set to [error] Errored files will be stored Log path set to [log] Trace set to WRITE_FILE

204

Implementing WebSphere BI Express for Item Synchronization

2003.11.19 09:20:11.094 2003.11.19 09:20:11.094 2003.11.19 09:20:11.104 2003.11.19 09:20:11.104 2003.11.19 09:20:11.114 2003.11.19 09:20:11.124 2003.11.19 09:20:11.134 2003.11.19 09:20:11.184 2003.11.19 09:20:11.194 2003.11.19 09:20:11.204 2003.11.19 09:20:11.214 2003.11.19 09:20:11.244 2003.11.19 09:20:11.315 2003.11.19 09:20:11.335 batch addkeys2.wo ok 2003.11.19 09:21:23.929 batch exportkeys2.wo ok 2003.11.19 09:21:55.114 shutdown

POPT POPT POPT POPT POPT POPT POPT PIKC PIKC PIKC PIKC PIKC PIKC HPIM

OK OK OK OK OK OK OK ERR ERR ERR ERR ERR ERR OK

Notice path set to [notice] Notices will not be written to file Work-order path set to [workorder] Work-order file-spec set to [wo] PKI path set to [pki] Async. receipt path set to [receipt] First-receive interval set to [300000ms] Unable to import keys Unable to import keys Unable to import keys Unable to import keys Unable to import keys Unable to import keys HTTP inbound service started

PAKC OK Keypair generated

POKC OK Key-pair exported

The two organizations now need to exchange certificates. The certificate that needs to be exchanged is the public key certificate, not the private key certificate which should never be given to anyone. Make sure there is a copy of the both of the .cer files on the PKI directory of both of our iSoft installations.

10.3 Unit test for send RCIR and receive MDN


1. Start a Test connector for the JDBC Connector. 2. Start the iSoft Connector. 3. Use the supplied CATALOG_ITEM ASBO (UCCNET_Test.bo) to send a catalog item from the Test Connector (in Synchronous mode). 4. Check that the data has gone to the iSoft connector and is in the OUTBOX queue. 5. Restart the iSoft Agents (for ITSO and UCCNET). We rename the executable for each of these to p2pagent_ITSO.exe and p2pagent_UCCNET.exe for easy identification for testing. 6. From the ITSO agent, Issue the batch command to issue the send command from the work order file:
batch SendToUCCNET.wo

7. Check that the iSoft Agent has picked up the data and processed it.

Chapter 10. Configure the AS2 connection

205

8. You should see output similar to the Example 10-6:


Example 10-6 Sample send from ITSO 2004.03.01 17:34:29.374 2004.03.01 17:34:29.384 43316 batch=[0] attempt=[1 of 1] 2004.03.01 17:34:29.394 43316 2004.03.01 17:34:29.404 43316 2004.03.01 17:34:29.454 43316 2004.03.01 17:34:29.464 43316 2004.03.01 17:34:29.474 43316 2004.03.01 17:34:29.484 43316 2004.03.01 17:34:29.494 43316 2004.03.01 17:34:29.504 43316 2004.03.01 17:34:29.514 43316 2004.03.01 17:34:29.524 43316 2004.03.01 17:34:29.534 43316 [20040301173429F39291D5.tmp] 2004.03.01 17:34:29.554 43316 2004.03.01 17:34:29.564 43316 2004.03.01 17:34:29.574 43316 2004.03.01 17:34:29.584 43316 2004.03.01 17:34:29.594 43316 2004.03.01 17:34:29.604 43316 2004.03.01 17:34:29.614 43316 2004.03.01 17:34:29.624 43316 2004.03.01 17:34:29.634 43316 2004.03.01 17:34:29.644 43316 2004.03.01 17:34:29.654 43316 2004.03.01 17:34:29.664 43316 2004.03.01 17:34:29.694 43316 2004.03.01 17:34:29.704 43316 2004.03.01 17:34:29.714 43316 2004.03.01 17:34:29.724 43316 2004.03.01 17:34:29.734 43316 2004.03.01 17:34:29.744 43316 2004.03.01 17:34:29.754 43316 2004.03.01 17:34:29.764 43316 2004.03.01 17:34:29.774 43316 FF FF FF 2004.03.01 17:34:29.784 43316 FF FF FF 2004.03.01 17:34:29.794 43316 FF FF FF 2004.03.01 17:34:29.804 43316 FF FF FF 2004.03.01 17:34:29.814 43316 FF FF FF OUTM OK Starting HTTPOutSession thread HPOS OK Outbound session started - mbox=[OUTBOX] HPOS EXMQ EXMQ EXMQ EXMQ COMP GKEY GKEY GPAY GPAY GPAY GPAY COMP GPAY GDIG GDIG PACK PACK COMP CDIG CDIG CDIG CMPE CMPE COMP CDIG CDIG CDIG SIGN SIGN SIGN SIGN OK OK OK OK OK OK OK OK OK OK OK OK OK OK OK OK OK OK OK OK OK OK OK OK OK OK OK OK OK OK OK OK Buffer allocated Entering ExtractMQ File extracted - [3658] bytes Extract-type set to LOCAL Exiting ExtractMQ Start ComposePackage Entering GetPairKeys Exiting GetPairKeys Entering GetPayload Using file-name Outbound file: Outbound file opened Outbound file size: [3658] Exiting GetPayload Entering GetDigestObject Exiting GetDigestObject Start Pack End Pack MIME headers applied to data Entering ComputeDigest Digest: k7Kl++xWzXK7xBiqjWA1C4m++WE= Exiting ComputeDigest Start of Compress File compressed Data compressed Entering ComputeDigest Digest: N6wpca9Ey6oiw867Ud2X0lJW9Y8= Exiting ComputeDigest Entering Sign Parsing key-pair to obtain private-key Decrypted digest: 00 01 FF FF FF FF FF FF FF FF FF FF FF FF FF FF FF FF FF FF FF FF FF FF FF FF FF FF FF FF FF FF FF FF FF FF FF FF FF FF FF FF FF FF FF FF FF FF FF FF FF FF FF FF FF FF FF FF FF FF FF FF FF FF FF

SIGN OK SIGN OK SIGN OK SIGN OK

206

Implementing WebSphere BI Express for Item Synchronization

2004.03.01 30 21 30 2004.03.01 AC 29 71 2004.03.01 56 F5 8F 2004.03.01 2004.03.01 9F E7 CA 2004.03.01 DB DE 72 2004.03.01 C0 12 7B 2004.03.01 86 16 55 2004.03.01 FB DB 96 2004.03.01 B8 0E E7 2004.03.01 1C C9 CE 2004.03.01 72 FC 8A 2004.03.01 2004.03.01 2004.03.01 2004.03.01 2004.03.01 2004.03.01 2004.03.01 2004.03.01 2004.03.01 2004.03.01 E4 F1 7F 2004.03.01 18 70 B6 2004.03.01 B5 37 0C 2004.03.01 FE A0 A1 2004.03.01 64 1C 4C 2004.03.01 D8 C9 B6 2004.03.01 1E 69 48 2004.03.01 03 B2 EE 2004.03.01

17:34:29.824 43316 SIGN OK 17:34:29.834 43316 SIGN OK 17:34:29.844 43316 SIGN OK

FF FF FF FF FF FF FF FF FF FF FF FF 00 09 06 05 2B 0E 03 02 1A 05 00 04 14 37 AF 44 CB AA 22 C3 CE BB 51 DD 97 D2 52

17:34:30.054 43316 SIGN OK Encrypted digest: 17:34:30.064 43316 SIGN OK 24 C0 FC 16 84 2E A3 AC 55 C5 11 18 04 17:34:30.075 43316 SIGN OK 17:34:30.075 43316 SIGN OK 17:34:30.085 43316 SIGN OK 17:34:30.095 43316 SIGN OK 17:34:30.105 43316 SIGN OK 17:34:30.105 43316 SIGN OK 17:34:30.115 43316 SIGN OK 17:34:30.125 17:34:30.135 17:34:30.145 17:34:30.145 17:34:30.165 17:34:30.165 17:34:30.175 17:34:30.185 17:34:30.185 17:34:30.195 43316 43316 43316 43316 43316 43316 43316 43316 43316 43316 SIGN COMP GCIP GCIP ENCR ENCR ENCR ENCR ENCR ENCR OK OK OK OK OK OK OK OK OK OK 09 EB 0C 44 C1 50 4C 68 9B 91 96 47 76 6C 67 E8 72 54 14 92 62 24 66 CC D0 9D 64 F9 09 B3 7B B0 4C AE 57 73 A7 2C 60 9B 56 CD EF 8B B6 E4 A9 92 C8 5F 7E CB 57 83 0D 26 E7 A0 1B 7C 2C CC 7C 97 8F 80 29 6F E0 AC 6D 99 DB 47 9A C8 CC 98 58 4C CE 71 65 CE 25 93 D3 05 AC C3 21 Exiting Sign Data signed Entering GetCipherObject Exiting GetCipherObject Encrypting message cert->m_uCertLen=[552] key.bytes=[24] cert->m_key.n.bytes=[128] Decrypted encryption key: 00 02 E8 2A 9A 9E 7C AC 57 DB 08 1E B7 B9 35 C9 40 03 98 D8 03 4E C9 A0 F7 C5 FB 52 E0 69 90 E3 D8 F3 BA FB CE C5 E6 B0 99 16 86 92 4F CD 64 9E 20 86 2B B1 4C A1 97 C1 E0 0C E7 0A A5 93 08 09 11 68 7B 6B 56 37 B2 92 9A F7 A9 01 E0 A4 9E 29 05 B2 19 80 C2 00 CA CD 2F 54 69 EA 0C 66 E1 09 B9 A9 E4 9B 2D 70 1A C4

17:34:30.205 43316 ENCR OK 17:34:30.205 43316 ENCR OK 17:34:30.215 43316 ENCR OK 17:34:30.215 43316 ENCR OK 17:34:30.225 43316 ENCR OK 17:34:30.225 43316 ENCR OK 17:34:30.235 43316 ENCR OK

17:34:30.255 43316 ENCR OK Encrypted encryption key:

Chapter 10. Configure the AS2 connection

207

2004.03.01 17:34:30.255 43316 79 5A C1 2004.03.01 17:34:30.265 43316 F5 30 78 2004.03.01 17:34:30.265 43316 A6 56 A8 2004.03.01 17:34:30.275 43316 BF D0 0D 2004.03.01 17:34:30.275 43316 22 79 15 2004.03.01 17:34:30.285 43316 66 0B 08 2004.03.01 17:34:30.285 43316 FC 8D BF 2004.03.01 17:34:30.295 43316 A0 6F B9 2004.03.01 17:34:30.305 43316 2004.03.01 17:34:30.305 43316 2004.03.01 17:34:30.315 43316 2004.03.01 17:34:30.325 43316 2004.03.01 17:34:30.325 43316 2004.03.01 17:34:30.335 43316 2004.03.01 17:34:30.345 43316 N6wpca9Ey6oiw867Ud2X0lJW9Y8= 2004.03.01 17:34:30.345 43316 2004.03.01 17:34:30.355 43316 2004.03.01 17:34:30.365 43316 2004.03.01 17:34:30.365 43316 2004.03.01 17:34:30.375 43316 2004.03.01 17:34:30.395 43316 2004.03.01 17:34:30.395 43316 2004.03.01 17:34:30.405 43316 2004.03.01 17:34:30.405 43316 2004.03.01 17:34:30.415 43316 2004.03.01 17:34:30.415 43316 2004.03.01 17:34:30.425 43316

ENCR OK ENCR OK ENCR OK ENCR OK ENCR OK ENCR OK ENCR OK ENCR OK ENCR COMP PACO CDTH CDTH PACO COMP COMP HPOS HPOS HPOS HPOS HPOS HPOS HPOS HPOS HPOS HPOS HPOS OK OK OK OK OK OK OK OK OK OK OK OK OK OK OK OK OK OK OK

2F BB 1D B3 94 87 83 EB D7 F5 BC E4 8D 7E 79 09 D2 9B 04 8B 0A 27 53 74 54 CC 56 59 48 0E 24 09 AF 1B 70 A3 D8 EA 94 D4 F4 A9 B0 73 35 04 0A 40 13 C1 D5 78 61 88 1B 55 48 56 1E 24 30 47 12 CE 2C A5 07 DD E2 6C A9 C8 92 5C 54 54 00 EA 30 1C BC 14 16 02 94 2F 58 B3 43 12 E0 64 31 2A 14 8A A9 1D 21 11 CE C8 47 FC Message encrypted Data encrypted Start PackOuter Entering ComposeDateHeader Exiting ComposeDateHeader End PackOuter The outbound digest is Exiting ComposePackage Sending 3446 bytes Temporary files created Socket created Connecting to server: 127.0.0.1:5080 Connection established HTTP server: 127.0.0.1:5080 Remote address obtained 3446 bytes read from file 3446 bytes written to server. t=3000 r=0 0 bytes read from file TimeLeft set to first-receive timeout

9. Check that the Agent on the other machine has received the data and responded. 10.Check the inbox folder of the UCCNET agent (under ITSO) for a text file that contains the payload of the AS2 transmission (that is, the message that would have been delivered to UCCnet).The file will have a name that is composed of the time and date stamp and some other characters. 11.The UCCNET agent will have sent an MDN back. Ensure that this MDN has been successfully written to the receipt directory of the ITSO agent. The MDN

208

Implementing WebSphere BI Express for Item Synchronization

will have a name of <responder>.<sender>.mdn.<timeanddatestamp>xxx.in and will look similar to Example 10-7.
Example 10-7 MDN Reporting-UA: iSoft Peer-to-Peer Agent Final-Recipient: rfc822; "UCCNET" Original-Message-Id: <2004030117342937E238B0@ITSO> Received-Content-MIC: N6wpca9Ey6oiw867Ud2X0lJW9Y8=, sha1 Disposition: automatic-action/MDN-sent-automatically; processed

We have now successfully configured our AS2 channels for testing the send of the RCIR. In the next chapter, we move on to handling the responses from UCCnet to enable an end-to-end test for our new item.

Chapter 10. Configure the AS2 connection

209

210

Implementing WebSphere BI Express for Item Synchronization

11

Chapter 11.

Final configuration and test from end-to-end


In this chapter we will move on to processing the response message from an RCIR_ADD. We will also build the additional objects required to process the CIN via a retrieve from the original item catalog for sending to UCCnet.

Copyright IBM Corp. 2004. All rights reserved.

211

11.1 Processing messages from UCCnet


To receive notifications from UCCnet, you must query your worklist for new messages. Whatever the responses for the RCIR and CIN operations, UCCnet will send back an immediate, unsolicited response to indicate the success or failure of processing. We then move on to processing the response from the RCIR. See Figure 11-1 on page 213.

RCIR
GTIN/GLN/TM 35 attrs

Data validation 1 2

Data provider Supplier

UCCnet GLOBALregistry

registration response
Figure 11-1 Item registration

So far we have unit tested Steps 1 and 2 of the diagram above.

11.2 Process the response from UCCnet


Step 3 in Figure 11-1 shows that UCCnet sends a registration response message. This message needs to be processed to complete the item registration. Once the registration has been completed, the catalog item notification must also be configured. This entails a change to the processWorklist collaboration to allow the details to be retrieved from the catalog item database and sent to UCCnet. We will first complete the steps to receive and process the registration response.

212

Implementing WebSphere BI Express for Item Synchronization

1. Ensure that both P2P agents are running. 2. In our P2P configuration for the ITSO end, we have configured our INBOX to be a queue. (This is the inbound event queue for the iSoft connector (as shown in Example 10-2 on page 200.) Check that this queue exists. 3. Ensure that the iSoft connector and JTextRWL connector are running. 4. From Appendix C, Additional material on page 259, copy the file RCIR_ADD_response.ITSO_15.xml to the UCCnet ITSO outbox directory. Note: The test messages we are using have been configured to match the UPC.EAN codes that we have invented. Therefore, the _15 files match the 00094860443115 code from the UCCNET_Test.bo. If you are using other codes, remember to edit the response messages to match. 5. Check the connector logs to ensure that no errors have occurred. 6. Check the audit log table of the smb_db. You will now see additional messages similar to those shown below. There are a few things of interest now in these logs, as shown in Figure 11-2, parts 1 and 2: ,
Figure 11-2 Audit log part 1

Figure 11-3 Audit log part 2

Note the second row of the table shows a GLN code that is not ours. This is the GLN code sent from UCCnet from the register command response from the processWorklist collaboration. It should be our GLN code. If viewed in sequence number order, we now see that the processing for our new item has progressed as shown in Table 11-1:
Table 11-1 Collaboration processing Transaction UCCnet_ItemSync UCCnet_ItemSync Processing Initialize ItemAdd

Chapter 11. Final configuration and test from end-to-end

213

Transaction UCCnet_ItemSync UCCnet_ItemSync UCCnet_processWorklist UCCnet_ProcessWorklist_RCIR_Response

Processing ADD Success Initialize REGISTER_COMMAND

7. Check the PROCESSED_GTIN table and ensure that there is an entry for the new item. Because all of the responses from UCCnet will be processed using this same basic flow (processWorklist), it is only the type of message that will determine the specifics of what is recorded, who is notified, and what downstream processing, if any, will take place.

11.3 Test the Catalogue Item Notification


As we saw in 8.5.5, UCCnet_processWorklist collaboration object on page 134 we bind the DestinationAppRetrieve port for the Item Basic to the Port connector. This binding allows us to easily configure and test the first part of the flow. Now that we have successfully completed this, we need to complete the final piece of the item synchronization process for our basic flow--the Catalogue Item Notification. Once an item is successfully added to the GLOBALregistry, the next process is to send an notification to each of the trading partners subscribing to the category of this item. This is done by sending one or more CIN messages to UCCnet.This notification contains (1) the GLN of the trading partner that needs to be notified and (2) the UDEX category. This is where the gln_subsc.txt is used. We configured the location of this file in our collaboration configuration.See 8.5.3, UCCnetXSD_CIN_Dispatcher collaboration object on page 125 and 8.5.4, UCCnetXSD_CIN_Dispatcher_forRWL collaboration object on page 131. Also, see Example 11-1.
Example 11-1 GLN subscriber file UDEX.01.0020.0082 7789555003003

The GLN code we use is our ITSO retailer GLN.

214

Implementing WebSphere BI Express for Item Synchronization

We now need to re-bind the processWorklist collaboration to enable the JDBC connector to perform the destination application retrieve from the source application. The DestinationAppRetrieve port allows us to use a connector to retrieve the data from our source application. We also need to create a map to map the Item Basic GBO to the application SUPPLIER_ITEM_CATALOG. This mapping enables the retrieve.

11.3.1 Create the map


Note: The only field that is in the GBO at this stage that might be useful to us for a keyed read of our database is the field named UPCEAN code. If this is not the key to your application table, you may need to store the values in an identity relationship (if you are using the Plus version of the product). As we mentioned earlier, we have intentionally created our application with a key that is the same as the actual UPC.EAN code to get around this restriction. Perform the following steps: 1. Create a new map with the name ItemBasic_to_SUPPLIER_ ITEM _CATALOG with the source business object being the ItemBasic and the target being the SUPPLIER_ITEM_CATALOG. See Figure 11-4.

Figure 11-4 Mapping direction

Chapter 11. Final configuration and test from end-to-end

215

2. Ensure that the mapping direction is set as GBO to ASBO. Map the fields as shown in Table 11-2.
Table 11-2 Field mappings Source UPCEANCode ObjItemBasic(Verb) UPCEANCode Target UPCEANCODE ObjSUPPLIER_ITEM_CATALOG(Verb) PRODUCTID

3. Ensure that any required fields in the business object are also filled (to avoid a mapping error). For our application we modified the SUPPLIER_ITEM_ CATALOG business object so that the only required fields are the PRODUCTID and the UPCEANCODE. We need to redeploy the modified business object as well). 4. Save and compile this new map. 5. Deploy the changed business object and the new map. 6. Restart the InterChange Server. Note: Remember that you cannot deploy an active object. Before you deploy any changed objects, make sure that you stop them and any objects that may be using them first (such as collaborations and connectors).

11.3.2 Modify the connector


We now need to modify the JDBC connector to add the mapping support for the GBO to ASBO map. See Figure 11-5 on page 217.

216

Implementing WebSphere BI Express for Item Synchronization

Figure 11-5 Mapping

Perform the following steps: 1. Open the JDBC connector. 2. Click Associated maps. 3. Select Explicit binding and select the ItemBasic_to_SUPPLIER _ITEM_CATALOG map. 4. Save the connector. 5. Redeploy the connector. 6. Restart the InterChange Server.

11.3.3 Modify the collaborations


The final modification that we need to make is to rebind the DestinationAppRetrieve port on the UCCnet_processWorklistObject collaboration. 1. Open the collaboration object in the System Manager. 2. Go to the Tree View. See Figure 11-6 on page 218.

Chapter 11. Final configuration and test from end-to-end

217

Figure 11-6 Rebind port

3. Right-click on the DestinationAppRetrieve port and select Bind Port. 4. Select the JDBC Connector. 5. You will now see that the connector shows in the Tree View along with the associated maps. See Figure 11-7 on page 219.

218

Implementing WebSphere BI Express for Item Synchronization

Figure 11-7 Connector and maps

As we can see from the figure above and from our original configuration, the CIN dispatcher port passes to the UCCnetXSD_CIN_Dispatcher_forRWLObject collaboration. This will pass the CIN on to UCCnet. However, if we look at this collaboration, we see that the To port is bound to the JTextRWL connector. This means that we will have to take an inbound file from this connector and at some point pass it to the AS2 channel. Given that we already have the AS2 channel setup and the iSoft connector feeding it, there seems no real reason why we should not pass the business object directly to the iSoft connector in this instance. So, in line with our idea of automating the process as far as possible, we will also change the To port of the UCCnetXSD_CIN_Dispatcher_forRWLObject to be bound to the iSoft connector. See Figure 11-8.

Figure 11-8 Rebound collaboration

Chapter 11. Final configuration and test from end-to-end

219

6. Stop the collaboration objects. 7. Redeploy the two changed collaboration objects. 8. Restart the InterChange Server.

11.4 Test the Catalog Item Confirmation


For the Catalog Item Confirmation, we will not make any changes to the collaboration for processWorklist. We currently have this with a Port connector as an end-point. For our testing purposes, this is sufficient. We use the method from 11.2, Process the response from UCCnet on page 212, but substitute the RCIR_Response file (number 15) with the CIC sent to ITSO message (number 15). Check the InterChange Server log for any errors. Also check the audit log. Ensure that there is an entry containing the following: Product ID 00094860443115 Transaction type: CCnet_processWorklist_CATALOGUE_ITEM_CONFIRMATION Transaction status: SYNCHRONISED This concludes the individual unit tests for each of the components. We now move on to a full end-to-end test with what we have in place.

11.5 End-to-end simulation


We now have all of the configuration in place to run a full end-to-end simulation. We will run our test without using a test connector (instead using the actual JDBC connector). 1. Trigger an event from the catalog item application (using a DB2 command) to start the item synchronization. 2. This sends the new item details to the iSoft connector and onwards through the AS2 channel to our partner. 3. The response message is received by our AS2 channel.The iSoft connector passes this message to the process worklist. 4. The process worklist processes the response and creates a CIN (since we only have a single subscribing retailer) that is sent back through the AS2 channel to UCCnet. Before we run this test, lets ensure that we have a clean slate and a controlled, known environment to work with. We want to make sure that there are no

220

Implementing WebSphere BI Express for Item Synchronization

outstanding Work In Progress (WIP) items. Finally, we also want to clear the audit logs so that we have a clear view of what we are looking at. 1. Shutdown the InterChange Server and all components. 2. In the additional materials, there is a script named CleanDB.bat. This goes through and deletes any entries from the various Work In Progress tables in the smb_db database. Run this script from a DB2 command window. Important: Be judicious in the use of a script such as this one. It should never be used in anything other than a development environment and only in a controlled fashion! 3. Clear the contents of the audit_log table so that we have a clean view to start with (using a DB2 command window and deleting all rows from the table). 4. Ensure that the following components are running: InterChange Server JDBC connector JTextRWL connector iSoft connector P2P agents for both ITSO and UCCNET 5. As mentioned earlier, we have a small file to automate the placing of files in the correct directories. We also have a set of files for this final test (found in Appendix C, Additional material on page 259). 6. Open a command window and navigate to these files. Automate.cmd DB insert ITEM.txt RCIR_ADD_response.ITSO_16.xml CIC_SentTo.ITSO_16.xml 7. Using a DB2 command window insert a record into the item catalog using the text contained in the DB insert ITEM.txt file, as shown in:
Figure 11-9 Insert record into item catalog insert into smbadmin.item_catalog (productid, unitof_wgt, description, descriptionshort, upceancode) values('00094860443116', '1', 'Really cool thing that we make to sell', 'COOLITEM1', '00094860443116')

8. Once you have seen the RCIR_ADD be transmitted across the AS2 channel to the UCCNET receiver and the MDN be received back again, enter

Chapter 11. Final configuration and test from end-to-end

221

automate from the command window to simulate the sending of responses


from UCCnet. Note: Be patient and note that we have a 30-second polling delay in our P2P agent configuration. 9. The script will then pause to simulate a time delay for the request to be received and processed. We now need to verify the results of this test so far. 1. First, check the InterChange Server log, we see a message that says:
****************Should end successfully***********************]

So far so good. 2. Now go to the audit_log. It is a good idea to have a look at the contents, sorted by the sequence number. In a DB2 command window enter the following:
SELECT * FROM AUDIT_LOG AS AUDIT_LOG ORDER BY AUDIT_LOG.LOG_SEQ_NO ASC

3. Looking at some of the more important columns, we note the following, as shown in Figure 11-10:

Figure 11-10 Audit log

The product id (GTIN) is consistent across the log. The GLN code for the RCIR_RESPONSE is ours, as sent from UCCnet. The GLN code for the CATALOG_ITEM_NOTIFICATION is that of our retailing partner from the subscribers list (see Example 11-1 on page 214). The transaction type sequence, appears to be correct from initialization to item add to RCIR response to Catalog Item Notification. 4. Lastly, check the processed GTIN table to ensure that this table has been updated to include the 00094860443116 GTIN. Finally, we need to process the CIC.

222

Implementing WebSphere BI Express for Item Synchronization

1. Go back to the command window where the automate script is running. Hit enter. This will simulate the creation of the response message from UCCnet. 2. The P2Pagent at the UCCNET end will send the response. 3. The CIC will be received and processed, completing our flow. 4. Check the audit log for complete end-to-end processing flow for our GTIN.

Figure 11-11 Full process

We have successfully implemented and unit-tested the base functions of the Item Synchronization using WebSphere Business Integration Express.

Chapter 11. Final configuration and test from end-to-end

223

224

Implementing WebSphere BI Express for Item Synchronization

Part 3

Part

Appendixes ppendixes

Copyright IBM Corp. 2004. All rights reserved.

225

226

Implementing WebSphere BI Express for Item Synchronization

Appendix A.

Getting started with UCCnet


This appendix explains how to configure a UCCnet supplier or retailer account for communication wtih UCCnet. The following steps are required: Configure your own systems for AS2 communication with UCCnet Obtain digital certificates and register in UCCnet SYNCpoint Subscribe retailer to Publication Information Subscribe supplier to Authorization Information

Copyright IBM Corp. 2004. All rights reserved.

227

A.1 Prerequisites
UCCnet supports secure message transmission via the AS2 protocol. They have several technical prerequisites for anyone who wishes to communicate with them. Before getting started, you should visit read the UCCnets EDIINT Welcome Package, which can be obtained from their Web sites eRoom at the following URL:
http://eroom.uc-council.org/eRoom

A.1.1 System requirements


UCCnet will only send messages to systems with a static IP address that is reachable from the Internet. They strongly prefer that you accept AS2 transmissions on port number 4080. If you have a firewall, you need to implement a firewall rule that will accept traffic from UCCnets sending IP address on port 4080. If you need to use a different port number, you will need to contact the UCCnet customer service desk for assistance.

A.1.2 Software requirements


In order to register with UCCnet, you must use a client that is certified as AS2-compliant by the Drummond Group. In our implementation, we used the iSoft Peer-to-Peer Agent Express.

A.2 Configuring your user account


When configuring your UCCnet account, you will need to login to SYNCPoint. The URLs for SYNCPoint are: Test Environments:
https://www.testregistry.net/Login/Login.jsp

Production:
https://www.uccnet.net/portal/secured/login/login.jsp

A.3 Obtain and register your own digital certificates


When communicating with UCCnets production systems, you need to purchase a digital certificate from a CA (Certifying Authority). UCCnet strongly urges trading partners to obtain a certificate from either VeriSign or GeoTrust. You will need to contact the UCCnet support center if you have a certificate from a

228

Implementing WebSphere BI Express for Item Synchronization

different CA. In the test environment, you are permitted to use self-signed certificates (as we did).

A.3.1 Import your digital certificate into SYNCpoint


You will need to follow this procedure in order to send your digital certificate to UCCnet. 1. 2. 3. 4. Login with your user ID and password. Click Digital Certificate Maintenance (at the bottom of the screen) Click New. Enter digital certificate ID (which can be anything, for example, your organization name). 5. Enter the name of your organization. 6. Click Browse (next to the Meant for Party item) for your organization, and then retrieve and select your organization. (Your organization should now be in the window next to Meant for Party.) 7. Click Browse (across from "Digital Certificate File") 8. Browse for the certificate file exported from endpoint provider (the path where the cert is on your local hard drive). 9. Select the appropriate certificate and then click "Load Certificate". 10.Click Save to save the Digital Certificate. 11.Verify that the certificate serial number is the same serial number loaded in EDIINT endpoint client.

A.3.2 Bind your userid to certificate


1. 2. 3. 4. 5. Click User Maintenance from the Administration Menu. Type in your user ID and click Retrieve. Click Add Certificate. Check Certificate and click Select (to add a certificate in the window). Click Save. (A message will appear in the upper-left-hand corner: User Updated Successfully.).

A.4 Obtain UCCnets public key digital certificate


You will need to complete an EDIINT Setup Request form. You can obtain it from the UCCnet helpdesk. This form is a short word document with a table that must be completed in order provide UCCnet with the information it needs to send messages to your UCCnet software. See Figure A-1 on page 230.

Appendix A. Getting started with UCCnet

229

Figure A-1 The UCCnet EDIINT Setup Request form

Email the completed form to CustomerSupport@uccnet.net. UCCnet will respond to confirm that you are all set up and send the UCCnet public key digital certificate.

A.5 Subscribe your user IDs to relevant events


Before your retailer account will receive CIN notifications in its worklist, you must subscribe your user ID to Publication Information from each of your suppliers GLNs. Similarly, suppliers must subscribe a user ID to authorization information in order to receive CICs. You can set this up through either XML messaging or SYNCpoint. We have chosen the second option.

A.5.1 Subscribe retailer to publication information


Perform the following steps:

230

Implementing WebSphere BI Express for Item Synchronization

1. Login as your retailer user ID and click on User Maintenance from the Administration Menu. See Figure A-2.

Figure A-2 UCCnet Administration menu

This step displays the User Maintenance screen. See Figure A-3 on page 232.

Appendix A. Getting started with UCCnet

231

Figure A-3 Retrieve Userid

2. Type in your user ID and click Retrieve. See Figure A-4 on page 233.

232

Implementing WebSphere BI Express for Item Synchronization

Figure A-4 User Maintenance Screen

3. Click Edit Subscriptions. See Figure A-5 on page 234.

Appendix A. Getting started with UCCnet

233

Figure A-5 Subscription Maintenance Screen

4. Select Publication Information and click Add. See Figure A-6 on page 235.

234

Implementing WebSphere BI Express for Item Synchronization

Figure A-6 Subsription Filter Details: Publication Information

5. Select everything in the Actions window on the top left of the screen and click the Browse button across from the word Category. See Figure A-7 on page 236.

Appendix A. Getting started with UCCnet

235

Figure A-7 Bottom of the Category Browser Screen

6. Scroll down to the bottom of the Category Browser screen that comes up and click Select All. See Figure A-8 on page 237.

236

Implementing WebSphere BI Express for Item Synchronization

Figure A-8 Subscription Filter Details Screen with UDEX.All Categories

7. When you are returned to the Subsription Filter Details screen, click Save. See Figure A-9 on page 238.

Appendix A. Getting started with UCCnet

237

Figure A-9 Subscription Maintenanance Screen

8. Click on the check-box and then click Save. See Figure A-10 on page 239. Note: You see a message confirming that your subscription has been added successfully.

238

Implementing WebSphere BI Express for Item Synchronization

Figure A-10 Subscription Maintenance confirmation message

A.5.2 Subscribe supplier to authorization information


Perform the following steps: 1. Login as your supplier user ID and click on User Maintenance from the Administration Menu. See Figure A-11 on page 240.

Appendix A. Getting started with UCCnet

239

Figure A-11 UCCnet User Maintenance Search Screen

2. Type in your user ID and click Retrieve. See Figure A-12 on page 241.

240

Implementing WebSphere BI Express for Item Synchronization

Figure A-12 User Maintenance Screen

3. Click Edit Subscriptions. See Figure A-13 on page 242.

Appendix A. Getting started with UCCnet

241

Figure A-13 Subscription Maintenance Screen

4. Select Authorization Information and click Add. 5. Select everything in the Actions window on the top left of the screen and click the Browse button across from the word Category. See Figure A-14 on page 243.

242

Implementing WebSphere BI Express for Item Synchronization

Figure A-14 Bottom of the Category Browser Screen

6. Scroll down to the bottom of the Category Browser screen that comes up and click Select All. See Figure A-15 on page 244.

Appendix A. Getting started with UCCnet

243

Figure A-15 Subscription Filter Details Screen with UDEX.All Categories

7. When you are returned to the Subsription Filter Details screen, click Save. See Figure A-16 on page 245.

244

Implementing WebSphere BI Express for Item Synchronization

Figure A-16 Subscription Maintenanance Screen

8. Click on the check-box and then click Save. See Figure A-17 on page 246. Note: You will see a message confirming that your subscription has been added successfully.

Appendix A. Getting started with UCCnet

245

Figure A-17 Subscription Maintenance confirmation message

You are now ready to begin trading data with UCCnet!

246

Implementing WebSphere BI Express for Item Synchronization

Appendix B.

Our sample messages


This appendix shows the sample messages we have used in the end-to-end test of our solution. All of these samples are provided in the Additional Materials. Remember that these messages were created for unit testing purposes only and are not suitable for actual transmission to UCCnet.

Copyright IBM Corp. 2004. All rights reserved.

247

Sample message texts


See Example B-1 for a sample request worklist message.
Example: B-1 Request worklist <?xml version="1.0" encoding="UTF-8" ?> - <ns0:envelope xmlns:ns0="http://www.uccnet.org/schemas/2.2/uccnet" communicationVersion="2.2" xmlns:uccnet="http://www.uccnet.org/schemas/2.2/uccnet" xmlns:eanucc="http://www.ean-ucc.org/schemas/1.3/eanucc" xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance" xsi:schemaLocation="http://www.uccnet.org/schemas/2.2/uccnet http://www.uccnet.net/xmlschema/uccnet/2.2/Envelope.xsd"> - <messageHeader> - <creationTime> <date>2004-02-10</date> - <time timeZone="EST"> <value>13:11:08</value> </time> </creationTime> - <messageIdentifier> <value>MSGID1076418666700</value> </messageIdentifier> <userId>itsosup2</userId> - <representingParty> <gln>7789333002006</gln> </representingParty> </messageHeader> - <body> - <transaction> - <entityIdentification> <uniqueCreatorIdentification>UID1076418666700</uniqueCreatorIdentification> - <globalLocationNumber> <gln>7789333002006</gln> </globalLocationNumber> </entityIdentification> - <command> - <ns0:notifyCommand> - <notifyCommandHeader> - <entityIdentification> <uniqueCreatorIdentification>UID11076418666700</uniqueCreatorIdentification> - <globalLocationNumber> <gln>7789333002006</gln> </globalLocationNumber> </entityIdentification> </notifyCommandHeader> - <notifyCommandOperand> - <ns1:catalogueItemNotification xmlns:ns1="http://www.ean-ucc.org/schemas/1.3/eanucc" xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance"

248

Implementing WebSphere BI Express for Item Synchronization

creationDate="2004-02-10T13:11:08.000-00:00" documentStatus="ORIGINAL" isReload="false" xsi:type="uccnet:CatalogueItemNotificationType"> - <catalogueItem> <catalogueItemState state="REGISTERED" /> - <tradeItem> <tradeItemUnitDescriptor>1</tradeItemUnitDescriptor> - <tradeItemIdentification> <gtin>00094860443116</gtin> - <additionalTradeItemIdentification xsi:type="uccnet:AlternateTradeItemIdentificationType"> <ns0:eanuccType>UP</ns0:eanuccType> <ns0:eanuccCode>00094860443116</ns0:eanuccCode> </additionalTradeItemIdentification> </tradeItemIdentification> - <tradeItemInformation> - <informationProviderOfTradeItem> - <informationProvider> <gln>7789333002006</gln> </informationProvider> <nameOfInformationProvider>itsosup2</nameOfInformationProvider> </informationProviderOfTradeItem> - <targetMarketInformation> <targetMarketCountryCode>840</targetMarketCountryCode> - <targetMarketDescription language="en-US"> <text>US</text> </targetMarketDescription> </targetMarketInformation> - <classificationCategoryCode> <classificationCategoryCode>0</classificationCategoryCode> <classificationCategoryDefinition>IGNORE</classificationCategoryDefinition> <classificationCategoryName>IGNORE</classificationCategoryName> - <additionalClassification> <additionalClassificationAgencyName>UDEX</additionalClassificationAgencyName> <additionalClassificationCategoryCode>01.0020.0082</additionalClassificationCategoryCode> <additionalClassificationCategoryDescription /> </additionalClassification> </classificationCategoryCode> - <tradeItemDescriptionInformation> <brandName>Red Bikes</brandName> - <descriptionShort> - <description language="en-US"> <text>Short Description</text> </description> </descriptionShort> - <functionalName> - <description language="en-US"> <text>Fuctional Name</text> </description> </functionalName> - <tradeItemDescription>

Appendix B. Our sample messages

249

- <longDescription language="en-US"> <longText>Item that we supply to you to sell</longText> </longDescription> </tradeItemDescription> </tradeItemDescriptionInformation> - <tradingPartnerNeutralTradeItemInformation> - <tradeItemUnitIndicator> <isTradeItemABaseUnit>true</isTradeItemABaseUnit> <isTradeItemAConsumerUnit>true</isTradeItemAConsumerUnit> <isTradeItemADespatchUnit>true</isTradeItemADespatchUnit> <isTradeItemAnInvoiceUnit>true</isTradeItemAnInvoiceUnit> <isTradeItemAnOrderableUnit>true</isTradeItemAnOrderableUnit> <isTradeItemAVariableUnit>false</isTradeItemAVariableUnit> </tradeItemUnitIndicator> - <packagingMarking> <isPackagingMarkedAsRecyclable>true</isPackagingMarkedAsRecyclable> <isPackagingMarkedReturnable>false</isPackagingMarkedReturnable> </packagingMarking> - <tradeItemDateInformation> <effectiveDate>2004-02-10</effectiveDate> <lastChangeDateTime>2004-02-10T13:11:08.000-00:00</lastChangeDateTime> <publicationDate>2004-02-10</publicationDate> <startAvailabilityDateTime>2004-02-10T13:11:06.000-00:00</startAvailabilityDateTime> </tradeItemDateInformation> - <tradeItemMeasurements> - <depth> <measurementValue unitOfMeasure="FT">2.2</measurementValue> </depth> - <grossWeight> <measurementValue unitOfMeasure="LB" /> </grossWeight> - <height> <measurementValue unitOfMeasure="FT">1.1</measurementValue> </height> - <width> <measurementValue unitOfMeasure="FT">1.0</measurementValue> </width> - <netWeight> <measurementValue unitOfMeasure="LB">30.3</measurementValue> </netWeight> </tradeItemMeasurements> </tradingPartnerNeutralTradeItemInformation> </tradeItemInformation> </tradeItem> <dataRecipient>7789555003003</dataRecipient> <sourceDataPool>7789333002006</sourceDataPool> </catalogueItem> - <catalogueItemNotificationIdentification> <uniqueCreatorIdentification>UID31076418668273</uniqueCreatorIdentification>

250

Implementing WebSphere BI Express for Item Synchronization

- <contentOwner> <gln>7789333002006</gln> </contentOwner> </catalogueItemNotificationIdentification> <ns0:notificationTopic topic="NEW_ITEM" /> </ns1:catalogueItemNotification> </notifyCommandOperand> </ns0:notifyCommand> </command> </transaction> </body> </ns0:envelope>

See Example B-2 for a sample RCIR_ADD response message.


Example: B-2 RCIR_ADD response <?xml version="1.0" encoding="UTF-8" ?> - <uccnet:envelope communicationVersion="2.2" xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance" xmlns:fmcg="http://www.ean-ucc.org/schemas/1.3/fmcg" xmlns:hbc="http://www.uccnet.org/schemas/1.3/hbc" xmlns:hardlines="http://www.uccnet.org/schemas/1.3/hardlines" xmlns:produce="http://www.uccnet.org/schemas/1.3/produce" xmlns:uccnet="http://www.uccnet.org/schemas/2.2/uccnet" xmlns:eanucc="http://www.ean-ucc.org/schemas/1.3/eanucc" xmlns:otc="http://www.uccnet.org/schemas/1.3/otc" xsi:schemaLocation="http://www.uccnet.org/schemas/2.2/uccnet http://www.testregistry.net/xmlschema/uccnet/2.2/Envelope.xsd"> - <messageHeader> - <to> - <globalLocationNumber> <gln>uccnet2</gln> </globalLocationNumber> </to> - <from> - <globalLocationNumber> <gln>7789333002006</gln> </globalLocationNumber> </from> - <messageIdentifier> <value>30750580</value> </messageIdentifier> <userId>UCCNET_SYSTEM</userId> - <representingParty> <gln>0614141800001</gln> </representingParty>

Appendix B. Our sample messages

251

</messageHeader> - <body> - <response> - <acknowledge> - <acknowledgement> - <acknowledgementHeader type="PROCESSED" success="TRUE" duplicate="FALSE"> - <entityIdentification> <uniqueCreatorIdentification>ITSOSUPPLY2</uniqueCreatorIdentification> - <globalLocationNumber> <gln>7789333002006</gln> </globalLocationNumber> </entityIdentification> - <messageIdentifier> <value>IBMMSG002</value> </messageIdentifier> </acknowledgementHeader> - <subdocumentValid success="TRUE"> - <documentIdentifier> - <typedEntityIdentification type="TRANSACTION"> - <entityIdentification> <uniqueCreatorIdentification>ITSOSUPPLY2</uniqueCreatorIdentification> - <globalLocationNumber> <gln>7789333002006</gln> </globalLocationNumber> </entityIdentification> </typedEntityIdentification> </documentIdentifier> - <subdocumentValid success="TRUE" validationKey="f1af4003baac597259e2d2b420470de7ce76b9e6"> - <documentIdentifier> - <typedEntityIdentification type="REGISTER_COMMAND"> - <entityIdentification> <uniqueCreatorIdentification>ITSOSUPPLY2</uniqueCreatorIdentification> - <globalLocationNumber> <gln>7789333002006</gln> </globalLocationNumber> </entityIdentification> </typedEntityIdentification> </documentIdentifier> - <subdocumentValid success="TRUE"> - <documentIdentifier> - <catalogueItemReference> <gtin>00094860443116</gtin> <dataSource>7789333002006</dataSource> - <targetMarket> <targetMarketCountryCode>840</targetMarketCountryCode> </targetMarket> </catalogueItemReference> </documentIdentifier> </subdocumentValid>

252

Implementing WebSphere BI Express for Item Synchronization

</subdocumentValid> </subdocumentValid> </acknowledgement> </acknowledge> </response> </body> </uccnet:envelope>

See Example B-3 for a sample CIC message.


Example: B-3 Catalog Item Confirmation <?xml version="1.0" encoding="UTF-8" ?> - <uccnet:envelope communicationVersion="2.2" xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance" xmlns:fmcg="http://www.ean-ucc.org/schemas/1.3/fmcg" xmlns:hbc="http://www.uccnet.org/schemas/1.3/hbc" xmlns:hardlines="http://www.uccnet.org/schemas/1.3/hardlines" xmlns:produce="http://www.uccnet.org/schemas/1.3/produce" xmlns:uccnet="http://www.uccnet.org/schemas/2.2/uccnet" xmlns:eanucc="http://www.ean-ucc.org/schemas/1.3/eanucc" xmlns:otc="http://www.uccnet.org/schemas/1.3/otc" xsi:schemaLocation="http://www.uccnet.org/schemas/2.2/uccnet http://www.testregistry.net/xmlschema/uccnet/2.2/Envelope.xsd"> - <messageHeader> - <messageIdentifier> <value>31005555</value> </messageIdentifier> <userId>UCCNET_SYSTEM</userId> - <representingParty> <gln>0614141800001</gln> </representingParty> </messageHeader> - <body> - <response> - <acknowledge> - <acknowledgement> - <acknowledgementHeader type="PROCESSED" success="TRUE" duplicate="FALSE"> - <entityIdentification> <uniqueCreatorIdentification>ITSOSUPPLY2</uniqueCreatorIdentification> - <globalLocationNumber> <gln>7789333002006</gln> </globalLocationNumber> </entityIdentification> - <messageIdentifier> <value>ITSOSUPPLY2</value> </messageIdentifier>

Appendix B. Our sample messages

253

</acknowledgementHeader> - <subdocumentValid success="TRUE"> - <documentIdentifier> - <typedEntityIdentification type="TRANSACTION"> - <entityIdentification> <uniqueCreatorIdentification>ITSOSUPPLY2</uniqueCreatorIdentification> - <globalLocationNumber> <gln>7789333002006</gln> </globalLocationNumber> </entityIdentification> </typedEntityIdentification> </documentIdentifier> - <subdocumentValid success="TRUE"> - <documentIdentifier> - <typedEntityIdentification type="QUERY_COMMAND"> - <entityIdentification> <uniqueCreatorIdentification>ITSOSUPPLY2</uniqueCreatorIdentification> - <globalLocationNumber> <gln>7789333002006</gln> </globalLocationNumber> </entityIdentification> </typedEntityIdentification> </documentIdentifier> - <resultList showDetails="TRUE"> - <notification topic="CATALOGUE_ITEM_CONFIRMATION" type="ROUTED_DOCUMENT"> - <entityIdentification> <uniqueCreatorIdentification>617895</uniqueCreatorIdentification> - <globalLocationNumber> <gln>0614141800001</gln> </globalLocationNumber> </entityIdentification> <sequenceId>617895</sequenceId> <notificationStatus value="UNREAD" /> <userId>itsoret1</userId> - <initiatingPartyIdentification> - <initiatingTradingPartner> - <globalLocationNumber> <gln>7789555003003</gln> </globalLocationNumber> </initiatingTradingPartner> - <initiatingParty> - <globalLocationNumber> <gln>7789333002006</gln> </globalLocationNumber> </initiatingParty> </initiatingPartyIdentification> - <notificationDetail> - <transactionInformation> - <entityIdentification>

254

Implementing WebSphere BI Express for Item Synchronization

<uniqueCreatorIdentification>1060609309994</uniqueCreatorIdentification> - <globalLocationNumber> <gln>0614141800001</gln> </globalLocationNumber> </entityIdentification> - <transactionDateAndTime> <date>2003-08-11</date> - <time timeZone="EDT"> <value>09:41:50</value> </time> </transactionDateAndTime> <transactionType>XML</transactionType> <transactionStatusCode>SUCCEEDED</transactionStatusCode> </transactionInformation> - <eanucc:catalogueItemConfirmation xmlns:eanucc="http://www.ean-ucc.org/schemas/1.3/eanucc" xmlns:uccnet="http://www.uccnet.org/schemas/2.2/uccnet" xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance" creationDate="2003-08-08T12:00:00.000-00:00" documentStatus="ORIGINAL" xsi:type="uccnet:CatalogueItemConfirmationType"> - <catalogueItemConfirmationIdentification> <uniqueCreatorIdentification>IBMCIC0015</uniqueCreatorIdentification> - <contentOwner> <gln>7789333002006</gln> </contentOwner> </catalogueItemConfirmationIdentification> - <catalogueItemReference> <gtin>00094860443116</gtin> <dataSource>7789333002006</dataSource> - <targetMarket> <targetMarketCountryCode>840</targetMarketCountryCode> </targetMarket> </catalogueItemReference> - <catalogueItemConfirmationState state="SYNCHRONISED"> <recipientDataPool>7789333002006</recipientDataPool> <recipientGLN>7789333002006</recipientGLN> </catalogueItemConfirmationState> - <uccnet:catalogueItemNotificationReference> <uniqueCreatorIdentification>IBMCIN0010</uniqueCreatorIdentification> - <globalLocationNumber> <gln>7789333002006</gln> </globalLocationNumber> </uccnet:catalogueItemNotificationReference> </eanucc:catalogueItemConfirmation> </notificationDetail> </notification> - <notification topic="CATALOGUE_ITEM_CONFIRMATION" type="ROUTED_DOCUMENT"> - <entityIdentification> <uniqueCreatorIdentification>618235</uniqueCreatorIdentification> - <globalLocationNumber>

Appendix B. Our sample messages

255

<gln>0614141800001</gln> </globalLocationNumber> </entityIdentification> <sequenceId>618235</sequenceId> <notificationStatus value="READ" /> <userId>itsoret1</userId> - <initiatingPartyIdentification> - <initiatingTradingPartner> - <globalLocationNumber> <gln>7789555003003</gln> </globalLocationNumber> </initiatingTradingPartner> - <initiatingParty> - <globalLocationNumber> <gln>7789333002006</gln> </globalLocationNumber> </initiatingParty> </initiatingPartyIdentification> - <notificationDetail> - <transactionInformation> - <entityIdentification> <uniqueCreatorIdentification>1060622703638</uniqueCreatorIdentification> - <globalLocationNumber> <gln>0614141800001</gln> </globalLocationNumber> </entityIdentification> - <transactionDateAndTime> <date>2003-08-11</date> - <time timeZone="EDT"> <value>13:25:03</value> </time> </transactionDateAndTime> <transactionType>XML</transactionType> <transactionStatusCode>SUCCEEDED</transactionStatusCode> </transactionInformation> - <eanucc:catalogueItemConfirmation xmlns:eanucc="http://www.ean-ucc.org/schemas/1.3/eanucc" xmlns:uccnet="http://www.uccnet.org/schemas/2.2/uccnet" xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance" creationDate="2003-08-08T12:00:00.000-00:00" documentStatus="ORIGINAL" xsi:type="uccnet:CatalogueItemConfirmationType"> - <catalogueItemConfirmationIdentification> <uniqueCreatorIdentification>IBMCIC0016</uniqueCreatorIdentification> - <contentOwner> <gln>7789333002006</gln> </contentOwner> </catalogueItemConfirmationIdentification> - <catalogueItemReference> <gtin>00094860443116</gtin> <dataSource>7789333002006</dataSource>

256

Implementing WebSphere BI Express for Item Synchronization

- <targetMarket> <targetMarketCountryCode>840</targetMarketCountryCode> </targetMarket> </catalogueItemReference> - <catalogueItemConfirmationState state="SYNCHRONISED"> <recipientDataPool>7789333002006</recipientDataPool> <recipientGLN>7789333002006</recipientGLN> </catalogueItemConfirmationState> - <uccnet:catalogueItemNotificationReference> <uniqueCreatorIdentification>IBMCIN0010</uniqueCreatorIdentification> - <globalLocationNumber> <gln>7789333002006</gln> </globalLocationNumber> </uccnet:catalogueItemNotificationReference> </eanucc:catalogueItemConfirmation> </notificationDetail> </notification> </resultList> </subdocumentValid> </subdocumentValid> </acknowledgement> </acknowledge> </response> </body> </uccnet:envelope>

Appendix B. Our sample messages

257

258

Implementing WebSphere BI Express for Item Synchronization

Appendix C.

Additional material
This redbook refers to additional material that can be downloaded from the Internet as described below.

Locating the Web material


The Web material associated with this redbook is available in softcopy on the Internet from the IBM Redbooks Web server. Point your Web browser to:
ftp://www.redbooks.ibm.com/redbooks/SG246083

Alternatively, you can go to the IBM Redbooks Web site at:


ibm.com/redbooks

Select the Additional materials and open the directory that corresponds with the redbook form number, SG246083.

Using the Web material


The additional Web material that accompanies this redbook includes the following files:

Copyright IBM Corp. 2004. All rights reserved.

259

File name SG246083.zip

Description Zipped sample messages, database utilities and sample business objects.

System requirements for downloading the Web material


The following system configuration is recommended: Hard disk space: Operating System: Processor: Memory: 20 GB minimum Windows 2000 1600 MHz or higher 1 GB or higher

How to use the Web material


Create a subdirectory (folder) on your workstation. Then, unzip the contents of the Web material zip file into this folder.

260

Implementing WebSphere BI Express for Item Synchronization

Abbreviations and acronyms


ASBO ASBO CI CIC CIN CIP EAN EDIINT GBO GLN GTIN ICL MDN RCIR UCC UDEX UPC Application Specific Business Object Application Specific Business Object Catalogue Item Document Catalogue Item Confirmation Catalogue Item Notification Catalogue Item Publication European Article Numbering EDI over the Internet Generic Business Object Global Location Number Global Trade Item Number Integration Component Library Message Disposition Notification Register Catalogue Item Registry Uniform Code Council Universal Descriptor Exchange Universal Product Code

Copyright IBM Corp. 2004. All rights reserved.

261

262

Implementing WebSphere BI Express for Item Synchronization

Related publications
The publications listed in this section are considered particularly suitable for a more detailed discussion of the topics covered in this redbook.

IBM Redbooks
For information on ordering these publications, see How to get IBM Redbooks on page 264. Note that some of the documents referenced here may be available in softcopy only. An EAI Solution using WebSphere Business Integration (V4.1), SG24-6849 A B2B Solution using WebSphere Business Integration V4.1 and WebSphere Business Connection V1.1), SG24-6916 B2B Solutions Using WebSphere Business Connection, SG24-6197 Implementing EDI Solutions, SG24-6906 Implementation of iSoft and Integration with an EAI Solution, REP-3625

Online resources
These Web sites and URLs are also relevant as further information sources: UCCnet
http://www.uc-council.org

GLN Introduction
http://uc-council.org/reflib/01801/index.html

GLN Implementation Guide


http://www.uc-council.org/ean_ucc_system/pdf/GLN.pdf

GTIN Implementation Guide


http://www.uc-council.org/ean_ucc_system/pdf/GTIN.pdf

UCC Check Digit Calculator


http://www.uc-council.org/ean_ucc_system/education_support/cdc.html

UCCnet eroom
http://eroom.uc-council.org/eRoom

Copyright IBM Corp. 2004. All rights reserved.

263

How to get IBM Redbooks


You can search for, view, or download Redbooks, Redpapers, Hints and Tips, draft publications, and Additional materials, as well as order hardcopy Redbooks or CD-ROMs, at this Web site:
ibm.com/redbooks

Help from IBM


IBM Support and downloads
ibm.com/support

IBM Global Services


ibm.com/services

264

Implementing WebSphere BI Express for Item Synchronization

Index
A
Adapters 28 for email 28 for iSoft Peer-to-Peer Agent 28 for JDBC 28 for JMS 28 for JText 28 for Web services 28 for WebSphere MQ 28 for XML 28 Applicability Statement 1 See AS1 Applicability Statement 2 See AS2 application specific business object See ASBO AS1 data transfer 25 security options 25 what is 25 AS2 and EDI files 25 and UCCnet 26 channel product 29 data transfer 25 encryption 25 product implementation 32 security options 2425 what is 25 AS2 channel server See iSoft P2P Agent Express ASBO business object exchange with server 57 connector support 185 create using ODA 167 deploy 187 explicit map binding 217 mapping fields 177 mapping from GBO 215 mapping to GBO 216 testing the mapping 179 what is 56 audit and logging clear logs 221 components 67 configure 96 database table 96 in CatalogueItemConfirmation 47 in ItemAdd 44 log entries 193 modifying the InterChange Server configuration 97 set up 96 UCCnet_ItemSync 67 UCCnet_processWorklist 67 update 54 viewing entries 194, 213, 220 what is 67 what is it used for 67

B
binding ports binding type 114 JDBC connector 186 UCCnet_processWorklist 142 UCCnet_requestWorklist 147 UCCnetXSD_CIN_Dispatcher 128 UCCnetXSD_CIN_Dispatcher_forRWL 134

C
CIN_DISPATCHER_GLN_FILE 46, 129, 133, 214 collaboration object configure 111 create 111 deploy 186 instantiation 54 ItemCommandRouterObject 119 receiving triggering objects 55 stop 220 UCCnet_ItemSyncObject 44, 112 UCCnet_processWorklistObject 45, 134 UCCnet_requestWorklistObject 55, 143 UCCnetXSD_CIN_Dispatcher_forRWLObject 131 UCCnetXSD_CIN_DispatcherObject 46, 124 views in System Manager 217

Copyright IBM Corp. 2004. All rights reserved.

265

what is 54 collaboration template and objects created 111 ItemCommandRouter 55 Notify_by_eMail 47 UCCnet_ItemSync 54 UCCnet_processWorklist 55 UCCnet_requestWorklist 54 UCCnetXSD_CIN_Dispatcher 55 what is 54 command REGISTER 16 start GUI 36 status 34 communication AS2 client 32 EDI over Internet 32 connector business object agent support 105 create 102 connector agent See also connectors Connector Configurator Express 28 connector controller See also connectors connectors application events 61 business objects 56 collaborations 54 communication 61 connector agent 57, 61 connector controller 57, 61 interaction with collaborations 56 request processing 61 what are 61 what are they 53

global standards 5 standards compliant data 5 UCCnet support 4 EAN/UCC-13 9 EAN/UCC-14 9 EAN/UCC-8 8 EDIINT 24 UCCnet certification 26 Email adapter 28 encryption P2PAgent 33 encryption algorithms 33 end-to-end flow CIC 20 CIN 19 RCIR 18 events collaboration 54 configuring connector for event processing 100 configuring database trigger 165 connector communications 61 create event tables 164 data entity transformation 57 event delivery context 179 in the supplier ERP system 44 inbound queue for iSoft 201 polling for 44 test event delivery 193 test event generation 166

F
features P2PAgent 32

G
GLN and the GLOBALregistry 7 as part of item identifier 10 functional entity 6 how to obtain 7 legal entity 6 physical location 6 what is 6 What makes a GLN? 6 GLN subscription file SeeCIN_DISPATCHER_GLN_FILE Global Location Number See GLN

D
data confidentiality P2PAgent 33 data integrity 33 digital signature algorithms 33 digital signatures P2PAgent 33

E
EAN.UCC and GTIN 7

266

Implementing WebSphere BI Express for Item Synchronization

Global Trade Item Number See GTIN GLOBALregistry 5 sending data to 11 GTIN as part of item identifier 10 examples 9 Item Reference 9 PROCESSED_GTIN table 66 what is 7

I
InterChange Server Express 28 iSoft connector 46 configure 108 create 107 create queues 109 event inbox 213 in ItemCommandRouter 55 in UCCnet_processWorklist 55 UCCnet_processWorklist 58 UCCnet_requestWorklist 58 UCCnet_XSD_CIN_Dispatcher 58 UCCnetGBO_envelope 58 UCCnetXSD_envelope 58 iSoft P2P Agent Connector See also iSoft connector iSoft Peer-to-Peer Agent adapter 28 item identifier 10 Item Registry 5 Item Synchronization collaboration 28 ItemCommandRouterObject create 119

event delivery 179 events tables 164 processWorklist 215 profile for Test connector 189 standard properties 184 starting 193194 startup batch file 194 template 182 unit test for RCIR 205 validation 193 JMS adapter 28 JText adapter 28 JText connector configure 104 configure meta object Data Handler 99 create 103 JTextRWL connector 55 configure event processing 100 UCCnet_requestWorklist 58 UCCnetGBO_envelope 58

L
load balancing 37

M
map application data 173 application item to ItemBasic 44 ASBO to GBO 173 associate with a connector 106, 109 between UCCnet GBO and UCCnet envelope 63 create mapping statements 177 create new 173 CwItemBasic_to_UCCnetXSD_envelope_notify Command_catalogueItem 147 CwItemBasic_to_UCCnetXSD_envelope_regist erCommand_itemAddChange 45, 147 data passing between connector and ICS 62 deploy 151 explicit binding 106, 109 for CIN dispatch 46 ItemBasic_to_SUPPLIER_ITEM_CATALOG 215 Java code 62 Map Designer 177 mapping direction 176 mapping services 62

J
JDBC retrieving data from back-end application 218 JDBC Adapter 28 install 79 JDBC connector add mapping support 216 and the back-end system 44 and the Test connector 189 bind ports 186 connector specific properties 185 create 182 deployment 187 end-to-end testing 220221

Index

267

relationships used for UCCnet 66 source business object 174 stop and start 90 SUPPLIER_ITEM_CATALOG_to_ItemBasic 187 target business object 175 UCCnetGBO_envelope business object 58 UCCnetXSD_envelope_to_UCCnetGBO_envel ope 45, 47, 58 update maps 147 what does it do 62 what is 62 with relationships 64 Map Designer 177

trade item attributes 5 trading partner GLN store for CIN 214 in relationship lookups 65 populate trading partner table 154 relationship 66 relationship table name 66 supplier from lookup 117 who can send to UCCnet 26 transport protocols for UCCnet 11

U
UCC-12 8 UCCnet GLOBALregistry 27 organization 5 what is 4 UCCnet messages 12 CI 13 CIC 13 CIN 13 CIP 13 command layer 15 document layer 16 RCIR 12 structure 14 transport layer 14 worklists 13 UCCnet Services 5 UCCnet_ItemSyncObject create 112 UCCnet_processWorklist collaboration properties 141 DestinationAppRetrieve 217 UCCnet_requestWorklist collaboration properties 146 create collaboration object 143 port bindings 147 Uniform Code Council 34

N
non-repudiation 33

P
P2PAgent encryption 33 features 32 Port connector 44, 47 agent support for businesses objects 110 configure 110 create 110 processed GTIN check entries 222 PROCESSED_GTIN table 66 relationship 66 update 222 PROCESSED_GTIN table what is 66 protocols for EDI 32

R
RCIR unit test using JDBC connector 205 unit test using Test connector 205

T
Target Market as part of item identifer 10 what is 10 test event generation 166 Toolset Express 28

W
Web services Adapter 28 WebSphere Business Integration Express and UCCnet 27 technology adapters 29 WebSphere MQ adapter 28

268

Implementing WebSphere BI Express for Item Synchronization

X
XML adapter 28

Index

269

270

Implementing WebSphere BI Express for Item Synchronization

Implementing WebSphere Business Integration Express for Item Synchronization

(0.5 spine) 0.475<->0.875 250 <-> 459 pages

Back cover

Implementing WebSphere Business Integration Express for Item Synchronization


Establish connectivity and execute item synchronization Establish a foundation for supply chain initiatives Automate item management
Today's suppliers, consumer packaged goods companies, manufacturers, and wholesalers face many challenges. Each year, 20 000 new food and non-food Universal Product Code (UPC) items are created and it typically takes 10 to 30 days to get these new items and price changes to market. Data elements that describe these individual items may change up to four times per year. Furthermore, nearly three out of five orders placed need to be revisited and reworked before completion. To meet these escalating data demands on suppliers, UCCnet has implemented multi-industry standards for product identification and related electronic communications. A subsidiary of the Uniform Code Council Inc., UCCnet is a neutral industry organization that implements these standards by requiring its community of trading partners to provide standardized item data in particular formats to its registry. This IBM Redbook covers IBM WebSphere Business Integration Express for Item Synchronization, which is designed for mid-market suppliers pursuing supply chain integration through the UCCnet GLOBALregistry.

INTERNATIONAL TECHNICAL SUPPORT ORGANIZATION

BUILDING TECHNICAL INFORMATION BASED ON PRACTICAL EXPERIENCE IBM Redbooks are developed by the IBM International Technical Support Organization. Experts from IBM, Customers and Partners from around the world create timely technical information based on realistic scenarios. Specific recommendations are provided to help you implement IT solutions more effectively in your environment.

For more information: ibm.com/redbooks


SG24-6083-00 ISBN 0738498084

Você também pode gostar