09.12.2012 Views

webMethods Developer User's Guide - Software AG Documentation

webMethods Developer User's Guide - Software AG Documentation

webMethods Developer User's Guide - Software AG Documentation

SHOW MORE
SHOW LESS

Create successful ePaper yourself

Turn your PDF publications into a flip-book with our unique Google optimized e-Paper software.

Title Page<br />

<strong>webMethods</strong>, Inc.<br />

South Tower<br />

3877 Fairfax Ridge Road<br />

Fairfax, VA 22030<br />

USA<br />

703.460.2500<br />

http://www.webmethods.com<br />

<strong>webMethods</strong> <strong>Developer</strong> User’s <strong>Guide</strong><br />

VERSION 6.5, SERVICE PACK 3<br />

DECEMBER 2006


Copyright<br />

& Document<br />

ID<br />

B2B Integration Server, Business Process Integration, Cerebra, Get There Faster, Glue, Glueprints, Glueware, <strong>Guide</strong>d SOA Governance, Infravio X-Broker,<br />

Infravio X-Registry, Infravio, My <strong>webMethods</strong> Server, My <strong>webMethods</strong>, Process Improvement Lifecycle, Process Improvement Lifecycle Methodology,<br />

<strong>webMethods</strong> Access, <strong>webMethods</strong> Administrator, <strong>webMethods</strong> Broker, <strong>webMethods</strong> Central Configuration, <strong>webMethods</strong> Dashboard, <strong>webMethods</strong> Designer,<br />

<strong>webMethods</strong> <strong>Developer</strong>, <strong>webMethods</strong> Fabric, <strong>webMethods</strong> Glue, <strong>webMethods</strong> Infrastructure Data Collector, <strong>webMethods</strong> Infravio X-Broker, <strong>webMethods</strong><br />

Infravio X-Registry, <strong>webMethods</strong> Installer, <strong>webMethods</strong> Integration Server, <strong>webMethods</strong> logo, <strong>webMethods</strong> Mainframe, <strong>webMethods</strong> Manager, <strong>webMethods</strong><br />

Modeler, <strong>webMethods</strong> Monitor, <strong>webMethods</strong> Optimize for Infrastructure, <strong>webMethods</strong> Optimize for Process, <strong>webMethods</strong> Optimize, <strong>webMethods</strong> Portal,<br />

<strong>webMethods</strong> Process Engine, <strong>webMethods</strong> Servicenet, <strong>webMethods</strong> SOA Governance, <strong>webMethods</strong> SOA Management, <strong>webMethods</strong> Task Engine,<br />

<strong>webMethods</strong> Trading Networks, <strong>webMethods</strong> Workflow, and <strong>webMethods</strong> are either registered trademarks or trademarks of <strong>webMethods</strong>, Inc. in the United<br />

States and/or other countries.<br />

Acrobat and Adobe are registered trademarks, and Reader is a trademark of Adobe Systems Incorporated. Amdocs is a registered trademark, and ClarifyCRM<br />

is a trademark of Amdocs. Ariba is a registered trademark of Ariba, Inc. BEA, BEA WebLogic Server, Jolt, and Tuxedo are registered trademarks, and BEA<br />

WebLogic Platform is a trademark of BEA Systems, Inc. Action Request System, BMC <strong>Software</strong>, PATROL, and Remedy are registered trademarks of BMC<br />

<strong>Software</strong>, Inc. BroadVision is a registered trademark of BroadVision, Inc. ChemeStandards and CIDX are trademarks of Chemical Industry Data Exchange.<br />

Unicenter is a registered trademark of Computer Associates International, Inc. PopChart is a registered trademark of CORDA Technologies, Inc. Kenan and<br />

Arbor are registered trademarks of CSG Systems, Inc. Data Connection and SNAP-IX are registered trademarks of Data Connection Corporation. DataDirect,<br />

DataDirect Connect, and SequeLink are registered trademarks of DataDirect Technologies. D&B and D-U-N-S are registered trademarks of Dun & Bradstreet<br />

Corporation. Entrust is a registered trademark of Entrust, Inc. papiNet is a registered trademark of the European Union and the United States. Financial<br />

Information eXchange, F.I.X, and F.I.X Protocol are trademarks of FIX Protocol Ltd. UCCnet and eBusinessReady are registered trademarks, and 1SYNC and<br />

Transora are trademarks of GS1 US. Hewlett-Packard, HP, HP-UX, OpenView, PA-RISC, and SNAplus2 are trademarks of Hewlett-Packard Company. i2 is a<br />

registered trademark of i2 Technologies, Inc. AIX, AS/400, CICS, DB2, Domino, IBM, Informix, Infoprint, Lotus, Lotus Notes, MQSeries, OS/390, OS/400,<br />

RACF, RS/6000, SQL/400, S/390, System/390, VTAM, z/OS, and WebSphere are registered trademarks; and Communications System for Windows NT, DB2<br />

Universal Database, IMS, MVS, and SQL/DS are trademarks of IBM Corporation. InnoDB is a trademark of Innobase Oy. Itanium is a registered trademark of<br />

Intel Corporation. JBoss is a registered trademark, and JBoss Group is a trademark of Jboss, Inc. Linux is a registered trademark of Linus Torvalds. W3C is a<br />

registered trademark, and X Window System is a trademark of the Massachusetts Institute of Technology. MetaSolv is a registered trademark of Metasolv<br />

<strong>Software</strong>, Inc. ActiveX, Microsoft, Outlook, Visual Basic, Windows, and Windows NT are registered trademarks; and Windows Server is a trademark of<br />

Microsoft Corporation. Six Sigma is a registered trademark of Motorola, Inc. Firefox is a registered trademark, and Mozilla is a trademark of the Mozilla<br />

Foundation. MySQL is a registered trademark of MySQL AB. nCipher is a trademark of nCipher Corporation Ltd. Teradata is a registered trademark of NCR<br />

International, Inc. Netscape is a registered trademark of Netscape Communications Corporation. ServletExec is a registered trademark, and New Atlanta is a<br />

trademark of New Atlanta Communications, LLC. SUSE is a registered trademark of Novell, Inc. Appia is a registered trademark and Javelin Technologies is<br />

a trademark of NYFIX, Inc. CORBA is a registered trademark of Object Management Group, Inc. JD Edwards, OneWorld, Oracle, PeopleSoft, Siebel, and<br />

Vantive are registered trademarks, and PeopleSoft Pure Internet Architecture and World<strong>Software</strong> are trademarks of Oracle Corporation. Infranet and Portal<br />

are trademarks of Portal <strong>Software</strong>, Inc. Red Hat is a registered trademark of Red Hat, Inc. PIP and RosettaNet are trademarks of RosettaNet, a non-profit<br />

organization. SAP and R/3 are registered trademarks of SAP <strong>AG</strong>. SWIFT and SWIFTNet are registered trademarks of Society for Worldwide Interbank<br />

Financial Telecommunication SCRL. SPARC and SPARCStation are registered trademarks of SPARC International, Inc. SSA is a registered trademark, and<br />

Baan and SSA Global are trademarks of SSA Global Technologies, Inc. EJB, Enterprise JavaBeans, Java, JavaServer, JDBC, JSP, J2EE, Solaris, Sun, and Sun<br />

Microsystems are registered trademarks; and Java Naming and Directory Interface, SOAP with Attachments API for Java, JavaServer Pages, and SunSoft are<br />

trademarks of Sun Microsystems, Inc. Sybase is a registered trademark of Sybase, Inc. VERITAS is a registered trademark, and VERITAS Cluster Server is a<br />

trademark of Symantec Corporation. UNIX is a registered trademark of The Open Group. Unicode is a trademark of Unicode, Inc. VeriSign is a registered<br />

trademark of Verisign, Inc.<br />

All other marks are the property of their respective owners.<br />

Copyright © 2006 by <strong>webMethods</strong>, Inc. All rights reserved, including the right of reproduction in whole or in part in any form.<br />

Document ID: DEV-UG-65SP3-20061222


Contents<br />

Contents<br />

About This <strong>Guide</strong>. . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 17<br />

Document Conventions . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 17<br />

Additional Information . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 18<br />

Chapter 1. Getting Started with <strong>Developer</strong> . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 19<br />

What Is <strong>Developer</strong>? . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 20<br />

Before You Use <strong>Developer</strong> . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 20<br />

Starting <strong>Developer</strong> . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 21<br />

What Does the <strong>Developer</strong> Window Contain? . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 23<br />

The Navigation Panel . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 24<br />

Navigation Panel Icons . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 25<br />

Refreshing the Contents of the Navigation Panel . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 27<br />

The Servicenet Tab . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 28<br />

Servicenet Tab Icons . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 28<br />

The Recent Elements Tab . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 29<br />

The Editor . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 30<br />

The Properties Panel . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 31<br />

The Results Panel . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 33<br />

Working in the <strong>Developer</strong> Window . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 33<br />

Moving Between Panels . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 33<br />

Performing Actions . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 34<br />

Resizing Areas in the <strong>Developer</strong> Window . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 35<br />

Hiding and Showing Panels . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 35<br />

Dragging Movable Borders . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 36<br />

Switching Perspectives . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 36<br />

Opening, Closing, and Restoring Sessions . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 37<br />

Restoring a Session on a Server . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 38<br />

Notification of Server Shutdown . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 39<br />

Changing Your Password . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 39<br />

Password Requirements . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 39<br />

Using Online Help . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 41<br />

Chapter 2. Managing Elements in the Navigation Panel . . . . . . . . . . . . . . . . . . . . . . . . . . 43<br />

What Is an Element? . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 44<br />

Creating New Elements . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 45<br />

About Element Names . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 45<br />

Package Names and Element Names . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 46<br />

<strong>webMethods</strong> <strong>Developer</strong> User’s <strong>Guide</strong> Version 6.5, Service Pack 3 � � � 3


Contents<br />

<strong>Guide</strong>lines for Naming Elements . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 46<br />

Editing Elements . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 47<br />

Specifying Dependency Checking Safeguards . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 47<br />

Notes About Performing Actions on Elements . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 48<br />

Opening and Closing Elements in the Editor . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 49<br />

Moving and Copying Elements . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 51<br />

General . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 51<br />

Moving and Copying Services . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 51<br />

Copying Elements Between Servers . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 52<br />

Moving and Copying Adapter Notifications and Related Elements . . . . . . . . . . . . . . . 53<br />

Renaming Elements . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 55<br />

Saving Changes to Elements . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 57<br />

Deleting Elements . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 57<br />

Finding Elements and Fields . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 59<br />

Finding Elements in the Navigation Panel . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 59<br />

Finding Fields in Editor Trees . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 61<br />

Locating Invoked Services . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 63<br />

Finding Dependents and References . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 63<br />

Finding Dependents . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 63<br />

Finding References . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 65<br />

Inspecting Pipeline References . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 66<br />

Caching Elements . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 70<br />

Clearing the <strong>Developer</strong> Cache . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 70<br />

Chapter 3. Working with Packages . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 73<br />

What Is a Package? . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 74<br />

Package Management . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 74<br />

Creating a Package . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 76<br />

<strong>Guide</strong>lines for Naming Packages . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 76<br />

Viewing Details for a Package . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 77<br />

Optimizing Lock Checking . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 77<br />

Copying a Package to Another Server . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 78<br />

Documenting a Package . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 80<br />

Reloading a Package . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 81<br />

Deleting a Package . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 81<br />

Exporting a Package or Element . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 82<br />

Assigning a Version Number to a Package . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 83<br />

Viewing the Patch History for a Package . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 83<br />

Identifying Package Dependencies . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 85<br />

Removing Package Dependencies . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 87<br />

Assigning Startup, Shutdown, and Replication Services . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 88<br />

<strong>webMethods</strong> <strong>Developer</strong> User’s <strong>Guide</strong> Version 6.5, Service Pack 3 � � � 4


Contents<br />

What Is a Startup Service? . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 88<br />

What Is a Shutdown Service? . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 89<br />

What Is a Replication Service? . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 89<br />

<strong>Guide</strong>lines for Assigning Startup, Shutdown, and Replication Services . . . . . . . . . . . . . . . . . . . 89<br />

Assigning Startup, Shutdown, and Replication Services . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 90<br />

Removing Startup, Shutdown, and Replication Services . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 91<br />

Chapter 4. Locking and Unlocking Elements . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 93<br />

Basic Concepts . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 94<br />

What Is a Lock? . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 94<br />

How Do I Know Who Has an Element Locked? . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 95<br />

When Do I Lock an Element? . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 95<br />

When Do I Unlock an Element? . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 95<br />

Locking Elements . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 95<br />

Locking Elements . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 96<br />

Locking Java and C/C++ Services . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 97<br />

Locking Templates . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 98<br />

System Locking Elements . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 98<br />

Viewing the Status of Locked Elements . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 98<br />

Copying, Moving, or Deleting Locked Elements . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 100<br />

Unlocking Elements . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 100<br />

Unlocking Elements Using <strong>Developer</strong> . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 100<br />

Unlocking an Element Using the Integration Server Administrator . . . . . . . . . . . . . . . . . . . . . . . 101<br />

Unlocking a System Locked Element . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 103<br />

Viewing an Element’s Corresponding Server Files . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 103<br />

Automatically Unlocking Elements After Saving . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 104<br />

Troubleshooting . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 105<br />

Lock/Unlock Problems . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 105<br />

Package Management Problems . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 106<br />

Save Problems . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 106<br />

Other Problems . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 107<br />

Frequently Asked Questions . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 107<br />

Chapter 5. Assigning and Managing Permissions . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 109<br />

Basic Concepts . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 110<br />

What Is an ACL? . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 110<br />

What Happens When a Client Runs a Service with ACLs? . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 110<br />

Am I Required to Use ACLs? . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 112<br />

How Do I Create an ACL? . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 112<br />

Assigning ACLs to Elements . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 113<br />

The Permissions Properties . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 114<br />

<strong>webMethods</strong> <strong>Developer</strong> User’s <strong>Guide</strong> Version 6.5, Service Pack 3 � � � 5


Contents<br />

ACLs and Inheritance . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 115<br />

Default ACLs and Inheritance . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 116<br />

Viewing ACL Information on a Server . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 116<br />

How ACLs Affect Other <strong>Developer</strong> Features . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 117<br />

ACLs and Locking . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 117<br />

ACLs and Testing/Debugging Services . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 118<br />

ACLs and Creating, Viewing, and Deleting Elements . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 118<br />

Troubleshooting . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 119<br />

Chapter 6. Building Flow Services . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 121<br />

Basic Concepts . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 122<br />

What Is a Flow Service? . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 122<br />

What Is a Flow Step? . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 123<br />

What Is the Pipeline? . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 124<br />

What Are Input and Output Parameters? . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 125<br />

A Process Overview . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 126<br />

Creating a New Flow Service . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 127<br />

Package and Folder Requirements . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 127<br />

Using the Default Logic Options . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 127<br />

Inserting Flow Steps . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 128<br />

Declaring Input and Output Parameters for a Service . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 129<br />

Supported Data Types . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 129<br />

Specifying Input Parameters . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 130<br />

Specifying Output Parameters . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 131<br />

Completing the Input/Output Tab . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 131<br />

Assigning an Output Template to a Service . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 134<br />

Specifying Run-Time Parameters . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 137<br />

Maintaining the State of a Service . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 137<br />

Configuring a Service’s Use of Cache . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 138<br />

Types of Services to Cache . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 138<br />

Services Suited for Caching . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 139<br />

Services that You Should Not Cache . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 139<br />

Controlling a Service’s Use of Cache . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 139<br />

Specifying the Duration of a Cached Result . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 140<br />

Using the Prefetch Option . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 140<br />

Specifying the Execution Locale . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 141<br />

Configuring Service Retry . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 143<br />

About the Maximum Retry Period . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 143<br />

Setting Service Retry Properties . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 144<br />

Assigning Universal Names to Services . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 145<br />

Configuring Service Auditing . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 148<br />

<strong>webMethods</strong> <strong>Developer</strong> User’s <strong>Guide</strong> Version 6.5, Service Pack 3 � � � 6


Contents<br />

Enabling Auditing for a Service . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 149<br />

Specifying When Audit Data Is Generated . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 149<br />

Including the Pipeline in the Audit Log . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 151<br />

When Is a Copy of the Input Pipeline Saved in the Audit Log? . . . . . . . . . . . . . . . . . . . . . . 151<br />

Service Auditing Use Cases . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 153<br />

Error Auditing . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 153<br />

Service Auditing . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 154<br />

Auditing for Recovery . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 155<br />

Auditing Long-Running Services . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 155<br />

Setting Auditing Options for a Service . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 155<br />

Audit Level Settings in Earlier Versions of <strong>Developer</strong> . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 156<br />

Printing a Flow Service . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 157<br />

Chapter 7. Inserting Flow Steps . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 159<br />

What Is a Flow Step? . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 160<br />

Inserting and Moving Flow Steps . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 160<br />

Changing the Position of a Flow Step . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 162<br />

Changing the Level of a Flow Step . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 162<br />

Setting the Properties of a Flow Step . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 163<br />

The INVOKE Step . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 165<br />

Specifying the Service Property . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 165<br />

Invoking a Built-In Service . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 166<br />

Invoking a Service on Another <strong>webMethods</strong> Integration Server . . . . . . . . . . . . . . . . . . . . . . . . . 166<br />

Building an INVOKE Step . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 167<br />

The BRANCH Step . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 168<br />

Branching on a Switch Value . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 169<br />

Specifying the Switch Variable . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 170<br />

Specifying the Label Value . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 170<br />

Branching on an Expression . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 171<br />

Branching on Null and Empty Values . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 172<br />

Specifying a Default Step . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 174<br />

Using SEQUENCE as the Target of a BRANCH . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 175<br />

Building a BRANCH Step . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 177<br />

The REPEAT Step . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 179<br />

Specifying the REPEAT Condition . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 180<br />

Setting the REPEAT Counter . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 180<br />

When Does REPEAT Fail? . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 180<br />

Using REPEAT to Retry a Failed Step . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 181<br />

Using REPEAT to Retry a Successful Step . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 183<br />

The SEQUENCE Step . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 185<br />

Using SEQUENCE to Specify an Exit Condition . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 185<br />

<strong>webMethods</strong> <strong>Developer</strong> User’s <strong>Guide</strong> Version 6.5, Service Pack 3 � � � 7


Contents<br />

The LOOP Step . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 186<br />

Specifying the Input Array . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 187<br />

Collecting Output from a LOOP Step . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 188<br />

Building a LOOP Step . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 189<br />

The EXIT Step . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 190<br />

The MAP Step . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 192<br />

Chapter 8. Mapping Data in a Flow Service . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 195<br />

What Is Data Mapping? . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 196<br />

What Does the Pipeline Tab Contain? . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 196<br />

Pipeline Tab for an INVOKE Step . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 197<br />

Pipeline Tab for a MAP Step . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 199<br />

Pipeline Modifiers . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 200<br />

Printing the Pipeline Tab . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 200<br />

Basic Mapping Tasks . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 201<br />

Linking Variables . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 201<br />

What Happens When Integration Server Executes a Link Between Variables? . . . . . . . . . 206<br />

Linking to Document and Document List Variables . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 208<br />

Linking Variables of Different Data Types . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 209<br />

Examples of Structural Transformations on the Pipeline Tab . . . . . . . . . . . . . . . . . . . 210<br />

Converting a String List to a Document List . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 210<br />

Linking to and from Array Variables . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 211<br />

<strong>Guide</strong>lines for Linking to and from Array Variables . . . . . . . . . . . . . . . . . . . . . . . . . . . 213<br />

Deleting Links Between Variables . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 214<br />

Applying Conditions to Links Between Variables . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 214<br />

Linking Multiple Source Variables to a Target Variable . . . . . . . . . . . . . . . . . . . . . . . . 215<br />

Assigning Values to Pipeline Variables . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 216<br />

Assigning a Default Value to a Variable . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 217<br />

Initializing Variables in a Flow Service . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 218<br />

Referencing Other Variables . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 218<br />

Setting a Value for a Pipeline Variable . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 218<br />

Copying Set Values Between Variables . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 219<br />

Dropping Variables from the Pipeline . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 220<br />

Adding Variables with the Pipeline Tab . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 221<br />

Working with Transformers . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 222<br />

What Are Transformers? . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 222<br />

Using Built-in Services as Transformers . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 224<br />

Inserting a Transformer into a MAP Step . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 224<br />

Linking Variables to a Transformer . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 226<br />

Transformer Movement . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 227<br />

Transformers and Array Variables . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 228<br />

<strong>webMethods</strong> <strong>Developer</strong> User’s <strong>Guide</strong> Version 6.5, Service Pack 3 � � � 8


Contents<br />

What Is Dimensionality? . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 228<br />

Example . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 228<br />

Solution . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 229<br />

Validating Input and Output for Transformers . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 229<br />

Copying Transformers . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 230<br />

Expanding Transformers . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 230<br />

Renaming Transformers . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 231<br />

Debugging Transformers . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 232<br />

Chapter 9. Creating IS Schemas, IS Document Types, and Specifications . . . . . . . . . . . 233<br />

Creating an IS Schema . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 234<br />

What Does an IS Schema Look Like? . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 234<br />

Schema Browser . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 235<br />

Schema Details Area . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 238<br />

Creating an IS Schema . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 239<br />

Creating IS Schemas from XML Schemas that Reference Other Schemas . . . . . . . . . . . . 241<br />

Editing a Simple Type in an IS Schema . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 242<br />

Setting Constraining Facet Values . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 243<br />

Creating an IS Document Type . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 244<br />

Creating an Empty IS Document Type . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 245<br />

Creating an IS Document Type from an XML Document, DTD, or XML Schema . . . . . . . . . . . . 246<br />

Creating an IS Document Type from a Broker Document Type . . . . . . . . . . . . . . . . . . . . . . . . . 248<br />

The Envelope Field . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 251<br />

Adapter Notifications and Publishable Document Types . . . . . . . . . . . . . . . . . . . . . . . . . . . 252<br />

Editing an IS Document Type . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 252<br />

Modifying Publishable Document Types . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 253<br />

Printing an IS Document Type . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 253<br />

Using an IS Document Type to Specify Service Input or Output Parameters . . . . . . . . . . . . . . . 253<br />

Using an IS Document Type to Build a Document Reference or Document Reference List Field 254<br />

Specifying Field Properties . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 255<br />

Creating a Specification . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 256<br />

Chapter 10. Performing Data Validation . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 259<br />

What Is Data Validation? . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 260<br />

What Is Data Validated Against? . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 260<br />

Applying Constraints to Variables . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 261<br />

Considerations for Object Constraints . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 263<br />

Customizing a String Content Type . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 264<br />

Viewing the Constraints Applied to Variables . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 265<br />

Performing Input/Output Validation . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 266<br />

Specifying Input/Output Validation via the Input/Output Tab . . . . . . . . . . . . . . . . . . . . . . . . . . . . 267<br />

<strong>webMethods</strong> <strong>Developer</strong> User’s <strong>Guide</strong> Version 6.5, Service Pack 3 � � � 9


Contents<br />

Specifying Input/Output Validation via the INVOKE Step . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 268<br />

Performing Document Validation . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 269<br />

Performing Pipeline Validation . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 270<br />

Performing XML Validation in <strong>webMethods</strong> Integration Server . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 271<br />

Performing Validation from within a Java Service . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 271<br />

Validation Errors and Exceptions . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 273<br />

Validation Exceptions . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 273<br />

Running Out of Memory During Validation . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 274<br />

Chapter 11. Testing and Debugging Services . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 275<br />

Testing and Debugging . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 276<br />

Testing Services . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 276<br />

Testing Services from <strong>Developer</strong> . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 277<br />

Entering Input for a Service . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 278<br />

Saving Input Values to a File . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 280<br />

Loading Input Values from a File . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 280<br />

Viewing the Results of the Service . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 281<br />

Copying Variables from the Results Panel . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 283<br />

Run-Time Exceptions . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 284<br />

The Call Stack . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 285<br />

The Pipeline Dump . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 286<br />

Testing Services from a Browser . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 286<br />

Testing Services that Expect XML Documents as Input . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 287<br />

Working in Debug Mode . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 288<br />

Entering Debug Mode . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 288<br />

Combining the Step and Trace Commands in Debug Mode . . . . . . . . . . . . . . . . . . . . . . . . . . . . 289<br />

Resetting Debug Mode . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 290<br />

Using the Trace Tools . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 290<br />

Tracing into a Child Flow . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 292<br />

Using the Step Tools . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 292<br />

Stepping though a Child Flow . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 294<br />

Using the Step Tools with a MAP Step . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 294<br />

Setting Breakpoints . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 295<br />

What Happens When a Breakpoint Is Encountered? . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 296<br />

Setting Breakpoints on Transformers . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 297<br />

Viewing a List of Breakpoints . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 298<br />

Disabling Flow Steps, Transformers, and Conditions . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 298<br />

Disabling Flow Steps . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 298<br />

Disabling Transformers . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 299<br />

Disabling a Condition Placed on a Link Between Variables . . . . . . . . . . . . . . . . . . . . . . . . . . . . 301<br />

Modifying the Current Pipeline . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 302<br />

<strong>webMethods</strong> <strong>Developer</strong> User’s <strong>Guide</strong> Version 6.5, Service Pack 3 � � � 10


Contents<br />

Saving and Restoring the Pipeline . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 303<br />

Saving the Results . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 303<br />

Saving the Contents of the Results Panel . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 304<br />

Saving the Pipeline at Run Time . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 305<br />

Restoring the Pipeline . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 306<br />

Loading a Saved Pipeline into the Results Panel . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 306<br />

Loading a Saved Pipeline at Run Time . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 307<br />

Other Debugging Techniques . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 308<br />

Using the Server’s Debug Facility . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 308<br />

The Contents of the Server Log . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 309<br />

Server Debug Levels . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 309<br />

Writing Information to the Server Log . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 310<br />

Writing an Arbitrary Message to the Log . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 310<br />

Dumping the Pipeline to the Log . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 311<br />

Chapter 12. Building Coded Services . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 315<br />

Basic Concepts . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 316<br />

The IData Object . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 316<br />

Services Take IData Objects as Input and Return IData as Output . . . . . . . . . . . . . . . . . . 316<br />

Getting and Setting Elements in an IData Object . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 317<br />

Creating IData Objects . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 317<br />

Building Services Using Java . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 318<br />

How Java Services Are Organized on the Server . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 318<br />

Building Java Services with <strong>Developer</strong> . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 319<br />

Using the <strong>Developer</strong> IDE . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 320<br />

The Java Service Editor . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 320<br />

The Shared Tab . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 322<br />

Creating a Java Service with <strong>Developer</strong>’s IDE . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 323<br />

Generating Java Code from Service Input and Output Parameters . . . . . . . . . . . . . . . . . . 325<br />

Setting Run-Time Options for a Java Service . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 326<br />

Building Java Services with Your Own IDE . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 327<br />

The Namespace Directory . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 327<br />

The Source Code Directory . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 328<br />

Writing the Source Code for a Service . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 328<br />

Using the <strong>webMethods</strong> API . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 328<br />

The Basic Stages . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 329<br />

Commenting Code for the <strong>webMethods</strong> Integration Server . . . . . . . . . . . . . . . . . . . . . . . . 329<br />

Using the jcode Utility . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 330<br />

Make Mode . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 330<br />

Fragment Mode . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 331<br />

Composite Mode . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 331<br />

<strong>webMethods</strong> <strong>Developer</strong> User’s <strong>Guide</strong> Version 6.5, Service Pack 3 � � � 11


Contents<br />

Other jcode Commands . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 332<br />

Building Services Using C/C++ . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 332<br />

Generating Files for a C/C++ Service . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 333<br />

The Java Code for a C Service . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 334<br />

Building the C/C++ Source Code . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 335<br />

Building Services Using COM . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 336<br />

Requirements . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 337<br />

Invoking Methods from Existing COM and DCOM Objects . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 337<br />

Creating the Object . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 337<br />

Invoking the Object . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 338<br />

Writing and Invoking a Visual Basic Service . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 339<br />

Compiling a Visual Basic Service . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 339<br />

Invoking a Visual Basic Service . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 339<br />

Invoking a VB Service Using Late Binding . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 339<br />

Invoking a VB Service Using Early Binding . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 341<br />

Chapter 13. Creating Client Code . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 345<br />

Basic Concepts . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 346<br />

Building a Java Client . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 346<br />

Assumptions . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 346<br />

Third-Party Libraries . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 348<br />

Limitations . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 348<br />

Procedure . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 349<br />

Files that Are Generated . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 349<br />

Building a C/C++ Client . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 350<br />

Assumptions . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 350<br />

Limitations . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 350<br />

Procedure . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 351<br />

Files that Are Generated . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 351<br />

Building a Visual Basic Client . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 352<br />

Assumptions . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 352<br />

Environment Setup . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 352<br />

Limitations . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 352<br />

Procedure . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 353<br />

Files that Are Generated . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 353<br />

General Files . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 353<br />

Files for the User Interface . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 354<br />

Files Containing the Code that Invokes the Service . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 354<br />

File Containing the Code that Interacts with <strong>webMethods</strong> Integration Server . . . . . . . . . . . 354<br />

Building an Excel Client . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 355<br />

Assumptions . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 355<br />

<strong>webMethods</strong> <strong>Developer</strong> User’s <strong>Guide</strong> Version 6.5, Service Pack 3 � � � 12


Contents<br />

Limitations . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 355<br />

Procedure . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 355<br />

Files that Are Generated . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 356<br />

Building a Browser-Based Client . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 356<br />

Assumptions . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 357<br />

Limitations . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 357<br />

Invoking Services with a URL . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 357<br />

Using the HTTP GET Method . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 358<br />

Using the HTTP POST Method . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 358<br />

Input to the Service . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 359<br />

Output from the Service . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 360<br />

Chapter 14. Subscribing to Events . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 361<br />

The Event Manager . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 362<br />

What Are Event Handlers? . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 363<br />

What Happens When an Event Occurs? . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 363<br />

Managing Event Subscriptions . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 364<br />

Subscribing to an Event . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 364<br />

Creating Event Filters . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 366<br />

Creating Event Filters for Services . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 368<br />

Viewing and Editing Event Subscriptions . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 369<br />

Suspending Event Subscriptions . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 369<br />

Deleting an Event Subscription . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 370<br />

Building an Event Handler . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 370<br />

Sample Event Handler . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 371<br />

Working with Alarm Events . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 372<br />

Building Handlers for Alarm Events . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 373<br />

Working with Audit Events . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 374<br />

Building Handlers for Audit Events . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 374<br />

Working with Exception Events . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 376<br />

Building Handlers for Exception Events . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 376<br />

Working with Guaranteed Delivery Events . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 377<br />

Guaranteed Delivery Events and Transaction Events . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 378<br />

Building Handlers for Guaranteed Delivery Start Events . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 379<br />

Building Handlers for Guaranteed Delivery End Events . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 380<br />

Working with Port Status Events . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 380<br />

Building Handlers for Port Status Events . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 381<br />

Working with Replication Events . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 381<br />

Building Handlers for Replication Events . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 382<br />

Working with Session Events . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 382<br />

Building Handlers for Session Start Events . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 383<br />

<strong>webMethods</strong> <strong>Developer</strong> User’s <strong>Guide</strong> Version 6.5, Service Pack 3 � � � 13


Contents<br />

Building Handlers for Session End Events . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 383<br />

Building Handlers for Session Expire Events . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 384<br />

Working with Stat Events . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 384<br />

Building Handlers for Stat Events . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 385<br />

Working with Transaction Events . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 386<br />

Building Handlers for Transaction Start Events . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 387<br />

Building Handlers for Transaction End Events . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 387<br />

Chapter 15. Building Services that Retry . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 389<br />

Overview . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 390<br />

Requirements for Retrying . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 390<br />

Adapter Services and Retry Behavior . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 390<br />

Building a Service that Throws an Exception for Retry . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 391<br />

How to Build a Service that Throws an Exception for Retry . . . . . . . . . . . . . . . . . . . . . . . . . . . . 391<br />

Example—Building a Service that Throws an Exception for Retry . . . . . . . . . . . . . . . . . . . . . . . 394<br />

Appendix A. <strong>webMethods</strong> Flow Steps . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 397<br />

BRANCH . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 398<br />

Branching on a Switch Value . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 398<br />

Branching on Expressions . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 399<br />

Properties . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 400<br />

Conditions that Will Cause a BRANCH Step to Fail . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 400<br />

EXIT . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 401<br />

Properties . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 401<br />

Examples of When to Use . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 402<br />

INVOKE . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 402<br />

Properties . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 402<br />

Conditions that Will Cause an INVOKE Step to Fail . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 403<br />

LOOP . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 403<br />

Properties . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 404<br />

Conditions that Will Cause a LOOP Step to Fail . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 405<br />

MAP . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 405<br />

Properties . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 405<br />

Example of When to Use . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 406<br />

REPEAT . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 406<br />

Properties . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 407<br />

When Does REPEAT Fail? . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 408<br />

Examples of When to Use . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 408<br />

SEQUENCE . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 408<br />

Properties . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 409<br />

Conditions that Will Cause the SEQUENCE Step to Fail . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 410<br />

<strong>webMethods</strong> <strong>Developer</strong> User’s <strong>Guide</strong> Version 6.5, Service Pack 3 � � � 14


Contents<br />

Appendix B. Regular Expressions . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 411<br />

What Is a Regular Expression? . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 412<br />

Using a Regular Expression in a Mask . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 412<br />

Regular Expression Operators . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 413<br />

Appendix C. Supported Data Types . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 419<br />

Data Types . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 420<br />

Java Classes for Objects . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 421<br />

How <strong>webMethods</strong> <strong>Developer</strong> Supports Tables . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 423<br />

Default Pipeline Rules for Linking to and from Array Variables . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 424<br />

Appendix D. Conditional Expressions . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 429<br />

Overview . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 430<br />

Syntax . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 431<br />

Comparing Java Objects to Constants . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 433<br />

Checking for Variable Existence . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 434<br />

Operators . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 434<br />

Relational Operators . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 434<br />

Standard Relational Operators . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 435<br />

Lexical Relational Operators . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 437<br />

Logical Operators . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 439<br />

Precedence . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 441<br />

Addressing Variables . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 441<br />

Addressing Variables that Contain Special Characters . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 443<br />

Typing Special Characters in Expressions . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 443<br />

Rules for Use of Expression Syntax with the Broker . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 444<br />

Appendix E. jcode tags . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 447<br />

jcode Template . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 448<br />

jcode Example . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 449<br />

Sample Code—IData . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 449<br />

Appendix F. Validation Content Constraints . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 453<br />

Overview . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 454<br />

Content Types . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 454<br />

Constraining Facets . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 464<br />

Appendix G. Validation Errors and Exceptions . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 467<br />

Overview . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 468<br />

Validation Errors . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 468<br />

Validation Exceptions . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 482<br />

IS Schema Generation Errors and Warnings . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 486<br />

<strong>webMethods</strong> <strong>Developer</strong> User’s <strong>Guide</strong> Version 6.5, Service Pack 3 � � � 15


Contents<br />

Index. . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 491<br />

<strong>webMethods</strong> <strong>Developer</strong> User’s <strong>Guide</strong> Version 6.5, Service Pack 3 � � � 16


About This <strong>Guide</strong><br />

Document Conventions<br />

About This <strong>Guide</strong><br />

This guide describes how to create services using <strong>webMethods</strong> <strong>Developer</strong>. It contains<br />

information for developers who want to build services using the <strong>webMethods</strong> flow<br />

language or a programming language such as Java, C/C++, or Visual Basic.<br />

To use this guide effectively, you should know how to program in Java, C/C++, and/or<br />

Visual Basic if you will be creating services in those languages.<br />

Convention Description<br />

Bold Identifies elements on a screen.<br />

Italic Identifies variable information that you must supply or change based<br />

on your specific situation or environment. Identifies terms the first<br />

time they are defined in text. Also identifies service input and output<br />

variables.<br />

Narrow font Identifies storage locations for services on the <strong>webMethods</strong><br />

Integration Server using the convention folder.subfolder:service.<br />

Typewriter<br />

font<br />

Identifies characters and values that you must type exactly or<br />

messages that the system displays on the console.<br />

UPPERCASE Identifies keyboard keys. Keys that you must press simultaneously are<br />

joined with the “+” symbol.<br />

\ Directory paths use the “\” directory delimiter unless the subject is<br />

UNIX-specific.<br />

[ ] Optional keywords or values are enclosed in [ ]. Do not type the [ ]<br />

symbols in your own code.<br />

<strong>webMethods</strong> <strong>Developer</strong> User’s <strong>Guide</strong> Version 6.5, Service Pack 3 � � � 17


Additional Information<br />

About This <strong>Guide</strong><br />

The <strong>webMethods</strong> Advantage Web site at http://advantage.webmethods.com provides you<br />

with important sources of information about <strong>webMethods</strong> components:<br />

� Troubleshooting Information. <strong>webMethods</strong> provides troubleshooting information for<br />

many <strong>webMethods</strong> components in the <strong>webMethods</strong> Knowledge Base.<br />

� <strong>Documentation</strong> Feedback. To provide documentation feedback to <strong>webMethods</strong>, go to the<br />

<strong>Documentation</strong> Feedback Form on the <strong>webMethods</strong> Bookshelf.<br />

� Additional <strong>Documentation</strong>. All <strong>webMethods</strong> documentation is available on the<br />

<strong>webMethods</strong> Bookshelf.<br />

<strong>webMethods</strong> <strong>Developer</strong> User’s <strong>Guide</strong> Version 6.5, Service Pack 3 � � � 18


Chapter 1. Getting Started with <strong>Developer</strong><br />

� What Is <strong>Developer</strong>? . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 20<br />

� Before You Use <strong>Developer</strong> . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 20<br />

� Starting <strong>Developer</strong> . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 21<br />

� What Does the <strong>Developer</strong> Window Contain? . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 23<br />

� Working in the <strong>Developer</strong> Window . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 33<br />

� Opening, Closing, and Restoring Sessions . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 37<br />

� Changing Your Password . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 39<br />

� Using Online Help . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 41<br />

<strong>webMethods</strong> <strong>Developer</strong> User’s <strong>Guide</strong> Version 6.5, Service Pack 3 � � � 19


What Is <strong>Developer</strong>?<br />

1. Getting Started with <strong>Developer</strong><br />

<strong>webMethods</strong> <strong>Developer</strong> is a graphical development tool that you use to build, edit, and<br />

test integration logic. It provides an integrated development environment in which you<br />

can develop the logic and supporting objects (referred to as elements) of an integration<br />

solution. It also provides tools for testing and debugging the solutions you create.<br />

<strong>Developer</strong> lets you rapidly construct integration logic with an easy-to-use implementation<br />

language called the <strong>webMethods</strong> flow language. Flow language provides a set of simple but<br />

powerful constructs that you use to specify a sequence of actions (steps) that the<br />

Integration Server will execute at run time. <strong>Developer</strong> also has extensive data<br />

transformation and mapping capabilities that allow you to quickly drag-and-drop data<br />

fields from one step to the next.<br />

Besides providing tools for constructing flow services, <strong>Developer</strong> provides additional<br />

editors and tools for creating various elements that support the execution of an<br />

integration solution. For example, you use <strong>Developer</strong> to create the document types and<br />

schemas used for data validation and to define triggers that launch the execution of<br />

services when certain documents are published.<br />

<strong>Developer</strong> enables you to lock an element you are working with. When you lock an<br />

element, the element is read-only to all other users on the Integration Server. Another user<br />

cannot edit the element until you unlock it. <strong>Developer</strong> can also be configured to interact<br />

with a third-part version control system (VCS) repository; in this case, elements are locked<br />

and unlocked as you check them out of and in to the VCS repository.<br />

All references in this guide to locking refer to local locking on the Integration Server. For<br />

specific information about local file locking, see Chapter 4, “Locking and Unlocking<br />

Elements”. For information on how to implement file locking with the Version Control<br />

System Integration feature for <strong>Developer</strong>, see the <strong>webMethods</strong> Version Control System<br />

Integration Feature <strong>Developer</strong>’s <strong>Guide</strong> in the ..\<strong>webMethods</strong>6\<strong>Developer</strong>\doc\guides<br />

directory of your <strong>webMethods</strong> installation.<br />

Before You Use <strong>Developer</strong><br />

<strong>Developer</strong> builds and edits services directly on a server. To use <strong>Developer</strong> you must:<br />

� Have access to a <strong>webMethods</strong> Integration Server on which you can build and test<br />

services.<br />

� Have a user account on that <strong>webMethods</strong> Integration Server.<br />

� Belong to a group that is a member of the “<strong>Developer</strong>s” ACL (access control list) on<br />

that <strong>webMethods</strong> Integration Server.<br />

If you do not have access to a <strong>webMethods</strong> Integration Server or you do not have an<br />

appropriate user account or access rights, see your server administrator.<br />

<strong>webMethods</strong> <strong>Developer</strong> User’s <strong>Guide</strong> Version 6.5, Service Pack 3 � � � 20


Starting <strong>Developer</strong><br />

1. Getting Started with <strong>Developer</strong><br />

Use the following procedure to start <strong>Developer</strong> on your workstation. Before you start<br />

<strong>Developer</strong> keep the following in mind:<br />

� Make sure that the Integration Server with which you want to use <strong>Developer</strong> is<br />

running. You cannot work with <strong>Developer</strong> if the server is not running.<br />

� If you are starting <strong>Developer</strong> for the first time on a UNIX system, verify that the<br />

DEVELOPER_DIR and JAVA_DIR settings in developer.sh specify the paths where<br />

<strong>Developer</strong> (DEVELOPER_DIR) and Java Runtime Environment (JAVA_DIR) reside. If<br />

these settings are not correct, update them before starting <strong>Developer</strong>.<br />

Important! You can only connect <strong>webMethods</strong> <strong>Developer</strong> version 6.5 to a <strong>webMethods</strong><br />

Integration Server version 6.1 or version 6.5.<br />

To start <strong>Developer</strong><br />

1 Depending on which operating system is running on your workstation, do the<br />

following:<br />

If you are running... Do this...<br />

Windows a On the Start menu, click Programs, and then click<br />

<strong>webMethods</strong>.<br />

b Click <strong>webMethods</strong> <strong>Developer</strong>.<br />

UNIX a Navigate to the directory where you installed<br />

<strong>Developer</strong>.<br />

Specify the name and<br />

port assignment of a<br />

server...<br />

...and enter a user<br />

account that has<br />

developer privileges.<br />

b Run bin/developer.sh.<br />

<strong>webMethods</strong> <strong>Developer</strong> User’s <strong>Guide</strong> Version 6.5, Service Pack 3 � � � 21


2 In the Open Session dialog box, complete the following:<br />

In this field... Specify...<br />

3 Click OK.<br />

1. Getting Started with <strong>Developer</strong><br />

Server type The registered type for the server on which you want to open a<br />

session. The default type is Integration Server.<br />

Server The name and port assignment of the <strong>webMethods</strong> Integration<br />

Server in ServerName:PortNum format.<br />

Example rubicon:5555<br />

Note: Servers to which you have successfully logged on in the<br />

past are listed in the Server list. You can select a server from this<br />

list or type its name and port number.<br />

Username The name of a valid user account on this server. (The user name<br />

must be a member of a group belonging to the <strong>Developer</strong>s<br />

ACL.)<br />

Use the exact combination of upper- and lower-case characters<br />

with which it was originally defined. IS user names are case<br />

sensitive.<br />

Note: The server is installed with a default user account called<br />

“<strong>Developer</strong>” that has developer privileges.<br />

Password The password for the user account in Username. Use the exact<br />

combination of upper- and lower-case characters with which it<br />

was originally defined. IS passwords are case sensitive.<br />

Uses secure<br />

connection<br />

Note: The default password for the <strong>Developer</strong> user account is<br />

isdev.<br />

Whether the session will be opened through HTTP or HTTPS.<br />

If you want to open an HTTPS session on the selected server<br />

using the Secure Socket Layer (SSL), select this check box. If<br />

you want to open an HTTP session on the server, clear this<br />

check box.<br />

Uses proxy Whether the session will be opened through the default proxy<br />

server. If you want to open a session on the selected server<br />

using your proxy server, select this check box.<br />

<strong>webMethods</strong> <strong>Developer</strong> User’s <strong>Guide</strong> Version 6.5, Service Pack 3 � � � 22


1. Getting Started with <strong>Developer</strong><br />

Tip! When you run <strong>Developer</strong> from the command line, <strong>Developer</strong> writes messages to the<br />

console. The amount and type of information that is written is determined by the debug<br />

level under which <strong>Developer</strong> is operating. The default debug level is 4. If you want more<br />

detail written to the console, set the debug level to 10. You can change the debug level by<br />

editing the ini.cnf file located in <strong>webMethods</strong>6\<strong>Developer</strong>\config.<br />

Note: When you start <strong>Developer</strong>, it verifies that the other <strong>webMethods</strong> components<br />

support the same locale as <strong>Developer</strong>. If the locale of an add-in component is not<br />

supported by the <strong>Developer</strong> locale, <strong>Developer</strong> displays a message in the console warning<br />

you of the locale mismatch. For example, if you start <strong>Developer</strong> in an English locale with a<br />

localized Japanese add-in component, <strong>Developer</strong> displays the following message in the<br />

console:<br />

Warning: The following plug-ins are running localized versions even though<br />

<strong>Developer</strong> is not: ComponentName; VersionNumber.<br />

<strong>Developer</strong> will display some text in English and the component’s text in Japanese.<br />

What Does the <strong>Developer</strong> Window Contain?<br />

The <strong>Developer</strong> window is divided into the following areas:<br />

� Navigation panel. You use the Navigation panel to select, lock, copy, move, delete, or<br />

rename elements. If the VCS Integration feature is enabled, you can check elements in<br />

to and out of a VCS repository. For more information about this panel, see “The<br />

Navigation Panel” on page 24.<br />

� Servicenet tab. You use the Servicenet tab to connect and disconnect Servicenet<br />

sessions, and to display, filter, and register Web services. For more information about<br />

this panel, see “The Servicenet Tab” on page 28.<br />

� Recent Elements tab. You use the Recent Elements tab to quickly access elements you<br />

have recently viewed. For more information about this panel, see “The Recent<br />

Elements Tab” on page 29.<br />

� Editor. You use the editor to examine and edit an element you opened from the<br />

Navigation panel or Recent Elements tab. For more information about the editor, see<br />

“The Editor” on page 30.<br />

� Properties panel. You use the Properties panel to view and edit the properties for an<br />

item. For more information about this panel, see “The Properties Panel” on page 31.<br />

� Results panel. You use the Results panel to view the result of a service’s execution, to<br />

view the variables that a service adds to the pipeline, and to view the contents of those<br />

variables. For more information about this panel, see “The Results Panel” on page 33.<br />

<strong>webMethods</strong> <strong>Developer</strong> User’s <strong>Guide</strong> Version 6.5, Service Pack 3 � � � 23


The Navigation Panel<br />

displays the contents of<br />

servers, packages, and<br />

folders.<br />

The Editor displays the<br />

controls you use to examine<br />

and edit an element you<br />

have opened from the<br />

Navigation panel or Recent<br />

Elements tab.<br />

The Servicenet tab displays<br />

available Web services, if a<br />

Servicenet session is open.<br />

The Recent Elements Tab<br />

displays the elements you<br />

viewed most recently.<br />

<strong>Developer</strong> main window<br />

The Navigation Panel<br />

1. Getting Started with <strong>Developer</strong><br />

The Properties Panel<br />

displays the properties<br />

for an item.<br />

The Results Panel<br />

displays the results of a<br />

service’s execution.<br />

The Navigation panel displays the contents of packages on the <strong>webMethods</strong> Integration<br />

Servers on which you have an open session. You use the Navigation panel to perform<br />

tasks such as creating, opening, locking, copying, moving, renaming, and deleting<br />

elements. If the VCS Integration feature is enabled, you can check elements in to and out<br />

of a VCS repository.<br />

Elements in the Navigation panel are shown in a hierarchical structure where the server is<br />

the topmost element in the hierarchy. Packages on the server contain one or more folders,<br />

which contain other elements that you can create and edit using <strong>Developer</strong> (for example,<br />

services, specifications, and IS document types).<br />

For more information about the tasks you can perform on elements in the Navigation<br />

panel, see Chapter 2, “Managing Elements in the Navigation Panel” and Chapter 3,<br />

“Working with Packages”.<br />

For information on how to implement file locking with the Version Control System<br />

Integration feature for <strong>Developer</strong>, see the <strong>webMethods</strong> Version Control System Integration<br />

Feature <strong>Developer</strong>’s <strong>Guide</strong> in the ..\<strong>webMethods</strong>6\<strong>Developer</strong>\doc\guides directory of your<br />

<strong>webMethods</strong> installation.<br />

<strong>webMethods</strong> <strong>Developer</strong> User’s <strong>Guide</strong> Version 6.5, Service Pack 3 � � � 24


Navigation Panel Icons<br />

1. Getting Started with <strong>Developer</strong><br />

Each item in the Navigation panel contains an icon that denotes the item’s type. The<br />

following table describes what each icon represents.<br />

This icon... Represents...<br />

A server. You can have multiple server contexts displayed in <strong>Developer</strong>.<br />

The active server context is the one that is highlighted in the Navigation<br />

panel. To display the contents of the server, click the symbol next to its<br />

name.<br />

A package. A package contains a set of services and related files, such as<br />

specifications, IS document types, and output templates. To display the<br />

contents of a package, click next to its name.<br />

A folder. A folder contains related services and optional folders (called<br />

subfolders). To display the contents of a folder, click next to its name.<br />

A flow service. A flow service is a service written in the <strong>webMethods</strong> flow<br />

language.<br />

A Web service connector. A Web service connector is a flow service that<br />

invokes a Web service located on a remote server. <strong>Developer</strong> uses a<br />

WSDL document to automatically generate a Web service connector.<br />

A Java service. A Java service is a service written in Java.<br />

A C service. A C service is a service written in C/C++.<br />

A specification. A specification is a formal description of a service’s inputs<br />

and outputs.<br />

A trigger. A trigger associates one or more publishable document types<br />

with one or more services. At run time, when the Integration Server<br />

receives a document that satisfies the conditions of the trigger, the<br />

Integration Server executes/invokes the associated services. For more<br />

information about creating triggers, see the Publish-Subscribe <strong>Developer</strong>’s<br />

<strong>Guide</strong>.<br />

An IS document type. An IS document type contains a set of fields used to<br />

define the structure and type of data in a document.<br />

A publishable document type. A publishable document type is an IS<br />

document type with specific publishing properties. Instances of<br />

publishable document types can be published and subscribed to.<br />

Publishable document types can be used anywhere an IS document type<br />

is needed.<br />

<strong>webMethods</strong> <strong>Developer</strong> User’s <strong>Guide</strong> Version 6.5, Service Pack 3 � � � 25


This icon... Represents...<br />

1. Getting Started with <strong>Developer</strong><br />

A publishable document type for an adapter notification. An adapter<br />

notification can have an associated publishable document type that the<br />

adapter uses to send the notification data to an Integration Server or a<br />

Broker.<br />

An IS schema. An IS schema is the blueprint or model document against<br />

which you validate an XML document. The schema defines what can and<br />

cannot be contained in the XML documents it validates.<br />

An adapter notification. An adapter notification enables an adapter to<br />

receive event data from the adapter’s resource. There are two types of<br />

adapter notifications:<br />

� Polling notifications, which poll the resource for events that occur on<br />

the resource.<br />

� Listener notifications, which work with listeners to detect and<br />

process events that occur on the adapter resource.<br />

For information about creating an adapter notification, refer to the<br />

documentation provided with the adapter.<br />

An adapter service. An adapter service connects to an adapter’s resource<br />

and initiates an operation on the resource. Adapter services are created<br />

using service templates included with the adapter. For information about<br />

creating adapter services, refer to the documentation provided with the<br />

adapter.<br />

A listener. A listener is an object that connects to an adapter resource and<br />

waits for the resource to deliver data when an event occurs on the<br />

resource. Listeners work with listener notifications to detect and process<br />

event data on the adapter resource.<br />

For information about creating a listener, refer to the documentation<br />

provided with the adapter.<br />

A connection. A connection is an object that contains parameters that<br />

adapter notifications and listeners use to connect to a resource. For<br />

information about creating a connection, refer to the documentation<br />

provided with the adapter.<br />

A flat file dictionary. A flat file dictionary contains record definitions, field<br />

definitions, and composite definitions that can be used in multiple flat<br />

file schemas. For more information about creating a flat file dictionary,<br />

see the Flat File Schema <strong>Developer</strong>’s <strong>Guide</strong>.<br />

<strong>webMethods</strong> <strong>Developer</strong> User’s <strong>Guide</strong> Version 6.5, Service Pack 3 � � � 26


This icon... Represents...<br />

Refreshing the Contents of the Navigation Panel<br />

1. Getting Started with <strong>Developer</strong><br />

A flat file schema. A flat file schema is the blueprint that contains the<br />

instructions for parsing or creating the records in a flat file, as well as the<br />

constraints to which an inbound flat file document should conform to be<br />

considered valid. Using flat file schemas, you can translate documents<br />

into and from flat file formats. For more information about creating a flat<br />

file schema, see the Flat File Schema <strong>Developer</strong>’s <strong>Guide</strong>.<br />

An XSLT service. An XSLT service converts XML data into other XML<br />

formats or into HTML, using rules defined in an associated XSLT<br />

stylesheet. For more information about creating XSLT services, see the<br />

XSLT Services <strong>Developer</strong>’s <strong>Guide</strong>.<br />

Servicenet. <strong>Developer</strong> displays all of the Web services registered in the<br />

Servicenet below the Servicenet name. <strong>Developer</strong> displays the subnet<br />

locator port or the WAN locator URL for the Servicenet to which you are<br />

connected.<br />

A Web service. A Web service is a service that uses specific XML- based<br />

protocols and interface descriptions to communicate.<br />

A .NET service. A .NET service is a service that calls methods imported<br />

from .NET assemblies (using the <strong>webMethods</strong> for Microsoft Plug-in).<br />

Once a .NET service exists within <strong>Developer</strong>, it can become part of a flow<br />

just like any other service. For more information about using the<br />

Microsoft .NET application platform with <strong>webMethods</strong> components, see<br />

the <strong>webMethods</strong> for Microsoft Package Installation and User’s <strong>Guide</strong>.<br />

An Unknown Node. The <strong>webMethods</strong> component used to create/develop<br />

the element is not installed on the client machine.<br />

An Unknown Service. The <strong>webMethods</strong> component used to create this<br />

service is not installed on the client machine.<br />

Note: Other installed <strong>webMethods</strong> components might add elements to the Navigation<br />

panel that are not described in the preceding table. For information about these elements,<br />

refer to the documentation provided with these installed components.<br />

The Navigation panel on your screen is not dynamically updated when other users lock,<br />

unlock, add, delete, or rename elements on a server. To refresh the Navigation panel to<br />

reflect any changes made to the contents of the servers you are working with, use the<br />

Session�Refresh command.<br />

<strong>webMethods</strong> <strong>Developer</strong> User’s <strong>Guide</strong> Version 6.5, Service Pack 3 � � � 27


The Servicenet Tab<br />

1. Getting Started with <strong>Developer</strong><br />

Note: Refreshing the session is different from restoring a session. Restoring a session<br />

allows you to save changes to an element you were working with when the Integration<br />

Server shuts down unexpectedly. For more information about restoring sessions, see<br />

“Restoring a Session on a Server” on page 38.<br />

Use the Servicenet tab to connect and disconnect Servicenet sessions. Once you have<br />

opened a Servicenet session, you can display, filter, and register Web services. Within the<br />

Servicenet tab, Web services are sorted in alphabetical order. Simply select a Web service<br />

to view more information about the service. For more information about using Servicenet<br />

with <strong>Developer</strong>, see the Web Services <strong>Developer</strong>’s <strong>Guide</strong>.<br />

Note: When you select a Web service in the Servicenet tab, the editor (the middle area of<br />

the <strong>Developer</strong> window between the Navigation panel and the Properties panel) does not<br />

change. This is because Web service details and logic cannot be modified using <strong>Developer</strong>.<br />

Servicenet Tab Icons<br />

The following buttons on the Servicenet tab toolbar are shortcuts to frequently-used<br />

commands.<br />

Use this<br />

button... To...<br />

Connect to a Servicenet session while working in <strong>Developer</strong>.<br />

Equivalent to Session�Open Servicenet.<br />

Disconnect from a Servicenet session while working in <strong>Developer</strong>.<br />

Equivalent to Session�Close Servicenet.<br />

Refresh the display of Web services. Equivalent to Session�Refresh<br />

Servicenet.<br />

Create an expression that filters the contents of the Servicenet tab<br />

based on the value of a Web service property. Equivalent to<br />

Session�Set Servicenet Filter.<br />

Remove the filter from the contents of the Servicenet tab and<br />

display all the registered Web services. Equivalent to<br />

Session�Clear Servicenet Filter.<br />

<strong>webMethods</strong> <strong>Developer</strong> User’s <strong>Guide</strong> Version 6.5, Service Pack 3 � � � 28


1. Getting Started with <strong>Developer</strong><br />

The Servicenet tab also contains icons to represent the Servicenet and the Web services<br />

that are registered within Servicenet. The following table identifies these icons.<br />

This icon... Represents...<br />

Servicenet. <strong>Developer</strong> displays all of the Web services registered in<br />

the Servicenet below the Servicenet name. <strong>Developer</strong> displays the<br />

subnet locator port or the WAN locator URL for the Servicenet to<br />

which you are connected.<br />

A Web service. A Web service is a service that uses specific XMLbased<br />

protocols and interface descriptions to communicate.<br />

The Recent Elements Tab<br />

The Recent Elements tab lists the last 30 elements you viewed in the editor. <strong>Developer</strong><br />

adds an element to this panel when you close the element. You can use this panel to<br />

quickly open elements that you have recently viewed and closed.<br />

Tip! To view a tool tip containing the fully qualified name of the element, the package in<br />

which the element resides, and the host name and port number of the server, rest the<br />

mouse pointer on the element name.<br />

You can clear the list of elements currently displayed in the Recent Elements tab by<br />

clicking Clear.<br />

<strong>Developer</strong> handles changes to the Recent Elements list as follows:<br />

� When you close an open element in the editor, <strong>Developer</strong> adds the element to the top<br />

of the Recent Elements list.<br />

� <strong>Developer</strong> remembers the contents of the Recent Elements tab between sessions. If<br />

you attempt to open an element that was deleted after you closed your previous<br />

<strong>Developer</strong> session, <strong>Developer</strong> alerts you that the element cannot be found and then<br />

removes the element from the list.<br />

� If you attempt to open an element listed in the Recent Elements tab that another user<br />

has deleted, moved, or renamed during your <strong>Developer</strong> session, <strong>Developer</strong> displays a<br />

message alerting you that the element cannot be found.<br />

If you move or rename an element during your current session, <strong>Developer</strong><br />

automatically refreshes the Recent Elements tab to reflect the change. If you delete an<br />

element, <strong>Developer</strong> removes the element from the Recent Elements list.<br />

For more information about selecting elements in the Recent Elements tab to view or edit<br />

in the editor, see “Opening and Closing Elements in the Editor” on page 49.<br />

<strong>webMethods</strong> <strong>Developer</strong> User’s <strong>Guide</strong> Version 6.5, Service Pack 3 � � � 29


If you open<br />

an element from the<br />

Navigation panel...<br />

...editing controls for<br />

that element are<br />

displayed in the editor.<br />

The Editor<br />

1. Getting Started with <strong>Developer</strong><br />

The editor contains the controls that you use to examine and edit an element you open<br />

from the Navigation panel or Recent Elements tab. The contents of the editor vary<br />

depending on the type of element you select.<br />

For some element types, the editor is divided into multiple areas, including tabs<br />

containing additional editing controls for the element. You switch among areas within the<br />

editor just as you would between the Navigation panel or Recent Elements tab and the<br />

editor. To select a different area, click any white space in that area. To display the contents<br />

of a tab, click the tab name.<br />

Editing controls for an element<br />

In this example, a<br />

specification is opened in<br />

the editor.<br />

The editor lists the input<br />

and output fields that<br />

were created for this<br />

specification. These lists<br />

are also referred to as<br />

“trees.”<br />

As mentioned earlier, you can use the Navigation panel and Recent Elements tab to select<br />

one or more elements to view or edit in the editor. It is helpful to display multiple<br />

elements in the editor when you are editing an element and you would like to refer back<br />

to another element for information. For example, if you are creating or editing a trigger,<br />

you may want to quickly view the document types and services associated with that<br />

trigger.<br />

Each element you open has its own tab in the editor. The element’s title bar contains the<br />

fully qualified name of the element and icons to indicate the element’s type and lock<br />

status. For more information about these icons, see “Navigation Panel Icons” on page 25<br />

and “What Is a Lock?” on page 94.<br />

<strong>webMethods</strong> <strong>Developer</strong> User’s <strong>Guide</strong> Version 6.5, Service Pack 3 � � � 30


Each opened element in<br />

the editor has its<br />

own tab.<br />

The element’s title bar<br />

displays the element’s<br />

fully qualified name.<br />

Some elements have<br />

specialized tabs.<br />

Editor with multiple elements opened<br />

The Properties Panel<br />

1. Getting Started with <strong>Developer</strong><br />

Tip! You can press CTRL+ALT+RIGHT ARROW to toggle forward between open elements<br />

in the editor and CTRL+ALT+LEFT ARROW to toggle backward.<br />

Click to view tabs that are not currently visible.<br />

Click to close the active element<br />

(that is, the element that is currently<br />

displayed).<br />

Tip! You can locate the active element in the Navigation panel by using the Edit�Locate in<br />

Navigation command.<br />

The Properties panel displays the properties for the currently selected item in the<br />

<strong>Developer</strong> window. You use this panel to view and edit the properties of an item (such as<br />

an element, a step in a flow service, a field in a document, or a link between two<br />

variables).<br />

The properties that <strong>Developer</strong> displays in this panel vary depending on the item you<br />

select and which area of the <strong>Developer</strong> window has the focus. <strong>Developer</strong> identifies the<br />

item for which properties are displayed beneath the title bar of the Properties panel.<br />

<strong>webMethods</strong> <strong>Developer</strong> User’s <strong>Guide</strong> Version 6.5, Service Pack 3 � � � 31


Click to collapse the<br />

list of properties<br />

beneath a category.<br />

Click to expand the list<br />

of properties beneath<br />

a category.<br />

Properties panel<br />

Depending on the type of property you select, you edit a property by:<br />

1. Getting Started with <strong>Developer</strong><br />

Tip! If the Properties panel displays the properties for an item (for example, a document<br />

field) and you want to display the properties for its parent element (for example, the<br />

document type to which the field belongs), click the title bar of the parent element in the<br />

editor, the tab of the parent element in the editor, or the white space within the editor.<br />

Drag to resize the Property and<br />

Value columns.<br />

Name of the item for which properties are<br />

displayed.<br />

Properties are grouped<br />

into categories.<br />

Description of the<br />

selected property.<br />

� Typing a value in the box to the right of the property name (for example, to specify the<br />

namespace and local names that make up the universal name for a service)<br />

Tip! You can also paste text into the box that you previously copied to the clipboard.<br />

Note: <strong>Developer</strong> accepts the text you type in a property box when you move the focus<br />

outside of the box or press ENTER. You can cancel your edits before you perform<br />

either of these actions by pressing ESC.<br />

� Selecting a value from a list (for example, to specify a validation processing rule)<br />

� Clicking a button next to the property name and supplying values on a dialog box (for<br />

example, to specify an index when linking to or from an array variable)<br />

� Clicking the browse button to locate an element (for example, a service)<br />

The tips area beneath the list of properties includes a description of the selected property<br />

and its values. To obtain this information for a particular property, click the property<br />

name.<br />

<strong>webMethods</strong> <strong>Developer</strong> User’s <strong>Guide</strong> Version 6.5, Service Pack 3 � � � 32


1. Getting Started with <strong>Developer</strong><br />

Note: If you do not own the lock for an element, the element’s properties are read only.<br />

The Results Panel<br />

The Results panel shows the result of a service’s execution, the variables that a service<br />

adds to the pipeline, and the contents of those variables. You can use this panel to quickly<br />

examine the data produced by the service while you are testing and debugging the<br />

service. You can also save the data to a file and use it as input for a later test.<br />

Results panel<br />

For more information about service execution results, see Chapter 11, “Testing and<br />

Debugging Services”.<br />

Working in the <strong>Developer</strong> Window<br />

Moving Between Panels<br />

Click a variable name...<br />

...to view its contents in<br />

the pipeline at this stage<br />

of the service’s execution.<br />

Before you can perform an action on an item that is displayed in the <strong>Developer</strong> window,<br />

you must first select the panel in which that item appears (that is, give that panel the<br />

“focus”). You can only select one panel in the <strong>Developer</strong> window at a time. <strong>Developer</strong><br />

indicates which area has the focus by highlighting the area’s title bar in blue.<br />

<strong>webMethods</strong> <strong>Developer</strong> User’s <strong>Guide</strong> Version 6.5, Service Pack 3 � � � 33


1. Getting Started with <strong>Developer</strong><br />

To switch from one panel of the <strong>Developer</strong> window to another, click any white space or<br />

field within the panel to which you want to switch. This action changes the focus to the<br />

new panel and makes its menu commands and toolbar buttons available for use.<br />

Performing Actions<br />

Before you can perform an action on an element, you must select the element in one of the<br />

following ways:<br />

� Single-click the title bar of an element in the editor.<br />

� Right-click an element.<br />

� Single-click one or more elements in the Navigation panel.<br />

Tip! To select a group of adjacent elements simultaneously, press the SHIFT key as you<br />

click. To select a group of non-adjacent elements, press the CTRL key.<br />

Note: Single-clicking an element in the Navigation panel selects (highlights) the<br />

element but does not open the element for viewing or editing in the editor. To open an<br />

element in the editor, double-click it.<br />

The actions that are available for an element depend on which area of the <strong>Developer</strong><br />

window has the focus. For example, to run a service, the service must be open in the<br />

editor and have the focus.<br />

There are a number of ways to perform an action on an element after you select it:<br />

� Menu commands. You can select a command from the menu bar to perform an action on<br />

an element. For example, to save changes to an opened element using the menu bar,<br />

select the element in the editor and then click File�Save.<br />

You can also access menu commands on a shortcut menu by right-clicking the<br />

element. For example, to open an element using a shortcut menu, right-click the<br />

element in the Navigation panel and then click Open. To close an editor using a<br />

shortcut menu, right-click the editor title bar and then click Close Active Editor.<br />

� Toolbar buttons. You can click a toolbar button to perform an action on an element. For<br />

example, to save changes to an opened element using a toolbar button, select the<br />

element in the editor and then click .<br />

The toolbar buttons that are available for you to use depend on the item in the<br />

<strong>Developer</strong> window that currently has the focus. For example, when you are editing a<br />

flow service, the flow service toolbar buttons in the editor are not available unless the<br />

editor has the focus.<br />

� Keys. You can use the keyboard to access a menu by pressing the ALT key plus the<br />

underlined letter in the menu name. You can then select a command on that menu by<br />

<strong>webMethods</strong> <strong>Developer</strong> User’s <strong>Guide</strong> Version 6.5, Service Pack 3 � � � 34


1. Getting Started with <strong>Developer</strong><br />

pressing the underlined letter in the command’s title. For example, to save changes to<br />

an element using the keyboard, select the element, press ALT and F to access the File<br />

menu, and then press S to save the element.<br />

Some commands also have shortcuts assigned to them. These shortcuts are displayed<br />

to the right of their associated commands on the menu bar. For example, to save<br />

changes to an element using a keyboard shortcut, select that element and then press<br />

CTRL and S.<br />

� Drag-and-drop action. You can select an element and move it to another package or<br />

element, either on the same server or on a different server, by dragging it. For<br />

example, to move an IS document type from one folder to another, you would drag<br />

that document type to the new folder.<br />

Note: Some elements, such as adapter notifications, cannot be moved using the dragand-drop<br />

action.<br />

Most of the procedures in this guide instruct you to perform actions using menu<br />

commands.<br />

Resizing Areas in the <strong>Developer</strong> Window<br />

You can resize areas in the <strong>Developer</strong> window by:<br />

� Hiding or showing panels<br />

� Dragging the movable border between panels<br />

� Switching perspectives<br />

Hiding and Showing Panels<br />

You can hide and show panels on the <strong>Developer</strong> window as follows:<br />

To... Do this...<br />

Hide the Navigation<br />

panel, Servicenet tab,<br />

and Recent Elements<br />

tab<br />

Click along the left edge of the <strong>Developer</strong> window.<br />

Show the Navigation<br />

panel, Servicenet tab,<br />

and Recent Elements<br />

tab Click along the left edge of the <strong>Developer</strong> window.<br />

<strong>webMethods</strong> <strong>Developer</strong> User’s <strong>Guide</strong> Version 6.5, Service Pack 3 � � � 35


To... Do this...<br />

Hide the Properties<br />

and Results panels<br />

Show the Properties<br />

and Results panels<br />

Expand or collapse<br />

editor details<br />

Dragging Movable Borders<br />

1. Getting Started with <strong>Developer</strong><br />

You can resize areas in the <strong>Developer</strong> window by dragging the movable borders between<br />

panels with your mouse.<br />

Switching Perspectives<br />

You can quickly change the <strong>Developer</strong> window to tailor it to the task you are performing<br />

(for example, show only the editor and Results panel when you are testing a service) by<br />

displaying a particular perspective. Perspectives allocate more space on the <strong>Developer</strong><br />

window for a particular task by hiding or minimizing the areas that are not essential to<br />

that task.<br />

<strong>Developer</strong> offers three perspectives:<br />

� Edit perspective. The edit perspective displays all of the <strong>Developer</strong> window areas but<br />

minimizes the Results panel. This perspective is useful when you are opening and<br />

editing elements and their properties.<br />

� Test perspective. The test perspective hides the Navigation panel, Servicenet tab, and<br />

Recent Elements tab and maximizes the editor and the Results panel. This perspective<br />

is useful when you are testing and debugging a service and you want to view the<br />

results of the service’s execution, its inputs and outputs, and its pipeline variables.<br />

� Details perspective. The details perspective hides the Navigation panel, Servicenet tab,<br />

and Recent Elements tab and minimizes the Results panel. This perspective is useful<br />

when you want to see as much of an element’s detail as possible (for example, a<br />

service’s pipeline).<br />

You display a perspective as follows:<br />

Click along the right edge of the <strong>Developer</strong> window.<br />

Click along the right edge of the <strong>Developer</strong> window.<br />

Click on the border between the top of the editor and the<br />

specialized tabs beneath it.<br />

<strong>webMethods</strong> <strong>Developer</strong> User’s <strong>Guide</strong> Version 6.5, Service Pack 3 � � � 36


Click to hide or show the<br />

Navigation panel,<br />

Servicenet taband<br />

Recent Elements tab.<br />

Click to expand or<br />

collapse editor details.<br />

1. Getting Started with <strong>Developer</strong><br />

To display the... Use this command... Or click this toolbar button...<br />

Edit perspective Window�Edit Perspective<br />

Test perspective Window�Test Perspective<br />

Details perspective Window�Details Perspective<br />

You can manually adjust areas within a perspective using the other techniques described<br />

in this section. <strong>Developer</strong> saves your settings across sessions.<br />

If you have adjusted the perspectives manually and you want to revert them to their<br />

default settings, use the Window�Reset Perspectives command.<br />

Resizing areas in the <strong>Developer</strong> window<br />

Opening, Closing, and Restoring Sessions<br />

Click to display Edit,<br />

Test, and Detail<br />

perspectives.<br />

Click to hide or show the<br />

Properties and Results<br />

panels.<br />

Drag movable borders<br />

to resize panels.<br />

When you start <strong>Developer</strong> you are prompted to log on to the server that you want to<br />

access. You maintain a session on that server until you exit <strong>Developer</strong> or close the session.<br />

You can have open sessions on multiple servers at a time. In the Navigation panel, the<br />

server that contains the selected element is the server on which your commands will be<br />

<strong>webMethods</strong> <strong>Developer</strong> User’s <strong>Guide</strong> Version 6.5, Service Pack 3 � � � 37


1. Getting Started with <strong>Developer</strong><br />

executed. For example, if you have the localhost:5555 server selected in the Navigation<br />

panel and you select the New command, the new element will be created on that server.<br />

You can open a session on another server without closing your current session by using<br />

the Session�Open command.<br />

To open a session on a different server<br />

1 On the Session menu, click Open.<br />

2 Complete the Open Session dialog box. For more information about completing this<br />

dialog box, see “To start <strong>Developer</strong>” on page 21.<br />

3 Click OK.<br />

Important! While you have an open session on a server through <strong>Developer</strong>, you are using a<br />

licensed seat for that server. At times when you are not actively using <strong>Developer</strong>, you may<br />

want to close your session to free a seat on the server for others to use.<br />

To close a session on the current server<br />

1 Save any work that you want to keep.<br />

2 On the Session menu, click Close.<br />

Restoring a Session on a Server<br />

Sometimes a server might shut down before you can save your work. <strong>Developer</strong> preserves<br />

any unsaved work as well as lock information, despite the loss of the connection to the<br />

server. When the server restarts, you can restore your session and save your changes to the<br />

server.<br />

Important! If a server shuts down and you close your session (that is, disconnect from the<br />

server), close unsaved elements on that server in the editor, or exit <strong>Developer</strong> before the<br />

server restarts, <strong>Developer</strong> warns you that if you continue you will lose all unsaved work.<br />

If you do not want to lose your work, click Cancel and wait for the connection to that<br />

server to be restored.<br />

To restore a session on the server<br />

� On the Session menu, click Restore.<br />

<strong>webMethods</strong> <strong>Developer</strong> User’s <strong>Guide</strong> Version 6.5, Service Pack 3 � � � 38


1. Getting Started with <strong>Developer</strong><br />

Note: Restoring a session is different from refreshing the session. Refreshing the session<br />

updates your screen to reflect the actions of other users on elements that are displayed<br />

within the Navigation panel and the editors. A refresh action does not restore the working<br />

state of an element if a server shuts down. For more information about refreshing the<br />

Navigation panel, see “Refreshing the Contents of the Navigation Panel” on page 27.<br />

Notification of Server Shutdown<br />

If the server administrator shuts down the server on which you have an open session,<br />

<strong>Developer</strong> does one of the following:<br />

� If the server administrator specified a time delay before shutdown, <strong>Developer</strong><br />

displays a message notifying you when the shutdown process began and how many<br />

minutes remain before the server shuts down. After you receive notification of server<br />

shutdown, save any work that you want to keep and then close your session. If you do<br />

not close your session, <strong>Developer</strong> notifies you when the server has shut down.<br />

� If the server administrator performed an immediate shutdown, <strong>Developer</strong> displays a<br />

message stating that your connection to the server has been lost. (<strong>Developer</strong> also<br />

displays this message if the network connection to the server is lost.)<br />

If you did not save your work before shut down occurred, you might be able to restore<br />

your session when the server restarts and then save your work. For more information<br />

about restoring sessions, see “Restoring a Session on a Server” on page 38.<br />

Changing Your Password<br />

You can change the password for your user account. If you forget your password, contact<br />

the server administrator.<br />

Important! If you are outside of the corporate firewall, do not change your password unless<br />

you use SSL to open the session on the <strong>webMethods</strong> Integration Server. If you do not use<br />

SSL, your password can be exposed in unencrypted form.<br />

Note: You cannot use <strong>Developer</strong> to change passwords that are stored in an LDAP or NIS<br />

server.<br />

Password Requirements<br />

For security purposes, <strong>webMethods</strong> Integration Server places length and character<br />

restrictions on passwords. <strong>webMethods</strong> Integration Server contains a default set of<br />

<strong>webMethods</strong> <strong>Developer</strong> User’s <strong>Guide</strong> Version 6.5, Service Pack 3 � � � 39


1. Getting Started with <strong>Developer</strong><br />

password requirements; however, your server administrator can change these. For more<br />

information about these password requirements, contact your server administrator.<br />

The default password requirements provided by <strong>webMethods</strong> are as follows:<br />

Requirement Default<br />

Minimum length 8<br />

Minimum number of alphabetic characters 3<br />

Minimum number of uppercase characters 2<br />

Minimum number of lowercase characters 2<br />

Minimum number of numeric characters 1<br />

Minimum number of special characters (non-alphabetic and non-numeric<br />

characters, such as *. ?, &)<br />

1<br />

To ensure the security of your password, follow the additional guidelines below:<br />

� Do not choose obvious passwords, such as your name, address, phone number,<br />

license plate, spouse’s name, child’s name, or a birthday.<br />

� Do not use any word that can be found in the dictionary.<br />

� Do not write your password down.<br />

� Do not share your password with anyone.<br />

� Change your password frequently.<br />

To change your password<br />

1 On the Session menu, click Change Password.<br />

2 In the Change Password dialog box, in the Old Password field, type your current<br />

password.<br />

3 In the New Password field, type your new password.<br />

4 In the Confirm New Password field, retype your new password. Click OK.<br />

Important! The server administrator can disable the feature for changing your password<br />

from <strong>Developer</strong>. If the feature is disabled and you try to change your password, you will<br />

receive a message stating that the administrator has disabled the feature.<br />

<strong>webMethods</strong> <strong>Developer</strong> User’s <strong>Guide</strong> Version 6.5, Service Pack 3 � � � 40


Using Online Help<br />

1. Getting Started with <strong>Developer</strong><br />

You can access online help at any point in <strong>webMethods</strong> <strong>Developer</strong>. To open the help<br />

system and search for a topic of interest, click Contents from the Help menu. <strong>Developer</strong> also<br />

provides the following types of context-sensitive help:<br />

� Window areas. For help about the dialog box or <strong>Developer</strong> window area that currently<br />

has the focus, do one of the following:<br />

� Click the Help button (available in most dialog boxes).<br />

� Press F1.<br />

� From the Help menu, click On Topic.<br />

� On the <strong>Developer</strong> window toolbar, click .<br />

� Properties. For help about a property, click the property in the Properties panel.<br />

<strong>Developer</strong> displays a description of the property at the bottom of the Properties panel.<br />

� Built-in services. For a description of a built-in service within the WmART, WmDB,<br />

WmPKI, WmPRT, or WmPublic packages, do one of the following:<br />

� If you are browsing the services within a package in the Navigation panel, select a<br />

service and press F1.<br />

� If you have added a built-in service to a flow service using an INVOKE step,<br />

select the built-in service in the editor and press F1.<br />

� If you are browsing for a built-in service to add to a flow service, select the builtin<br />

service in the Select dialog box and press F1.<br />

You can also view or print descriptions of all built-in services from one location by<br />

clicking Help�Built-In Service Reference.<br />

<strong>webMethods</strong> <strong>Developer</strong> User’s <strong>Guide</strong> Version 6.5, Service Pack 3 � � � 41


1. Getting Started with <strong>Developer</strong><br />

<strong>webMethods</strong> <strong>Developer</strong> User’s <strong>Guide</strong> Version 6.5, Service Pack 3 � � � 42


Chapter 2. Managing Elements in the Navigation Panel<br />

� What Is an Element? . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 44<br />

� Creating New Elements . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 45<br />

� Specifying Dependency Checking Safeguards . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 47<br />

� Notes About Performing Actions on Elements . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 48<br />

� Opening and Closing Elements in the Editor . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 49<br />

� Moving and Copying Elements . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 51<br />

� Renaming Elements . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 55<br />

� Saving Changes to Elements . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . .57<br />

� Deleting Elements . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 57<br />

� Finding Elements and Fields . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 59<br />

� Finding Dependents and References . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 63<br />

� Inspecting Pipeline References . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . .66<br />

� Caching Elements . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 70<br />

<strong>webMethods</strong> <strong>Developer</strong> User’s <strong>Guide</strong> Version 6.5, Service Pack 3 � � � 43


What Is an Element?<br />

Folders, services,<br />

triggers, specifications,<br />

IS document types,<br />

and IS schemas are<br />

elements.<br />

2. Managing Elements in the Navigation Panel<br />

An element is an item that exists in the Navigation panel in <strong>webMethods</strong> <strong>Developer</strong>.<br />

Elements include folders, services, specifications, IS document types, triggers, and IS<br />

schemas. In the Navigation panel, servers and packages are not considered to be elements.<br />

Elements in the Navigation panel<br />

The following table identifies where to go for more information about creating new<br />

elements and performing actions on those elements.<br />

For information about... See...<br />

Creating, opening, moving and<br />

copying, renaming, deleting,<br />

finding, and caching elements<br />

The sections in this chapter<br />

Locking elements Chapter 4, “Locking and Unlocking Elements”<br />

Checking elements in to and out of a<br />

third-party version control<br />

repository<br />

<strong>webMethods</strong> Version Control System Integration<br />

Feature <strong>Developer</strong>’s <strong>Guide</strong> in the directory:<br />

..\<strong>webMethods</strong>6\<strong>Developer</strong>\doc\guides<br />

Performing actions on packages Chapter 3, “Working with Packages”<br />

<strong>webMethods</strong> <strong>Developer</strong> User’s <strong>Guide</strong> Version 6.5, Service Pack 3 � � � 44


Creating New Elements<br />

When creating elements, keep the following points in mind:<br />

2. Managing Elements in the Navigation Panel<br />

� You cannot create a new Java or C service unless all services of those types are<br />

unlocked, or locked by you, in the folder in which you want to create the new service.<br />

For details, see “Locking Java and C/C++ Services” on page 97.<br />

� The names of non-folder elements must be unique across all packages. If you try to<br />

create an element using a name that already exists at that level in any package,<br />

<strong>Developer</strong> creates the element and names it Untitled.<br />

� <strong>Developer</strong> places some restrictions on the characters you can use in element and<br />

package names. For more information about these restrictions, see “<strong>Guide</strong>lines for<br />

Naming Elements” on page 46.<br />

To create a new element<br />

1 On the File menu, click New.<br />

2 On the New dialog box, click the type of element you want to create and then click<br />

Next.<br />

3 Follow the prompts given by <strong>Developer</strong> for the type of element you are creating.<br />

When you have supplied all of the information that <strong>Developer</strong> needs to create the<br />

element, the Finish button becomes active.<br />

4 Click Finish.<br />

Tip! You can quickly create an element by clicking next to the New button on the toolbar<br />

and then clicking the element you want to create. <strong>Developer</strong> adds the element beneath the<br />

currently selected element, with a default name of Untitled.<br />

If you select multiple elements and then click this button, <strong>Developer</strong> offers only the All<br />

Choices option, which opens the New dialog box described in the procedure above.<br />

About Element Names<br />

The fully qualified name of an Integration Server element is composed of two parts: a<br />

folder identifier, consisting of the folder path in which the element resides, and the element<br />

name. The Integration Server represents elements in the following format:<br />

folder.subfolder1.subfolder2:element<br />

<strong>webMethods</strong> <strong>Developer</strong> User’s <strong>Guide</strong> Version 6.5, Service Pack 3 � � � 45


2. Managing Elements in the Navigation Panel<br />

For example, if the HomeLoan service is in the Personal folder, which is contained in the<br />

Finance folder, the fully qualified service name is:<br />

Finance.Personal:HomeLoan<br />

Note: <strong>Developer</strong> ensures that the fully qualified name of each element within the server is<br />

unique. Depending on the action you are performing on the element, <strong>Developer</strong><br />

accomplishes this either by alerting you that the action cannot be completed or by<br />

appending a number to the name of the element after the action is performed. For<br />

example, if you are copying a flow service named checkOrder2 to a destination that already<br />

contains a flow service with that name, <strong>Developer</strong> copies the service and names the copy<br />

checkOrder2_1.<br />

Package Names and Element Names<br />

The name of the package to which an element belongs has no bearing on the names of the<br />

elements that package contains (that is, the package name is not part of the fully qualified<br />

name of the element). Nor does it affect how the element is referenced by a client<br />

application. For example, if you move a service called Personnel:GetDeptNames from a<br />

package called Admin to a package called EmployeeData, client applications would still<br />

reference the service as Personnel:GetDeptNames.<br />

<strong>Guide</strong>lines for Naming Elements<br />

<strong>webMethods</strong> <strong>Developer</strong> places some restrictions on the characters you can use in element<br />

and package names. Specifically, element and package names cannot contain:<br />

� Reserved words and characters that are used in Java or C/C++ (such as for, while, and<br />

if )<br />

� Digits as their first character<br />

� Spaces<br />

� Control characters and special characters like periods (.), including:<br />

? ' - # = ) ( . / \ ;<br />

& @ ^ ! | } { ` > <<br />

% * : $ ] [ " + , ~<br />

� Characters outside of the basic ASCII character set, such as multi-byte characters<br />

If you specify a name that disregards these restrictions, <strong>Developer</strong> displays an error<br />

message. When this happens, use a different name or try adding a letter or number to the<br />

name to make it valid.<br />

<strong>webMethods</strong> <strong>Developer</strong> User’s <strong>Guide</strong> Version 6.5, Service Pack 3 � � � 46


Editing Elements<br />

2. Managing Elements in the Navigation Panel<br />

To edit an element, you must first lock it. You must also have Write access to the element.<br />

For more information about locking and unlocking elements, see Chapter 4, “Locking and<br />

Unlocking Elements”. For more information about access permissions, see Chapter 5,<br />

“Assigning and Managing Permissions”.<br />

If you have enabled the VCS Integration feature, you must first check out the element<br />

before you can edit it. For more information, see the <strong>webMethods</strong> Version Control System<br />

Integration Feature <strong>Developer</strong>’s <strong>Guide</strong> in the ..\<strong>webMethods</strong>6\<strong>Developer</strong>\doc\guides<br />

directory.<br />

Tip! You can produce printable versions of many of the elements in the Navigation panel<br />

by clicking File�View as HTML.<br />

Specifying Dependency Checking Safeguards<br />

<strong>Developer</strong> automatically checks for dependents when you delete, rename, or move<br />

elements in the Navigation panel. This dependency checking acts as a safeguard to<br />

prevent you from inadvertently affecting other elements on the <strong>webMethods</strong> Integration<br />

Server. This is especially important during collaborative development on the same<br />

<strong>webMethods</strong> Integration Server.<br />

You can have <strong>Developer</strong> prompt you before deleting, moving, or renaming an element<br />

with dependents. You can also have <strong>Developer</strong> update local references when pasting<br />

elements.<br />

Note: The dependency checking options are enabled by default.<br />

To specify dependency checking safeguards<br />

1 On the Tools menu, click Options.<br />

2 Click General. Under Navigation Panel, do the following:<br />

<strong>webMethods</strong> <strong>Developer</strong> User’s <strong>Guide</strong> Version 6.5, Service Pack 3 � � � 47


Select... To...<br />

3 Click OK.<br />

2. Managing Elements in the Navigation Panel<br />

Confirm before deleting Instruct <strong>Developer</strong> to notify you before deleting an<br />

element used by other elements, such as flow services, IS<br />

document types, specifications, or triggers.<br />

Prompt before updating<br />

dependents when<br />

renaming/moving<br />

Update local references<br />

when pasting multiple<br />

elements<br />

For more information about finding dependents, see “Finding Dependents and<br />

References” on page 63.<br />

Notes About Performing Actions on Elements<br />

If <strong>Developer</strong> finds elements that depend on the element<br />

being deleted, <strong>Developer</strong> lists those dependents and<br />

prompts you to delete the element anyway or cancel the<br />

action. If you clear this check box, <strong>Developer</strong> deletes the<br />

element without prompting you.<br />

Instruct <strong>Developer</strong> to alert you when dependents (that is,<br />

other elements that use the selected element, such as<br />

flow services, IS document types, or triggers) exist.<br />

If dependents exist, <strong>Developer</strong> lists those dependents<br />

before renaming or moving the selected element and<br />

prompts you to:<br />

� Rename/move the selected element and update<br />

references in dependent elements.<br />

� Rename/move the selected element without<br />

updating references to it.<br />

� Cancel the action.<br />

If you clear this check box, <strong>Developer</strong> automatically<br />

updates dependents without prompting you.<br />

Instruct <strong>Developer</strong> to update references when copying<br />

and pasting a group of elements that refer to each other.<br />

If you clear this check box, <strong>Developer</strong> retains the original<br />

references in the copied elements.<br />

When performing actions on one or more elements, keep the following points in mind:<br />

� You must have at least List access to view elements, Read access to select elements to<br />

move or copy, Write access to the location to which you want to move/copy elements,<br />

and Write access to elements you want to rename or delete. If you select multiple<br />

<strong>webMethods</strong> <strong>Developer</strong> User’s <strong>Guide</strong> Version 6.5, Service Pack 3 � � � 48


2. Managing Elements in the Navigation Panel<br />

elements and you do not have the required access to one or more of them, you will not<br />

be able to perform the action. You must either ask your system administrator to give<br />

you the required access to the elements or select only elements for which you have the<br />

proper access.<br />

� <strong>Developer</strong> prompts you to save changes to an element before allowing you to perform<br />

an action on the element, close the element in the editor, close your session on the<br />

current server, or exit <strong>Developer</strong>.<br />

� The actions you can perform on items depend on the type and combination of items<br />

you select. If an action is not allowed for one or more elements in a selection,<br />

<strong>Developer</strong> makes the action unavailable for use. For example, <strong>Developer</strong> disables the<br />

cut, copy, paste, and delete actions if you select a server. <strong>Developer</strong> also prevents you<br />

from selecting multiple elements when doing so could cause confusion or undefined<br />

results. For example, you cannot select a server and any other element, a package and<br />

any other element, or a folder and one or more elements contained within that folder.<br />

� If you select multiple elements and <strong>Developer</strong> encounters an error while performing<br />

the specified action on one or more of the elements, <strong>Developer</strong> displays a dialog box<br />

listing the elements for which the action failed. You can obtain more information<br />

about why the action failed by clicking Details.<br />

� The elements you want to move, copy, rename, save, or delete must be unlocked, or<br />

locked by you. For more information about locking and unlocking elements, see<br />

Chapter 4, “Locking and Unlocking Elements”.<br />

� You cannot undo a move, copy, rename, or delete action using the Edit�Undo<br />

command.<br />

� If you select a publishable document type that is associated with an adapter<br />

notification, <strong>Developer</strong> handles actions performed on the document type as follows:<br />

� For non-copy actions, you must also select the adapter notification before you can<br />

perform a non-copy action on the document type.<br />

� For copy actions, you can select the publishable document type without selecting<br />

its associated adapter notification. However, the copied publishable document<br />

type loses its association with the adapter notification.<br />

Opening and Closing Elements in the Editor<br />

You can open elements from either the Navigation panel or the Recent Elements tab.<br />

When opening elements from the Navigation panel, keep the following points in mind:<br />

� Single-clicking an element selects the element but does not display its details in the<br />

editor. Double-clicking an element opens it in the editor.<br />

<strong>webMethods</strong> <strong>Developer</strong> User’s <strong>Guide</strong> Version 6.5, Service Pack 3 � � � 49


2. Managing Elements in the Navigation Panel<br />

� Double-clicking a folder expands or collapses the contents of the folder in the<br />

Navigation panel. To view a folder’s properties in the Properties panel, perform the<br />

steps in the procedure that follows.<br />

� If the <strong>Developer</strong>’s Version Control System (VCS) Integration feature is enabled,<br />

<strong>Developer</strong> might exhibit slowdowns, error messages (such as "Server version has<br />

changed" and "Session already in use"), and may stop responding completely when<br />

you expand a large element (such as a folder) in the Navigation panel. This condition<br />

occurs when <strong>Developer</strong> queries the Integration Server to check the lock state of each<br />

element within an element. To improve performance during lock checking, see<br />

“Optimizing Lock Checking” on page 77.<br />

To open elements in the editor<br />

1 Select one or more elements to open.<br />

Tip! Press the SHIFT key as you click to select a group of adjacent elements. Press the<br />

CTRL key to select a group of non-adjacent elements.<br />

2 On the File menu, click Open.<br />

If you are opening an element from the Recent Elements tab and the element resides<br />

on a server to which you are no longer connected, <strong>Developer</strong> prompts you to log on to<br />

that server before displaying the element.<br />

To close elements in the editor<br />

� Do one of the following:<br />

To... Do this...<br />

Close the active element in the editor<br />

(that is, the element whose tab is<br />

highlighted)<br />

On the Window menu, click Close Active<br />

Editor.<br />

Close all elements except the active one On the Window menu, click Close All But<br />

Active Editor.<br />

Close all elements in the editor On the Window menu, click Close All<br />

Editors.<br />

Note: You do not need to close elements when you exit <strong>Developer</strong>. <strong>Developer</strong> remembers<br />

which elements were open and displays them when you restart <strong>Developer</strong>. If you close an<br />

element without saving changes made to the element, <strong>Developer</strong> will prompt you to save<br />

changes.<br />

<strong>webMethods</strong> <strong>Developer</strong> User’s <strong>Guide</strong> Version 6.5, Service Pack 3 � � � 50


Moving and Copying Elements<br />

2. Managing Elements in the Navigation Panel<br />

You can move or copy elements between packages and, in most cases, across servers.<br />

When moving or copying elements, keep the following points in mind:<br />

General<br />

� You must have Read access to the elements you are moving or copying and Write<br />

access to the packages, folders, or servers to where you want to move/copy them. For<br />

more information about Write access and ACLs assigned to elements, see Chapter 5,<br />

“Assigning and Managing Permissions”.<br />

� When you move or copy an element, <strong>Developer</strong> automatically changes the element’s<br />

fully qualified name to reflect its new location.<br />

� You cannot move an element to a location that already contains an element with the<br />

same name. If you copy the element, however, <strong>Developer</strong> copies the element and<br />

appends a number to the end of the name of the copied element.<br />

� You cannot move multiple elements with the same name to a single location.<br />

� After you move or copy an element, the element becomes locked by you.<br />

� When you copy multiple elements to another location on the same server and the<br />

elements contain references to each other, <strong>Developer</strong> updates the references if you<br />

have selected Update local reference(s) when pasting multiple elements on the Options<br />

dialog box. For example, if you copy a folder that contains two services and one of the<br />

services invokes the other, <strong>Developer</strong> will update the reference to the invoked service.<br />

Moving and Copying Services<br />

� When you move or copy a service, <strong>Developer</strong> does not move/copy any output<br />

templates that are associated with that service.<br />

� If you move a service, or a folder containing a service, <strong>Developer</strong> retains the service’s<br />

explicit universal name. If you copy a service or a folder containing a service,<br />

<strong>Developer</strong> does not retain the service’s explicit universal name. You must restore the<br />

universal name by editing the service’s properties. For more information, see<br />

“Assigning Universal Names to Services” on page 145.<br />

� When you move or copy a Java service, <strong>Developer</strong> automatically recompiles the<br />

service and any Java services that remain in the source folder. When you delete a Java<br />

service, <strong>Developer</strong> recompiles any Java services that remain in the source folder.<br />

� You cannot move or copy a Java service to a folder that contains other Java services<br />

that are system locked or locked by another user. If you attempt to do so, <strong>Developer</strong><br />

cancels the entire move/copy action.<br />

� When you move or copy a Java service, <strong>Developer</strong> will also move or copy the service’s<br />

Shared fields to the destination folder, unless the destination folder already contains<br />

<strong>webMethods</strong> <strong>Developer</strong> User’s <strong>Guide</strong> Version 6.5, Service Pack 3 � � � 51


2. Managing Elements in the Navigation Panel<br />

Shared fields with different values. In this case, you must first manually copy the<br />

Shared fields into the destination folder and then move or copy the Java service.<br />

Copying Elements Between Servers<br />

� When you cut and paste or drag elements between servers, <strong>Developer</strong> retains a copy<br />

of the elements on the source server. That is, a move (cut and paste or drag) action is<br />

the same as a copy action.<br />

� <strong>Developer</strong> does not automatically copy an element’s references to the destination<br />

server. Instead, it displays a dialog box after the copy alerting you to any unresolved<br />

references. You must copy the references to the destination server manually.<br />

� <strong>Developer</strong> does not automatically update references when copying across servers.<br />

Therefore, if you are copying multiple elements from one server to another using<br />

<strong>Developer</strong> and the elements reference each other, you should paste the elements into a<br />

location with the same name on the destination server.<br />

� If you are copying an add-in element that has a component that resides on the server,<br />

and the destination server does not have that add-in component installed, <strong>Developer</strong><br />

displays an error message stating that you are attempting to copy an unknown<br />

element. <strong>Developer</strong> does not copy the add-in elements but does copy other elements<br />

in the selection.<br />

� Elements you copy to a folder on a different server adopt the ACL access permissions<br />

of the destination folder, even if they had explicitly assigned ACLs on the source<br />

server. Folders you copy to a package on a different server inherit the default ACLs<br />

for top-level folders.<br />

� When you copy a trigger to another server, the trigger will be pasted in a disabled<br />

state. To create the subscriptions identified in the trigger, you must enable the trigger.<br />

When you copy a package to another server, the triggers contained in the package will<br />

maintain their original state.<br />

If you are configuring a cluster, use the package replication feature in the Integration<br />

Server Administrator to populate the cluster nodes. See the <strong>webMethods</strong> Integration<br />

Server Administrator’s <strong>Guide</strong> for more information about this feature.<br />

� When you move or copy a publishable document type to a destination on the same<br />

server, the moved or copied document type remains publishable. When you copy a<br />

publishable document type to a different server, <strong>Developer</strong> converts the publishable<br />

document type to an IS document type on the destination server. For more<br />

information about making IS document types publishable and synchronizing them<br />

with Broker document types, see the Publish-Subscribe <strong>Developer</strong>’s <strong>Guide</strong>.<br />

<strong>webMethods</strong> <strong>Developer</strong> User’s <strong>Guide</strong> Version 6.5, Service Pack 3 � � � 52


Moving and Copying Adapter Notifications and Related Elements<br />

2. Managing Elements in the Navigation Panel<br />

Tip! To retain the status of a publishable document type and its link to a Broker<br />

document type, use the package replication functionality in the Integration Server<br />

Administrator instead of using <strong>Developer</strong> to move or copy the package containing the<br />

publishable document type. For information about package replication, see the<br />

<strong>webMethods</strong> Integration Server Administrator’s <strong>Guide</strong>.<br />

� Although you cannot move an adapter notification’s publishable document type<br />

without also moving its associated adapter notification, you can copy it. If you do so,<br />

the copied document type remains publishable but is no longer associated with the<br />

adapter notification.<br />

When you move or copy an adapter notification, <strong>Developer</strong> also moves/copies its<br />

associated publishable document type and prompts you to indicate whether to<br />

move/copy the associated Broker document type.<br />

� You cannot move or copy adapter notifications, adapter notification publishable<br />

document types, or adapter services across servers. If you are selecting multiple<br />

elements and your selection contains any of these elements, <strong>Developer</strong> alerts you that<br />

the move/copy action cannot be completed.<br />

� You cannot move or copy a listener or connection element.<br />

To move or copy elements<br />

1 Select the elements that you want to move or copy.<br />

2 Do one of the following:<br />

To... Click...<br />

Cut the element Edit�Cut<br />

Copy the element Edit�Copy<br />

Tip! You can cancel a cut action by pressing ESC.<br />

3 If the elements you want to move or copy contain unsaved changes, <strong>Developer</strong> alerts<br />

you that you must first save the changes. Click OK to close the alert dialog box. Then,<br />

save the changes and repeat the move/copy action.<br />

4 If you do not have Read access to the elements you are moving or copying, or Write<br />

access to the location you are moving/copying them to, <strong>Developer</strong> displays a message<br />

that identifies the elements that are preventing the action from completing<br />

successfully. Click OK and then either obtain the proper access from your system<br />

administrator or select only those elements to which you have proper access.<br />

<strong>webMethods</strong> <strong>Developer</strong> User’s <strong>Guide</strong> Version 6.5, Service Pack 3 � � � 53


2. Managing Elements in the Navigation Panel<br />

5 Select the location where you want to move or copy the elements.<br />

6 On the Edit menu, click Paste�After.<br />

7 If the destination already contains an element with the same name as an element you<br />

are moving or copying, do one of the following:<br />

� If you are moving the element, <strong>Developer</strong> alerts you that the element cannot be<br />

moved. Click OK to close the alert dialog box. Rename the element if desired and<br />

repeat the move action.<br />

� If you are copying the element, <strong>Developer</strong> copies the element and appends a<br />

number to the name of the copied element. (For example, if you are copying a<br />

flow service named checkOrder2 to a destination that already contains a flow<br />

service with that name, <strong>Developer</strong> copies the service and names the copy<br />

checkOrder2_1.) Rename the element if desired.<br />

For more information about renaming elements, see “Renaming Elements” on<br />

page 55.<br />

8 If one of the elements you moved or copied is a Java service, perform the following as<br />

necessary:<br />

� If you are moving or copying the Java service to a folder with other Java services<br />

that are system locked or locked by another user, <strong>Developer</strong> alerts you that the<br />

element cannot be moved/copied.<br />

Click OK and then ask the owner of the lock to remove the lock.<br />

� If the Java service you are moving or copying contains a shared source that<br />

conflicts with the shared source of an existing Java service in the destination<br />

folder, <strong>Developer</strong> alerts you that there is a conflict. Click Proceed to use the<br />

destination folder’s shared source, or click Cancel to cancel the entire move action.<br />

Note: If no shared Java source conflict exists, <strong>Developer</strong> moves the Java service and<br />

its shared source to the destination folder. If a conflict does exist, you must respecify<br />

the Shared tab information in the copy of the service. (You can copy the<br />

information from the Shared tab for the original service to the Shared tab for the<br />

copy of the service.)<br />

9 If you clicked the Prompt before updating dependents when renaming/moving check box in<br />

the Options dialog box and any elements on the current server contain unsaved<br />

changes, <strong>Developer</strong> prompts you to save the element(s). Do one of the following:<br />

To... Click...<br />

Save changes and then proceed with the move/copy action Save and Proceed<br />

Proceed with the move/copy action without saving<br />

changes<br />

Proceed without Save<br />

<strong>webMethods</strong> <strong>Developer</strong> User’s <strong>Guide</strong> Version 6.5, Service Pack 3 � � � 54


Renaming Elements<br />

2. Managing Elements in the Navigation Panel<br />

To... Click...<br />

Cancel the entire move/copy action Cancel<br />

10 If you clicked Proceed without Save in Step 9, <strong>Developer</strong> identifies the elements that will<br />

be affected by the move.<br />

Do one of the following:<br />

To... Click...<br />

Move the selected element and update references to<br />

dependent elements<br />

Move the selected element in the Navigation panel<br />

without updating references to dependent elements<br />

Cancel the entire move action Cancel<br />

For more information about dependency safeguards, see “Specifying Dependency<br />

Checking Safeguards” on page 47.<br />

When renaming elements, keep the following points in mind:<br />

Update Usages<br />

Ignore Usages<br />

Tip! You can also move elements by clicking them and dragging them to their new<br />

location.<br />

� You can rename any elements for which you have Write access to the element and its<br />

parent folder. When renaming a folder, you must also have Write access to all<br />

elements within the folder. For more information about Write access and ACLs<br />

assigned to elements, see Chapter 5, “Assigning and Managing Permissions”.<br />

� When you rename a folder, <strong>Developer</strong> automatically renames all of the elements in<br />

that folder (that is, changes their fully qualified names).<br />

� If the folder you want to rename contains elements with unsaved changes, you must<br />

save the changes before you can rename the folder.<br />

� Element names must be unique across all packages. If you try to rename an element<br />

using a name that already exists at that level in any package, <strong>Developer</strong> reverts the<br />

element back to its original name.<br />

<strong>webMethods</strong> <strong>Developer</strong> User’s <strong>Guide</strong> Version 6.5, Service Pack 3 � � � 55


2. Managing Elements in the Navigation Panel<br />

� When you rename an adapter notification, <strong>Developer</strong> also renames its associated<br />

publishable document type and prompts you to indicate whether to rename the<br />

associated Broker document type.<br />

� You cannot rename a listener or connection element.<br />

To rename an element<br />

1 Select the element that you want to rename.<br />

2 On the Edit menu, click Rename.<br />

3 If the element you want to rename contains unsaved changes, <strong>Developer</strong> alerts you<br />

that the element cannot be renamed until you save the changes. Click OK to close the<br />

alert dialog box. Then, save the changes and repeat the rename action.<br />

4 <strong>Developer</strong> moves the cursor to the end of the element name. Edit the name and press<br />

ENTER.<br />

If an element already exists with that name at the same level, <strong>Developer</strong> displays a<br />

message alerting you that the rename action could not be completed. Click OK to close<br />

the message dialog box and repeat the rename action.<br />

Tip! You can cancel a rename action by pressing ESC.<br />

5 If you clicked the Prompt before updating dependents when renaming/moving check box in<br />

the Options dialog box and any elements on the current server contain unsaved<br />

changes, <strong>Developer</strong> prompts you to save the element(s). Do one of the following:<br />

To... Click...<br />

Save changes and then proceed with the rename action Save and Proceed<br />

Proceed with the rename action without saving changes Proceed without Save<br />

Cancel the entire rename action Cancel<br />

6 If you clicked Proceed without Save in Step 5, <strong>Developer</strong> alerts you to the elements that<br />

will be affected by the rename action.<br />

Do one of the following:<br />

To... Click...<br />

Rename the selected element in the Navigation panel and<br />

update references to dependent elements<br />

Update Usages<br />

<strong>webMethods</strong> <strong>Developer</strong> User’s <strong>Guide</strong> Version 6.5, Service Pack 3 � � � 56


2. Managing Elements in the Navigation Panel<br />

For more information about dependency safeguards, see “Specifying Dependency<br />

Checking Safeguards” on page 47.<br />

Saving Changes to Elements<br />

Deleting Elements<br />

To... Click...<br />

Rename the selected element without updating references to<br />

dependent elements<br />

Cancel the entire rename action Cancel<br />

Changes that you make to an element are not written to <strong>webMethods</strong> Integration Server<br />

until you explicitly save your work.<br />

To save changes to elements<br />

� Do one of the following:<br />

To... Do this...<br />

If you attempt to close <strong>Developer</strong>, close your session on the current server, close an<br />

unsaved element in the editor, or perform an action on an element without saving your<br />

changes, <strong>Developer</strong> will prompt you to save changes first.<br />

When deleting elements, keep the following points in mind:<br />

Ignore Usages<br />

Save changes to the current element On the File menu, click Save.<br />

Save all elements you have edited, on<br />

all servers<br />

On the File menu, click Save All Editors.<br />

� You can delete any elements to which you have Write access for the element and its<br />

parent folder. When deleting a folder, you must also have Write access to all elements<br />

within the folder. For more information about Write access and ACLs assigned to<br />

elements, see Chapter 5, “Assigning and Managing Permissions”.<br />

� When you delete a folder or the last Java service in a folder, <strong>Developer</strong> also deletes the<br />

shared source for that folder. If you cancel the delete action, no elements (including<br />

non-Java service elements) are deleted.<br />

� You can only delete an adapter notification’s publishable document type if you delete<br />

its associated adapter notification.<br />

<strong>webMethods</strong> <strong>Developer</strong> User’s <strong>Guide</strong> Version 6.5, Service Pack 3 � � � 57


2. Managing Elements in the Navigation Panel<br />

� When you delete an adapter notification, <strong>Developer</strong> also deletes its associated<br />

publishable document type and prompts you to indicate whether to delete the<br />

associated Broker document type.<br />

� You cannot delete a listener or connection element.<br />

To delete elements<br />

1 Select the elements that you want to delete.<br />

2 On the Edit menu, click Delete.<br />

3 If you selected the Confirm before deleting check box in the Options dialog box, do the<br />

following:<br />

a If any elements on the server contain unsaved changes, <strong>Developer</strong> prompts you to<br />

save the element(s). Do one of the following:<br />

To... Click...<br />

Save changes and then proceed with the delete<br />

action<br />

Proceed with the delete action without saving<br />

changes<br />

Cancel the entire delete action Cancel<br />

Save and Proceed<br />

Proceed without Save<br />

b If the elements you are deleting are not dependents of other elements, <strong>Developer</strong><br />

prompts you to confirm the delete action. Click OK.<br />

c If the elements you are deleting are dependents of other elements, <strong>Developer</strong><br />

alerts you to the elements that will be affected by the deletion. Do the following:<br />

1 If one of the elements you want to delete is a publishable document type or an<br />

adapter notification, do one of the following:<br />

To... Do this...<br />

Delete the element on the Integration<br />

Server but leave the corresponding<br />

document type on the Broker<br />

Delete the element on the Integration<br />

Server and the corresponding<br />

document type on the Broker<br />

Clear the Delete associated Broker<br />

document type on the Broker check<br />

box.<br />

Select the Delete associated Broker<br />

document type on the Broker check<br />

box.<br />

<strong>webMethods</strong> <strong>Developer</strong> User’s <strong>Guide</strong> Version 6.5, Service Pack 3 � � � 58


2 Continue or cancel the delete action as follows:<br />

2. Managing Elements in the Navigation Panel<br />

For more information about dependency safeguards, see “Specifying Dependency<br />

Checking Safeguards” on page 47.<br />

Finding Elements and Fields<br />

Important! If you delete a publishable document type and Broker document<br />

type associated with a trigger or a flow service, you might break any<br />

integration solution that uses the document type.<br />

If you delete the Broker document type, you might negatively impact any<br />

publishable document types created from that Broker document type on<br />

other Integration Servers. When the developers synchronize document<br />

types with the Broker and they choose to Pull from Broker, publishable<br />

document types associated with the deleted Broker document type will be<br />

removed from their Integration Servers.<br />

To... Click...<br />

Delete the elements from the Navigation panel<br />

(and therefore break any links to dependent<br />

elements)<br />

You can find elements and fields within <strong>Developer</strong> using the following methods:<br />

� Find elements in the Navigation panel. When creating and editing elements, you might<br />

lose track of where you saved certain elements. For example, suppose that you do not<br />

remember the folder to which you saved a service called Test.<br />

� Find fields in editor trees. You can search for fields in certain trees in the editor (that is,<br />

from within a document or specification editor, and in a flow service’s Pipeline tab).<br />

You might want to search for fields when working with a large document with many<br />

fields.<br />

� Locate an invoked service from the editor. You can highlight the location of an invoked<br />

service in the Navigation panel. This is especially helpful when working with a flow<br />

written by another party and with complex flows that make multiple invokes.<br />

Finding Elements in the Navigation Panel<br />

Continue<br />

Cancel the entire delete action Cancel<br />

Using the Find command, you can search across all packages and folders within a server to<br />

find all occurrences of a specified element name.<br />

<strong>webMethods</strong> <strong>Developer</strong> User’s <strong>Guide</strong> Version 6.5, Service Pack 3 � � � 59


2. Managing Elements in the Navigation Panel<br />

The Find command searches the fully qualified names of elements. If you search for the<br />

name Test, the results display all elements with Test in their fully qualified name. The<br />

results could include a service called Sample located in a Test folder, or an IS document type<br />

called SampleTest.<br />

The Find command interprets search terms as case-sensitive regular expressions. By<br />

default, the command looks for all elements containing a specified search term. For<br />

example, if you specified “Test” as a search term, the results would include elements<br />

named “Test,” “MyTest,” and “TestFinal.” You can also include regular expression<br />

operator characters. For example:<br />

To find... Type...<br />

All elements containing “PO” PO<br />

All elements starting with “PO” ^PO<br />

All elements ending with “PO” PO$<br />

All services with the exact name of “logPO” :logPO$<br />

All elements containing “log” followed by any<br />

two characters (wildcards)<br />

log..<br />

For a complete list of regular expression operator characters, see Appendix B, “Regular<br />

Expressions”.<br />

Note: The Find command supports regular expressions but not conditional statements. For<br />

example, you can specify Test as a search term, but not Test OR Test1.<br />

To find an element in the Navigation panel<br />

1 Click anywhere in the Navigation panel.<br />

2 On the Edit menu, click Find. <strong>Developer</strong> displays the Find In Navigation Panel dialog<br />

box.<br />

3 In the Find In Navigation Panel box, type any portion of the fully qualified name of the<br />

element that you want to find.<br />

4 If you want to limit the scope of the search to a specific package, select the package in<br />

the Package list.<br />

5 Click Find. The Find In Navigation Panel dialog box displays the results of the search.<br />

<strong>webMethods</strong> <strong>Developer</strong> User’s <strong>Guide</strong> Version 6.5, Service Pack 3 � � � 60


The term “PO” is<br />

found in...<br />

...the names of 33<br />

elements in the<br />

Navigation panel. All<br />

of these elements<br />

contain “PO” in their<br />

fully qualified name.<br />

Results of search for “PO”<br />

2. Managing Elements in the Navigation Panel<br />

6 To jump to an element in the Navigation panel, select that element in the results and<br />

click Go To.<br />

Note: If you receive a “Couldn’t find in Navigation panel” message when you click Go To,<br />

you probably do not have List access to the element. Contact your server administrator to<br />

obtain access.<br />

Tip! For an active element in the editor, you can highlight the element’s location in the<br />

Navigation panel using the Edit�Locate in Navigation command.<br />

Finding Fields in Editor Trees<br />

You can search for a field in any of the following trees in the editor:<br />

� Trees in a document or specification editor<br />

� Trees in the Pipeline In, Pipeline Out, Service In, and Service Out areas in the Pipeline tab of<br />

a flow service editor<br />

When searching for fields on an editor tree, keep the following points in mind:<br />

� You can search only one tree at a time. For example, if you want to find fields that<br />

contain the text number in the Pipeline In and Service In areas of the Pipeline tab, search<br />

one tree, and then the next.<br />

� You can refine your search by requiring <strong>Developer</strong> to find only fields that match the<br />

capitalization of the search text or fields that match only the complete word specified<br />

as the search text.<br />

<strong>webMethods</strong> <strong>Developer</strong> User’s <strong>Guide</strong> Version 6.5, Service Pack 3 � � � 61


2. Managing Elements in the Navigation Panel<br />

� You can search for a parent and child field combination. For example, if you specify<br />

address/street as the search text, <strong>Developer</strong> searches for all instances where a field<br />

named street is a child of a document or document list field named address. If you<br />

specify customerInformation/address/street as the search criteria, <strong>Developer</strong><br />

searches for a field named customerInformation that contains a field named address<br />

which contains a field named street. Use a forward slash (/) to separate the parent field<br />

from the child field.<br />

� <strong>Developer</strong> does not treat search text as a regular expression. For example, if you type<br />

^PO, <strong>Developer</strong> searches for fields that contain the text ^PO. <strong>Developer</strong> does not<br />

search for fields that begin with the text PO.<br />

Note: <strong>Developer</strong> interprets the forward slash character (/) as the divider between the<br />

name of a parent field and a child field. <strong>Developer</strong> will not search for a field name that<br />

contains a forward slash character. For example, if you type true/false as the search<br />

text, <strong>Developer</strong> searches for a field named false that is a child of a document or<br />

document list field named true. <strong>Developer</strong> does not search for a field named true/false.<br />

� <strong>Developer</strong> searches the tree as follows:<br />

� If you select a field, <strong>Developer</strong> begins searching at the selected field and continues<br />

to the bottom of the tree. If you have not selected a field, <strong>Developer</strong> begins<br />

searching at the top of the tree.<br />

� When <strong>Developer</strong> finds a field that matches the search criteria, <strong>Developer</strong> selects<br />

the field in the tree.<br />

� When <strong>Developer</strong> reaches the bottom of the tree, <strong>Developer</strong> displays a message<br />

asking if you would like to continue searching from the top of the tree.<br />

� After completing a search of the entire tree, if <strong>Developer</strong> cannot find a matching<br />

field, <strong>Developer</strong> displays a message stating that the search text was not found.<br />

To find a field within an editor tree<br />

1 Select the tree in which you want to search for a field.<br />

2 On the Edit menu, click Find.<br />

3 In the Find what field, type the text you want to search for. If you want to search for a<br />

parent-child field combination, use a forward slash (/) to separate the parent field<br />

from the child field.<br />

<strong>webMethods</strong> <strong>Developer</strong> User’s <strong>Guide</strong> Version 6.5, Service Pack 3 � � � 62


4 To further refine your search, do one or more of the following:<br />

To... Do this...<br />

Find fields with the same capitalization as<br />

the text in the Find what field<br />

Find only fields that match the complete<br />

word in the Find what field<br />

Find fields that contain the text in the Find<br />

what field as all or a portion of their name<br />

2. Managing Elements in the Navigation Panel<br />

5 Click Find Next. If <strong>Developer</strong> finds a match, it selects the field and displays it on the<br />

Pipeline tab.<br />

6 Click Find Next to find the next field that matches the search criteria.<br />

Locating Invoked Services<br />

You can navigate to the location of an invoked service in both the flow view.<br />

To find an invoked service<br />

1 In the editor, select the INVOKE step containing the service you want to locate.<br />

2 On the Edit menu, click Locate in Navigation. <strong>Developer</strong> locates and selects the service in<br />

the Navigation panel.<br />

Finding Dependents and References<br />

Before performing an action on a selected element, you can determine whether other<br />

elements will be affected by the change by finding dependents and references of the<br />

element. In <strong>Developer</strong>, a dependent is an element that uses a selected element, and a<br />

reference is an element that is used by a selected element.<br />

Finding Dependents<br />

Select the Match case check box.<br />

Select the Match whole words check<br />

box.<br />

Clear the Match whole words check<br />

box.<br />

To determine how a selected element is used by other elements on the server, you can find<br />

dependents of the selected element. For example, suppose that the flow service ServiceA<br />

invokes the flow service receivePO. The ServiceA service uses (that is, is a dependent of) the<br />

receivePO service. If you delete receivePO from the Navigation panel, ServiceA will not run.<br />

<strong>webMethods</strong> <strong>Developer</strong> User’s <strong>Guide</strong> Version 6.5, Service Pack 3 � � � 63


This service is a<br />

dependent of...<br />

...each of these<br />

services.<br />

The services:receivePO<br />

service is used by...<br />

...this element.<br />

Dependent elements<br />

2. Managing Elements in the Navigation Panel<br />

During debugging, you might want to locate all of the dependents of a given service or IS<br />

document type. Or, before editing an IS document type, you might want to know what<br />

elements, such as specifications, triggers, or flow services, will be affected by changes to<br />

the IS document type. Use the Find Dependents command to find all the dependents.<br />

Note: <strong>Developer</strong> does not consider a Java service that invokes another services to be a<br />

dependent. For example, if Java service A invokes service B, and you instruct <strong>Developer</strong> to<br />

find dependents of service B, service A will not appear as a dependent.<br />

To find dependents of a selected element<br />

1 In the Navigation panel or in the editor, select the element for which you want to find<br />

dependents.<br />

2 On the Tools menu, click Find Dependents.<br />

The Find Dependents dialog box displays the dependents of the element.<br />

Find Dependents dialog box<br />

<strong>webMethods</strong> <strong>Developer</strong> User’s <strong>Guide</strong> Version 6.5, Service Pack 3 � � � 64


Each of these services<br />

is a reference of<br />

ServiceA.<br />

2. Managing Elements in the Navigation Panel<br />

3 After <strong>Developer</strong> finds the dependents of the selected element, you may do any of the<br />

following:<br />

� To jump to an element in the Navigation panel, select that element in the results<br />

and then click Go To.<br />

� To see all dependents of a found dependent, click next to the item in the results<br />

list.<br />

� To limit the scope of the search to a specific package, select the package in the<br />

Package list and then click Find.<br />

Finding References<br />

To determine how a selected element uses other elements on the server, you can find<br />

references of the selected element. For example, the flow service ServiceA invokes the<br />

services receivePO, pub.schema:validate, processPO and submitPO. Additionally, in its input<br />

signature, ServiceA declares a document reference to the IS document type PODocument. The<br />

services receivePO, validate, processPO, and submitPO, and the IS document type PODocument,<br />

are used by (that is, they are references of) ServiceA.<br />

Elements as references<br />

During debugging of a complex flow service, you might want to locate all of the services,<br />

IS document types, and specifications used by the flow service. Use the Find References<br />

command to locate the references.<br />

You can also use the Find References command to locate any unresolved references. An<br />

unresolved reference is an element that does not exist in the Navigation panel yet is still<br />

referred to in the service, IS document type, or specification that you selected. The element<br />

might have been renamed, moved, or deleted. To prevent unresolved references, specify<br />

the dependency checking safeguards. For more information about these safeguards, see<br />

“Specifying Dependency Checking Safeguards” on page 47.<br />

Note: <strong>Developer</strong> does not consider document references to schema types to be references,<br />

nor does it consider services invoked within a Java service to be references of the Java<br />

service. For example, if Java service A invokes service B, and you instruct <strong>Developer</strong> to<br />

find references for service A, service B will not appear as a reference of A.<br />

<strong>webMethods</strong> <strong>Developer</strong> User’s <strong>Guide</strong> Version 6.5, Service Pack 3 � � � 65


The processPO<br />

service uses...<br />

...these elements.<br />

The element in bold<br />

italics does not exist in<br />

the Navigation panel<br />

To find references of a selected element<br />

2. Managing Elements in the Navigation Panel<br />

1 In the Navigation panel or in the editor, select the element for which you want to find<br />

references.<br />

2 On the Tools menu, click Find References.<br />

The Find References dialog box displays the references of the element. Unresolved<br />

references are indicated in bold italics.<br />

Find References dialog box<br />

3 After <strong>Developer</strong> finds the references of the selected element, you may do either of the<br />

following:<br />

� To jump to an element in the Navigation panel, select that element in the results<br />

and then click Go To.<br />

� To see all references of a found reference, click next to the item in the results<br />

list.<br />

Inspecting Pipeline References<br />

A pipeline reference is where a Link, Drop, or Set Value pipeline modifier is assigned to a field<br />

in a document reference or document reference list on the Pipeline tab. For example, in its<br />

input signature, ServiceA declares a document reference to the IS document type<br />

PODocument. If ServiceA contains an INVOKE or MAP step in which a field in the document<br />

reference is linked to another pipeline variable, then that link is a pipeline reference. In the<br />

following illustration of the Pipeline tab, the link between PoNum and num is a pipeline<br />

reference.<br />

<strong>webMethods</strong> <strong>Developer</strong> User’s <strong>Guide</strong> Version 6.5, Service Pack 3 � � � 66


This variable is a<br />

reference to the<br />

PODocument in the<br />

Navigation panel.<br />

The link between<br />

PONum and num is a<br />

pipeline reference.<br />

This Drop Value<br />

modifier and...<br />

... this Set Value modifier<br />

are pipeline references.<br />

Pipeline reference<br />

2. Managing Elements in the Navigation Panel<br />

Pipeline references are also those locations where you assign a Set Value modifier or a<br />

Drop Value modifier to a field in a document reference or document reference list. The<br />

following illustration of the Pipeline tab identifies these types of pipeline references.<br />

Examples of pipeline references<br />

When you edit an IS document type, the changes affect any document reference and<br />

document reference list variables defined by that IS document type. The changes might<br />

make pipeline references invalid. For example, suppose the input signature for ServiceA<br />

contains a document reference variable POInfo based on the IS document type PODocument.<br />

The IS document type PODocument contains the field PONum. In the pipeline for ServiceA,<br />

you link the PONum field to another pipeline variable. If you edit the PODocument IS<br />

document type by deleting the PONum field, the pipeline reference (the link) for the field<br />

in the ServiceA pipeline is broken (that is, it is invalid) because the pipeline contains a link<br />

to a field that does not exist.<br />

<strong>webMethods</strong> <strong>Developer</strong> User’s <strong>Guide</strong> Version 6.5, Service Pack 3 � � � 67


2. Managing Elements in the Navigation Panel<br />

When you edit an IS document type, you might want to check all dependent pipeline<br />

modifiers for validity. You can use the Tools�Inspect Pipeline References command to locate<br />

any broken or invalid pipeline references. You can use this command to:<br />

� Search for invalid pipeline references in a selected flow service.<br />

� Search for invalid pipeline references involving document reference and document<br />

reference list variables defined by a selected IS document type.<br />

When inspecting pipeline references, keep the following points in mind:<br />

� You can inspect pipeline references in a selected flow service. You can also inspect<br />

pipeline references for document reference or document reference list variables based<br />

on a selected IS document type. The search results include only flow services,<br />

document reference variables, or document reference list variables that contain<br />

invalid pipeline modifiers.<br />

� Values set at the top level of a document reference or document reference list in the<br />

pipeline are not considered pipeline references. (That is, a Set Value modifier<br />

assigned to the document reference is not a pipeline reference.) Therefore, if a Set<br />

Value modifier assigned to a document reference contains input values for a<br />

nonexistent field, it will not appear in the search results even though it is invalid.<br />

� The search results will not show data type and dimensionality mismatches. For<br />

example, suppose that you link a String named Number to the PONum String list<br />

within the document reference PODocument. This dimensionality mismatch will not<br />

appear in the search results.<br />

� When you inspect pipeline references in a flow service, <strong>Developer</strong> inspects references<br />

across all packages on <strong>webMethods</strong> Integration Server.<br />

� When you inspect pipeline references for an IS document type, you can inspect<br />

references across a specific package or all packages.<br />

To inspect pipeline references<br />

1 In the Navigation panel or in the editor, select the flow service or IS document type<br />

for which you want to find invalid pipeline references.<br />

2 On the Tools menu, click Inspect Pipeline References.<br />

The Inspect Pipeline References dialog box displays all invalid pipeline references for<br />

the selected service or IS document type.<br />

� If you inspected a flow service, the search results contain all of the document<br />

references that have invalid pipeline references in that flow.<br />

� If you inspected an IS document type, the search results contain all of the flow<br />

services that have invalid pipeline references to that IS document type.<br />

<strong>webMethods</strong> <strong>Developer</strong> User’s <strong>Guide</strong> Version 6.5, Service Pack 3 � � � 68


The getData flow<br />

service contains...<br />

...an invalid reference in<br />

its pipeline to the IS<br />

document type po_doc.<br />

Inspect Pipeline References dialog box<br />

2. Managing Elements in the Navigation Panel<br />

3 After <strong>Developer</strong> finds the pipeline references of the selected element, you may do any<br />

of the following:<br />

� To jump to an element in the Navigation panel, select that element in the results<br />

and then click Go To.<br />

� To jump to the unresolved reference in the pipeline, select the element in the<br />

results and then click Find in Flow.<br />

� If the selected element has multiple unresolved references in the same flow<br />

service and you want to automatically jump to the next reference within the<br />

selected element, you can use the Find Next command. To use the Find Next<br />

command, keep the Inspect Pipeline References dialog box open and click Edit �<br />

Find Next.<br />

� If the selected element is a document type and you want to limit the scope of the<br />

search to a specific package, select the package in the Package list and then click<br />

Inspect.<br />

<strong>webMethods</strong> <strong>Developer</strong> User’s <strong>Guide</strong> Version 6.5, Service Pack 3 � � � 69


Caching Elements<br />

2. Managing Elements in the Navigation Panel<br />

You can improve performance in <strong>Developer</strong> by caching Navigation panel elements that<br />

are frequently used. When elements are located in the <strong>Developer</strong> cache, <strong>Developer</strong> does<br />

not need to request them from the Integration Server and can therefore display them more<br />

quickly.<br />

To cache elements<br />

1 On the Tools menu, click Options.<br />

2 In the Options dialog box, click General.<br />

3 Under Navigation Panel, in the Number of elements to cache box, type the number of<br />

elements that you want to cache per <strong>Developer</strong> session. The total number of cached<br />

elements includes elements on all the servers to which you are connected.<br />

The minimum number of elements is 10. The higher the number of elements, the more<br />

likely an element will be in the cache, which reduces network traffic and speeds up<br />

<strong>Developer</strong>.<br />

4 Click OK. The caching settings take effect immediately.<br />

If you enter an illegal cache size <strong>Developer</strong> displays an error and resets the cache size<br />

to the previous value.<br />

Note: Keep in mind that increasing the cache reduces the amount of available memory. If<br />

you experience memory problems, consider decreasing the number of cached elements.<br />

Clearing the <strong>Developer</strong> Cache<br />

When you clear the <strong>Developer</strong> cache, you remove Navigation panel elements from<br />

memory for all servers. The following elements are not removed:<br />

� Flow services with breakpoints (if you want to clear the flow service from the cache,<br />

remove the breakpoint and clear the cache again)<br />

� Flow services that are currently being debugged (for example, if a service has been<br />

stepped into)<br />

� Unsaved elements<br />

Keep in mind that the cache is automatically cleared when you close <strong>Developer</strong> or when<br />

you refresh the session by using the Session�Refresh command.<br />

<strong>webMethods</strong> <strong>Developer</strong> User’s <strong>Guide</strong> Version 6.5, Service Pack 3 � � � 70


To clear the <strong>Developer</strong> cache<br />

2. Managing Elements in the Navigation Panel<br />

1 On the Tools menu, click Options. <strong>Developer</strong> displays the Options dialog box.<br />

2 Click General.<br />

3 Under Navigation Panel, click the Clear Cache button. All cached elements are removed<br />

from memory.<br />

Note: Clearing cached elements from <strong>Developer</strong> is different from clearing the contents of<br />

the pipeline from <strong>webMethods</strong> Integration Server cache. If you want to clear the contents<br />

of the pipeline from a server’s cache, see “Configuring a Service’s Use of Cache” on<br />

page 138.<br />

<strong>webMethods</strong> <strong>Developer</strong> User’s <strong>Guide</strong> Version 6.5, Service Pack 3 � � � 71


2. Managing Elements in the Navigation Panel<br />

<strong>webMethods</strong> <strong>Developer</strong> User’s <strong>Guide</strong> Version 6.5, Service Pack 3 � � � 72


Chapter 3. Working with Packages<br />

� What Is a Package? . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 74<br />

� Package Management . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 74<br />

� Assigning Startup, Shutdown, and Replication Services . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 88<br />

<strong>webMethods</strong> <strong>Developer</strong> User’s <strong>Guide</strong> Version 6.5, Service Pack 3 � � � 73


What Is a Package?<br />

Package Management<br />

3. Working with Packages<br />

A package is a container that is used to bundle services and related elements, such as<br />

specifications, IS document types, IS schemas, and output templates. When you create a<br />

folder, service, specification, IS document type, IS schema, or output template, you save it<br />

in a package.<br />

Packages are designed to hold all of the components of a logical unit in an integration<br />

solution. For example, you might group all the services and files specific to a particular<br />

marketplace in a single package. By grouping these components into a single package,<br />

you can easily manipulate them as a unit. For example, you can copy, reload, distribute, or<br />

delete the set of components (the “package”) with a single action.<br />

Although you can group services using any package structure that suits your purpose,<br />

most sites organize their packages by function or application. For example, they might put<br />

all purchasing-related services in a package called “PurchaseOrderMgt” and all timereporting<br />

services into a package called “TimeCards.”<br />

On the server, a package represents a subdirectory within the<br />

<strong>webMethods</strong>6\IntegrationServer\packages directory. All the components that belong to a<br />

package reside in the package’s subdirectory.<br />

Note: Every element in <strong>webMethods</strong> <strong>Developer</strong> must belong to a package.<br />

For a list and description of packages installed with the Integration Server, see the<br />

<strong>webMethods</strong> Integration Server Administrator’s <strong>Guide</strong>.<br />

You can use <strong>webMethods</strong> <strong>Developer</strong> to perform certain package management tasks, such<br />

as creating, copying, and deleting packages, on the Integration Server. When you perform<br />

a package management task, all of the files and services in the package are affected.<br />

The following table identifies all of the package management tasks that can be performed<br />

using <strong>Developer</strong> or the Integration Server Administrator. If you can perform the task with<br />

<strong>Developer</strong>, the See column directs you to a page within this guide for instructions. For<br />

tasks that can only be performed using the Integration Server Administrator, the See<br />

column directs you to the <strong>webMethods</strong> Integration Server Administrator’s <strong>Guide</strong>.<br />

To... See...<br />

Create a package page 76<br />

Activate a package <strong>webMethods</strong> Integration Server<br />

Administrator’s <strong>Guide</strong><br />

Copy a package to another server page 78<br />

<strong>webMethods</strong> <strong>Developer</strong> User’s <strong>Guide</strong> Version 6.5, Service Pack 3 � � � 74


To... See...<br />

View details for a package page 77<br />

Display specific packages by filtering the<br />

Packages List<br />

Document the purpose and function of a<br />

package<br />

<strong>webMethods</strong> Integration Server<br />

Administrator’s <strong>Guide</strong><br />

page 80<br />

3. Working with Packages<br />

View the patch history for a package page 83 and<br />

<strong>webMethods</strong> Integration Server<br />

Administrator’s <strong>Guide</strong><br />

Assign startup, shutdown, or replication page 88<br />

services to a package<br />

Reload the services and files in a package<br />

into memory without restarting the server<br />

page 81 and<br />

<strong>webMethods</strong> Integration Server<br />

Administrator’s <strong>Guide</strong><br />

Delete the contents of a package page 81 and<br />

<strong>webMethods</strong> Integration Server<br />

Administrator’s <strong>Guide</strong><br />

Assign a version number to a package page 83 and<br />

<strong>webMethods</strong> Integration Server<br />

Administrator’s <strong>Guide</strong><br />

Identify packages that must be loaded page 85<br />

before a specific package is loaded (package<br />

dependencies)<br />

Export a package or partial package page 82<br />

Replicate or copy the contents of a package<br />

and send (publish) it to other Integration<br />

Servers<br />

Disable a package without deleting the<br />

package<br />

Enable a package that you previously<br />

disabled<br />

Recover services and related files from a<br />

deleted package<br />

Archive a copy of the package (such as for a<br />

backup copy)<br />

page 78 and<br />

<strong>webMethods</strong> Integration Server<br />

Administrator’s <strong>Guide</strong><br />

<strong>webMethods</strong> Integration Server<br />

Administrator’s <strong>Guide</strong><br />

<strong>webMethods</strong> Integration Server<br />

Administrator’s <strong>Guide</strong><br />

<strong>webMethods</strong> Integration Server<br />

Administrator’s <strong>Guide</strong><br />

<strong>webMethods</strong> Integration Server<br />

Administrator’s <strong>Guide</strong><br />

<strong>webMethods</strong> <strong>Developer</strong> User’s <strong>Guide</strong> Version 6.5, Service Pack 3 � � � 75


Creating a Package<br />

3. Working with Packages<br />

When you want to create a new grouping for services and related files, create a package.<br />

Packages can store services, specifications, IS document types, output templates, and<br />

schemas.<br />

When you create a package, <strong>Developer</strong> creates a new subdirectory for the package in the<br />

file system on the machine where the Integration Server is installed. For information<br />

about the subdirectory and its contents, see the <strong>webMethods</strong> Integration Server<br />

Administrator’s <strong>Guide</strong>.<br />

<strong>Guide</strong>lines for Naming Packages<br />

Keep the following guidelines in mind when naming new packages:<br />

� Start all package names with an uppercase letter and capitalize the first letter of<br />

subsequent words (for example, PurchaseOrder).<br />

� Keep package names short. Use abbreviations instead of full names. For example,<br />

instead of ProcessPurchaseOrder, use ProcessPO.<br />

� Make sure the package name describes the functionality and purpose of the services it<br />

contains.<br />

� Avoid creating package names with random capitalization (for example,<br />

cOOLPkgTest).<br />

� Avoid using articles (for example, “a,” “an,” and “the”) in the package name. For<br />

example, instead of TestTheService, use TestService.<br />

� Avoid using the prefix “Wm”. <strong>Developer</strong> uses the “Wm” prefix for predefined<br />

packages that contain services, IS document types, and other files.<br />

To create a package<br />

1 On the File menu, click New.<br />

2 In the New dialog box, select Package, and then click Next.<br />

<strong>Developer</strong> displays the New Package dialog box.<br />

3 In the Name field, type the name for the new package using any combination of letters,<br />

numbers, and the underscore character. Click Finish.<br />

<strong>Developer</strong> refreshes the Navigation panel and displays the new package.<br />

<strong>webMethods</strong> <strong>Developer</strong> User’s <strong>Guide</strong> Version 6.5, Service Pack 3 � � � 76


3. Working with Packages<br />

Note: Avoid using control characters and special characters like periods (.) in a<br />

package name. The watt.server.illegalNSChars setting in the server.cnf file (which is<br />

located in the <strong>webMethods</strong>6\IntegrationServer\config directory) defines all the<br />

characters that you cannot use when naming packages. Additionally, the operating<br />

system on which you run the Integration Server might have specific requirements that<br />

limit package names.<br />

Tip! You can quickly create a package beneath the server you are currently working with<br />

by clicking next to the New button on the toolbar and then clicking Package. Type the<br />

name of the package and then click OK.<br />

You can then create a folder beneath the package by clicking next to the New button<br />

and then clicking Folder. <strong>Developer</strong> adds the folder beneath the package, with a default<br />

name of Untitled.<br />

Viewing Details for a Package<br />

Double-clicking a package in the Navigation panel expands or collapses the contents of<br />

that package. To view details for a package in the editor, perform the steps in the<br />

following procedure.<br />

To view details for a package<br />

1 Select the packages whose details you want to view.<br />

2 On the File menu, click Open.<br />

For more information about package details, see “Assigning a Version Number to a<br />

Package” on page 83, “Viewing the Patch History for a Package” on page 83, and<br />

“Identifying Package Dependencies” on page 85.<br />

Optimizing Lock Checking<br />

If the <strong>Developer</strong>’s Version Control System (VCS) Integration feature is enabled, <strong>Developer</strong><br />

might exhibit slowdowns, error messages (such as "Server version has changed" and<br />

"Session already in use"), and may stop responding completely when you expand a large<br />

element (such as a folder) or a large package in the Navigation panel. This condition<br />

occurs when <strong>Developer</strong> queries the Integration Server to check the lock state of each<br />

element in a package.<br />

<strong>webMethods</strong> <strong>Developer</strong> User’s <strong>Guide</strong> Version 6.5, Service Pack 3 � � � 77


To optimize lock checking<br />

3. Working with Packages<br />

1 Open the file ..\<strong>webMethods</strong>6\<strong>Developer</strong>\config\developer.cnf with<br />

a text editor.<br />

2 Add the following properties to the file:<br />

dev.maxServerLockInfoCalls=<br />

Defines the maximum number of lock state queries that will be made from <strong>Developer</strong><br />

to Integration Server. The default value is 20. After this maximum is reached, cached<br />

values are retrieved for each element. These cached values may be inaccurate, but the<br />

only result is that menu items may be enabled or disabled incorrectly.<br />

dev.maxLockInfoCalls=<br />

Defines the maximum number of cached lock states that are retrieved. The default<br />

value is 100. After this maximum is reached, the last known lock state for each<br />

remaining element is used. This state may be incorrect, but as above, the only result is<br />

that menu items may be enabled or disabled incorrectly.<br />

For example, when a large package is opened (using the default values): Full lock<br />

status information will be retrieved for the first 20 elements. For elements 21-100,<br />

cached lock state information will be retrieved. For elements 101 and above, the last<br />

known lock state will be used.<br />

3 Save the file.<br />

4 Shut down and restart <strong>Developer</strong>.<br />

Note: The lower the values for these settings, the more the performance will improve.<br />

Applying a value of zero (0) to these settings will eliminate all lock state queries to the<br />

server. This may result in some temporarily out-of-sync lock states, but these will be<br />

updated during normal <strong>Developer</strong> operations.<br />

Lock state information is updated as child elements are opened in the Navigation panel.<br />

Copying a Package to Another Server<br />

You can copy a package to another Integration Server in one of two ways:<br />

� From <strong>Developer</strong>. You can copy a package and its contents to another Integration Server<br />

from within <strong>Developer</strong> by performing a copy or a drag-and-drop action. Copying<br />

packages using either of these methods provides a quick way to share a set of services<br />

and their supporting files with other developers in a development environment.<br />

� From Integration Server Administrator. You can also copy a package from within the<br />

Integration Server Administrator by replicating the package. You can then send, or<br />

publish, the package to other Integration Servers. Copying packages using this<br />

method allows you to customize the way in which packages are replicated and<br />

<strong>webMethods</strong> <strong>Developer</strong> User’s <strong>Guide</strong> Version 6.5, Service Pack 3 � � � 78


3. Working with Packages<br />

published. This method is useful for managing releases between development and<br />

production environments, for deploying releases to partners or customers, or for<br />

distributing package updates to developers working in large, collaborative<br />

environments.<br />

For information about replicating packages and managing releases from within<br />

Integration Server Administrator, see the <strong>webMethods</strong> Integration Server Administrator’s<br />

<strong>Guide</strong>.<br />

When copying packages, keep the following points in mind.<br />

� You can copy a package to a different server only if you are a member of a group<br />

assigned to the Replicators ACL on the source and destination servers and you are<br />

logged on to both servers.<br />

� Before you copy a package that contains elements with unsaved changes, you must<br />

save the changes.<br />

� You cannot undo a copy action using the Edit�Undo command.<br />

� You cannot copy a package to another server if the destination server already contains<br />

a package with that name.<br />

Note: Because UNIX directories are case sensitive, Integration Servers running in a<br />

UNIX environment will allow packages with similar names to reside on the same<br />

server. For example, you can copy a package named orderProcessing to a server that<br />

contains a package named OrderProcessing.<br />

� If you copy a package that depends on other packages to load (that is, contains<br />

package dependencies), and the required packages are not present on the destination<br />

server, the package will be copied but it will not be enabled.<br />

For more information about setting package dependencies, see “Identifying Package<br />

Dependencies” on page 85.<br />

For more information about copying elements within a package, see Chapter 2,<br />

“Managing Elements in the Navigation Panel”.<br />

To copy a package<br />

1 Select the package that you want to copy.<br />

2 On the Edit menu, click Copy.<br />

3 If the package you want to copy contains elements with unsaved changes, <strong>Developer</strong><br />

alerts you that the package cannot be copied until you save the changes. Click OK to<br />

close the alert dialog box. Then, save the changes and repeat the copy action.<br />

<strong>webMethods</strong> <strong>Developer</strong> User’s <strong>Guide</strong> Version 6.5, Service Pack 3 � � � 79


4 Select the server where you want to copy the package.<br />

5 On the Edit menu, click Paste After.<br />

3. Working with Packages<br />

Tip! You can also copy packages by clicking them and dragging them to their new location.<br />

<strong>Developer</strong> retains a copy of the package and its contents on the source server.<br />

Documenting a Package<br />

You can communicate the purpose and function of a package and its services to other<br />

developers by documenting the package.<br />

To create documentation for a package<br />

1 Document the package in one or more Web documents (such as HTML pages). Be<br />

sure to name the home page for the package documentation index.html. The<br />

index.html file can contain links to the other Web documents for the package. An<br />

index.html file exists for each package installed by the Integration Server.<br />

2 Place the documents in the pub subdirectory for the package on the Integration<br />

Server.<br />

For example, place the package documentation for a package named<br />

“PurchaseOrders” in the following directory:<br />

<strong>webMethods</strong>6\IntegrationServer\packages\PurchaseOrders\pub<br />

Tip! An alternate location for package documentation is the<br />

<strong>webMethods</strong>6\IntegrationServer\packages\doc directory. Typically, this directory is<br />

used for reference material such as PDFs that do not need to be published to the Web.<br />

To access documentation for a package<br />

� Enter the URL for the package documentation. The URLs for package documentation<br />

have the following format:<br />

http://serverName:port/PackageName/DocumentName<br />

where:<br />

serverName:port is the name and port address of the Integration Server on which<br />

the package resides.<br />

<strong>webMethods</strong> <strong>Developer</strong> User’s <strong>Guide</strong> Version 6.5, Service Pack 3 � � � 80


Reloading a Package<br />

3. Working with Packages<br />

PackageName is the name of the package for which you want documentation.<br />

DocumentName is the name of the Web document you want to access. If you do<br />

not specify a DocumentName, the Integration Server<br />

automatically displays the index.html file.<br />

Sometimes, you need to reload a package on the server to activate changes that have been<br />

made to it outside of <strong>Developer</strong>. You need to reload a package if any of the following<br />

occurs:<br />

� A Java service that was compiled using jcode is added to the package.<br />

� New jar files are added to the package.<br />

� Any of the configuration files for the package are modified.<br />

Note: Reloading a package is not the same as refreshing the Navigation panel. When you<br />

refresh the Navigation panel, <strong>webMethods</strong> <strong>Developer</strong> retrieves a fresh copy of the<br />

contents of all the packages from the memory the Integration Server. When you reload a<br />

package, the Integration Server removes the existing package information from memory<br />

and loads new versions of the package and its contents into its memory.<br />

To reload a package<br />

1 In the Navigation panel, select the package you want to reload.<br />

2 On the File menu, click Reload Package.<br />

Deleting a Package<br />

When you no longer need the services and files in a package, you can delete the package.<br />

Deleting a package removes the package and all of its contents from the Navigation panel.<br />

When you delete a package from <strong>Developer</strong>, the Integration Server saves a copy of the<br />

package. If you later want to recover the package and its contents, contact your server<br />

administrator. Only Integration Server Administrator users can recover a package. For<br />

more information about recovering packages, see the <strong>webMethods</strong> Integration Server<br />

Administrator’s <strong>Guide</strong>.<br />

<strong>webMethods</strong> <strong>Developer</strong> User’s <strong>Guide</strong> Version 6.5, Service Pack 3 � � � 81


Before you delete a package, make sure that:<br />

3. Working with Packages<br />

� Other users or other services do not use (depend on) the services, templates, IS<br />

document types, and schemas in the package. You can use the Find Dependents<br />

command to identify other services that are dependent on a service in a package that<br />

you want to delete. For more information, see “Finding Dependents and References”<br />

on page 63.<br />

� All elements in the package that you want to delete are unlocked, or locked by you. If<br />

the package contains elements that are locked by others or system locked, you cannot<br />

delete the package.<br />

To delete a package<br />

1 In the Navigation panel, select the package you want to delete.<br />

2 On the Edit menu, click Delete.<br />

Exporting a Package or Element<br />

Packages or parts of a package, such as a folder, can be exported to your hard drive so that<br />

they can be shared with partners or developers. You can install an exported package on<br />

another server by using the package publishing functionality in the Integration Server<br />

Administrator. Locking information is not exported.<br />

To export a package<br />

1 In the Navigation panel, select the package you want to export.<br />

2 On the File menu, click Export. <strong>Developer</strong> displays the Export To dialog box.<br />

3 Select the location on your hard drive where you want the exported package to reside.<br />

Click Save.<br />

This exports the package to a ZIP file and saves it on your hard drive. The ZIP file can<br />

then be published on another server.<br />

To export an element<br />

1 In the Navigation panel, select the folder or element that you want to export.<br />

2 On the File menu, click Export. <strong>Developer</strong> displays the Export To dialog box.<br />

3 Select the location on your hard drive where you want the exported partial package to<br />

reside. Click Save.<br />

This exports the folder or element to a ZIP file and saves it on your hard drive. The<br />

ZIP file can then be unzipped into the ns directory of a package on the server.<br />

<strong>webMethods</strong> <strong>Developer</strong> User’s <strong>Guide</strong> Version 6.5, Service Pack 3 � � � 82


Assigning a Version Number to a Package<br />

3. Working with Packages<br />

You can assign a version number to a package to identify different versions of the<br />

package. For example, you might want to assign a new version number to a package when<br />

you add new services to the package or after you fix bugs in a package. You might find<br />

assigning version numbers especially helpful if you work in a development environment<br />

where more than one person makes changes to a package.<br />

By default, <strong>Developer</strong> assigns the version number 1.0 to each package that you create.<br />

Important! When you change the version number of a package, make sure that you update<br />

the package dependencies for other packages that depend on the earlier version of this<br />

package.<br />

Tip! Assign and change package version numbers through <strong>Developer</strong> only when the<br />

packages are in a development stage. To avoid difficulties installing package releases, do<br />

not change version numbers on packages you receive from trading partners, packages to<br />

which you subscribe, or packages installed with the Integration Server.<br />

To assign a version number to a package<br />

1 In the Navigation panel, select the package to which you want to assign a version<br />

number.<br />

2 On the File menu, click Open.<br />

3 In the editor, click the package’s Settings tab.<br />

4 In the Package Version field, type the version number you want to assign to the<br />

package. Be sure to format the version number in one of the following ways: X.X or<br />

X.X.X (for example, 1.0, 2.1, 2.1.3, or 3.1.2).<br />

5 On the File menu, click Save to save your changes.<br />

If the version number you entered does not use one of the formats specified in step 4,<br />

<strong>Developer</strong> displays a message stating that the format is not correct.<br />

Note: You can also use the Integration Server Administrator to assign version numbers to<br />

packages. For more information, see the <strong>webMethods</strong> Integration Server Administrator’s<br />

<strong>Guide</strong>.<br />

Viewing the Patch History for a Package<br />

For each package, <strong>Developer</strong> tracks and displays the history of installed patches. A patch<br />

is a partial upgrade, change, or fix to the contents of a package.<br />

<strong>webMethods</strong> <strong>Developer</strong> User’s <strong>Guide</strong> Version 6.5, Service Pack 3 � � � 83


These fields display<br />

information about the<br />

currently installed patch...<br />

...and these fields track<br />

the patch history for the<br />

package.<br />

You might want to check a package’s patch history for the following reasons:<br />

3. Working with Packages<br />

� To avoid overwriting the installed package with a lower version of the same package.<br />

� To view the changes that are included in each version of the package.<br />

� To inform <strong>webMethods</strong> Customer Care which versions of predefined packages are<br />

installed on your Integration Server.<br />

When you open a package in the editor, the package’s Settings tab displays the patch<br />

history since the last full release of the package. (A full release of a package incorporates<br />

all previous patches for the package.)<br />

The Settings tab displays patch history for the package<br />

Note: With the exception of the Package version field and the fields under Package<br />

dependencies, the fields on the Settings tab are display-only.<br />

Note: When the server administrator installs a full release of a package (a release that<br />

includes all previous patches for the package), the Integration Server removes the existing<br />

patch history. This helps the server administrator avoid potential confusion about version<br />

numbers and re-establish a baseline for package version numbers.<br />

<strong>webMethods</strong> <strong>Developer</strong> User’s <strong>Guide</strong> Version 6.5, Service Pack 3 � � � 84


To view patch history for a package<br />

3. Working with Packages<br />

1 In the Navigation panel, select the package for which you want to view a patch<br />

history.<br />

2 On the File menu, click Open.<br />

3 In the editor, click the package’s Settings tab and review the fields under Patch history.<br />

This field... Specifies...<br />

Name The name of the package.<br />

Version The version number of the package. A user assigns a version<br />

number when they create a package release. By default, <strong>Developer</strong><br />

assigns version 1.0 to a new package.<br />

Build The build number of the package. The build number is a<br />

generation number that a user assigns to a package each time the<br />

package is released. For example, a user might release version 1.0<br />

of the “Finance” package ten times and assign build numbers<br />

1,2,3…10 to the different releases or builds of the package.<br />

The Build number is not the same as the Version number. One<br />

version of a package might have multiple builds.<br />

Description A brief description of the package written by the user who created<br />

the package release.<br />

Time The time at which the package release (patch) was created.<br />

JVM Number The version of the JVM (Java virtual machine) required to run the<br />

package.<br />

Publisher The name of the publishing server that created the package release.<br />

Patch Number The patch numbers included in this release of the package.<br />

Identifying Package Dependencies<br />

If a package needs the services in another package to load before it can load, you must set<br />

up package dependencies. For example, you should identify package dependencies if a<br />

startup service for a package invokes a service in another package. The startup service<br />

cannot execute if the package containing the invoked service has not yet loaded.<br />

You should also identify package dependencies if Java services in a package need to access<br />

Java classes contained in another package.<br />

When you identify a package dependency, you must indicate the version number of the<br />

package that needs to load first. For example, the “Finance” package might depend on<br />

version 2.0 of the “FinanceUtil” package. It is possible that the services and elements<br />

<strong>webMethods</strong> <strong>Developer</strong> User’s <strong>Guide</strong> Version 6.5, Service Pack 3 � � � 85


3. Working with Packages<br />

needed by a dependent package are contained in more than one version of the same<br />

package. For example, the “Finance” package might depend on version 2.0 or later of the<br />

“FinanceUtil” package.<br />

Important! If you create new adapter services and adapter notifications, you should save<br />

them in packages that identify the <strong>webMethods</strong> AdapterName package as a package<br />

dependency.<br />

Important! Other <strong>webMethods</strong> components might include packages that register new types<br />

of elements in <strong>Developer</strong>. You should save instances of these new element types in<br />

packages that list the registering package as a package dependency. The registering<br />

package needs to load before your packages so that <strong>Developer</strong> can recognize instances of<br />

the new element type. For example, if you create new flat file schemas, you should save<br />

the flat file schemas in packages that identify the WmFlatFile package as a package<br />

dependency.<br />

To identify package dependencies for a package<br />

1 In the Navigation panel, select the package for which you want to specify package<br />

dependencies.<br />

2 On the File menu, click Open.<br />

3 In the editor, click the package’s Settings tab.<br />

4 Under Package Dependencies, click .<br />

5 In the Enter Input Values dialog box, enter the following information:<br />

<strong>webMethods</strong> <strong>Developer</strong> User’s <strong>Guide</strong> Version 6.5, Service Pack 3 � � � 86


In this field... Specify...<br />

6 Click OK.<br />

7 On the File menu, click Save.<br />

Removing Package Dependencies<br />

3. Working with Packages<br />

Package The name of the package you want Integration Server to load<br />

before the package selected in the Navigation panel.<br />

Version The version number you want Integration Server to load before the<br />

package selected in the Navigation panel.<br />

More than one version of the same package might contain the<br />

services and elements that a dependent package needs the<br />

Integration Server to load first. You can use an asterisk (*) as a<br />

wildcard in the version number to indicate that any version<br />

number greater than or equal to the specified version will satisfy<br />

the package dependency. For example, to specify version 3.0 or<br />

later of a package, type 3.* for the version number. To specify<br />

versions 3.1 or later, type 3.1.* for the version number.<br />

If any version of the package satisfies the package dependency,<br />

type *.* as the version number.<br />

Important! Only one version of a package can be installed at one time. If the available<br />

version of the package specified in the package dependency is not the correct version, the<br />

Integration Server does not load the dependent package. The Integration Server writes a<br />

dependency load error for the dependent package to the server log.<br />

Important! Make sure that you do not create circular package dependencies. For example, if<br />

you identify “FinanceUtil” as a dependent package for the “Finance” package, do not<br />

identify “Finance” as a dependent package for the “FinanceUtil” package. If you create<br />

circular package dependencies, neither package will load the next time you start the<br />

Integration Server.<br />

Use the following procedure to remove a package dependency that is no longer needed.<br />

For example, to continue the example from page 85, if you delete the service in “Finance”<br />

that invokes the service in “FinanceUtil,” then you would no longer need a package<br />

dependency on the “FinanceUtil” package. Another case where you would remove the<br />

package dependency is if you move the services in the “FinanceUtil” package into the<br />

“Finance” package.<br />

<strong>webMethods</strong> <strong>Developer</strong> User’s <strong>Guide</strong> Version 6.5, Service Pack 3 � � � 87


To remove a package dependency<br />

3. Working with Packages<br />

1 In the Navigation panel, select the package for which you want to remove a package<br />

dependency.<br />

2 On the File menu, click Open.<br />

3 In the editor, click the package’s Settings tab.<br />

4 Under Package Dependencies, select the package dependency you want to remove.<br />

5 Click .<br />

6 On the File menu, click Save.<br />

Assigning Startup, Shutdown, and Replication Services<br />

You can set up services to automatically execute each time Integration Server loads,<br />

unloads, or replicates a package. These types of services are called startup, shutdown, or<br />

replication services.<br />

What Is a Startup Service?<br />

A startup service is one that Integration Server automatically executes when it loads a<br />

package into memory. The server loads a package:<br />

� At server initialization (if the package is enabled).<br />

� When someone uses <strong>Developer</strong> or the Integration Server Administrator to reload a<br />

package.<br />

� When someone uses <strong>Developer</strong> or the Integration Server Administrator to enable a<br />

package.<br />

Startup services are useful for generating initialization files or assessing and preparing<br />

(for example, setting up or cleaning up) the environment before the server loads a<br />

package. However, you can use a startup service for any purpose.<br />

Tip! If a startup service invokes a service in another package, make sure to identify the<br />

other package as a package dependency for the package containing the startup service.<br />

<strong>webMethods</strong> <strong>Developer</strong> User’s <strong>Guide</strong> Version 6.5, Service Pack 3 � � � 88


What Is a Shutdown Service?<br />

3. Working with Packages<br />

A shutdown service is one that the Integration Server automatically executes when it<br />

unloads a package from memory. The server unloads a package from memory:<br />

� At server shutdown or restart.<br />

� When someone uses the Integration Server Administrator to disable the package.<br />

� When someone uses the Integration Server Administrator to reload a package before<br />

it is removed from memory.<br />

Shutdown services are useful for executing clean-up tasks such as closing files and<br />

purging temporary data. You could also use them to capture work-in-progress or state<br />

information before a package unloads.<br />

What Is a Replication Service?<br />

A replication service is one that Integration Server automatically executes when it<br />

prepares to replicate a package. A replication service executes when the Integration Server<br />

Administrator creates a package release (full release or patch) or creates a package<br />

archive.<br />

Replication services provide a way for a package to persist state or configuration<br />

information so that these are available when the published package is activated on the<br />

remote server.<br />

Note: The term replication service does not refer to the services contained in pub.replicator or<br />

to services that subscribe to replication events (replication event services).<br />

<strong>Guide</strong>lines for Assigning Startup, Shutdown, and<br />

Replication Services<br />

Keep the following guidelines in mind when assigning startup, shutdown, and replication<br />

services to packages:<br />

� When you assign a startup or shutdown service to a package, you can only assign a<br />

service that resides in the same package. For example, a startup service for the<br />

“Finance” package must be located in the “Finance” package.<br />

� When you assign a replication service to a package, you can assign any service from<br />

any loaded package on Integration Server, including the current package.<br />

<strong>webMethods</strong> <strong>Developer</strong> User’s <strong>Guide</strong> Version 6.5, Service Pack 3 � � � 89


3. Working with Packages<br />

� Because services in a package are not made available to clients until the package’s<br />

startup services finish executing, you should avoid implementing startup services<br />

that access busy remote servers. They will delay the availability of other services in<br />

that package.<br />

� You can assign one or more startup services to a package; however, you cannot<br />

specify the order in which the services execute. If you have a series of startup services<br />

that need to execute in a specific order, create a “wrapper” service that invokes all the<br />

startup services in the correct order. Designate the “wrapper” service as the startup<br />

service for the package.<br />

Assigning Startup, Shutdown, and Replication Services<br />

Use the following procedure to identify startup, shutdown, and replication services.<br />

To assign startup, shutdown, and replication services<br />

1 In the Navigation panel, select the package to which you want to assign startup,<br />

shutdown, or replication services.<br />

2 On the File menu, click Open.<br />

3 In the editor, click the package’s Startup/Shutdown/Replication Services tab.<br />

4 To assign a startup service, under Startup services, select the service from the Available<br />

Services list, and click .<br />

Repeat this step for each service you want to add as a startup service for the package.<br />

Note: A service that you just created does not appear in the Available Services list if you<br />

have not refreshed your session on the server since you created the service.<br />

5 To add a shutdown service, under Shutdown services, select the service from the<br />

Available Services list, and click .<br />

Repeat this step for each service you want to add as a shutdown service for the<br />

package.<br />

6 To add a replication service, do the following:<br />

a Under Replication Services, click .<br />

b In the Enter Input Values dialog box, in the Service field, do one of the following:<br />

� Type the service name in the format: folderName:serviceName<br />

� Click to navigate to and select the service that you want to use as a<br />

replication service.<br />

<strong>webMethods</strong> <strong>Developer</strong> User’s <strong>Guide</strong> Version 6.5, Service Pack 3 � � � 90


c Click OK.<br />

3. Working with Packages<br />

d Repeat these steps for each service you want to add as a replication service.<br />

Removing Startup, Shutdown, and Replication Services<br />

You might need to remove a startup, shutdown, or replication service if the service is no<br />

longer needed, has been deleted, or has been incorporated into another service (such as a<br />

wrapper service).<br />

Tip! If you remove a startup service that invoked a service in another package and the<br />

package was identified as a package dependency, make sure you remove the package<br />

dependency after you remove the startup service.<br />

To remove startup, shutdown, and replication services<br />

1 In the Navigation panel, select the package for which you want to remove startup,<br />

shutdown, or replication services.<br />

2 On the File menu, click Open.<br />

3 In the editor, click the package’s Startup/Shutdown/Replication Services tab.<br />

4 Do one or more of the following:<br />

� To remove a startup service, under Startup services, select the service you want to<br />

remove from Selected services list, and click .<br />

� To remove a shutdown service, under Shutdown services, select the service you<br />

want to remove from the Selected services list, and click .<br />

� To remove a replication service, under Replication services, select the replication<br />

service you want to remove and click .<br />

<strong>webMethods</strong> <strong>Developer</strong> User’s <strong>Guide</strong> Version 6.5, Service Pack 3 � � � 91


3. Working with Packages<br />

<strong>webMethods</strong> <strong>Developer</strong> User’s <strong>Guide</strong> Version 6.5, Service Pack 3 � � � 92


Chapter 4. Locking and Unlocking Elements<br />

� Basic Concepts . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 94<br />

� Locking Elements . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 95<br />

� Unlocking Elements . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 100<br />

� Troubleshooting . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 105<br />

� Frequently Asked Questions . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 107<br />

<strong>webMethods</strong> <strong>Developer</strong> User’s <strong>Guide</strong> Version 6.5, Service Pack 3 � � � 93


Basic Concepts<br />

4. Locking and Unlocking Elements<br />

In <strong>webMethods</strong> <strong>Developer</strong>, you can manage changes to elements during development by<br />

locking them. This prevents two different users from editing an element at the same time.<br />

You can lock elements such as flow services, Java services, schemas, and specifications.<br />

All elements in <strong>Developer</strong>’s Navigation panel are read-only until you lock them. You can<br />

edit an element only if you own the lock on the element. However, you can use and run a<br />

service regardless of its lock status, as long as you have Execute access to the service. For<br />

details, see Chapter 5, “Assigning and Managing Permissions”.<br />

This chapter describes local locking on the Integration Server, which is the default locking<br />

mode of <strong>Developer</strong>. If you enable <strong>Developer</strong>’s VCS Integration feature, elements are<br />

locked and unlocked when you check them out of or into your version control system<br />

repository. For more information about implementing and using the VCS Integration<br />

feature, see the <strong>webMethods</strong> Version Control System Integration Feature <strong>Developer</strong>’s <strong>Guide</strong> in<br />

the ..\<strong>webMethods</strong>6\<strong>Developer</strong>\doc\guides directory.<br />

What Is a Lock?<br />

A lock on an element prevents another user from editing that element. There are two<br />

types of locks: user locks and system locks. When an element is locked by you, you have a<br />

user lock. The element is read-only to all other users on the Integration Server. Another<br />

user cannot edit the element until you unlock it.<br />

When an element’s supporting files (node.xml, for example) are marked read-only on the<br />

Integration Server, the element is system locked. For example, the server administrator has<br />

the ability to mark an element’s supporting files on the server as read-only, in which case<br />

they are system locked. To edit the element, you must ask the server administrator to<br />

remove the system lock (that is, make the element’s files writable), and then you must<br />

reload the package in which the element resides.<br />

Important! When an Integration Server has the VCS Integration feature enabled, system<br />

locking is effectively disabled for elements that are checked into the version control<br />

system. The VCS Integration feature will override any read/write status changes applied<br />

manually by a server administrator.<br />

Elements are shown in the following ways in <strong>Developer</strong>:<br />

Element Status Can I edit? How do I gain rights to edit?<br />

Not locked No Click File�Lock for Edit.<br />

Locked by you Yes N/A<br />

<strong>webMethods</strong> <strong>Developer</strong> User’s <strong>Guide</strong> Version 6.5, Service Pack 3 � � � 94


Locking Elements<br />

How Do I Know Who Has an Element Locked?<br />

4. Locking and Unlocking Elements<br />

Element Status Can I edit? How do I gain rights to edit?<br />

Locked by another user No Contact the user to unlock.<br />

Locked by the system No Contact the server<br />

administrator to unlock.<br />

On every element in the Navigation panel, you can view the lock status by using the Lock<br />

Status command. This command provides information about the element such as the<br />

username of the person who owns the lock and when they locked it. If an element is<br />

system locked, you can also use the Lock Status command to obtain the names of the server<br />

files that are read-only on the server. For details, see “Viewing the Status of Locked<br />

Elements” on page 98 and “Viewing an Element’s Corresponding Server Files” on<br />

page 103.<br />

When Do I Lock an Element?<br />

You lock an element when you want to make changes to the element. For details, see<br />

“Locking Elements” on page 96.<br />

When Do I Unlock an Element?<br />

You unlock an element after making your changes and saving those changes to the server.<br />

It is important to unlock the elements you are done with so that other users on the server<br />

can access them. For details, see “Unlocking Elements” on page 100.<br />

If you want to automatically unlock an element after saving it, you can enable a setting on<br />

the Options dialog box. For details, see “Automatically Unlocking Elements After Saving”<br />

on page 104.<br />

Before you edit an element, you must lock it. This ensures that you are the only person<br />

working on a particular element at a time, preventing the loss of changes. Elements can<br />

only be locked by one user at a time. If the element you need is already locked, request<br />

that the current owner of the lock release it. If the element is system locked, request that<br />

the server administrator release it by making the corresponding server files writable.<br />

<strong>webMethods</strong> <strong>Developer</strong> User’s <strong>Guide</strong> Version 6.5, Service Pack 3 � � � 95


Locking Elements<br />

4. Locking and Unlocking Elements<br />

Elements are locked by <strong>webMethods</strong> username (the name you use to log on to the<br />

Integration Server). Because of this, it is important that you use a distinct username to log<br />

on to the server. If you change usernames, you will be unable to edit or unlock items that<br />

you locked using your old username.<br />

When locking elements, keep the following points in mind:<br />

� When you create a new element, it is locked automatically for you.<br />

� In order to lock an element, you must have Write access rights to it. For details, see<br />

Chapter 5, “Assigning and Managing Permissions”.<br />

� When you lock an element, <strong>Developer</strong> obtains and locks the latest version of the<br />

element that has been saved on the <strong>webMethods</strong> Integration Server.<br />

� Elements generated by a service (including an adapter service) are not locked<br />

automatically.<br />

� When you select multiple elements to lock, some elements in the selection may not be<br />

available to lock because they may be system locked, locked by another user, elements<br />

to which you do not have Write access, or elements that cannot directly be locked.<br />

<strong>Developer</strong> will notify you that these elements cannot be locked and will lock the rest.<br />

� When you lock an adapter notification, <strong>Developer</strong> also locks its associated publishable<br />

document type. You cannot directly lock the publishable document type associated<br />

with an adapter notification.<br />

� When you lock a folder or package, you only lock existing, unlocked elements within<br />

it. Other users can still create new elements in that folder or package.<br />

Note: Users cannot create Java and C/C++ services in a folder or package while other<br />

users own the lock on the folder or package. These types of services require that all<br />

existing Java and C/C++ services in the folder are unlocked and the user has Write<br />

access to all Java and C/C++ services in the folder. For details, see “Locking Java and<br />

C/C++ Services” on page 97.<br />

� When you lock a Java or C/C++ service, <strong>Developer</strong> locks all other Java or C/C++<br />

services within the folder. For details, see “Locking Java and C/C++ Services” on<br />

page 97.<br />

� You cannot lock a listener or connection element.<br />

To lock elements<br />

1 In the Navigation panel, select the elements that you want to lock.<br />

2 On the File menu, click Lock for Edit.<br />

<strong>webMethods</strong> <strong>Developer</strong> User’s <strong>Guide</strong> Version 6.5, Service Pack 3 � � � 96


4. Locking and Unlocking Elements<br />

If the elements were successfully locked, a green check mark appears next to their<br />

icons in the Navigation panel. If one or more of the elements could not be locked (for<br />

example, if they are system locked, locked by another user, or elements to which you<br />

do not have Write access), <strong>Developer</strong> displays a dialog box listing them. For<br />

information about troubleshooting lock problems, see “Lock/Unlock Problems” on<br />

page 105.<br />

Tip! You can also lock an element that is open in the editor by right-clicking the element’s<br />

tab or title bar and then clicking Lock for Edit.<br />

Locking Java and C/C++ Services<br />

When you lock Java and C/C++ services, there are special considerations to keep in mind.<br />

� Locking and unlocking actions on Java and C/C++ services are folder-wide. All Java and C/C++<br />

services in a folder share the same .java and .class files on the Integration Server.<br />

These files, located in the \code subdirectory of a package, correspond to all services<br />

(except flow services) in a folder. Therefore, when you lock a Java/C service, all Java/C<br />

services in that folder are locked.<br />

For example, if you lock a Java service in a folder A, all Java and C/C++ services in<br />

folder A are locked by you. Similarly, if another user has locked a Java service in<br />

folder B, you cannot add, edit, move, or delete any Java or C/C++ services in folder B.<br />

� Locking actions on Java and C/C++ services are ACL dependent. If you want to lock one or<br />

more Java or C/C++ services within a folder, you must have Write access to all Java<br />

and C/C++ services in that folder. This is because Java and C/C++ services within a<br />

folder share the same .java and .class files.<br />

� The jcode development environment operates independently of locking. If you use jcode to<br />

develop Java services, you do not have the locking functionality that is available in the<br />

Integration Server. When you use jcode, you may compile a service that is locked by<br />

another user, overwriting that user’s changes to the service. Therefore, if you use<br />

jcode, do not use the locking features in the Integration Server.<br />

� Before you save a Java or C/C++ service, multiple corresponding files must be writable on the<br />

server. A single Java or C/C++ service corresponds to the following files:<br />

.java<br />

.class<br />

.ndf<br />

.frag (may not be present)<br />

Before you save a Java or C/C++ service, all of the preceding files must be writable.<br />

Therefore, make sure that all system locks are removed from those files before saving.<br />

<strong>webMethods</strong> <strong>Developer</strong> User’s <strong>Guide</strong> Version 6.5, Service Pack 3 � � � 97


Locking Templates<br />

4. Locking and Unlocking Elements<br />

A template can be used with one or more services on the Integration Server. Currently,<br />

you cannot lock a template as an entity, only the service to which it is attached. Following<br />

are considerations for working with templates in a cooperative development<br />

environment.<br />

� To create or edit a template for a service, you must have the service locked.<br />

� The template for a service can change without your knowledge. Since a template can be<br />

attached to one or more services, keep in mind that a shared template can change<br />

without your knowledge. For example, if your template is attached to a service that<br />

another user locks and edits, that user can change your template.<br />

System Locking Elements<br />

If you are a server administrator, you can system lock an element by using the server’s file<br />

system to make the element’s supporting server files read-only. If you do not know the<br />

names of the files that correspond to a particular element, use the Lock Status command.<br />

For details, see “Viewing an Element’s Corresponding Server Files” on page 103. Usually,<br />

a system lock is not reflected in <strong>webMethods</strong> <strong>Developer</strong> or the Integration Server<br />

Administrator until you reload the package in which the element resides.<br />

Important! Before you system lock an element, always verify that it is not locked by a user<br />

on the Integration Server. If an element becomes system locked while a user is editing it,<br />

the user will not know until he or she tries to save changes to the element. If this occurs,<br />

make the element’s corresponding files writable on the server. After this is done, the user<br />

can save his or her changes to the element.<br />

Viewing the Status of Locked Elements<br />

The lock status of an element tells you if an element is available for locking, and if not,<br />

who owns the lock and when they locked it. You can view the status of a locked element<br />

to see who owns the lock or you can view a list of all elements for which you own the lock.<br />

When viewing an element’s lock status, keep the following points in mind:<br />

� If the element has been system locked since you last reloaded the package, <strong>Developer</strong><br />

will not show the system lock status in the Locking Status dialog box until you reload<br />

the package.<br />

� When another user unlocks an element, you must refresh the Navigation panel to<br />

reflect the updated status. Similarly, when the server administrator removes a system<br />

lock from an element, you must reload the package in which the element resides to<br />

reflect the updated status.<br />

<strong>webMethods</strong> <strong>Developer</strong> User’s <strong>Guide</strong> Version 6.5, Service Pack 3 � � � 98


To view lock status for an element<br />

4. Locking and Unlocking Elements<br />

1 In the Navigation panel, select the element for which you want to view the status.<br />

2 On the File menu, click Lock Status. The following dialog box appears if the element is<br />

locked by someone else. A similar dialog appears if the element is system locked or<br />

locked by you.<br />

Locking Status dialog box<br />

To list all elements locked by you<br />

� On the Tools menu, click My Locked Elements. The My Locked Elements dialog box<br />

appears.<br />

My Locked Elements dialog box<br />

You can unlock individual elements from this dialog box by pressing the CTRL key as you<br />

click each element and then clicking Unlock. You can unlock all elements by clicking Unlock<br />

All. For more information about unlocking elements, see “Unlocking Elements” on<br />

page 100.<br />

<strong>webMethods</strong> <strong>Developer</strong> User’s <strong>Guide</strong> Version 6.5, Service Pack 3 � � � 99


Unlocking Elements<br />

Copying, Moving, or Deleting Locked Elements<br />

4. Locking and Unlocking Elements<br />

You can copy a locked element to another folder or package. However, you cannot move,<br />

rename, or delete an element unless it is locked by you or unlocked.<br />

After you edit an element and save changes to the server, you should unlock it to make it<br />

available to other users. There are several ways to unlock elements, depending on<br />

whether you are a member of the <strong>Developer</strong>s ACL or the Administrators ACL. If you are a<br />

developer, you can unlock elements in <strong>Developer</strong>. If you are an administrator, you can<br />

unlock elements in the Integration Server Administrator as well as in <strong>Developer</strong>.<br />

Unlocking Elements Using <strong>Developer</strong><br />

You must explicitly unlock elements. Disconnecting from the server does not unlock your<br />

element(s), since your locks are maintained from session to session.<br />

When unlocking elements, keep the following points in mind:<br />

� When you unlock a single Java or C service, <strong>Developer</strong> unlocks all other Java or C<br />

services within the folder. For details, see “Locking Java and C/C++ Services” on<br />

page 97.<br />

� If a Java or C service in a folder has unsaved changes, you will not be able to unlock<br />

other Java or C services within that folder. Save the changes and then unlock the<br />

services.<br />

� When you unlock an adapter notification, <strong>Developer</strong> also unlocks its associated<br />

publishable document type. You cannot directly unlock the publishable document<br />

type associated with an adapter notification.<br />

� You cannot unlock a listener or connection element.<br />

.<br />

To unlock elements using <strong>Developer</strong><br />

1 In the Navigation panel, select the elements that you want to unlock.<br />

Note: Be sure to save changes to the elements before you attempt to unlock them.<br />

2 On the File menu, click Unlock.<br />

3 If the elements you want to unlock contain unsaved changes, <strong>Developer</strong> alerts you<br />

that the elements cannot be unlocked until you save the changes. Click OK to close the<br />

alert dialog box. Then, save the changes and repeat the unlock action.<br />

<strong>webMethods</strong> <strong>Developer</strong> User’s <strong>Guide</strong> Version 6.5, Service Pack 3 � � � 100


4. Locking and Unlocking Elements<br />

4 If one of the elements you selected to unlock is a publishable document type<br />

associated with an adapter notification, and you did not also select the adapter<br />

notification, <strong>Developer</strong> alerts you that the elements cannot be unlocked. Click OK to<br />

close the alert dialog box. Then, reselect the elements (including the appropriate<br />

adapter notifications) and repeat the unlock action.<br />

The Navigation panel refreshes and the green check mark next to the element disappears.<br />

Tip! You can also unlock elements using the following techniques:<br />

- To unlock an element that is open in the editor, right-click the element’s tab or title<br />

bar and then click Unlock.<br />

- To unlock all elements to which you own the lock, use the Tools�My Locked Elements<br />

command.<br />

Unlocking an Element Using the Integration Server<br />

Administrator<br />

Important! Be cautious when you remove user locks to prevent a user from losing changes.<br />

If you unlock an element while a user is editing it, the user will not know until he or she<br />

tries to save changes to the element and the action fails. Always confirm with the user<br />

before removing his or her lock on an element.<br />

To unlock an element using the Integration Server Administrator<br />

1 In the Integration Server Administrator, under Packages, click Management.<br />

2 Click View Locked Elements. The following screen appears, showing all elements that<br />

have user locks and system locks.<br />

Locked Elements screen<br />

“localhost” means the machine<br />

on which the server is running<br />

<strong>webMethods</strong> <strong>Developer</strong> User’s <strong>Guide</strong> Version 6.5, Service Pack 3 � � � 101


3 Click Unlock Elements. The following screen appears.<br />

Unlock Selected Elements screen<br />

4. Locking and Unlocking Elements<br />

� Locked by System. Lists elements whose corresponding files are marked read-only<br />

on the server file system. You cannot remove a system lock via the Server<br />

Administrator. On the server’s file system, you must make the element’s files<br />

writable and reload the package. For details, see “Unlocking a System Locked<br />

Element” on page 103.<br />

� Locked by Current User. Lists elements that are locked by you, the server<br />

administrator (or the username with which you logged on to the Integration<br />

Server Administrator). Before you unlock an item, make sure that you have saved<br />

all changes to the server.<br />

� Locked by Other Users. Lists elements that are locked by other users on the server.<br />

Before you remove a user’s lock, make sure that the user has saved all changes to<br />

the server. If not, the user will lose all changes that they made to the element since<br />

they last saved it to the server.<br />

4 Select the elements that you want to unlock (after informing users if necessary) and<br />

click Unlock Selected Elements.<br />

<strong>Developer</strong>s using <strong>webMethods</strong> <strong>Developer</strong> should refresh their Navigation panel to<br />

update their view of the lock status of all elements.<br />

Important! If you receive a “failed to unlock” message, it means that the server files for a<br />

locked element were deleted from the server. Use the Sync to Name Space command to<br />

update the Integration Server Administrator’s view of locked elements.<br />

<strong>webMethods</strong> <strong>Developer</strong> User’s <strong>Guide</strong> Version 6.5, Service Pack 3 � � � 102


Unlocking a System Locked Element<br />

4. Locking and Unlocking Elements<br />

If you are a server administrator, you can remove a system lock from an element using the<br />

server’s file system. After you remove the system lock, you must reload the package in<br />

which the element resides to reflect the element’s updated status. If you use <strong>Developer</strong>,<br />

you must refresh the Navigation panel (after the package is reloaded) to reflect the<br />

element’s updated status.<br />

To remove a system lock from an element<br />

1 If you do not know the names of the server files that correspond to the element, use<br />

the Lock Status command in <strong>Developer</strong>. For details, see “Viewing an Element’s<br />

Corresponding Server Files” on page 103.<br />

2 On the server’s file system, remove the read-only properties from the files that<br />

correspond to the element to make the files writable.<br />

3 Reload the package on the Integration Server that contains the element. The updated<br />

status is reflected in the Integration Server Administrator. Refresh the Navigation<br />

panel in <strong>Developer</strong> to view the updated status.<br />

Important! If you accidentally applied a system lock to an element that was already locked<br />

by another user, remove the system lock but DO NOT have the user reload the package in<br />

<strong>webMethods</strong> <strong>Developer</strong>. (Reloading the package in <strong>Developer</strong> will discard their edits.)<br />

The user can then save the element without losing the changes he or she made to it while<br />

you had the element system-locked.<br />

Viewing an Element’s Corresponding Server Files<br />

You can view the names of the server files associated with every <strong>webMethods</strong> element.<br />

This is convenient when an element is system locked and you need to convey the<br />

element’s file names to the server administrator.<br />

To view server files for an element<br />

1 In the Navigation panel, select the elements for which you want to view the server file<br />

names.<br />

2 On the File menu, click Lock Status.<br />

The following dialog box shows the server files associated with a flow service named<br />

ApplyCreditMemo. These server files are system locked (that is, they are not writable on<br />

the server).<br />

<strong>webMethods</strong> <strong>Developer</strong> User’s <strong>Guide</strong> Version 6.5, Service Pack 3 � � � 103


Viewing server files for element ‘ApplyCreditMemo’<br />

4. Locking and Unlocking Elements<br />

Note: After a server administrator removes a system lock from an element, you must<br />

reload the package in which the element resides to reflect the unlocked status.<br />

Automatically Unlocking Elements After Saving<br />

You can choose to automatically unlock flow services, IS document types, and<br />

specifications after you save changes to them. This prevents you from forgetting to unlock<br />

them; however, it may not be the best option if you save periodically while editing an<br />

element.<br />

Important! When an Integration Server has the VCS Integration feature enabled, the<br />

Automatically unlock upon save option must be disabled.<br />

To automatically unlock flow services, IS document types, and specifications after saving<br />

To<br />

1 On the Tools menu, click Options. The Options dialog box appears.<br />

2 Click General.<br />

3 Under Navigation Panel, select the Automatically unlock upon save check box.<br />

4 Click OK.<br />

<strong>webMethods</strong> <strong>Developer</strong> User’s <strong>Guide</strong> Version 6.5, Service Pack 3 � � � 104


Troubleshooting<br />

4. Locking and Unlocking Elements<br />

This section addresses common problems that may arise when implementing cooperative<br />

development with <strong>webMethods</strong> components.<br />

Lock/Unlock Problems<br />

The Lock for Edit and Unlock commands are disabled.<br />

Possible causes are:<br />

� The Integration Server to which you are connected may have the<br />

watt.server.ns.lockingMode property configured to “no locking” or “system<br />

locking only.” For details, contact your server administrator.<br />

� You have selected multiple elements to lock or unlock and your selection contains of<br />

one or more of the following:<br />

� A server<br />

� A folder or package and its contents<br />

� A package and any other element<br />

� An adapter notification record<br />

When I try to lock an element, I get an exception message.<br />

The element may be locked by someone else, system-locked (marked read-only on the<br />

server), or you may not have Write access. Refresh the Navigation panel. If a lock is not<br />

shown but you still cannot lock the element, reload the package. In addition, make sure<br />

that you are a member of the ACL assigned for Write access to the element by checking<br />

the element’s Permissions property in the Properties panel.<br />

I can’t unlock a Java or C service.<br />

If there is another Java or C service that is locked by another user or system locked in the<br />

same folder, then you cannot unlock any Java or C services in that folder. This is because<br />

those services share the same .java and .class files on the Integration Server.<br />

I can’t unlock elements since I changed my username.<br />

You can only unlock elements that you have locked with your current username for the<br />

session. If you have changed usernames, log back in to the server with your old username<br />

and then unlock the elements.<br />

If the administrator has deleted your username, contact him or her to unlock the elements<br />

on the server. You can assist the administrator by using the Lock Status command to<br />

identify the names of the system-locked files on the server that need to be unlocked.<br />

Another user unlocked an element, but it still shows as locked in my Navigation panel.<br />

If it is a Java or C service, reload the package in the Navigation panel. If it is any other<br />

element, use the Refresh command to refresh the Navigation panel.<br />

<strong>webMethods</strong> <strong>Developer</strong> User’s <strong>Guide</strong> Version 6.5, Service Pack 3 � � � 105


4. Locking and Unlocking Elements<br />

I receive an “element failed to unlock” message when I try to unlock elements in the Integration Server<br />

Administrator.<br />

This indicates that the server files for the locked element were deleted from the server.<br />

You need to update the Integration Server Administrator’s list of unlocked elements by<br />

clicking Sync to Name Space on the Unlock Selected Elements screen. The Sync to Name<br />

Space command runs automatically when the server is started or restarted.<br />

Package Management Problems<br />

I can’t preserve locking information when I replicate and publish a package.<br />

This is expected behavior and is part of the feature’s design. You can, however, preserve<br />

system locks (read-only file attributes).<br />

When I disable a package, it does not preserve locking information.<br />

This is expected behavior and prevents conflicts if another package with the same folder<br />

and element names gets installed.<br />

Save Problems<br />

When I try to save an element that I have locked, I get an exception message.<br />

During the time that you had the lock, the element became system-locked, its ACL status<br />

changed, or a server administrator removed your lock and another user locked the<br />

element. If the exception message indicates that a file is read-only, then one or all of the<br />

files that pertain to that element on the server are system-locked. Contact your<br />

administrator to remove the system lock. After this is done, you can save the element and<br />

your changes will be incorporated.<br />

If the exception message indicates that you cannot perform the action without ACL<br />

privileges, then the ACL assigned to the element has been changed to an ACL in which<br />

you are not an Allowed user. To preserve your changes to the element, contact your server<br />

administrator to:<br />

1 Remove your lock on the element.<br />

2 Lock the element.<br />

3 Edit the ACL assigned for Write access to the element, to give you access.<br />

4 Unlock the element.<br />

You can then save your changes to the element.<br />

When I try to save a template, I get an error message.<br />

The template file on the server is read-only. Contact your server administrator to make the<br />

file writable.<br />

<strong>webMethods</strong> <strong>Developer</strong> User’s <strong>Guide</strong> Version 6.5, Service Pack 3 � � � 106


Other Problems<br />

4. Locking and Unlocking Elements<br />

I can’t create a new Java or C service.<br />

Another Java or C service is locked in the folder in which you want to create the new<br />

service, or you do not have Write access to all Java or C services in the folder. All of them<br />

must be unlocked or locked by you and you must have Write access to add a new Java or<br />

C service to the same folder. See “Lock/Unlock Problems” on page 105.<br />

I can’t delete a package.<br />

One of the elements in that package is system-locked (read-only) or locked by another<br />

user. Contact your administrator or contact the user who has the element locked in the<br />

package.<br />

The <strong>webMethods</strong> Integration Server went down while I was locking or unlocking an element.<br />

The action may or may not have completed, depending on the exact moment at which the<br />

server ceased action. When the server is back up, restore your session and look at the<br />

current status of the element.<br />

Frequently Asked Questions<br />

What is the difference between a system-locked element and a read-only element?<br />

None. “System lock” is a term used to denote an element that has read-only files on the<br />

<strong>webMethods</strong> Integration Server. The server administrator usually applies system locks to<br />

files (makes them read-only).<br />

Can I select multiple elements to lock or unlock in the Navigation panel simultaneously?<br />

Yes, you can select multiple elements to lock or unlock in the Navigation panel, as long as<br />

your selection does not contain the following:<br />

� A server<br />

� A folder or package and its contents<br />

� A package and any other element<br />

� An adapter notification record<br />

You can also lock or unlock all elements in a package or folder that have not been<br />

previously locked/unlocked by right-clicking the package or folder and selecting Lock for<br />

Edit (to lock) or Unlock (to unlock).<br />

I only save elements after I’m completely done. Remembering to unlock elements after saving them is<br />

tedious. Is there a shortcut for this task?<br />

Yes. For the specific procedure, see “Automatically Unlocking Elements After Saving” on<br />

page 104.<br />

Where is the lock information stored (such as names of elements that are locked, when they were<br />

locked, etc.)?<br />

The information is stored in the <strong>webMethods</strong> Repository version 2. For information on the<br />

Repository, see the <strong>webMethods</strong> Integration Server Clustering <strong>Guide</strong>.<br />

<strong>webMethods</strong> <strong>Developer</strong> User’s <strong>Guide</strong> Version 6.5, Service Pack 3 � � � 107


4. Locking and Unlocking Elements<br />

Important! It is not recommended that you use Cooperative Development functionality in a<br />

Remote Repository configuration. Locking information for elements could be<br />

inadvertently shared with another Integration Server sharing the Remote Repository.<br />

Also, if the Remote Repository Server goes down or a connection is lost, development will<br />

be stalled until the Remote Repository Server is back online. Use the local <strong>webMethods</strong><br />

Repository while developing to eliminate these Cooperative Development problems.<br />

Should I archive derived files?<br />

Generally, you should not archive derived files such as the .class file that is generated<br />

when you compile a Java service.<br />

What happens to the locks on elements when I replicate a package?<br />

Locking information is not preserved when you replicate and publish a package. This is<br />

expected behavior and is part of the feature’s design. You can, however, preserve system<br />

locks (read-only file attributes).<br />

<strong>webMethods</strong> <strong>Developer</strong> User’s <strong>Guide</strong> Version 6.5, Service Pack 3 � � � 108


Chapter 5. Assigning and Managing Permissions<br />

� Basic Concepts . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 110<br />

� Assigning ACLs to Elements . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 113<br />

� Viewing ACL Information on a Server . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 116<br />

� How ACLs Affect Other <strong>Developer</strong> Features . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 117<br />

� Troubleshooting . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 119<br />

<strong>webMethods</strong> <strong>Developer</strong> User’s <strong>Guide</strong> Version 6.5, Service Pack 3 � � � 109


Basic Concepts<br />

5. Assigning and Managing Permissions<br />

In addition to controlling access to elements on an individual user basis using locking,<br />

you can also control access by groups of users using access control lists (ACLs). Typically<br />

created by a system administrator, ACLs allow you to restrict access on a broader level.<br />

For example, if you have a production package and a development package on the<br />

<strong>webMethods</strong> Integration Server, you can restrict access to the production package to users<br />

in an Administrators ACL, and restrict access to the development package to users in a<br />

<strong>Developer</strong>s ACL.<br />

Within ACLs, you can also assign different levels of access, depending on the access that<br />

you want different groups of users to have. For example, you may want a “Tester” ACL to<br />

only have Read and Execute access to elements. Or, you may want a “Contractor” ACL<br />

that denies List access to sensitive packages on the <strong>webMethods</strong> Integration Server, so<br />

that contractors never see them in <strong>webMethods</strong> <strong>Developer</strong>.<br />

What Is an ACL?<br />

An ACL controls access to packages, folders, and other elements (such as services, IS<br />

document types, and specifications) at the group level. An ACL identifies groups of users<br />

that are allowed to access an element (Allowed Groups) and/or groups that are not<br />

allowed to access an element (Denied Groups). When identifying Allowed Groups and<br />

Denied Groups, you select from groups that you have defined previously.<br />

There are four different kinds of access: List, Read, Write, and Execute.<br />

� List controls whether a user sees the existence of an element and its metadata; that is,<br />

its input and output, settings, and ACL permissions. The element will be displayed on<br />

screens in the <strong>Developer</strong> and the Integration Server Administrator.<br />

� Read controls whether a user can view the source code and metadata of an element.<br />

� Write controls whether a user can update an element. This access also controls whether<br />

a user can lock, rename, or delete an element or assign an ACL to it.<br />

� Execute controls whether a user can execute a service.<br />

For more details about these types of access, see the <strong>webMethods</strong> Integration Server<br />

Administrator’s <strong>Guide</strong>.<br />

What Happens When a Client Runs a Service with ACLs?<br />

When a client requests that <strong>webMethods</strong> Integration Server invoke a service, the server<br />

checks the ACL assigned to the service. If the client is a member of an allowed group and<br />

is not a member of a denied group, the server executes the service. If the client is not a<br />

member of an allowed group, the server denies the request to invoke the service and stops<br />

executing.<br />

<strong>webMethods</strong> <strong>Developer</strong> User’s <strong>Guide</strong> Version 6.5, Service Pack 3 � � � 110


5. Assigning and Managing Permissions<br />

By default, when a client requests a service, <strong>webMethods</strong> Integration Server checks only<br />

the ACL of the externally invoked service (the service requested directly by the client).<br />

The server does not check the ACLs of any of the internally invoked services (those<br />

services invoked by the externally invoked service). However, you can set up the security<br />

settings for a service so that <strong>webMethods</strong> Integration Server checks the ACL assigned to<br />

the service every time it is invoked, whether directly by a client or by another service. For<br />

details, see “The Permissions Properties” on page 114.<br />

The following diagram illustrates the points at which ACL checking occurs when a client<br />

requests a service.<br />

ACL checking when a client requests a service<br />

Stage Description<br />

1<br />

2<br />

Client<br />

1<br />

Purch:SubmitPO<br />

Purch:SubmitPO<br />

INVOKE Purch:LogPO<br />

INVOKE Purch:CreditAuth<br />

INVOKE Purch:SendPO<br />

<strong>webMethods</strong> Integration Server<br />

Purch:LogPO<br />

Purch:CreditAuth<br />

Purch:SendPO<br />

The client (such as another application or a DSP) requests the Purch:SubmitPO<br />

service on the local <strong>webMethods</strong> Integration Server. <strong>webMethods</strong> Integration<br />

Server checks the ACL of the Purch:SubmitPO service (the externally invoked<br />

service). The server executes the service only if the client is invoking the<br />

service on the behalf of a user that is a member of an allowed group and is not<br />

a member of a denied group for the ACL assigned to the service.<br />

The Purch:SubmitPO service invokes the Purch:LogPO service. Because the<br />

Purch:LogPO service is invoked by the externally invoked service and is located<br />

on the same server as the externally invoked service, <strong>webMethods</strong> Integration<br />

Server considers the Purch:LogPO service to be internally invoked.<br />

Consequently, the server does not check the ACL of the Purch:LogPO service<br />

before executing it.<br />

<strong>webMethods</strong> <strong>Developer</strong> User’s <strong>Guide</strong> Version 6.5, Service Pack 3 � � � 111<br />

2<br />

3<br />

4


Stage Description<br />

3<br />

4<br />

Am I Required to Use ACLs?<br />

5. Assigning and Managing Permissions<br />

The Purch:SubmitPO service invokes the Purch:CreditAuth service. Like the<br />

Purch:LogPO service, <strong>webMethods</strong> Integration Server considers the<br />

Purch:CreditAuth service to be an internally invoked service. Consequently, the<br />

server does not check the ACL of the Purch:CreditAuth service before executing it.<br />

The Purch:SubmitPO service invokes the Purch:SendPO service. Like the<br />

Purch:LogPO and Purch:CreditAuth services, <strong>webMethods</strong> Integration Server<br />

considers the Purch:SendPO service to be an internally invoked service. The<br />

server does not check the ACL of the Purch:SendPO service before executing it.<br />

Note: If the security settings for the Purch:LogPO, Purch:CreditAuth, or Purch:SendPO services<br />

specify that ACL checking occurs every time the service is invoked (Enforce execute ACL<br />

option is set to Always), <strong>webMethods</strong> Integration Server would perform ACL checking<br />

when the externally invoked service (Purch:SubmitPO) invoked these services. For more<br />

information about requiring ACL checking, see “Assigning ACLs to Elements” on<br />

page 113.<br />

Note: Any service that the Purch:SubmitPO flow service invokes could also be invoked<br />

directly by the client. For example, if the client directly invokes the Purch:SendPO service,<br />

the server checks the ACL of the Purch:SendPO service. If the client is invoking the service<br />

on the behalf of a user that is a member of an allowed group and not a member of a denied<br />

group, then the server executes the Purch:SendPO service.<br />

No. However, there are default ACL settings for elements shipped with the Integration<br />

Server and default settings for new elements that you create. For details on default ACLs,<br />

see the <strong>webMethods</strong> Integration Server Administrator’s <strong>Guide</strong>.<br />

How Do I Create an ACL?<br />

You create ACLs using the Integration Server Administrator. For details, see the<br />

<strong>webMethods</strong> Integration Server Administrator’s <strong>Guide</strong>.<br />

<strong>webMethods</strong> <strong>Developer</strong> User’s <strong>Guide</strong> Version 6.5, Service Pack 3 � � � 112


Assigning ACLs to Elements<br />

To<br />

5. Assigning and Managing Permissions<br />

You can assign an ACL to a package, folder, services, and other elements in the<br />

Navigation panel. Assigning an ACL restricts or allows access to an element for a group of<br />

users. You can assign only one ACL per element.<br />

You cannot assign an ACL to an element for List, Read, or Write access unless you are a<br />

member of that ACL. For example, if you want to allow DevTeam1 to edit the ProcessPO<br />

service, you must be a member of the DevTeam1 ACL. That is, your username must be a<br />

member of a group that is in the Allowed list of the DevTeam1 ACL.<br />

To assign an ACL to a package or folder<br />

1 Make sure that the ACL you want to assign exists on the Integration Server. If not,<br />

create the ACL in the Integration Server Administrator. For details, see the<br />

<strong>webMethods</strong> Integration Server Administrator’s <strong>Guide</strong>.<br />

2 In the Navigation panel, click the package or folder to which you want to assign an<br />

ACL.<br />

3 On the File menu, click Open.<br />

4 In the editor, click the title bar of the package or folder to give it the focus.<br />

5 In the Permissions category of the Properties panel, select the ACLs that you want to<br />

assign for each level of access. For details, see “The Permissions Properties” on<br />

page 114.<br />

Important! For List, Read, and Write access, you can only assign ACLs of which you are<br />

a member. If you cannot assign an ACL to an element for List, Read, or Write access,<br />

you probably are not a member of a user group in the Allowed list of that ACL. To<br />

verify, use the Tools�ACL Information command. To obtain access to an ACL, contact<br />

your server administrator.<br />

6 Save the element. If an error message appears, check to make sure that you are a<br />

member of each ACL that you assigned to the element.<br />

To assign an ACL to other elements in the Navigation panel<br />

1 Make sure that the ACL you want to assign exists on the Integration Server. If not,<br />

create the ACL in the Integration Server Administrator. For details, see the<br />

<strong>webMethods</strong> Integration Server Administrator’s <strong>Guide</strong>.<br />

2 Open the element to which you want to assign an ACL.<br />

3 In the Permissions category of the Properties panel, select the ACLs that you want to<br />

assign for each level of access. For details, see “The Permissions Properties” on<br />

page 114.<br />

<strong>webMethods</strong> <strong>Developer</strong> User’s <strong>Guide</strong> Version 6.5, Service Pack 3 � � � 113


5. Assigning and Managing Permissions<br />

Important! For List, Read, and Write access, you can only assign ACLs of which you are<br />

a member. If you cannot assign an ACL to an element for List, Read, or Write access,<br />

you probably are not a member of a user group in the Allowed list of that ACL. To<br />

verify, use the Tools�ACL Information command. To obtain access to an ACL, contact<br />

your server administrator.<br />

4 Save the element. If an error message appears, check to make sure that you are a<br />

member of each ACL that you assigned to the element.<br />

The Permissions Properties<br />

You assign an ACL to an element in the Permissions category of the Properties panel.<br />

Depending on the element you select, certain access levels are displayed. For example, for<br />

a package, you can only set List access. For details about the different levels of access<br />

available for elements, see the <strong>webMethods</strong> Integration Server Administrator’s <strong>Guide</strong>.<br />

The ACLs assigned to an element are mutually exclusive; that is, an element can have<br />

different ACLs assigned for each level of access. For example, the following element has<br />

the <strong>Developer</strong>s ACL assigned for Read access and the Administrators ACL assigned for<br />

Write access.<br />

Permissions properties for a flow service<br />

Field / Button Description<br />

An element can have different<br />

ACLs assigned for each level<br />

of access.<br />

List ACL Users in the Allowed list of this assigned ACL can see that the element<br />

exists and view the element’s metadata (input, output, etc.).<br />

Read ACL Users in the Allowed list of this assigned ACL can view the source<br />

code and metadata of the element.<br />

Write ACL Users in the Allowed list of this assigned ACL can lock, edit, rename,<br />

and delete the element.<br />

Execute ACL Users in the Allowed list of this assigned ACL can execute the service.<br />

This level of access only applies to services.<br />

<strong>webMethods</strong> <strong>Developer</strong> User’s <strong>Guide</strong> Version 6.5, Service Pack 3 � � � 114


Field / Button Description<br />

Enforce<br />

execute ACL<br />

ACLs and Inheritance<br />

5. Assigning and Managing Permissions<br />

� When top-level service only. The Integration Server performs ACL<br />

checking against the service when it is directly invoked from a<br />

client or DSP. For example, suppose a client invokes the OrderParts<br />

service on server A. After checking port access, server A checks the<br />

Execute ACL assigned to OrderParts to make sure the requesting<br />

user is allowed to run the service. It does not check the Execute<br />

ACL when other services invoke OrderParts.<br />

� Always. The Integration Server performs ACL checking against the<br />

service when it is directly invoked from a client as well as when it<br />

is invoked from other services. For example, suppose the OrderParts<br />

service is invoked from a browser, as well as by the ProcessOrder<br />

and AddToDatabase services. If Always is set on OrderParts, the server<br />

performs ACL checking on OrderParts three times (once when it is<br />

invoked from the browser and twice when it is invoked by<br />

ProcessOrder and AddToDatabase).<br />

Note: You can view the users and groups that compose the ACLs on the Integration Server<br />

to which you are connected by using the Tools�ACL Information command. This<br />

information is read only; to edit ACLs, users, and groups, use the Integration Server<br />

Administrator.<br />

When you assign an ACL to a folder, it affects the subfolders and services in the folder.<br />

The subfolders and services that do not have an assigned ACL inherit the ACLs that you<br />

assign to the folder. (Subfolders and services with an assigned ACL are not affected by the<br />

ACL assigned to the folder.) When a subfolder or service inherits the ACL of a folder,<br />

“inherited” is displayed next to the ACL in the List, Read, Write, or Execute fields in the<br />

Permissions category of the Properties panel.<br />

When you remove an ACL from a service or subfolder, the service or subfolder inherits<br />

the ACL assigned to the folder in which the service or subfolder is located. When you<br />

remove the ACL assigned to the top-level folder (the uppermost folder in a package),<br />

<strong>webMethods</strong> Integration Server applies the default ACL to the folder and its contents for<br />

which an ACL is not specified. (The default ACL restricts access to a service to any user<br />

with a valid username and password for the <strong>webMethods</strong> Integration Server.)<br />

<strong>webMethods</strong> <strong>Developer</strong> User’s <strong>Guide</strong> Version 6.5, Service Pack 3 � � � 115


Default ACLs and Inheritance<br />

5. Assigning and Managing Permissions<br />

If the element is a top-level folder, its default ACL is that specified by a configuration file,<br />

not by its parent (the package). If the element is a subfolder, it shares its default ACL<br />

settings with other folders at the same level in the folder hierarchy. For details about<br />

inheritance, as well as the default ACLs that are installed with the <strong>webMethods</strong><br />

Integration Server, see the <strong>webMethods</strong> Integration Server Administrator’s <strong>Guide</strong>.<br />

Note: An element can inherit access from all elements except a package.<br />

Viewing ACL Information on a Server<br />

You can view the users and groups that make up the ACLs on a server by using the<br />

Tools�ACL Information command. The ACL Information dialog box lists the ACLs<br />

contained on the Integration Server to which you are connected. This information is read<br />

only; to edit ACLs, users, and groups, use the Integration Server Administrator.<br />

ACL Information dialog box for a Server<br />

The Default ACL...<br />

...denies access to members<br />

of the Anonymous group...<br />

...and allows access to<br />

members of all other groups.<br />

<strong>webMethods</strong> <strong>Developer</strong> User’s <strong>Guide</strong> Version 6.5, Service Pack 3 � � � 116


Field Description<br />

How ACLs Affect Other <strong>Developer</strong> Features<br />

ACLs and Locking<br />

5. Assigning and Managing Permissions<br />

ACLs The ACLs defined on the Integration Server to which you are<br />

connected. These include the default ACLs that were installed<br />

with the server.<br />

User Group<br />

Association for<br />

‘[ACL]’<br />

Resulting Users for<br />

‘[ACL]’<br />

� Allowed. The user group(s) that have been explicitly allowed to<br />

access the packages, folders, services, or other elements<br />

associated with this ACL.<br />

� Denied. The user group(s) that have been explicitly denied<br />

access to the packages, folders, services, or other elements<br />

associated with this ACL.<br />

The names of users that the ACL authorizes, given the current<br />

settings in the Allowed and Denied lists. The server builds this list by<br />

looking at the groups to which each user belongs and comparing<br />

that to the groups to which the ACL allows or denies access. For<br />

details on how the server determines access, see the <strong>webMethods</strong><br />

Integration Server Administrator’s <strong>Guide</strong>.<br />

As explained previously, locking allows you to control access at the individual user level,<br />

while ACLs allow you to control access by groups of users. Following are guidelines to<br />

keep in mind as you use ACLs with locking:<br />

� To lock an element, you must be the member of the ACL that is assigned for Write<br />

access to that element.<br />

� To lock a Java or C service within a folder, you must be the member of the ACL that is<br />

assigned for Write access for all Java or C services in that folder. This is because<br />

locking and unlocking actions for Java/C services are at the folder level. For details,<br />

see the Chapter 4, “Locking and Unlocking Elements”.<br />

� To edit ACL permissions for an element, you must lock the element (except for<br />

packages and folders, which cannot be locked).<br />

Note: When an Integration Server has the VCS Integration feature enabled, an element is<br />

locked when it is checked out of the version control system. With the appropriate ACL<br />

permissions, you are able to check out (lock) and check in (unlock) elements, folders and<br />

packages.<br />

<strong>webMethods</strong> <strong>Developer</strong> User’s <strong>Guide</strong> Version 6.5, Service Pack 3 � � � 117


ACLs and Testing/Debugging Services<br />

Keep the following in mind when you test and debug services:<br />

5. Assigning and Managing Permissions<br />

� To step or trace through a top-level service, you must have Execute, Read, and List<br />

access to the service.<br />

� To step or trace through all the services within a top-level service, you must have<br />

Execute, List, and Read access to all services invoked by the top-level service. If you<br />

do not have access to services invoked by the top-level service, <strong>Developer</strong> “steps<br />

over” those services. (The Integration Server performs ACL checking for a child<br />

service when the Enforce execute ACL property for the service is set to Always.)<br />

<strong>Developer</strong> executes the top-level service and continues to the next flow step.<br />

<strong>Developer</strong> does not step into or trace into the top-level service.<br />

� To test a service by sending an XML file to a service, you must have Read access to the<br />

service.<br />

� To set a breakpoint in a service, you must have Read access to the service.<br />

ACLs and Creating, Viewing, and Deleting Elements<br />

Keep the following guidelines in mind when you create, view, or delete elements:<br />

� To create or paste an element, you must have Write access to its parent folder. If you<br />

are not a member of the ACL assigned for Write access to the folder, contact your<br />

server administrator.<br />

� To copy an element, you must have Read access to it and Write access to its parent<br />

folder.<br />

� To rename or delete an element, you must have Write access to it and its parent folder.<br />

� To copy a package, you must be a member of a group assigned to the Replicators<br />

ACL.<br />

� When you create a folder and assign an ACL to it, any elements that you create within<br />

that folder inherit its ACL, until you explicitly set the ACL to something else. For<br />

details about inheritance, see the <strong>webMethods</strong> Integration Server Administrator’s <strong>Guide</strong>.<br />

� You may not see all of the elements on the Integration Server in the Navigation panel<br />

because you may not have List access to all of them. You can only see those elements<br />

to which you have at least List access.<br />

<strong>webMethods</strong> <strong>Developer</strong> User’s <strong>Guide</strong> Version 6.5, Service Pack 3 � � � 118


Troubleshooting<br />

5. Assigning and Managing Permissions<br />

I receive a “Cannot perform operation without Write ACL privileges” message when I try to create an<br />

element.<br />

You are not a member of the ACL assigned to the folder in which you want to save the<br />

element. To verify, check the Permissions category of the Properties panel. If you had<br />

previously been able to save the element, the ACL settings may have changed on the<br />

server since you last saved it. See “Troubleshooting” on page 105 in Chapter 4, “Locking<br />

and Unlocking Elements”.<br />

I receive an “element already exists” message when I try to create an element.<br />

There may be an element with the same name on the Integration Server, but you may not<br />

be able to see it because you do not have List access to it. Try a different element name, or<br />

contact your server administrator.<br />

I can’t assign an ACL to an element.<br />

Make sure that you have locked the element and that you are a member of the List, Read,<br />

or Write ACL that you want to assign. To verify, use the Tools�ACL Information command.<br />

I can’t see the source of a flow or Java service. However, I can see the input and output.<br />

You do not have Read access to the service. Contact your server administrator to obtain<br />

access.<br />

I receive an exception when I try to lock an element.<br />

The element may be locked by someone else, system locked (marked read only on the<br />

server), or you may not have Write access. Refresh the Navigation panel. If a lock is not<br />

shown but you still cannot lock the element, reload the package. In addition, make sure<br />

that you are a member of the ACL assigned for Write access to the element. To do so, click<br />

the Permissions category of the Properties panel.<br />

I receive an error when I run a command on the Test menu.<br />

You must have a minimum of Read access to trace or step through a service. If you don’t<br />

have Read access to the service when you are tracing, tracing into, stepping through, or<br />

stepping into a service, you will receive an error message.<br />

If you do have Read access to a service but you do not have Read access to a service it<br />

invokes, <strong>Developer</strong> “steps over” the invoked service but does not display an error<br />

message.<br />

You must also have Read access to a service to set a breakpoint in the service or send an<br />

XML document to the service.<br />

I receive an exception when I try to go to a referenced service from the pipeline.<br />

You do not have List access to the referenced service. Contact your server administrator.<br />

I receive a “Couldn’t find in Navigation panel” message when I try to find a service in the Navigation<br />

panel. However, I know it is on the Integration Server.<br />

If you do not see the service listed in the Navigation panel, you probably do not have List<br />

access to that service. Contact your server administrator.<br />

<strong>webMethods</strong> <strong>Developer</strong> User’s <strong>Guide</strong> Version 6.5, Service Pack 3 � � � 119


5. Assigning and Managing Permissions<br />

I can’t copy and paste a Java service.<br />

Check to make sure that you have Write access to all Java services in the folder into which<br />

you want to paste the service, as well as Write access to the folder itself.<br />

<strong>webMethods</strong> <strong>Developer</strong> User’s <strong>Guide</strong> Version 6.5, Service Pack 3 � � � 120


Chapter 6. Building Flow Services<br />

� Basic Concepts . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 122<br />

� A Process Overview . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 126<br />

� Creating a New Flow Service . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 127<br />

� Declaring Input and Output Parameters for a Service . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 129<br />

� Assigning an Output Template to a Service . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 134<br />

� Specifying Run-Time Parameters . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 137<br />

� Configuring Service Retry . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 143<br />

� Assigning Universal Names to Services . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 145<br />

� Configuring Service Auditing . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 148<br />

� Printing a Flow Service . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 157<br />

<strong>webMethods</strong> <strong>Developer</strong> User’s <strong>Guide</strong> Version 6.5, Service Pack 3 � � � 121


Basic Concepts<br />

Client application invokes<br />

Purch:SubmitPO...<br />

6. Building Flow Services<br />

To successfully build a flow service, you should understand the following basic concepts<br />

and terms.<br />

What Is a Flow Service?<br />

A flow service is a service that is written in the <strong>webMethods</strong> flow language. This simple yet<br />

powerful language lets you encapsulate a sequence of services within a single service and<br />

manage the flow of data among them. For example, you might create a flow service that<br />

takes a purchase order from a buyer and executes the following series of services before<br />

submitting it to an internal ordering system:<br />

1 Gets a purchase order submitted by a buyer<br />

2 Logs the order in an audit-trail file<br />

3 Performs a credit check<br />

4 Posts the order to the ordering system<br />

Flow services encapsulate other services<br />

Purch:SubmitPO<br />

INVOKE Purch:GetOrders<br />

INVOKE Purch:LogOrder<br />

INVOKE Purch:CreditAuth<br />

INVOKE Purch:PostPO<br />

...which performs a sequence<br />

of four services<br />

Any service can be invoked within a flow (including other flow services). For instance, a<br />

flow might invoke a service that you create, any of the built-in services provided by<br />

<strong>webMethods</strong>, and/or services from a <strong>webMethods</strong> add-on product such as the<br />

<strong>webMethods</strong> JDBC Adapter.<br />

You create flow services using <strong>Developer</strong>. They are saved in XML files on <strong>webMethods</strong><br />

Integration Server.<br />

Important! Although flow services are written as XML files, they are maintained in a format<br />

that can only be created and understood by <strong>Developer</strong>. You cannot create or edit a flow<br />

service with a text editor.<br />

<strong>webMethods</strong> <strong>Developer</strong> User’s <strong>Guide</strong> Version 6.5, Service Pack 3 � � � 122<br />

1<br />

2<br />

3<br />

4


A LOOP step<br />

repeats a set of<br />

flow steps<br />

A BRANCH step<br />

selects a specified flow<br />

step for execution<br />

What Is a Flow Step?<br />

6. Building Flow Services<br />

A flow service contains flow steps. A flow step is a basic unit of work (expressed in the<br />

<strong>webMethods</strong> flow language) that <strong>webMethods</strong> Integration Server interprets and executes<br />

at run time. The <strong>webMethods</strong> flow language provides flow steps that invoke services and<br />

flow steps that let you edit data in the pipeline.<br />

<strong>webMethods</strong>’ flow language also provides a set of control steps that allow you to direct the<br />

execution of a flow service at run time. The control steps allow you to:<br />

� Conditionally execute a specified sequence based on a field value.<br />

� Retry a specified sequence until it succeeds.<br />

� Repeat a specified sequence (loop) for each element in an array field.<br />

In the following flow service, control steps have been inserted to loop through a subset of<br />

the flow service and branch to one of two services in the last step of the loop.<br />

Control steps are used to direct the execution of a flow<br />

Purch:SubmitPO<br />

INVOKE Purch:GetOrders<br />

LOOP PurchaseOrders<br />

INVOKE Purch:LogOrder<br />

INVOKE Purch:CreditAuth<br />

BRANCH AuthOK<br />

INVOKE Purch:PostPO<br />

INVOKE Purch:BouncePO<br />

A flow service can contain the following types of flow steps:<br />

Invocation Steps<br />

INVOKE<br />

Executes a specified service. For more information about this<br />

step, see “The INVOKE Step” on page 165.<br />

<strong>webMethods</strong> <strong>Developer</strong> User’s <strong>Guide</strong> Version 6.5, Service Pack 3 � � � 123


Data-Handling Steps<br />

MAP<br />

Control Steps<br />

BRANCH<br />

LOOP<br />

REPEAT<br />

SEQUENCE<br />

EXIT<br />

6. Building Flow Services<br />

See Appendix A, “<strong>webMethods</strong> Flow Steps” for a detailed description of each type of flow<br />

step provided by the <strong>webMethods</strong> flow language. For information about building each<br />

type of flow step, see Chapter 7, “Inserting Flow Steps”.<br />

What Is the Pipeline?<br />

Performs specified editing operations on the pipeline (such as<br />

mapping variables in the pipeline, adding variables to the<br />

pipeline, and dropping variables from the pipeline). For more<br />

information about this step, see “The MAP Step” on page 192.<br />

Executes a specified flow step based on the value of a specified<br />

variable in the pipeline. For more information about this step,<br />

see “The BRANCH Step” on page 168.<br />

Executes a set of flow steps once for each element in a<br />

specified array. For more information about this step, see “The<br />

LOOP Step” on page 186.<br />

Re-executes a set of flow steps up to a specified number of<br />

times based on the successful or non-successful completion of<br />

the set. For more information about this step, see “The<br />

REPEAT Step” on page 179.<br />

Groups a set of flow steps into a series. The SEQUENCE step is<br />

implicit in most flow services (that is, the steps in a flow<br />

service are treated as a series). However, at times it is<br />

necessary to explicitly group a subset of flow steps using<br />

SEQUENCE so that they can be treated as a unit. For more<br />

information about this flow step, see “The SEQUENCE Step”<br />

on page 185.<br />

Controls the execution of a flow step (for example, abort an<br />

entire flow service from within a series of deeply nested steps,<br />

throw an exception without writing a Java service, or exit a<br />

LOOP or REPEAT without throwing an exception). For more<br />

information about this step, see “The EXIT Step” on page 190.<br />

The pipeline is the general term used to refer to the data structure in which input and<br />

output values are maintained for a flow service. It allows services in the flow to share<br />

data.<br />

The pipeline starts with the input to the flow service and collects inputs and outputs from<br />

subsequent services in the flow. When a service in the flow executes, it has access to all<br />

data in the pipeline at that point.<br />

<strong>webMethods</strong> <strong>Developer</strong> User’s <strong>Guide</strong> Version 6.5, Service Pack 3 � � � 124


Services in a flow<br />

get their input from<br />

and place their<br />

output in the<br />

pipeline.<br />

The pipeline holds the input and output for a flow service<br />

INVOKE Purch:LogPO<br />

Flow Service The Pipeline<br />

INVOKE Purch:CreditAuth<br />

INVOKE Purch:ConvertDate<br />

INVOKE Purch:SendPO<br />

output<br />

output<br />

output<br />

output<br />

ONum:46-77135<br />

Name:Kings Sport<br />

Phone:201-887-1544<br />

TNum:128824993554<br />

Acct:128824993554<br />

Total:5732.78<br />

Qty:20<br />

AuthNum:TW99123554<br />

Date:04/04/99<br />

Item:PK8801-NS<br />

OrderDate:19990404<br />

Ship:UPS Ground<br />

Terms:30N<br />

Freight:65.00<br />

Status:Received<br />

6. Building Flow Services<br />

When you build a flow service, you use <strong>Developer</strong> to specify how information in the<br />

pipeline is mapped to and from services in the flow.<br />

What Are Input and Output Parameters?<br />

Input and output parameters are the names and types of fields that the service requires as<br />

input and generates as output. For example, a service that takes two string values—an<br />

account number (AcctNum) and a dollar amount (OrderTotal)—as input and produces an<br />

authorization code (AuthCode) as output, has the following input and output parameters:<br />

Input and output parameters define the fields that the service requires as input and generates as output<br />

<strong>webMethods</strong> <strong>Developer</strong> User’s <strong>Guide</strong> Version 6.5, Service Pack 3 � � � 125<br />

input<br />

input<br />

input<br />

input<br />

Input Output<br />

Name Data Type Name Data Type<br />

AcctNum String AuthCode String<br />

OrderTotal String


A Process Overview<br />

6. Building Flow Services<br />

Part of the process of creating a service is declaring its input and output parameters (that<br />

is, explicitly specifying the fields it expects as input and produces as output).<br />

Building a flow service is a process that involves the following basic stages:<br />

Stage 1<br />

Stage 2<br />

Stage 3<br />

Stage 4<br />

Stage 5<br />

Stage 6<br />

Stage 7<br />

Creating a new service on <strong>webMethods</strong> Integration Server. During this stage,<br />

you create the new service on the <strong>webMethods</strong> Integration Server where<br />

you will do your development and testing. For information about this<br />

stage, see “Creating a New Flow Service” which follows.<br />

Inserting flow steps into the new service. During this stage, you specify the<br />

work that you want the service to perform by adding flow steps to the<br />

service. For information about this stage, see Chapter 7, “Inserting Flow<br />

Steps”.<br />

Declaring the input and output parameters of the service. During this stage, you<br />

define the service’s inputs and outputs. For information about this stage,<br />

see “Declaring Input and Output Parameters for a Service” on page 129.<br />

Mapping pipeline data. During this stage, you route input and output<br />

variables between services that are invoked in the flow. For information<br />

about this stage, see Chapter 8, “Mapping Data in a Flow Service”.<br />

Specifying the run-time parameters. During this stage, you assign parameters<br />

that configure the run-time environment for this service. For information<br />

about this stage, see “Specifying Run-Time Parameters” on page 137.<br />

Formatting service output. During this stage you can create an output<br />

template to format the service output. For information about this stage,<br />

see “Assigning an Output Template to a Service” on page 134 or refer to<br />

the Dynamic Server Pages and Output Templates <strong>Developer</strong>’s <strong>Guide</strong>.<br />

Testing and debugging. During this stage you can use the tools provided by<br />

<strong>Developer</strong> to test and debug your flow service. For information about<br />

this stage, see Chapter 11, “Testing and Debugging Services”.<br />

The remaining sections in this chapter and the following chapters provide detailed<br />

information about each stage.<br />

<strong>webMethods</strong> <strong>Developer</strong> User’s <strong>Guide</strong> Version 6.5, Service Pack 3 � � � 126


Creating a New Flow Service<br />

6. Building Flow Services<br />

The first step you take when you build a flow service is to create a new service on the<br />

<strong>webMethods</strong> Integration Server where you do your development.<br />

Package and Folder Requirements<br />

Before you create a new flow service, you must:<br />

� Make sure the package in which you want to create the flow service already exists. If the<br />

package does not already exist, create it using <strong>Developer</strong>. For more information about<br />

creating a package, see “Creating a Package” on page 76.<br />

� Make sure the folder in which you want to create the service already exists and that you have<br />

Write ACL access to it. If the folder does not already exist, create it using <strong>Developer</strong>. For<br />

information about creating folders, see “Creating New Elements” on page 45. For<br />

information about ACL permissions, see Chapter 5, “Assigning and Managing<br />

Permissions”.<br />

Once the package and folder are in place, you use the File�New command to start the<br />

process of creating a new service. For more information, see “Creating New Elements” on<br />

page 45.<br />

Using the Default Logic Options<br />

The wizard that creates a new flow service gives you the option of starting with an empty<br />

flow (one that contains no predefined flow steps) or starting with a service that contains a<br />

set of default logic for extracting information from an HTML or XML document (a<br />

common flow-service function).<br />

If you are building a flow service that extracts data from an HTML or XML document, you<br />

can select an option to automatically generate the logic (that is, the set of flow steps) that<br />

will get data from a specified document, rather than building this logic manually.<br />

Use this option... To...<br />

Empty Flow Generate a flow service that does not have any logic.<br />

Load and Query an<br />

HTML Page<br />

Automatically generate a flow service that invokes the loadXMLNode<br />

service (which gets a document from a URL that you specify) and<br />

the queryXMLNode service (which extracts a specified set of elements<br />

from the document returned by loadXMLNode).<br />

For additional information about the loadXMLNode and queryXMLNode<br />

services, see the XML Services <strong>Developer</strong>’s <strong>Guide</strong>.<br />

<strong>webMethods</strong> <strong>Developer</strong> User’s <strong>Guide</strong> Version 6.5, Service Pack 3 � � � 127


Use this option... To...<br />

Receive an XML<br />

Document<br />

Inserting Flow Steps<br />

6. Building Flow Services<br />

Automatically generate a service that receives an XML node as<br />

input. If you specify the format by providing a DTD or XML<br />

Schema definition, <strong>webMethods</strong> <strong>Developer</strong> maps the incoming<br />

document to its corresponding IS document type structure.<br />

Important! The flow steps produced by these options are no different than those produced<br />

by manually inserting INVOKE loadXMLNode and INVOKE queryXMLNode steps in a flow<br />

service. After <strong>Developer</strong> inserts the set of default steps into your flow service, you can edit<br />

the default steps and insert additional steps just as you would any ordinary flow service.<br />

Flow steps call previously built services and direct the flow of data within a flow service.<br />

You can insert flow steps into a flow service using the buttons at the top of the editor. For<br />

more information, see Chapter 7, “Inserting Flow Steps”.<br />

To insert a/an... Click this button...<br />

INVOKE step<br />

MAP step<br />

BRANCH step<br />

LOOP step<br />

REPEAT step<br />

SEQUENCE step<br />

EXIT step<br />

<strong>webMethods</strong> <strong>Developer</strong> User’s <strong>Guide</strong> Version 6.5, Service Pack 3 � � � 128


Declaring Input and Output Parameters for a Service<br />

6. Building Flow Services<br />

Input and output parameters are the names and data types of the fields that a service<br />

expects as input and generates as output. Some systems refer to input and output<br />

parameters as “imports” and “exports.” These parameters are also collectively referred to<br />

as a signature.<br />

You declare input and output parameters for all types of services: flow services, Java<br />

services, and services written in other supported programming languages.<br />

Although you are not required to declare input and output parameters for a service (the<br />

Integration Server will execute a service regardless of whether it has a specification or<br />

not), there are good reasons to do so:<br />

� Declaring parameters makes the service’s input and outputs visible to <strong>Developer</strong>. Without<br />

declared input and output parameters, you cannot:<br />

� Link data to and/or from the service using <strong>Developer</strong>’s Pipeline tab.<br />

� Assign default input values to the service on the Pipeline tab.<br />

� Validate the input and output values of the service at run time.<br />

� Test the service in <strong>Developer</strong> and enter initial input values.<br />

� Generate skeleton code for invoking the service from a client.<br />

� Declaring parameters makes the input and output requirements of your service known to other<br />

developers who may want to call your service from their programs.<br />

For these reasons, we strongly recommend that you make it a practice to declare input<br />

and output parameters for every service that you create.<br />

Supported Data Types<br />

<strong>webMethods</strong> <strong>Developer</strong> supports several data types for use in services. Each data type<br />

supported by <strong>Developer</strong> corresponds to a Java data type and has an associated icon. When<br />

working in the editor, you can determine the data type for a field by looking at the icon<br />

next to the field name.<br />

For information about these data types and the editor icons that represent them, see<br />

Appendix C, “Supported Data Types”.<br />

<strong>webMethods</strong> <strong>Developer</strong> User’s <strong>Guide</strong> Version 6.5, Service Pack 3 � � � 129


Specifying Input Parameters<br />

6. Building Flow Services<br />

When you define the input parameters for a flow service, keep the following points in<br />

mind:<br />

� Specify all inputs that a calling program must supply to this flow service. For example, if a<br />

flow service invokes two other services, one that takes a field called AcctNum and<br />

another that takes OrderNum, you must define both AcctNum and OrderNum as input<br />

parameters for the flow service.<br />

Note: The purpose of declaring input parameters is to define the inputs that a calling<br />

program or client must provide when it invokes this flow service. You do not need to<br />

declare inputs that are obtained from within the flow itself. For example, if the input<br />

for one service in the flow is derived from the output of another service in the flow,<br />

you do not need to declare that field as an input parameter.<br />

� When possible, use variable names that match the names used by the services in the flow.<br />

Variables with the same name are automatically linked to one another in the pipeline.<br />

(Remember that variable names are case sensitive.) If you use the same variable<br />

names used by flow’s constituent services, you reduce the amount of manual data<br />

mapping that needs to be done. When you specify names that do not match the ones<br />

used by the constituent services, you must use the Pipeline tab to manually link them<br />

to one another. For information about the Pipeline tab, see “What Does the Pipeline Tab<br />

Contain?” on page 196.<br />

� Avoid using multiple inputs that have the same name. Although <strong>Developer</strong> permits you to<br />

declare multiple input parameters with the same name, the fields may not be<br />

processed correctly within the service or by services that invoke this service.<br />

� Make sure the variables match the data types of the variables they represent in the flow. For<br />

example, if a service in the flow expects a document list called LineItems, define that<br />

input variable as a document list. Or, if a service expects a Date object called<br />

EmploymentDate, define that input variable as an Object and apply the java.util.Date<br />

object constraint to it. For a complete description of the data types supported by<br />

<strong>Developer</strong>, see Appendix C, “Supported Data Types”.<br />

� Declared input variables appear automatically as inputs in the pipeline. When you select the<br />

first service or MAP step in the flow, the declared inputs appear under Pipeline In.<br />

Important! If you edit a cached service by changing the inputs (not the pipeline), you must<br />

reset the server cache. If you do not reset it, the old cached input parameters will be used<br />

at run time. To reset the service cache from <strong>Developer</strong>, select the service and then click the<br />

Reset button next to Reset Cache in the Properties panel. To reset the service cache from<br />

Integration Server Administrator, select Service Usage under Server in the Navigation<br />

panel. Select the name of the service and an information screen for that service appears.<br />

Click Reset Server Cache.<br />

<strong>webMethods</strong> <strong>Developer</strong> User’s <strong>Guide</strong> Version 6.5, Service Pack 3 � � � 130


6. Building Flow Services<br />

Note: If you intend to use this service in a trigger to process published documents, the<br />

input signature for this service needs to contain a document reference to the publishable<br />

document type. The name for this document reference must be the fully qualified name of<br />

the publishable document type (for example, folder.subfolder:PublishableDocumentTypeName).<br />

You can copy and paste the fully qualified document type name from the Navigation<br />

panel to the document reference field on the Input/Output tab. For more information about<br />

creating triggers and publishable document types, see the Publish-Subscribe <strong>Developer</strong>’s<br />

<strong>Guide</strong>.<br />

Specifying Output Parameters<br />

On the output side of the Input/Output tab you specify the variables that you want the flow<br />

to return to the calling program or client. The guidelines for defining the output<br />

parameters are similar to those for defining input parameters:<br />

� Specify all of the output variables that you want this flow service to return to the calling<br />

program or client.<br />

� Make sure the names of output variables match the names used by the services that produce<br />

them. Like input variables, if you do not specify names that match the ones produced<br />

by the flow’s constituent services, you must use the Pipeline tab to manually link them<br />

to one another. For information about the Pipeline tab, see “What Does the Pipeline Tab<br />

Contain?” on page 196.<br />

� Avoid using multiple outputs that have the same name. Although <strong>Developer</strong> permits you to<br />

declare multiple output parameters with the same name, the fields may not be<br />

processed correctly within the service or by services that invoke this service.<br />

� Make sure the variables match the data types of the variables they represent in the flow. For<br />

example, if a service produces a String called AuthorizationCode, make sure you define<br />

that variable as a String. Or, if a service produces a Long object called EmployeeID,<br />

define that output variable as an Object and apply the java.lang.Long object constraint<br />

to it. For a complete description of the data types supported by a service, see<br />

Appendix C, “Supported Data Types”.<br />

� Declared output variables appear automatically as outputs in the pipeline. When you select the<br />

last service or MAP step in a flow, the declared output variables appear under Pipeline<br />

Out.<br />

Completing the Input/Output Tab<br />

You declare the input and output parameters for a service using the Input/Output tab. On<br />

the left side of this tab, you define the variables that the service requires as input. On the<br />

right side, you define the variables the service returns to the client or calling program.<br />

<strong>webMethods</strong> <strong>Developer</strong> User’s <strong>Guide</strong> Version 6.5, Service Pack 3 � � � 131


Define the flow<br />

service’s input<br />

parameters<br />

on this side...<br />

Input/Output tab<br />

...and output<br />

parameters on this<br />

side.<br />

6. Building Flow Services<br />

For a flow service, the input side describes the initial contents of the pipeline. In other<br />

words, it specifies the variables that this flow service expects to find in the pipeline at run<br />

time. The output side identifies the variables produced by the flow service and returned<br />

to the pipeline.<br />

You can complete the Input/Output tab in the following ways:<br />

� Reference a specification. A specification defines a set of service inputs and outputs. You<br />

can use a specification to define input and output parameters for multiple services.<br />

When you assign a specification to a service, you cannot add, delete, or modify the<br />

declared variables using the service’s Input/Output tab.<br />

� Reference an IS document type. You can use an IS document type to define the input or<br />

output parameters for a service. When you assign an IS document type to the Input or<br />

Output side of the Input/Output tab, you cannot add, modify, or delete the variables on<br />

that half of the tab.<br />

You insert a reference to an IS document type in one of three ways:<br />

� By typing the fully qualified name of the IS document type in the Input or Output<br />

field<br />

� By clicking to select an IS document type from a list<br />

� By dragging an IS document type on the same server from the Navigation panel<br />

to the box below the Validate input or Validate output check boxes<br />

With the first two methods, the variables within the IS document type become the<br />

input or output signature for the service. You cannot add, modify, or delete the<br />

variables on that half of the tab. With the third method, the IS document type<br />

reference becomes the top-level document in the signature. You cannot modify or<br />

delete the variables that are contained within the referenced IS document type but<br />

you can add other variables to that half of the tab.<br />

<strong>webMethods</strong> <strong>Developer</strong> User’s <strong>Guide</strong> Version 6.5, Service Pack 3 � � � 132


6. Building Flow Services<br />

� Manually insert input and output variables. Use to specify the data type and name<br />

for each input and output variable for the service.<br />

To declare input and output parameters for a service<br />

1 Open the service for which you want to declare input and output parameters.<br />

2 In the editor, click the Input/Output tab for that service.<br />

3 If you want to reference a specification, do the following:<br />

a In the Specification Reference field, type the specification’s name or click to<br />

select it from a list. For more information about creating specifications, see<br />

“Declaring Input and Output Parameters for a Service” on page 129.<br />

b Skip the rest of this procedure.<br />

Important! When a specification is assigned to a service, you cannot add, delete, or<br />

modify the declared variables using the service’s Input/Output tab.<br />

4 If you want to reference an IS document type for the input or output parameters of the<br />

service, do the following:<br />

a In the Input or Output field (depending on which half of the specification you want<br />

to assign the IS document type to), type the IS document type name or click to<br />

select it from a list. You can also drag an IS document type from the Navigation<br />

panel to the box below the Validate input or Validate output check boxes.<br />

b If you assigned an IS document type to both the Input and Output sides of the<br />

Input/Output tab, skip the rest of this procedure. Otherwise, continue to the next<br />

step to specify the variables in the other half of the tab.<br />

Important! When an IS document type is assigned to the Input or Output side, you cannot<br />

add, delete, or modify the declared variables on that half of the Input/Output tab.<br />

5 For each input or output variable that you want to define, do the following:<br />

a Select the half of the Input/Output tab (Input or Output) where you want to define the<br />

variable by clicking anywhere in that half’s large white text box.<br />

b Click on the toolbar and select the type of variable that you want to define.<br />

c Type the name of the variable and press ENTER.<br />

<strong>webMethods</strong> <strong>Developer</strong> User’s <strong>Guide</strong> Version 6.5, Service Pack 3 � � � 133


6. Building Flow Services<br />

d With the variable selected, set variable properties and apply constraints in the<br />

Properties panel (optional).<br />

e If the variable is a document or a document list, repeat steps b–d to define and set<br />

the properties and constraints for each of its members. Use to indent each<br />

member beneath the document or document list variable.<br />

6 If you want to enter any notes or comments about the input and output parameters,<br />

type your comments on the Comments tab.<br />

Assigning an Output Template to a Service<br />

An output template is a Web document, such as an HTML page, embedded with special<br />

codes (tags) that <strong>webMethods</strong> Integration Server processes. These tags instruct<br />

<strong>webMethods</strong> Integration Server to perform a specific action and substitute the result of<br />

that action in the Web document. Typically, you use tags in output templates to insert<br />

service output values in Web documents returned to clients.<br />

Output templates are used most frequently to customize the HTML page that a service<br />

returns to a browser-based application. However, they can also be used to generate an<br />

XML document or any other formatted string. For example, you may have a service that<br />

retrieves a record from a relational database and uses an output template to format it as an<br />

XML document or a comma-delimited record before returning it to the requester.<br />

Note: Output templates are optional. If a service has an output template assigned to it, the<br />

server automatically applies the template to the results of the service (that is, the contents<br />

of the pipeline) whenever that service is invoked by an HTTP client. If a service does not<br />

have an output template, the server simply returns the results of the service in the body of<br />

an HTML document, formatted as a two-column table.<br />

When using output templates, keep in mind that:<br />

� A service can have at most one output template assigned to it at a time (you can<br />

dynamically change the output template assignment at run time, however).<br />

� You can assign the same output template to more than one service.<br />

� If you assign an existing output template to a service, the output template must reside<br />

in the <strong>webMethods</strong>6\IntegrationServer\packages\packageName\templates directory,<br />

where packageName is the package in which the service is located.<br />

� You can reference one output template from within another.<br />

� You can specify the encoding in which to save the template (for example, SJIS, a type<br />

of Japanese encoding). The Integration Server is optimized for the UTF-8 encoding.<br />

You should not change this setting unless you are sure that you want to use another<br />

encoding.<br />

<strong>webMethods</strong> <strong>Developer</strong> User’s <strong>Guide</strong> Version 6.5, Service Pack 3 � � � 134


To assign an output template to a service<br />

1 Open the service to which you want to assign an output template.<br />

2 In the editor, click the service’s title bar to give the service the focus.<br />

6. Building Flow Services<br />

3 In the Output template category of the Properties panel, do one of the following to<br />

update the Name field:<br />

� If you want to assign a new output template to the service, type the name of the<br />

new output template or accept the system default output template name of<br />

FolderName_ServiceName.<br />

� If you want to assign an existing output template to the service, type the file name<br />

of the existing output template. You do not need to include the path information<br />

or the file name extension.<br />

Important! Make sure the existing output template resides in the<br />

<strong>webMethods</strong>6\IntegrationServer\packages\packageName\templates directory,<br />

where packageName is the same package in which the service is located.<br />

4 In the Type list, do one of the following to specify the format for the output template:<br />

To... Select...<br />

Assign an HTML output template to the service html<br />

Assign an XML output template to the service xml<br />

Assign a WML output template to the service wml<br />

Assign an HDML output template to the service hdml<br />

Note: The Type you select determines the extension for the output template file (*.html,<br />

*.xml, *.wml, or *.hdml). In cases where the output is returned to a Web browser, the<br />

Type also determines the value of the HTTP “Content-Type” header field (for example,<br />

“text/html,” “text/xml,” “text/vnd.wap.wml,” or “text/x-hdml“).<br />

5 Do one of the following:<br />

� If you assigned a new output template to the service, click New to create the<br />

output template.<br />

� If you assigned an existing output template to the service and you want to edit the<br />

template, click Edit.<br />

Select the encoding used to create the template file and click OK. (By default,<br />

<strong>Developer</strong> uses UTF-8 to create output template files.)<br />

<strong>webMethods</strong> <strong>Developer</strong> User’s <strong>Guide</strong> Version 6.5, Service Pack 3 � � � 135


6. Building Flow Services<br />

6 In the template dialog box, create or edit the output template by typing HTML, XML,<br />

WML, or HDML content, and/or by inserting template tags. For more information<br />

about creating an output template, see the Dynamic Server Pages and Output Templates<br />

<strong>Developer</strong>’s <strong>Guide</strong>.<br />

7 In the File Encoding list, select the encoding in which you want the template file saved.<br />

The encoding is used by the Integration Server to send the template to the browser<br />

and to interpret data posted in the resulting page in the browser.<br />

The default encoding is Unicode (UTF8). You should not change this setting unless<br />

you are sure that you wish to use another encoding. The Integration Server is<br />

optimized for the UTF-8 encoding. The encoding you choose also applies to any<br />

localized (translated) versions of the template that you may create, so you should<br />

choose a character encoding that supports all of the languages for which you will<br />

create localized templates. For details, see the Dynamic Server Pages and Output<br />

Templates <strong>Developer</strong>’s <strong>Guide</strong>.<br />

If you do change this setting, make sure that your XML or HTML file contains the<br />

proper encoding or META tag for the encoding you use, as this may affect the browser<br />

or parser performance outside the Integration Server.<br />

Note: The File Encoding you select limits the characters that you can use in your<br />

template (including the data inserted into your template using %VALUE%<br />

statements) to those in the character set of the encoding you choose. It also limits any<br />

translated versions of the templates to the same character set. Generally it is a good<br />

idea to use the UTF-8 (Unicode) encoding, since Unicode supports nearly all of the<br />

characters in all of the world's languages. You will not lose any data if you choose to<br />

save your template in UTF-8; any data entered into a form will be properly<br />

interpreted by the Integration Server.<br />

8 Click Save.<br />

Important! After editing a template in <strong>Developer</strong>, do not edit it outside of <strong>Developer</strong>. This<br />

will affect the interpretation of the encoding settings and may result in characters being<br />

lost or misinterpreted.<br />

<strong>webMethods</strong> <strong>Developer</strong> User’s <strong>Guide</strong> Version 6.5, Service Pack 3 � � � 136


Specifying Run-Time Parameters<br />

6. Building Flow Services<br />

As a developer of a service, you can use the Properties panel to specify the following<br />

service parameters:<br />

� State of a service. You can maintain whether or not you want the server to treat it as a<br />

“stateless” service at run time.<br />

� Caching of service results. You can cache elements to reduce memory usage in<br />

<strong>Developer</strong>. For details, see “To cache elements” on page 70.<br />

� Execution locale of a service. You can set the type of locale in which the Integration<br />

Server executes at run time.<br />

Important! The Runtime properties on the Properties panel should only be set by someone<br />

who is thoroughly familiar with the structure and operation of the selected service.<br />

Improper use of these options can lead to a service failure at run time and/or the return of<br />

invalid data to the client program.<br />

Maintaining the State of a Service<br />

When a remote client opens a session on a <strong>webMethods</strong> Integration Server, the server<br />

automatically builds a session object for that client. The server uses this object to maintain<br />

specific information about the client requesting the service, such as user name and<br />

password. The server maintains the session object for the duration of the session (that is,<br />

until the client program explicitly closes the session on the server or the session times out<br />

due to client inactivity).<br />

When you develop services in a language such as Java, C/C++, or Visual Basic, you can use<br />

the “put” method to write information to the session object. You might do this to store<br />

information that a sequence of services needs to maintain a connection to an external<br />

system.<br />

A service that is an atomic unit of work (that is, one that is wholly self contained and not<br />

part of a multi-service transaction to an external system) does not to need to have its<br />

session object maintained when it is finished executing. For performance reasons, you<br />

may want to configure these types of services to run in “stateless” mode. Services that run<br />

in “stateless” mode use fewer resources and do not consume a licensed seat on<br />

<strong>webMethods</strong> Integration Server.<br />

Important! Do not use the stateless option unless you are certain that the service operates as<br />

an atomic unit of work. If you are unsure, set the Stateless property in the Runtime category<br />

to False.<br />

<strong>webMethods</strong> <strong>Developer</strong> User’s <strong>Guide</strong> Version 6.5, Service Pack 3 � � � 137


To configure a service’s run-time state<br />

1 Open the service that you want to configure.<br />

2 In the editor, click the service’s title bar to give the service the focus.<br />

6. Building Flow Services<br />

3 In the Runtime category of the Properties panel, do one of the following to set the<br />

Stateless property:<br />

� If the service is a self-contained, atomic unit of work and does not need access to<br />

state information, select True. The server will remove the client session<br />

immediately after the service executes, and no session information will be<br />

maintained for the service.<br />

� If the service is part of a multi-service transaction or if you are unsure of its state<br />

requirements, select False. The server will build and maintain a session object for<br />

this service.<br />

Configuring a Service’s Use of Cache<br />

Caching is an optimization feature that can improve the performance of stateless services.<br />

When you enable caching for a service, <strong>webMethods</strong> Integration Server saves the entire<br />

contents of the pipeline after invoking the service in a local cache for the period of time<br />

that you specify. The pipeline includes the output fields explicitly defined in the cached<br />

service, as well as any output fields produced by earlier services in the flow. When the<br />

server receives subsequent requests for a service with the same set of input values, it returns<br />

the cached result to the client rather than invoking the service again.<br />

Caching can significantly improve response time of services. For example, services that<br />

retrieve information from busy data sources such as high-traffic commercial Web servers<br />

could benefit from caching. The server can cache the results for flows, Java services, and<br />

C/C++ services.<br />

Note: Caching is only available for data that can be written to the repository server. Since<br />

nodes cannot be written to the repository, they cannot be cached.<br />

Types of Services to Cache<br />

While caching service results can improve performance, not all services should be cached.<br />

You should never cache services if the cached results might be incorrect for subsequent<br />

invocations or if the service performs tasks that must be executed each time the service is<br />

invoked. This section describes guidelines for you to consider when determining whether<br />

to cache the results for a service.<br />

<strong>webMethods</strong> <strong>Developer</strong> User’s <strong>Guide</strong> Version 6.5, Service Pack 3 � � � 138


Services Suited for Caching<br />

6. Building Flow Services<br />

� Services that require no state information. If a service does not depend on state<br />

information from an earlier transaction in the client’s session, you can cache its results.<br />

� Services that retrieve data from data sources that are updated infrequently. Services whose<br />

sources are updated on a daily, weekly, or monthly basis are good candidates for<br />

caching.<br />

� Services that are invoked frequently with the same set of inputs. If a service is frequently<br />

invoked by clients using the same input values, it is beneficial to cache the results.<br />

Services that You Should Not Cache<br />

� Services that perform required processing. Some services contain processing that must be<br />

processed each time a client invokes it. For example, if a service contains accounting<br />

logic to perform charge back and you cache the service results, the server does not<br />

execute the service, so the service does not perform charge back for the subsequent<br />

invocations of the service.<br />

� Services that require state information. Do not cache services that require state<br />

information from an earlier transaction, particularly information that identifies the<br />

client that invoked it. For example, you do not want to cache a service that produced a<br />

price list for office equipment if the prices in the list vary depending on the client who<br />

initially connects to the data source.<br />

� Services that retrieve information from frequently updated sources. If a service retrieves data<br />

from a data source that is updated frequently, the cached results can become<br />

outdated. Do not cache services that retrieve information from sources that are<br />

updated in real time or near real time, such as stock quote systems or transactional<br />

databases.<br />

� Services that are invoked with unique inputs. If a service handles a large number of unique<br />

inputs and very few repeated requests, you will gain little by caching its results. You<br />

might even degrade server performance by quickly consuming large amounts of<br />

memory.<br />

Controlling a Service’s Use of Cache<br />

You use the properties on the Properties panel to enable caching and to configure the way<br />

in which you want it to operate with the selected service. You use these settings to strike<br />

the right balance between data currency and memory usage. To gauge the effectiveness of<br />

your cache settings, you can monitor its performance by viewing service statistics with the<br />

Integration Server Administrator and then adjusting your caching values accordingly.<br />

Note: If you do not have administrator privileges on your <strong>webMethods</strong> Integration Server,<br />

work with your server administrator to monitor and evaluate your service’s use of cache.<br />

<strong>webMethods</strong> <strong>Developer</strong> User’s <strong>Guide</strong> Version 6.5, Service Pack 3 � � � 139


6. Building Flow Services<br />

Important! If you edit a cached service by changing the inputs (not the pipeline), you must<br />

reset the server cache. If you do not reset it, the old cached input parameters will be used<br />

at run time. To reset the service cache from <strong>Developer</strong>, select the service and then click the<br />

Reset button next to Reset Cache in the Properties panel. To reset the service cache from<br />

Integration Server Administrator, select Service Usage under Server in the Navigation<br />

panel. Select the name of the service and an information screen for that service appears.<br />

Click Reset Server Cache.<br />

Specifying the Duration of a Cached Result<br />

The server maintains results in cache for the period of time you specify in the Cache expire<br />

property on the Properties panel. The expiration timer begins when the server initially<br />

caches a result, and it expires when the time you specify elapses. (The server does not reset<br />

the expiration timer each time it satisfies a service request with a cached result.) The<br />

minimum cache expiration time is one minute.<br />

Note: The cache may not be refreshed at the exact time specified in Cache expire. It may vary<br />

from 0 to 15 seconds, according to the cache sweeper thread. For details, see the<br />

watt.server.cache.flushMins setting in <strong>webMethods</strong> Integration Server.<br />

Using the Prefetch Option<br />

You use the Prefetch property to specify whether or not you want the server to<br />

automatically refresh the cache for this service when it expires. If you set Prefetch to True,<br />

the server automatically re-executes the service (using the same set of inputs as before) to<br />

update its results in cache. This action also resets the cache expiration timer.<br />

Important! Use Prefetch carefully. Overuse can quickly exhaust the memory available for<br />

cache.<br />

Important! Do not use Prefetch with Java or C/C++ services that invoke access-controlled<br />

services. Such services will fail during prefetch because the embedded service will be<br />

invoked without the proper access privileges. To avoid this problem, enable Prefetch on<br />

the invoked services rather than on the Java or C/C++ services that call them.<br />

When you enable Prefetch, you must also set the Prefetch activation property to specify<br />

when the server should initiate a prefetch. This setting specifies the minimum number of<br />

times a cached result must be accessed (hit) in order for the server to prefetch results. If<br />

the server retrieves the cached results fewer times than specified in the Prefetch activation<br />

property, the server will not prefetch the service results when the cache expires.<br />

<strong>webMethods</strong> <strong>Developer</strong> User’s <strong>Guide</strong> Version 6.5, Service Pack 3 � � � 140


6. Building Flow Services<br />

Note: The cache may not be refreshed at the exact time the last hit fulfills the Prefetch<br />

activation requirement. It may vary from 0 to 15 seconds, according to the cache sweeper<br />

thread. For details, see the watt.server.cache.flushMins setting in <strong>webMethods</strong><br />

Integration Server.<br />

To enable caching of pipeline contents after a service is invoked<br />

1 Open the service for which you want to configure caching.<br />

2 In the editor, click the service’s title bar to give the service the focus.<br />

3 In the Runtime category of the Properties panel, set Cache results to True.<br />

4 In the Cache expire field, type an integer representing the length of time (in minutes)<br />

that you want the results for this service to be available in cache.<br />

5 If you want to use prefetch, do the following:<br />

a Set Prefetch to True.<br />

b In the Prefetch activation property, specify the minimum number of hits needed to<br />

activate the use of prefetch.<br />

Specifying the Execution Locale<br />

When you create a service, you can set the locale property to indicate the locale policy in<br />

which the service executes at run time. The locale policy of a service refers to the language,<br />

regional, or cultural settings of a specific target market (the end user). Each locale consists<br />

of five sections: language, extended language, script, region, and variant.<br />

Locales can influence the following:<br />

� String display of numeric values and date/time values<br />

� Parsing of dates and numbers from strings<br />

� Default currency (pounds, Euros, dollars)<br />

� Default measuring system (metric or customary)<br />

� Default system resources (such as fonts, character encoding, etc.)<br />

� Collation (sorting) of lists<br />

� User interface/content language<br />

The Integration Server recognizes the following locale policies at run time:<br />

� Server locale uses its default JVM locale.<br />

� User locale uses the client locale.<br />

<strong>webMethods</strong> <strong>Developer</strong> User’s <strong>Guide</strong> Version 6.5, Service Pack 3 � � � 141


� Root locale uses neutral or POSIX locale.<br />

� Null locale uses no locale policy.<br />

6. Building Flow Services<br />

You can also enable the Integration Server to recognize custom locales. By default, the<br />

service uses the null locale. That is, it uses no locale policy.<br />

To specify the execution locale of a service<br />

1 Open the service that you want to configure.<br />

2 In the editor, click the service’s title bar to give the service the focus.<br />

3 In the Runtime category of the Properties panel, do one of the following to specify the<br />

Execution Locale property:<br />

Select... To...<br />

[$default] Default Runtime Locale Use the server’s default JVM locale.<br />

[$user] Default User Locale Use the client locale.<br />

[$null] No Locale Policy Use no locale policy.<br />

[root locale] Use the neutral or POSIX locale.<br />

[] Use a specific locale.<br />

Open locale editor... Define a custom locale.<br />

4 If you selected Open locale editor, complete the following in the Define Custom Locale<br />

dialog box.<br />

In this field... Do the following...<br />

Language Select one of the ISO 639 codes that represent the<br />

language. (2- or 3-letter codes)<br />

Extended Language For future release.<br />

Script Optional. Select one of the 4-letter script codes in the<br />

ISO 15924 registry.<br />

Region Optional. Select one of the ISO 3166-2 country<br />

codes.<br />

IANA Variant Optional. Add or remove a variant code registered<br />

by the IANA.<br />

5 Click OK. The Integration Server will execute the service in the specified locale.<br />

<strong>webMethods</strong> <strong>Developer</strong> User’s <strong>Guide</strong> Version 6.5, Service Pack 3 � � � 142


Configuring Service Retry<br />

6. Building Flow Services<br />

When building a service, you can configure the service to retry automatically if the service<br />

fails because of an ISRuntimeException. An ISRuntimeException occurs when the service<br />

catches and wraps a transient error, and then re-throws it as an ISRuntimeException. A<br />

transient error is an error that arises from a temporary condition that might be resolved or<br />

restored quickly, such as the unavailability of a resource due to network issues or failure<br />

to connect to a database. The service might execute successfully if the Integration Server<br />

waits a short interval of time and then retries the service.<br />

To configure a service to retry, you specify the maximum retry attempts and the retry<br />

interval. The maximum retry attempts indicate how many attempts the Integration Server<br />

makes to re-execute the service when it ends because of an ISRuntimeException. The retry<br />

interval indicates the length of time (in milliseconds) that the Integration Server waits<br />

between execution attempts.<br />

At run time, when a service throws an ISRuntimeException, the Integration Server waits<br />

the length of the retry interval and then re-executes the service using the original input<br />

pipeline passed to the service. The Integration Server continues to retry the service until<br />

the service executes successfully or the Integration Server makes the maximum number of<br />

retry attempts. If the service throws an ISRuntimeException during the final retry<br />

attempt, the Integration Server treats the last failure as a service error. The service ends<br />

with a service exception.<br />

Integration Server generates the following journal log message between retry attempts:<br />

[ISS.0014.0031V3] Service serviceName failed with ISRuntimeException.<br />

Retry x of y will begin in retryInterval milliseconds.<br />

Note: If service auditing is also configured for the service, the Integration Server adds an<br />

entry to the audit log for each failed retry attempt. Each of these entries will have a status<br />

of “Retried” and an error message of “Null”. However, if the Integration Server makes the<br />

maximum retry attempts and the service still fails, the final audit log entry for the service<br />

will have a status of “Failed” and will display the actual error message.<br />

About the Maximum Retry Period<br />

The Integration Server uses the same server thread for the initial service execution and the<br />

subsequent retry attempts. The Integration Server returns the thread to the server thread<br />

pool only when the service executes successfully or the retry attempts are exhausted. To<br />

prevent the execution and re-execution of a single service from monopolizing a server<br />

thread for a long time, the Integration Server enforces a maximum retry period when you<br />

configure service retry properties. The maximum retry period indicates the total amount<br />

of time that can elapse if the Integration Server makes the maximum retry attempts. By<br />

default, the maximum retry period is 15,000 milliseconds (15 seconds).<br />

When you configure service retry, the Integration Server verifies that the retry period for<br />

that service will not exceed the maximum retry period. The Integration Server determines<br />

<strong>webMethods</strong> <strong>Developer</strong> User’s <strong>Guide</strong> Version 6.5, Service Pack 3 � � � 143


6. Building Flow Services<br />

the retry period for the service by multiplying the maximum retry attempts by the retry<br />

interval. If this value exceeds the maximum retry period, <strong>Developer</strong> displays an error<br />

indicating that either the maximum attempts or the retry interval needs to be modified.<br />

Note: The watt.server.invoke.maxRetryPeriod server parameter specifies the<br />

maximum retry period. To change the maximum retry period, change the value of this<br />

parameter.<br />

Setting Service Retry Properties<br />

When configuring service retry, keep the following points in mind:<br />

� You can configure retry attempts for flow services, Java services, and C services only.<br />

� Only top-level services can be retried. That is, a service can be retried only when it is<br />

invoked directly by a client request. The service cannot be retried when it is invoked<br />

by another service (that is, when it is a nested service).<br />

� If a service is invoked by a trigger (that is, the service is functioning as a trigger<br />

service), the Integration Server uses the trigger retry properties instead of the service<br />

retry properties.<br />

� Unlike triggers, you cannot configure a service to retry until successful.<br />

� To catch a transient error and re-throw it as an ISRuntimeException, the service must<br />

do one of the following:<br />

� If the service is a flow service, the service must invoke<br />

pub.flow:throwExceptionForRetry. For more information about the<br />

pub.flow:throwExceptionForRetry, see the <strong>webMethods</strong> Integration Server Built-In<br />

Services Reference.<br />

� If the service is written in Java, the service can use<br />

com.wm.app.b2b.server.ISRuntimeException ( ). For more information about<br />

constructing ISRuntimeExceptions in Java services, see <strong>webMethods</strong> Integration<br />

Server Java API Reference for the com.wm.app.b2b.server.ISRuntimeException<br />

class.<br />

� The service retry period must be less than the maximum retry period. For more<br />

information, see “About the Maximum Retry Period” on page 143.<br />

To configure service retry<br />

1 Open the service for which you want to configure service retry.<br />

2 In the editor, click the service’s title bar to give the service the focus.<br />

<strong>webMethods</strong> <strong>Developer</strong> User’s <strong>Guide</strong> Version 6.5, Service Pack 3 � � � 144


6. Building Flow Services<br />

3 Under the Retry on ISRuntimeException category of the Properties panel, in the Max<br />

attempts property, specify the number of times the Integration Server should attempt<br />

to re-execute the service. The default is 0, which indicates that the Integration Server<br />

does not attempt to re-execute the service.<br />

4 In the Retry interval property, specify the number of milliseconds the Integration Server<br />

should wait between retry attempts. The default is 0 milliseconds, which indicates<br />

that the Integration Server re-executes the service immediately.<br />

5 On the File menu, click Save.<br />

Tip! You can invoke the pub.flow:getRetryCount service to retrieve the current retry count and<br />

the maximum specified retry attempts. For more information about this service, see the<br />

<strong>webMethods</strong> Integration Server Built-In Services Reference. For more information about<br />

building a service that retries, see “Configuring Service Retry” on page 143.<br />

Assigning Universal Names to Services<br />

Every service on a <strong>webMethods</strong> Integration Server has a universal name in addition to its<br />

regular <strong>webMethods</strong> name. A universal name is a unique public identifier that external<br />

protocols (such as SOAP) use to reference a service on a <strong>webMethods</strong> Integration Server.<br />

A universal name has two parts: a namespace name and a local name.<br />

� The namespace name is a qualifier that distinguishes a <strong>webMethods</strong> service from<br />

other resources on the Internet. For example, there might be many resources with the<br />

name AcctInfo. A namespace name distinguishes one AcctInfo resource from another by<br />

specifying the name of the collection to which it belongs, similar to the way in which a<br />

state or province name serves to distinguish cities with the same name (for example,<br />

Springfield, Illinois, versus Springfield, Ontario).<br />

Like namespaces in XML, the namespace portion of a universal name is expressed as a<br />

URI. This notation assures uniqueness, because URIs are based on globally unique<br />

domain names.<br />

The namespace portion of the universal name can consist of any combination of<br />

characters that form a valid absolute URI (relative URIs are not supported). For<br />

example, the following are all valid namespace names:<br />

http://www.gsx.com<br />

http://www.gsx.com/gl/journals<br />

http://www.ugmed.ch/résumè<br />

For a complete description of what makes up a valid URI, see RFC 2396 Uniform<br />

Resource Identifiers (URI): Generic Syntax at http://www.ietf.org/rfc/rfc2396.txt.<br />

� The local name uniquely identifies a service within the collection encompassed by a<br />

particular namespace. Many <strong>webMethods</strong> users use a service’s unqualified name as<br />

<strong>webMethods</strong> <strong>Developer</strong> User’s <strong>Guide</strong> Version 6.5, Service Pack 3 � � � 145


6. Building Flow Services<br />

its local name. Under this scheme, a service named gl.journals:closeGL would have a<br />

local name of closeGL.<br />

Local names follow the same construction rules as NCNames in XML. Basically, a<br />

local name can be composed of any combination of letters, digits, or the following<br />

symbols:<br />

. (period)<br />

- (dash)<br />

_(underscore)<br />

Additionally, the local name must begin with a letter or an underscore. The following<br />

are examples of valid local names:<br />

addCustOrder<br />

authorize_Level1<br />

générent<br />

For specific rules relating to NCNames, see the “NCName” definition in the<br />

Namespaces in XML specification at http://www.w3.org/TR/1999/REC-xml-names-<br />

19990114.<br />

A universal name can be either an explicit or an implicit universal name.<br />

� An explicit universal name is a universal name that you assign to a service by specifying<br />

both a namespace name and a local name in the Properties panel.<br />

� An implicit universal name is automatically derived from the name of the service itself,<br />

and it acts as the universal name when an explicit universal name has not been<br />

specified. The server derives an implicit name as follows:<br />

� The namespace name is the literal string http://localhost/ followed by the fully<br />

qualified name of the folder in which the service resides on the Integration Server.<br />

� The local name is the unqualified name of the service.<br />

For details on universal names, see the SOAP <strong>Developer</strong>’s <strong>Guide</strong>.<br />

Note: The server normalizes universal names according to Unicode Normalization Form C,<br />

as recommended by the Character Model, SOAP, and XML standards. This ensures that<br />

names containing non-ASCII characters (particularly those with accented or combining<br />

characters) are represented in a standard way.<br />

For information about normalization, see http://www.unicode.org/reports/tr15/ (Unicode<br />

Standard Annex #15) and http://www.w3.org/TR/charmod/ (Character Model for the<br />

World-Wide Web).<br />

<strong>webMethods</strong> <strong>Developer</strong> User’s <strong>Guide</strong> Version 6.5, Service Pack 3 � � � 146


To assign, edit, or view a universal name<br />

1 Open the service whose universal name you want to assign, edit, or view.<br />

2 In the editor, click the service’s title bar to give the service the focus.<br />

6. Building Flow Services<br />

3 If you want to assign or edit the service’s universal name, specify the following in the<br />

Universal Name category of the Properties panel:<br />

In this field... Specify...<br />

Namespace name The URI that will be used to qualify the name of this service.<br />

You must specify a valid absolute URI.<br />

Local name A name that uniquely identifies the service within the<br />

collection encompassed by Namespace name. The name can be<br />

composed of any combination of letters, digits, or the period<br />

(.), dash (-) and underscore (_) characters. Additionally, it must<br />

begin with a letter or the underscore character.<br />

4 On the File menu, click Save.<br />

1 Open the service whose universal name you want to delete.<br />

2 In the editor, click the service’s title bar to give the service the focus.<br />

3 In the Universal Name category of the Properties panel, clear the settings in the<br />

Namespace name and Local name fields.<br />

4 On the File menu, click Save.<br />

Note: Many <strong>webMethods</strong> users use the unqualified portion of<br />

the service name as the local name.<br />

Note: If you move a service, or a folder containing a service, <strong>Developer</strong> retains the service’s<br />

explicit universal name. If you copy a service, or a folder containing a service, <strong>Developer</strong><br />

does not retain the service’s explicit universal name.<br />

To delete a universal name<br />

<strong>webMethods</strong> <strong>Developer</strong> User’s <strong>Guide</strong> Version 6.5, Service Pack 3 � � � 147


Configuring Service Auditing<br />

Specifies if a service<br />

generates audit data.<br />

Specifies when to<br />

include the pipeline in<br />

the audit log.<br />

6. Building Flow Services<br />

Service auditing is a feature in the Integration Server that you can use to track which<br />

services executed, when services started and completed, and whether services succeeded<br />

or failed. You perform service auditing by analyzing the data stored in the audit log. The<br />

audit log can contain entries for service start, service end, and service failure. The audit<br />

log can also contain a copy of the input pipeline used to invoke the service. At run time,<br />

services generate audit data at predefined points. The Integration Server captures the<br />

generated audit data and stores it in the audit log. If the audit log is a database, you can<br />

reinvoke services using the <strong>webMethods</strong> Monitor.<br />

Note: When the Integration Server logs an entry for a service, the log entry contains the<br />

identify of the server that executed the service. The server ID in the log entry always uses<br />

the Integration Server primary port, even if a service is executed using another<br />

(non-primary) Integration Server port.<br />

Each service has a set of auditing properties located in the Audit category on the service’s<br />

Properties panel. These properties determine when a service generates audit data and<br />

what data is stored in the audit log. For each service, you can decide:<br />

� Whether the service should generate audit data during execution.<br />

� The points during service execution when the service should generate audit data to be<br />

saved in the audit log.<br />

� Whether to include a copy of the service input pipeline in the audit log.<br />

Audit properties for a service<br />

Specifies when a<br />

service generates audit<br />

data during execution.<br />

Keep in mind that generating audit data can impact performance. The Integration Server<br />

uses the network to send the audit data to the audit log and uses memory to actually save<br />

the data in the audit log. If a large amount of data is saved, performance can be impacted.<br />

When you configure audit data generation for services, you should balance the need for<br />

audit data against the potential performance impact.<br />

The following sections describe the options for generating audit data and the potential<br />

performance impact of each option.<br />

<strong>webMethods</strong> <strong>Developer</strong> User’s <strong>Guide</strong> Version 6.5, Service Pack 3 � � � 148


Enabling Auditing for a Service<br />

6. Building Flow Services<br />

Note: The audit log can be a flat file or a database. If you use a database, the database must<br />

support JDBC. You can use the Integration Server to view the audit log whether it is a flat<br />

file or a database. If the audit log is a database, you can also use the <strong>webMethods</strong> Monitor<br />

to view audit data and reinvoke the service. Before you configure service auditing, check<br />

with your Integration Server Administrator to learn what kind of audit log exists. For<br />

more information about the audit log, see the <strong>webMethods</strong> Logging <strong>Guide</strong>.<br />

When you configure service auditing, you first must decide whether you want to be able<br />

to audit the service. That is, do you want the service to generate audit data to be captured<br />

in the audit log? If so, you must decide whether the service will generate audit data every<br />

time it executes or only when it is invoked directly by a client request (HTTP, FTP, SMTP,<br />

etc.) or a trigger.<br />

The following table describes each option for the Enable auditing property in the Properties<br />

panel. Keep in mind that whenever a service generates audit data, performance can be<br />

impacted.<br />

Enable auditing option Description<br />

Never The service never generates audit data. Select this option<br />

if you do not want to be able to audit this service.<br />

When top-level service only The service generates audit data only when it is invoked<br />

directly by a client request or by a trigger. The service<br />

does not generate audit data when it is invoked by<br />

another service (that is, when it is a nested service).<br />

Always The service generates audit data every time it is invoked.<br />

Select this option if the service is a critical service that<br />

you want to be able to audit every time it executes.<br />

Specifying When Audit Data Is Generated<br />

When you configure service auditing, you can specify the points when the service<br />

generates audit data. You might want a service to produce audit data when it starts, when<br />

it ends successfully, when it fails, or a combination of these. Use the options in the Log on<br />

property on the Properties panel to specify when a service generates audit data.<br />

<strong>webMethods</strong> <strong>Developer</strong> User’s <strong>Guide</strong> Version 6.5, Service Pack 3 � � � 149


6. Building Flow Services<br />

Tip! When a service generates audit data, it also produces an audit event. If you want the<br />

audit event to cause another action to be performed, such as sending an e-mail<br />

notification, write an event handler. Then subscribe the event handler to audit events. For<br />

more information about events and event handlers, see Chapter 14, “Subscribing to<br />

Events”.<br />

The following table describes each option in the Log on property. Keep in mind that every<br />

time the service generates audit data, the Integration Server must capture the data and<br />

write it to the audit log. This can degrade performance.<br />

Log on option Description<br />

Error only The service generates audit data only when the service ends<br />

because of a failure. If the service executes successfully, it will not<br />

generate audit data.<br />

Performance Impact: This option impacts performance only when<br />

the service fails. When a service executes successfully, this option<br />

does not impact performance. This option offers the smallest<br />

performance impact of all the options under Log on.<br />

Error and success The service generates audit data when the service finishes<br />

executing, regardless of whether it ends because of success or<br />

failure. The audit log will contain an entry for every time the<br />

service finishes processing.<br />

Error, success, and<br />

start<br />

Performance Impact: This option impacts performance every time<br />

the service executes, whether it ends because of error or success. If<br />

you are concerned only with services that fail, consider using the<br />

Error only option instead.<br />

The service generates audit data when it begins executing and<br />

when it finishes executing. When the service executes to<br />

completion, the audit log will contain a start entry and an end or<br />

error entry.<br />

Generally, most services execute fairly quickly. By the time an<br />

administrator views the audit log using <strong>webMethods</strong> Monitor, the<br />

audit log would probably contain entries for the start and end of<br />

service execution. Situations where you might want the service to<br />

generate audit data at the start and end of service execution<br />

include:<br />

� To check for the start of long-running services<br />

� To detect service hangs.<br />

<strong>webMethods</strong> <strong>Developer</strong> User’s <strong>Guide</strong> Version 6.5, Service Pack 3 � � � 150


Log on option Description<br />

Including the Pipeline in the Audit Log<br />

6. Building Flow Services<br />

In both situations, if service execution began but did not complete,<br />

the audit log contains an entry for the start of the service, but no<br />

entry for the end of the service.<br />

Performance Impact: Of all the options under Log on, this option<br />

provides the most verbose and expensive type of audit logging.<br />

Every time it executes, the service generates audit data at two<br />

points: the beginning and the end. The Integration Server must<br />

write the audit data to the audit log twice per service execution.<br />

This requires significantly more disk utilization than the Error only<br />

and Error and success options. At most, the Error only and Error and<br />

success options require the Integration Server to write audit data<br />

once per service execution.<br />

Note: The service generates audit data only when it satisfies the selected option under<br />

Enable auditing and the selected option in the Log on property. For example, if When top-level<br />

service only is selected and the service is not the root service in the flow service, it will not<br />

generate audit data.<br />

When you configure service auditing, you can specify whether the server should include a<br />

copy of the service’s input pipeline in the audit log. If the audit log contains a copy of the<br />

input pipeline, you can use the <strong>webMethods</strong> Monitor to perform more extensive failure<br />

analysis, examine the service’s input data, or reinvoke the service. Use the options in the<br />

Include pipeline property on the Properties panel to specify when the Integration Server<br />

should save a copy of the input pipeline in the audit log.<br />

The pipeline data saved in the audit log is the state of the pipeline just before the<br />

invocation of the service. It is not the state of the pipeline at the point the service generates<br />

audit data.<br />

When Is a Copy of the Input Pipeline Saved in the Audit Log?<br />

The Integration Server saves a copy of the input pipeline only if the service generates<br />

audit data and the service satisfies the option selected in the Include pipeline property. For<br />

example, ServiceA has the following settings on the Properties panel.<br />

<strong>webMethods</strong> <strong>Developer</strong> User’s <strong>Guide</strong> Version 6.5, Service Pack 3 � � � 151


The audit log will contain<br />

audit and pipeline data<br />

for this service only if the<br />

service is invoked by a<br />

client or trigger and...<br />

...the service fails.<br />

Audit log settings for ServiceA<br />

6. Building Flow Services<br />

The audit log will contain the input pipeline for ServiceA only if it is the top-level service<br />

(invoked directly by a client or a trigger) and the service ends because of failure. If ServiceA<br />

is not the top-level service or if ServiceA executes successfully, the audit log will not contain<br />

a copy of the input pipeline.<br />

Note: Including the pipeline in the audit log is more beneficial when the audit log is a<br />

database. The Integration Server can save the pipeline to a flat file audit log; however, you<br />

will not be able to use the pipeline data to reinvoke the service or perform failure analysis.<br />

The following table describes the options in the Include pipeline property on the Properties<br />

panel. Keep in mind that saving the input pipeline to the audit log can impact the<br />

performance of the Integration Server.<br />

Include pipeline Description<br />

Never The Integration Server will never save a copy of the service’s input<br />

pipeline to the audit log. Select this option if you are using a flat file<br />

for the audit log or if you do not want to be able to resubmit the<br />

service to the Integration Server.<br />

Performance Impact: This option requires minimal network bandwidth<br />

because the Integration Server needs to send only the audit data<br />

generated by the service to the audit log.<br />

On errors only The Integration Server saves a copy of the input pipeline to the audit<br />

log only when the service generates audit data because of failure.<br />

Select this option if you want to use the resubmission capabilities of<br />

the <strong>webMethods</strong> Monitor to reinvoke a failed service. For more<br />

information about <strong>webMethods</strong> Monitor, see the <strong>webMethods</strong><br />

Monitor documentation.<br />

Performance Impact: For successful service invocations, the On errors<br />

only option requires minimal network bandwidth. Service<br />

invocations that end in failure require more network bandwidth<br />

because the Integration Server must save the audit data and the<br />

input pipeline. The actual network bandwidth needed depends on<br />

the size of the initial input pipeline. A large pipeline can degrade<br />

performance because it may negatively impact the rate at which the<br />

data is saved to the audit log.<br />

<strong>webMethods</strong> <strong>Developer</strong> User’s <strong>Guide</strong> Version 6.5, Service Pack 3 � � � 152


Include pipeline Description<br />

Service Auditing Use Cases<br />

6. Building Flow Services<br />

Always The Integration Server saves a copy of the input pipeline to the audit<br />

log every time the service generates audit data. If the service<br />

generates data at the start and end of execution (Log on is set to Error,<br />

success, and start), the input pipeline is saved with the audit log entry<br />

for the start of service execution. If a service does not generate audit<br />

data, the Integration Server does not include a copy of the input<br />

pipeline.<br />

Before you set properties in the Audit category on the Properties panel, decide what type of<br />

auditing you want to perform. That is, decide what you want to use the audit log for. The<br />

following sections describe four types of auditing and identify the Audit properties you<br />

would select to be able to perform that type of auditing.<br />

Error Auditing<br />

Select the Always option if you want to be able to use the<br />

resubmission capabilities of the <strong>webMethods</strong> Monitor to reinvoke<br />

the service, regardless of whether the original service invocation<br />

succeeded or failed. Including the pipeline can be useful if a resource<br />

experiences a fatal failure (such as hard disk failure). To restore the<br />

resource to its pre-failure state, you could resubmit all the service<br />

invocations that occurred since the last time the resource was backed<br />

up. This is sometimes called a full audit for recovery.<br />

Performance Impact: The Always option is the most expensive option<br />

under Include pipeline. This option places the greatest demand on<br />

network bandwidth because the Integration Server must write a<br />

copy of the input pipeline to the audit log every time a service<br />

executes. The actual network bandwidth needed depends on the size<br />

of the initial input pipeline. A large input pipeline can negatively<br />

impact the rate at which the data is saved to the audit log.<br />

Note: If you want audit events generated by a service to pass a copy of the input pipeline to<br />

any subscribed event handlers, select On errors only or Always.<br />

In error auditing, you use the audit log to track and reinvoke failed services. To use the<br />

audit log for error auditing, services must generate audit data when errors occur, and the<br />

Integration Server must save a copy of the service’s input pipeline in the audit log.<br />

With <strong>webMethods</strong> Monitor, you can only reinvoke top-level services (those services<br />

invoked directly by a client or by a trigger). Therefore, if your intent with error auditing is<br />

<strong>webMethods</strong> <strong>Developer</strong> User’s <strong>Guide</strong> Version 6.5, Service Pack 3 � � � 153


6. Building Flow Services<br />

to reinvoke failed services, the service needs to generate audit data only when it is the toplevel<br />

service and it fails.<br />

To make sure the audit log contains the information needed to perform error auditing,<br />

select the following Audit properties.<br />

For this property... Select this option...<br />

Enable auditing When top-level service only<br />

Include pipeline On errors only<br />

Log on Error only<br />

To use the audit log for error auditing, use a database as the audit log.<br />

Service Auditing<br />

Note: If you want to be able to audit all failed<br />

invocations of this service, select Always.<br />

When you perform service auditing, you use the audit log to track which services execute<br />

successfully and which services fail. You can perform service auditing to analyze the audit<br />

log and determine how often a service executes, how many times it succeeds, and how<br />

many times it fails. To use the audit log for service auditing, services need to generate<br />

audit data after execution ends.<br />

To make sure the audit log contains the information needed to perform service auditing,<br />

select the following Audit properties.<br />

For this property... Select this option...<br />

Enable auditing When top-level service only<br />

Include pipeline Never<br />

Log on Error and success<br />

Note: Configure a service to save a copy of the input<br />

pipeline only if you intend to reinvoke the service<br />

using the resubmission capabilities of the<br />

<strong>webMethods</strong> Monitor.<br />

To use the audit log for service auditing, you can use either a flat file or a database as the<br />

audit log.<br />

<strong>webMethods</strong> <strong>Developer</strong> User’s <strong>Guide</strong> Version 6.5, Service Pack 3 � � � 154


Auditing for Recovery<br />

6. Building Flow Services<br />

Auditing for recovery involves using the audit log to track executed services and service<br />

input data so that you can reinvoke the services. You might want to audit for recovery in<br />

the event that a resource experiences a fatal failure, and you want to restore the resource<br />

to its pre-failure state by resubmitting service invocations.<br />

When auditing for recovery, you want to be able to resubmit failed and successful<br />

services. The audit log needs to contain an entry for each service invoked by a client<br />

request or a trigger. The audit log also needs to contain a copy of each service’s input<br />

pipeline.<br />

To use the audit log to audit for recovery, select the following Audit properties.<br />

For this property... Select this option...<br />

Enable auditing When top-level service only<br />

Include pipeline Always<br />

Log on Error and success<br />

To use the audit log to audit for recovery, use a database for the audit log.<br />

Auditing Long-Running Services<br />

If a service takes a long time to process, you might want to use the audit log to verify that<br />

service execution started. If the audit log contains a start entry for the service but no end<br />

or error entry, then you know that service execution began but did not complete. To<br />

enable auditing of long-running services, select the Error, success, and start option for the<br />

Log on property.<br />

Note: Typically, you will audit long-running services in conjunction with error auditing,<br />

service auditing, or auditing for recovery.<br />

Setting Auditing Options for a Service<br />

The following procedure explains how to set auditing options for a service. The options<br />

you select determine if and when a service generates audit data, and whether the audit log<br />

includes a copy of the service’s input pipeline. Make sure that you select options that will<br />

provide the audit log with the audit data you require.<br />

Important! Before you select options for generating audit data, check with your Integration<br />

Server Administrator to determine what kind of audit log exists. An audit log can be a flat<br />

file or a database.<br />

<strong>webMethods</strong> <strong>Developer</strong> User’s <strong>Guide</strong> Version 6.5, Service Pack 3 � � � 155


To set auditing options for a service<br />

6. Building Flow Services<br />

1 Open the service for which you want to configure service auditing. To configure<br />

service auditing, you must have write access to the service and own the lock on the<br />

service.<br />

2 In the editor, click the service’s title bar to give the service the focus.<br />

3 In the Audit category of the Properties panel, select an Enable auditing option to indicate<br />

when you want the service to generate audit data.<br />

For more information about the Enable auditing options, see “Enabling Auditing for a<br />

Service” on page 149.<br />

4 For Include pipeline, select an option to indicate when the Integration Server should<br />

include a copy of the input pipeline in the audit log.<br />

Note: If you want audit events generated by this service to pass a copy of the input<br />

pipeline to any subscribed event handlers, select On errors only or Always.<br />

For more information about the Include pipeline options, including information about<br />

the performance impact, see “Including the Pipeline in the Audit Log” on page 151.<br />

5 For Log on, select an option to determine when the service generates audit data.<br />

For more information about the Log on options, including information about the<br />

performance impact, see “Specifying When Audit Data Is Generated” on page 149.<br />

6 On the File menu, click Save.<br />

Important! The options you select in the Audit category of the Properties panel can be<br />

overwritten at run time by the value of the watt.server.auditLog server property.<br />

Audit Level Settings in Earlier Versions of <strong>Developer</strong><br />

In earlier versions of <strong>Developer</strong>, you could configure audit level settings using the Audit<br />

level field on the Settings tab. In this field, you could select one of three audit levels for a<br />

service: off, brief, or verbose. Because the auditing options on the Properties panel offer<br />

more control over the generation of audit data, the audit level settings are no longer<br />

available. Each of the earlier Audit level settings corresponds to a combination of options on<br />

the Properties panel.<br />

The following table indicates how the Audit level values from <strong>webMethods</strong> <strong>Developer</strong> 4.6<br />

(and earlier) correspond to the properties on the Properties panel.<br />

<strong>webMethods</strong> <strong>Developer</strong> User’s <strong>Guide</strong> Version 6.5, Service Pack 3 � � � 156


Printing a Flow Service<br />

Input/Output<br />

parameters<br />

Body of the flow<br />

Details of each<br />

flow step<br />

Audit Level in<br />

<strong>Developer</strong> 4.x Enable auditing Include pipeline Log on<br />

6. Building Flow Services<br />

None Never Never --<br />

Brief Always Never Error, success, and start<br />

Verbose Always Always Error, success, and start<br />

The following procedure describes how to use the View as HTML command to produce a<br />

printable version of a flow service. This lets you see all aspects of a flow (its input and<br />

output parameters, its flow steps, and pipeline behavior) in a single document.<br />

A flow report lets you view all aspects of the flow service at once<br />

<strong>webMethods</strong> <strong>Developer</strong> User’s <strong>Guide</strong> Version 6.5, Service Pack 3 � � � 157


To print a flow service<br />

1 In the editor, select the service that you want to print.<br />

2 From the File menu, click View as HTML.<br />

3 If you want to print the flow, select your browser’s print command.<br />

6. Building Flow Services<br />

Note: When you print a flow service as HTML, only the flow steps currently visible in the<br />

editor appear in the resulting HTML page. To fit all of the steps in a flow service into the<br />

editor (and therefore, into a single HTML page), hide the Navigation, Recent Elements,<br />

Properties, and Results panels to maximize the editor.<br />

<strong>webMethods</strong> <strong>Developer</strong> User’s <strong>Guide</strong> Version 6.5, Service Pack 3 � � � 158


Chapter 7. Inserting Flow Steps<br />

� What Is a Flow Step? . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 160<br />

� Inserting and Moving Flow Steps . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 160<br />

� The INVOKE Step . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 165<br />

� The BRANCH Step . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 168<br />

� The REPEAT Step . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 179<br />

� The SEQUENCE Step . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 185<br />

� The LOOP Step . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 186<br />

� The EXIT Step . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 190<br />

� The MAP Step . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 192<br />

<strong>webMethods</strong> <strong>Developer</strong> User’s <strong>Guide</strong> Version 6.5, Service Pack 3 � � � 159


What Is a Flow Step?<br />

7. Inserting Flow Steps<br />

A flow step is the basic unit of work that instructs <strong>webMethods</strong> Integration Server about<br />

what to do with data at each stage of a flow service. Flow steps can invoke services and<br />

direct the course of execution. Using flow steps you can:<br />

� Invoke a service, such as a flow service, Java service, C service, or Web service<br />

connector (INVOKE).<br />

� Conditionally execute one step from a set of specified alternatives (BRANCH).<br />

� Repeat a set of flow steps up to a specified number of times or until a step in the set<br />

fails or succeeds as specified (REPEAT).<br />

� Group a set of flow steps and control the way in which the failure of a member of the<br />

set is processed (SEQUENCE).<br />

� Repeat a set of flow steps over the elements of a specified array (LOOP).<br />

� Exit the entire flow or exit a single flow step (EXIT).<br />

� Link, add, edit, and delete pipeline variables or invoke several services that operate<br />

on the same set of pipeline variables (MAP).<br />

Inserting and Moving Flow Steps<br />

To insert flow steps in a flow service, you must open the service in the editor. The flow<br />

steps in the service are listed in the editor. (If you just created the service and it does not<br />

yet contain any default logic, the editor is empty).<br />

<strong>webMethods</strong> <strong>Developer</strong> User’s <strong>Guide</strong> Version 6.5, Service Pack 3 � � � 160


Flow steps are<br />

displayed in<br />

the editor.<br />

Displaying the steps in a flow service<br />

7. Inserting Flow Steps<br />

Note: You might find it helpful to declare the input and output parameters for a flow<br />

service before you insert flow steps. By first declaring the parameters, it is clear what data<br />

the service expects and what variables are available for use in flow steps.<br />

You insert flow steps into a service using the following toolbar buttons at the top of the<br />

editor. (You cannot directly type a flow step into the editor. All editing is performed<br />

through the toolbar).<br />

To insert a/an... Click this button... For more information, see page...<br />

INVOKE step 165<br />

MAP step 192<br />

BRANCH step 168<br />

LOOP step 186<br />

<strong>webMethods</strong> <strong>Developer</strong> User’s <strong>Guide</strong> Version 6.5, Service Pack 3 � � � 161


7. Inserting Flow Steps<br />

To insert a/an... Click this button... For more information, see page...<br />

REPEAT step 179<br />

SEQUENCE step 185<br />

EXIT step 190<br />

Note: If you select an existing step in the editor before inserting a new one, <strong>Developer</strong><br />

inserts the new step below the one that is selected. If you do not have a step selected, it<br />

adds the new step to the end of the flow. You can move a step to a new location using the<br />

arrow buttons on the toolbar. See the following section, “Changing the Position of a Flow<br />

Step”.<br />

Changing the Position of a Flow Step<br />

Flow steps run in the order in which they appear in the editor. To move a step up or down<br />

in a flow service, first select that step in the editor and then use the arrow buttons on the<br />

toolbar to move the step up or down in the list.<br />

To... Click this button...<br />

Move the flow step up in the list<br />

Move the flow step down in the list<br />

You can also move a flow step by dragging it up or down with your mouse or by using the<br />

Shift commands on the Compose menu.<br />

Changing the Level of a Flow Step<br />

Some flow steps have subordinate steps on which they operate. Subordinate steps are<br />

referred to as children. For example, when you use the LOOP step, the set of steps that<br />

make up the loop are referred to as children of that LOOP step.<br />

Children are specified by indenting them beneath their parent flow step. In the following<br />

example, the top LOOP step has nine children. Note that one of its children is a BRANCH<br />

step, which has its own set of children.<br />

<strong>webMethods</strong> <strong>Developer</strong> User’s <strong>Guide</strong> Version 6.5, Service Pack 3 � � � 162


These steps are<br />

“children” of the<br />

BRANCH step.<br />

This step is a “child”<br />

of the LOOP step.<br />

Child steps are indented beneath their parent step<br />

7. Inserting Flow Steps<br />

To promote or demote a flow step within a parent/child hierarchy, select the step in the<br />

editor, and then use one of the following buttons to move it left or right beneath the<br />

current parent step.<br />

To... Click this button...<br />

Demote a flow step in the hierarchy (that is, make the selected step<br />

a child of the preceding parent step)<br />

This button will only be available if you select a step that can<br />

become a child.<br />

Promote a flow step in the hierarchy (that is, move the step one<br />

level up in the hierarchy)<br />

Setting the Properties of a Flow Step<br />

Every flow step is associated with a unique set of properties. The properties for a flow<br />

step are displayed in the Properties panel. Values that you specify in the Properties panel<br />

apply only to the selected step in the editor.<br />

<strong>webMethods</strong> <strong>Developer</strong> User’s <strong>Guide</strong> Version 6.5, Service Pack 3 � � � 163


Use the Properties<br />

panel to view and set<br />

the properties of a<br />

flow step.<br />

Properties of a flow step<br />

7. Inserting Flow Steps<br />

Although each type of flow step has a set of unique properties, they all have the following<br />

properties:<br />

Property Description<br />

Comments Assigns an optional descriptive comment to the selected flow step.<br />

Label Assigns a name to the selected flow step. When a label is assigned, that<br />

label appears next to the step in the editor. The label allows you to<br />

reference that flow step in other flow steps. In addition, you use the label<br />

to control the behavior of certain flow steps. For example, the BRANCH<br />

step uses the Label property to determine which alternative it is<br />

supposed to execute.<br />

See “The BRANCH Step” on page 168 and “The EXIT Step” on page 190<br />

for additional information about this use of the label property.<br />

For a complete description of the properties associated with each flow step, see<br />

Appendix A, “<strong>webMethods</strong> Flow Steps”.<br />

<strong>webMethods</strong> <strong>Developer</strong> User’s <strong>Guide</strong> Version 6.5, Service Pack 3 � � � 164


The INVOKE Step<br />

7. Inserting Flow Steps<br />

You use the INVOKE step to request a service within a flow. You can use the INVOKE step<br />

to:<br />

� Invoke any type of service, including other flow services and Web service connectors.<br />

� Invoke any service for which the caller of the current flow has access rights on the<br />

local <strong>webMethods</strong> Integration Server.<br />

� Invoke built-in services and services on other <strong>webMethods</strong> Integration Servers.<br />

� Invoke flow services recursively (that is, a flow service that calls itself). If you use a<br />

flow service recursively, bear in mind that you must provide a means to end the<br />

recursion.<br />

� Invoke any service, validating its input and/or output. For details, see “Performing<br />

Input/Output Validation” on page 266.<br />

Flow service containing INVOKE steps<br />

Specifying the Service Property<br />

The INVOKE step’s Service property specifies which service will be invoked at run time.<br />

When you insert an INVOKE step, <strong>Developer</strong> automatically assigns the name of that<br />

service to the Service property.<br />

If you want to change the service assigned to an INVOKE step, you edit the Service<br />

property. You edit this property in one of two ways:<br />

� By clicking the Service property’s edit button ( ) and selecting a service from the<br />

Select dialog box. This is the preferred method.<br />

� By typing the name of a service in the Service text box. When you specify a service in<br />

this manner, keep the following points in mind:<br />

<strong>webMethods</strong> <strong>Developer</strong> User’s <strong>Guide</strong> Version 6.5, Service Pack 3 � � � 165


7. Inserting Flow Steps<br />

� You must specify the service’s fully qualified name in folderName:serviceName<br />

format.<br />

Example purchasing.orders:getOrders<br />

� You must specify the service’s name exactly as it is defined on the server. Service<br />

names are case sensitive.<br />

Invoking a Built-In Service<br />

There is an extensive set of built-in services that you can invoke from a flow service. The<br />

<strong>webMethods</strong> library includes services for doing such things as transforming data values,<br />

performing simple mathematical operations, extracting information from XML<br />

documents, and accessing databases.<br />

Built-in services reside in the WmPublic package. For a complete description of these<br />

services, see the <strong>webMethods</strong> Integration Server Built-In Services Reference.<br />

Note: If you are using any adapters (for example, the <strong>webMethods</strong> JDBC Adapter), you<br />

will have additional built-in services, which are provided by the adapters. See the<br />

documentation provided with those adapters for details.<br />

Invoking a Service on Another <strong>webMethods</strong> Integration<br />

Server<br />

You can use the built-in service pub.remote:invoke to invoke a service on a remote Integration<br />

Server and return the results. The remote server is identified by an alias, which is<br />

configured on the Remote Servers screen in the Integration Server Administrator. The<br />

pub.remote:invoke service automatically handles opening a session and authentication on the<br />

remote server.<br />

The pub.remote:invoke service resides in the WmPublic package and requires the alias of the<br />

remote server and the fully qualified name of the service that you want to invoke as input.<br />

For a complete description of this service, see the <strong>webMethods</strong> Integration Server Built-In<br />

Services Reference.<br />

<strong>webMethods</strong> <strong>Developer</strong> User’s <strong>Guide</strong> Version 6.5, Service Pack 3 � � � 166


Building an INVOKE Step<br />

Use the following procedure to invoke a service within a flow service.<br />

To build an INVOKE step<br />

7. Inserting Flow Steps<br />

1 Open the flow service in which you want to invoke another service. In the editor,<br />

select the step immediately above which you want to insert the INVOKE step.<br />

2 Click on the editor toolbar and then select the service you want to invoke. If the<br />

service you want to invoke does not appear in the list, click Browse to navigate to and<br />

select the service.<br />

Tip! You can also add invoke steps by selecting one or more services in the Navigation<br />

panel and dragging them to the desired position within the flow in the editor. The<br />

services must reside on the same server as the flow service.<br />

3 Complete the following fields on the Properties panel:<br />

For this property... Specify...<br />

Service The fully qualified name of the service that will be invoked at<br />

run time. When you insert a service, <strong>Developer</strong> automatically<br />

assigns the name of that service to the Service property. If you<br />

want to change the service that is invoked, specify the service’s<br />

fully qualified name in the format folderName:serviceName or<br />

click and select a service from the list.<br />

Timeout Optional. Specifies the maximum number of seconds that this<br />

step should run. If this time elapses before the step completes,<br />

the server waits for the step to complete and then raises an<br />

exception.<br />

If you want to use the value of a pipeline variable for this<br />

property, type the variable name between % symbols. For<br />

example, %expiration%.<br />

If you do not need to specify a time-out period, leave Timeout<br />

blank.<br />

Validate input Whether or not you want the server to validate the input to the<br />

service against the service input signature. Select True to<br />

validate the input. Select False if you do not want to validate<br />

the input.<br />

For information about validating input, see “Performing<br />

Input/Output Validation” on page 266.<br />

<strong>webMethods</strong> <strong>Developer</strong> User’s <strong>Guide</strong> Version 6.5, Service Pack 3 � � � 167


The BRANCH Step<br />

For this property... Specify...<br />

7. Inserting Flow Steps<br />

Validate output Whether or not you want the server to validate the output of<br />

the service against the service output signature. Select True to<br />

validate the output. Select False if you do not want to validate<br />

the output.<br />

4 If necessary, on the Pipeline tab, link Pipeline In variables to Service In variables. Link<br />

Service Out variables to Pipeline Out variables. For more information about linking<br />

variables to a service, see “Linking Variables” on page 201.<br />

The BRANCH step allows you to conditionally execute a step based on the value of a<br />

variable at run time. For example, you might use a BRANCH step to process a purchase<br />

order one way if the PaymentType value is “CREDIT CARD” and another way if it is<br />

“CORP ACCT”.<br />

When you build a BRANCH step, you can:<br />

For information about validating output, see “Performing<br />

Input/Output Validation” on page 266.<br />

Tip! When you install <strong>Developer</strong>, the Insert menu displays a list of commonly used<br />

services. You can use the Tools�Options command to customize this list of services to suit<br />

your needs.<br />

� Branch on a switch value. Use a variable to determine which child step executes. At run<br />

time, the BRANCH step matches the value of the switch variable to the Label property<br />

of each of its targets. It executes the child step whose label matches the value of the<br />

switch.<br />

� Branch on an expression. Use an expression to determine which child step executes. At<br />

run time, the BRANCH step evaluates the expression in the Label property of each<br />

child step. It executes the first child step whose expression evaluates to “true.”<br />

Important! You cannot branch on a switch value and an expression for the same BRANCH<br />

step. If you want to branch on the value of a single variable and you know the possible<br />

run-time values of the switch variable exactly, branch on the switch value. If you want to<br />

branch on the values of more than one variable or on a range of values, branch on<br />

expressions.<br />

<strong>webMethods</strong> <strong>Developer</strong> User’s <strong>Guide</strong> Version 6.5, Service Pack 3 � � � 168


Each conditional step<br />

has a label that matches<br />

the value that causes it<br />

to execute.<br />

Branching on a Switch Value<br />

7. Inserting Flow Steps<br />

When you branch on a switch value, you branch on the value of a single variable in the<br />

pipeline.<br />

To branch on a switch value<br />

1 Create a list of the conditional steps (target steps) and make them children of the<br />

BRANCH step.<br />

2 In the Properties panel for the BRANCH step, specify in the Switch property the name<br />

of the pipeline variable whose value will act as the switch. For more information<br />

about this property, see “Specifying the Switch Variable” on page 170.<br />

3 In the Label property of each target step, specify the value that will cause that step to<br />

execute. For more information about this property, see “Specifying the Label Value”<br />

on page 170.<br />

Simple BRANCH step that branches on a switch value<br />

The switch property of<br />

the BRANCH step<br />

specifies the name of<br />

the variable that acts<br />

as the switch.<br />

<strong>webMethods</strong> <strong>Developer</strong> User’s <strong>Guide</strong> Version 6.5, Service Pack 3 � � � 169


If PaymentType is<br />

“COD,” execution will<br />

fall through this<br />

BRANCH step.<br />

Specifying the Switch Variable<br />

The variable you use as the switch variable:<br />

� Must be a String or constrained Object variable.<br />

7. Inserting Flow Steps<br />

� Must be a variable that can exist in the pipeline when the BRANCH step is executed at<br />

run time.<br />

� Must be formatted as document/documentVariable, if you are specifying a field in a<br />

document as the switch variable (for example, BuyerInfo/AccountNum).<br />

Specifying the Label Value<br />

At run time, the BRANCH step compares the value of the switch variable to the Label<br />

property of each of its targets. It executes the target step whose label matches the value of<br />

the switch variable.<br />

You can use a regular expression to specify the matching value for a BRANCH step. To do<br />

so, use the following syntax to specify the value in Label:<br />

/RegularExpression/<br />

For example, if you want to select a step based on whether a PO number starts with the<br />

string “REL” you use /^REL/ as the value of Label. For more information about regular<br />

expressions, see Appendix B, “Regular Expressions”.<br />

Unlike other flow steps whose children execute in sequence at run time, only one child of a<br />

BRANCH step is executed: the target whose label matches the value of the switch<br />

variable. If none of the targets match the switch variable, none of them are performed, and<br />

execution “falls through” to the next step in the flow service. For example, in the<br />

following flow service, execution passes directly to the LogTransaction service if the value of<br />

PaymentType is “COD.”<br />

An unmatched value will fall though the BRANCH<br />

<strong>webMethods</strong> <strong>Developer</strong> User’s <strong>Guide</strong> Version 6.5, Service Pack 3 � � � 170


7. Inserting Flow Steps<br />

Keep the following points in mind when assigning labels to the targets of the BRANCH<br />

step:<br />

� You must give each target step a label unless you want to match an empty string. For<br />

that case, you leave the Label property blank. For more about matching an empty<br />

string, see “Branching on Null and Empty Values” on page 172.<br />

� Each Label value must be unique within the BRANCH step.<br />

� When you specify a literal value as the Label of a child step, the value you specify must<br />

match the run-time value of the switch variable exactly. The Label property is case<br />

sensitive.<br />

� You can use a regular expression as the value of Label instead of a literal value.<br />

� You can match a null value by using the $null value in the Label property. For more<br />

information about specifying a null value, see “Branching on Null and Empty Values”<br />

on page 172.<br />

� You can designate a default step for all unmatched cases by using the $default value in<br />

the Label property. For more information about using the $default setting, “Specifying a<br />

Default Step” on page 174.<br />

Branching on an Expression<br />

When you branch on an expression, you assign an expression to each child of a branch<br />

step. At run time, the BRANCH step evaluates the expressions assigned to the child steps.<br />

It executes the first child step with an expression that evaluates to true.<br />

To branch on an expression<br />

1 Create a list of the conditional steps (target steps) and make them children of the<br />

BRANCH step.<br />

2 In the Properties panel for the BRANCH step, set Evaluate labels to True.<br />

3 In the Label property of each target, specify the expression that, when true, will cause<br />

the target step to execute. The expressions you create can include multiple variables<br />

and can specify a range of values for variables. Use the syntax provided by<br />

<strong>webMethods</strong> to create the expression. For more information about expression syntax,<br />

see Appendix D, “Conditional Expressions”.<br />

<strong>webMethods</strong> <strong>Developer</strong> User’s <strong>Guide</strong> Version 6.5, Service Pack 3 � � � 171


Each target step has an<br />

expression as the label.<br />

Simple BRANCH step that branches on an expression<br />

When set to true, the<br />

Evaluate labels property<br />

indicates the step<br />

branches on expressions.<br />

7. Inserting Flow Steps<br />

Keep in mind that only one child of a BRANCH step is executed: the first target step<br />

whose label contains an expression that evaluates to true. If none of the expressions<br />

evaluate to true, none of the child steps are invoked, and execution falls through to the<br />

next step in the flow service. You can use the $default value in the Label property to<br />

designate a default step for cases where no expressions evaluate to true. For more<br />

information about using the $default value, see “Specifying a Default Step” on page 174.<br />

Important! The expressions you create for the children of a BRANCH step need to be<br />

mutually exclusive (only one condition should evaluate to true at run time).<br />

Branching on Null and Empty Values<br />

When you build a BRANCH step, you can include target steps that match null or empty<br />

switch values. The BRANCH step considers a switch value to be null if the variable does<br />

not exist in the pipeline or is explicitly set to null. The BRANCH step considers a switch<br />

value to be an empty string if the variable exists in the pipeline but its value is a zero length<br />

string. To branch on null or empty values, set the Label property for the target step as<br />

follows.<br />

<strong>webMethods</strong> <strong>Developer</strong> User’s <strong>Guide</strong> Version 6.5, Service Pack 3 � � � 172


To BRANCH on... Do the following...<br />

7. Inserting Flow Steps<br />

A null value Set the Label property to $null. At run time, the BRANCH step<br />

executes the target step with the $null label if the switch variable is<br />

explicitly set to null or does not exist in the pipeline.<br />

You can use $null with any type of switch variable.<br />

An empty string Leave the Label property blank (empty). At run time, the BRANCH<br />

step executes the target step with no label if the switch variable is<br />

present, but contains no characters.<br />

You can use an empty value only when the switch variable is of<br />

type String.<br />

Important! If you branch on expressions (Evaluate labels is set to True), you cannot branch on<br />

null or empty values. When executing the BRANCH step and evaluating labels, the server<br />

ignores target steps with a blank or $null label.<br />

The following example shows a BRANCH step used to authorize a credit card number<br />

based on the buyer’s credit card type (CreditCardType). It contains three target steps. The<br />

first target step handles situations where the value of CreditCardType is null or where<br />

CreditCardType does not exist in the pipeline. The second target step handles cases where<br />

the value of CreditCardType is an empty string. (Note that the first two target steps are<br />

EXIT steps that will return a failure condition when executed.) The third target step has<br />

the $default label, and will process all specified credit card types.<br />

<strong>webMethods</strong> <strong>Developer</strong> User’s <strong>Guide</strong> Version 6.5, Service Pack 3 � � � 173


This target step executes<br />

when CreditCardType is<br />

null or does not exist.<br />

This target step<br />

executes when the<br />

CreditCardType value is<br />

a zero length string.<br />

BRANCH that contains target steps to match null values or empty strings<br />

Specifying a Default Step<br />

7. Inserting Flow Steps<br />

If you want to prevent the service from falling through a BRANCH step when an<br />

unmatched value occurs at run time, include a default target step to handle unmatched<br />

cases. To specify the default alternative of a BRANCH step, set the Label property to<br />

$default.<br />

The following example shows a BRANCH step that is used to authenticate payment for an<br />

order based on the type of payment (PaymentType). It contains three target steps. The first<br />

target step handles orders paid for by Credit Card. The second target step handles orders<br />

paid for through a Corporate Account. The third target step has the $default label and will<br />

process all other payment types.<br />

<strong>webMethods</strong> <strong>Developer</strong> User’s <strong>Guide</strong> Version 6.5, Service Pack 3 � � � 174


The first two target steps<br />

handle credit card and<br />

corporate account<br />

payments...<br />

...and the $default<br />

target step handles<br />

the rest.<br />

The default step is set to $default<br />

Using SEQUENCE as the Target of a BRANCH<br />

7. Inserting Flow Steps<br />

Important! You can only have one default target step for a BRANCH step. <strong>Developer</strong><br />

always evaluates the default step last. The default step does not need to be the last child of<br />

the BRANCH step.<br />

In many cases, you may want a BRANCH step to conditionally execute a series of<br />

multiple steps rather than just a single step. For these cases, you can use the SEQUENCE<br />

step as the target step and group a series of flow steps beneath it.<br />

The following example illustrates a service that accepts a purchase order and processes it<br />

one of three ways depending on the payment type specified in the PaymentType variable.<br />

Because a series of steps are needed to process the PO in each case, the targets of the<br />

BRANCH are defined as SEQUENCE steps, and the appropriate series of steps are<br />

specified as children beneath each SEQUENCE.<br />

<strong>webMethods</strong> <strong>Developer</strong> User’s <strong>Guide</strong> Version 6.5, Service Pack 3 � � � 175


Create a SEQUENCE<br />

for each multi-step<br />

alternative...<br />

...and then specify the<br />

appropriate series of<br />

flow steps as children<br />

beneath each<br />

SEQUENCE.<br />

Use a SEQUENCE step as the target for a multi-step alternative<br />

Define a multi-step alternative in a SEQUENCE<br />

7. Inserting Flow Steps<br />

The SEQUENCE step that you use as a target for a BRANCH can contain any valid flow<br />

step, including additional BRANCH steps. For additional information about building a<br />

SEQUENCE, see “The SEQUENCE Step” on page 185.<br />

<strong>webMethods</strong> <strong>Developer</strong> User’s <strong>Guide</strong> Version 6.5, Service Pack 3 � � � 176


Building a BRANCH Step<br />

Use the following procedure to build a BRANCH step in a flow service.<br />

To build a BRANCH step<br />

7. Inserting Flow Steps<br />

1 If you are inserting a BRANCH step into an existing flow service, display that service<br />

in the editor and highlight the step immediately above where you want the BRANCH<br />

step inserted.<br />

2 Click on the editor toolbar.<br />

3 Complete the following fields on the Properties panel:<br />

For this property... Specify...<br />

Comments An optional descriptive comment for this step.<br />

Scope The name of a document (IData object) in the pipeline to which<br />

you want to restrict this step. If you want this step to have<br />

access to the entire pipeline, leave this property blank.<br />

Timeout The maximum number of seconds that this step should run. If<br />

this time elapses before the step completes, the server waits for<br />

the step to complete and then raises an exception.<br />

If you want to use the value of a pipeline variable for this<br />

property, type the variable name between % symbols (for<br />

example, %expiration%).<br />

If you do not need to specify a time-out period, leave Timeout<br />

blank.<br />

Label An optional name for this specific step, or a null, unmatched,<br />

or empty string ($null, $default, blank). For more information<br />

about branching on null or empty values, see “Branching on<br />

Null and Empty Values” on page 172.<br />

Note: If you use this step as a target for another BRANCH or an<br />

EXIT step, you must specify a value in the Label property. For<br />

more information about the EXIT step, see “The EXIT Step” on<br />

page 190.<br />

<strong>webMethods</strong> <strong>Developer</strong> User’s <strong>Guide</strong> Version 6.5, Service Pack 3 � � � 177


For this property... Specify...<br />

7. Inserting Flow Steps<br />

Switch The name of the String or constrained Object variable whose<br />

value will be used to determine which child step to execute at<br />

run time. Do not specify a switch variable if you set the<br />

Evaluate labels property to True.<br />

Evaluate labels Whether or not you want to evaluate labels of child steps as<br />

conditional expressions. Select True to branch on expressions.<br />

Select False (the default) if you want to branch on the switch<br />

value.<br />

4 Insert the conditional steps that belong to the BRANCH (that is, its children) using the<br />

following steps:<br />

a Insert a flow step using the buttons on the editor toolbar.<br />

b Indent the flow step using on the editor toolbar to make it a child of the<br />

BRANCH step.<br />

c In the Label property on the Properties panel, specify the switch value that will<br />

cause this step to execute at run time.<br />

To match... Specify...<br />

That exact string A string<br />

The String representation of the object’s value<br />

A constrained<br />

Example for Boolean object true<br />

object value<br />

Example for Integer object 123<br />

Any string fitting the criteria specified by the regular<br />

expression<br />

Example /^REL/<br />

d Set other properties as needed.<br />

A regular<br />

expression<br />

An empty string A blank field<br />

A null value $null<br />

Any unmatched value (that is, execute the step if the<br />

value does not match any other label)<br />

$default<br />

<strong>webMethods</strong> <strong>Developer</strong> User’s <strong>Guide</strong> Version 6.5, Service Pack 3 � � � 178


The REPEAT Step<br />

This INVOKE step is<br />

repeated up to 10 times<br />

if it fails at run time.<br />

7. Inserting Flow Steps<br />

Important! If you are branching on expressions, make sure the expressions you assign to the<br />

target steps are mutually exclusive. In addition, do not use null or empty values as labels<br />

when branching on expressions. The BRANCH step ignores target steps with a $null label<br />

or blank label.<br />

The REPEAT step allows you to conditionally repeat a sequence of child steps based on<br />

the success or failure of those steps. You can use REPEAT to:<br />

� Re-execute (retry) a set of steps if any step within the set fails. This option is useful to<br />

accommodate transient failures that might occur when accessing an external system<br />

(for example, databases, ERP systems, Web servers, or Web services) or device.<br />

� Re-execute a set of steps until one of the steps within the set fails. This option is useful for<br />

repeating a process as long as a particular set of circumstances exists (for example,<br />

data items exist in a data set).<br />

Use REPEAT to re-execute one or more steps<br />

<strong>webMethods</strong> <strong>Developer</strong> User’s <strong>Guide</strong> Version 6.5, Service Pack 3 � � � 179


Specifying the REPEAT Condition<br />

7. Inserting Flow Steps<br />

When you build a REPEAT step, you set the Repeat on property to specify the condition<br />

(success or failure) that will cause its children to re-execute at run time.<br />

If you set “Repeat on” to… The REPEAT step…<br />

FAILURE Re-executes the set of child steps if any step in the set fails.<br />

SUCCESS Re-executes the set of child steps if all steps in the set<br />

complete successfully.<br />

Setting the REPEAT Counter<br />

The REPEAT step’s Count property specifies the maximum number of times the server reexecutes<br />

the child steps in the REPEAT step.<br />

If you set “Count” to… The REPEAT step…<br />

0 Does not re-execute children.<br />

Any value > 0 Re-executes children up to this number of times.<br />

-1 or blank Re-executes children as long as the specified Repeat on<br />

condition is true.<br />

Important! Note that children of a REPEAT always execute at least once. The Count property<br />

specifies the maximum number of times the children can be re-executed. At the end of an<br />

iteration, the server checks to see whether the condition (that is, failure or success) for<br />

repeating is satisfied. If the condition is true and the Count is not met, the children are<br />

executed again. This process continues until the repeat condition is false or Count is met,<br />

whichever occurs first. (In other words, the maximum number of times that children of a<br />

REPEAT will execute when Count is > -1, is Count+1.)<br />

When Does REPEAT Fail?<br />

The following conditions cause the REPEAT step to fail:<br />

If “Repeat on” is set to… The REPEAT step fails if…<br />

SUCCESS A child within the REPEAT block fails.<br />

FAILURE The Count limit is reached before its children execute<br />

successfully.<br />

If the REPEAT step is a child of another flow step, the failure is propagated to its parent.<br />

<strong>webMethods</strong> <strong>Developer</strong> User’s <strong>Guide</strong> Version 6.5, Service Pack 3 � � � 180


Using REPEAT to Retry a Failed Step<br />

7. Inserting Flow Steps<br />

If your flow invokes services that access external systems, you can use the REPEAT step to<br />

accommodate network errors, such as busy servers or connection errors, at run time. If<br />

you use the REPEAT step for this purpose, keep the following points in mind:<br />

� The following types of failures satisfy the FAILURE condition:<br />

� Expiration of a child step’s Timeout limit<br />

� An exception thrown by a Java service<br />

� A document query that returns an unpermitted null value<br />

� If you specify multiple children under a REPEAT step, the failure of any one of the<br />

children will cause the entire set of children to be re-executed.<br />

� The REPEAT step immediately exits a set of children at the point of failure (that is, if<br />

the second child in a set of three fails, the third child is not executed).<br />

� When Repeat on is set to FAILURE, the failure of a child within a REPEAT step does<br />

not cause the REPEAT step itself to fail unless the Count limit is also reached.<br />

� The Timeout property for the REPEAT step specifies the amount of time in which the<br />

entire REPEAT step, including all of its possible iterations, must complete. When you<br />

use REPEAT to retry on failure, you may want to leave the Timeout value at 0 (no limit)<br />

or set it to a very high value. You can also set the property to the value of a pipeline<br />

variable by typing the name of the variable between % symbols.<br />

� As a developer, you must be thoroughly familiar with the processes you include<br />

within a REPEAT step. Make certain that the child steps you specify can safely be<br />

repeated in the event that a failure occurs. You don’t want to use REPEAT if there is<br />

the possibility that a single action, such as accepting an order or crediting an account<br />

balance, could be applied twice.<br />

To build a REPEAT step that re-executes failed steps<br />

1 If you are inserting a REPEAT step into an existing flow service, display that service in<br />

the editor and highlight the step immediately above where you want the REPEAT<br />

step inserted.<br />

2 Click on the editor toolbar.<br />

3 Complete the following fields on the Properties panel:<br />

<strong>webMethods</strong> <strong>Developer</strong> User’s <strong>Guide</strong> Version 6.5, Service Pack 3 � � � 181


For this property... Specify...<br />

7. Inserting Flow Steps<br />

Comments An optional descriptive comment for this step.<br />

Scope The name of a document (IData object) in the pipeline to which<br />

you want to restrict this step. If you want this step to have<br />

access to the entire pipeline, leave this property blank.<br />

Timeout The maximum number of seconds that this step should run. If<br />

this time elapses before the step completes, the server waits for<br />

the step to complete and then raises an exception.<br />

If you want to use the value of a pipeline variable for this<br />

property, type the variable name between % symbols (for<br />

example, %expiration%).<br />

If you do not need to specify a time-out period, leave Timeout<br />

blank.<br />

Label An optional name for this specific REPEAT step, or a null,<br />

unmatched, or empty string ($null, $default, blank).<br />

Important! If you use this step as a target for a BRANCH or<br />

EXIT step, you must specify a value in the Label property. For<br />

more information about the BRANCH and EXIT steps, see<br />

“The BRANCH Step” on page 168 or “The EXIT Step” on<br />

page 190.<br />

Count The maximum number of times you want the children to be<br />

re-executed. If you want to use the value of a pipeline variable<br />

for this property, type the variable name between % symbols<br />

(for example, %servicecount%).<br />

If you want the children re-executed until they are all<br />

successful (that is, no maximum limit), set this value to –1.<br />

Repeat interval The length of time (in seconds) that you want the server to<br />

wait between iterations of the children.<br />

If you want to use the value of a pipeline variable for this<br />

property, type the variable name between % symbols (for<br />

example, %waittime%).<br />

Repeat on FAILURE<br />

<strong>webMethods</strong> <strong>Developer</strong> User’s <strong>Guide</strong> Version 6.5, Service Pack 3 � � � 182


7. Inserting Flow Steps<br />

4 Beneath the REPEAT step, use the following steps to insert each step that you want to<br />

repeat:<br />

a Insert a flow step using the buttons on the editor toolbar.<br />

b Indent that flow step using on the editor toolbar. (Make it a child of the<br />

REPEAT step.)<br />

c Set the properties for the child step as needed.<br />

Using REPEAT to Retry a Successful Step<br />

Apart from using REPEAT to retry a failed step, you can also use it as a looping device to<br />

repeat a series of steps until a failure occurs.<br />

If you use the REPEAT step to re-execute successful child steps, keep the following points<br />

in mind:<br />

� The success condition is met if all children of the REPEAT step execute without<br />

returning a single exception.<br />

� If one child in the set fails, the REPEAT step exits at the point of failure, leaving the<br />

remaining children unexecuted.<br />

� The failure of a child does not cause the REPEAT step to fail; it merely ends the loop.<br />

(In this case, the REPEAT step itself succeeds and execution of the flow proceeds<br />

normally).<br />

To build a REPEAT step that repeats a set of successful steps<br />

1 If you are inserting a REPEAT step into an existing flow service, display that service in<br />

the editor and highlight the step immediately above where you want the REPEAT<br />

step inserted.<br />

2 Click on the editor toolbar.<br />

3 Complete the following fields on the Properties panel:<br />

For this property... Specify...<br />

Comments An optional descriptive comment for this step.<br />

Scope The name of a document (IData object) in the pipeline to which<br />

you want to restrict this step. If you want this step to have<br />

access to the entire pipeline, leave this property blank.<br />

<strong>webMethods</strong> <strong>Developer</strong> User’s <strong>Guide</strong> Version 6.5, Service Pack 3 � � � 183


For this property... Specify...<br />

7. Inserting Flow Steps<br />

Timeout The maximum number of seconds that this step should run.If<br />

this time elapses before the step completes, the server waits for<br />

the step to complete and then raises an exception.<br />

If you want to use the value of a pipeline variable for this<br />

property, type the variable name between % symbols (for<br />

example, %expiration%).<br />

If you do not need to specify a time-out period, leave Timeout<br />

blank.<br />

Label An optional name for this specific step, or a null, unmatched,<br />

or empty string ($null, $default, blank).<br />

Important! If you use this step as a target for a BRANCH or<br />

EXIT step, you must specify a value in the label property. For<br />

more information about the BRANCH and EXIT steps, see<br />

“The BRANCH Step” on page 168 or “The EXIT Step” on<br />

page 190.<br />

Count The maximum number of times you want the children to be<br />

re-executed. If you want to use the value of a pipeline variable<br />

for this property, type the variable name between % symbols<br />

(for example, %servicecount%).<br />

If you want the children re-executed until any one of them fails<br />

(that is, no maximum limit), set this value to –1.<br />

Repeat interval The length of time (in seconds) that you want the server to<br />

wait between iterations of the children.<br />

If you want to use the value of a pipeline variable for this<br />

property, type the variable name between % symbols (for<br />

example, %waittime%).<br />

Repeat on SUCCESS<br />

4 Beneath the REPEAT step, use the following steps to insert each step that you want<br />

repeat:<br />

a Insert a flow step using the buttons on the editor toolbar.<br />

b Indent that flow step using on the editor toolbar to make it a child of the<br />

REPEAT step.<br />

c Set the properties for the child step as needed.<br />

<strong>webMethods</strong> <strong>Developer</strong> User’s <strong>Guide</strong> Version 6.5, Service Pack 3 � � � 184


The SEQUENCE Step<br />

7. Inserting Flow Steps<br />

You use the SEQUENCE step to build a set of steps that you want to treat as a group. Steps<br />

in a group are executed in order, one after another. By default, all steps in a flow service,<br />

except for children of a BRANCH step, are executed as though they were members of an<br />

implicit SEQUENCE step (that is, they execute in order, one after another). However,<br />

there are times when it is useful to explicitly group a set of steps. The most common<br />

reasons to do this are:<br />

� To group a set of steps as a single alternative beneath a BRANCH step. For details<br />

about this use of the SEQUENCE step, see “Using SEQUENCE as the Target of a<br />

BRANCH” on page 175.<br />

� To specify the conditions under which the server will exit a sequence of steps without<br />

executing the entire set.<br />

Using SEQUENCE to Specify an Exit Condition<br />

In an implicit sequence, when a step fails, the server automatically exits the sequence (that<br />

is, the Exit on property is set to FAILURE). By grouping steps into an explicit sequence, you<br />

can override this default behavior and specify the condition on which the sequence exits.<br />

To do this, you set the Exit on parameter as follows:<br />

If you want the server to… Set “Exit on” to…<br />

Exit the sequence when a step in the sequence fails. (Execution<br />

continues with the next flow step in the flow service.) This is the<br />

default behavior of a sequence of steps.<br />

This setting is useful if you have a series of steps that build upon<br />

one another. For example, if you have a set of steps that gets an<br />

authorization code and then submits a PO, you will want to skip the<br />

PO submission if the authorization step fails.<br />

When a SEQUENCE exits under this condition, the SEQUENCE<br />

step fails.<br />

Note: When a SEQUENCE step exits on failure, the Integration<br />

Server rolls back the pipeline contents. That is, the Integration<br />

Server returns the pipeline to the state it was in before the<br />

SEQUENCE step executed.<br />

FAILURE<br />

<strong>webMethods</strong> <strong>Developer</strong> User’s <strong>Guide</strong> Version 6.5, Service Pack 3 � � � 185


The LOOP Step<br />

7. Inserting Flow Steps<br />

If you want the server to… Set “Exit on” to…<br />

Exit the sequence when any step in the sequence succeeds.<br />

(Execution continues with the next step in the flow service.)<br />

This setting is useful for building a set of alternative steps that are<br />

each attempted at run time. Once one of the members of the set runs<br />

successfully, the remaining steps in the sequence are skipped.<br />

When a SEQUENCE exits under this condition, the server considers<br />

the SEQUENCE step successful, even if all its children fail. If a child<br />

fails under this condition, any changes that it made to the pipeline<br />

are rolled back (undone), and processing continues with the next<br />

child step in the SEQUENCE.<br />

Execute every step in the sequence even if one of the steps in the<br />

sequence fails.<br />

The server considers a SEQUENCE step successful as long as it<br />

executes all of its children within the specified time-out limit. The<br />

success or failure of a child within the sequence is not taken into<br />

consideration. If a child fails under this condition, any changes that<br />

it made to the pipeline are rolled back (undone), and processing<br />

continues with the next child step in the SEQUENCE.<br />

SUCCESS<br />

The LOOP step repeats a sequence of child steps once for each element in an array that<br />

you specify. For example, if your pipeline contains an array of purchase-order line items,<br />

you could use a LOOP step to process each line item in the array.<br />

To specify the sequence of steps that make up the body of the loop (that is, the set of steps<br />

you want the LOOP to repeat), you indent those steps beneath the LOOP as shown in the<br />

following example.<br />

<strong>webMethods</strong> <strong>Developer</strong> User’s <strong>Guide</strong> Version 6.5, Service Pack 3 � � � 186<br />

DONE<br />

Note: Rollback operations are performed on the first level of the pipeline only. That is, firstlevel<br />

variables are restored to their original values before the step failed, but the server<br />

does not roll back changes to any documents to which the first-level variables refer.<br />

Note: A failure in a MAP step (that is, a failure in one of the transformers) will cause the<br />

containing SEQUENCE to exit when you set Exit on to FAILURE. However, a MAP step that<br />

does not fail will not cause the containing SEQUENCE to exit when you set Exit on to<br />

SUCCESS. That is, a MAP can fail but it does not “succeed.”


The body of the loop<br />

must be indented<br />

beneath the LOOP<br />

step.<br />

The entire LOOP step<br />

is a child of the<br />

outer LOOP.<br />

Simple LOOP step<br />

7. Inserting Flow Steps<br />

You may include any valid flow step within the body of a LOOP, including additional<br />

LOOP steps. The following example shows a pair of nested LOOPs. Note how the<br />

indentation of the steps determines the LOOP to which they belong.<br />

Nested LOOP steps<br />

Specifying the Input Array<br />

The LOOP step requires you to specify an input array that contains the individual<br />

elements that will be used as input to one or more steps in the LOOP. At run time, the<br />

LOOP step executes one pass of the loop for each member in the specified array. For<br />

example, if you want to execute a LOOP for each line item stored in a purchase order, you<br />

would use the document list in which the order’s line items are stored as the LOOP’s input<br />

array.<br />

<strong>webMethods</strong> <strong>Developer</strong> User’s <strong>Guide</strong> Version 6.5, Service Pack 3 � � � 187


The LOOP step<br />

executes once for each<br />

member of the array<br />

specified in Input array.<br />

7. Inserting Flow Steps<br />

You specify the name of the input array on the LOOP step’s Properties panel. The array<br />

you specify can be any of the following data types:<br />

� String list<br />

� String table<br />

� Document list<br />

� Object list<br />

LOOP properties<br />

When you design your flow, remember that because the services within the loop operate<br />

against individual elements in the specified input array, they must be designed to take<br />

elements of the array as input, not the entire array.<br />

For example, if your LOOP executes against a document list called LineItems that contains<br />

children called Item, Qty, and UnitPrice, you would specify LineItems as the Input array for<br />

the LOOP step, but services within the loop would take the individual elements of<br />

LineItems (for example, Item, Qty, UnitPrice, and so forth) as input.<br />

Collecting Output from a LOOP Step<br />

If your LOOP step produces an output variable, the server can collect that output into an<br />

array in the pipeline.<br />

To do this, you use the Output array parameter to specify the name of the array variable into<br />

which you want the server to collect output for each iteration of the loop. For example, if<br />

your loop checks inventory status of each line item in a purchase order and produces a<br />

String called InventoryStatus each time it executes, you would specify InventoryStatus as<br />

the value of Output array. At run time, the server will automatically transform<br />

InventoryStatus to an array variable that contains the output from each iteration of the<br />

loop.<br />

To collect output from each pass of the loop, specify the name of the output variable that<br />

you want the server to collect for each iteration.<br />

<strong>webMethods</strong> <strong>Developer</strong> User’s <strong>Guide</strong> Version 6.5, Service Pack 3 � � � 188


Building a LOOP Step<br />

Use the following procedure to build a LOOP step in a flow service.<br />

To build a LOOP step<br />

7. Inserting Flow Steps<br />

1 If you are inserting a LOOP step into an existing flow service, display that service in<br />

the editor and select the step immediately above where you want the LOOP step<br />

inserted.<br />

2 Click on the editor toolbar.<br />

3 Complete the following fields on the Properties panel:<br />

For this property… Specify…<br />

Comments An optional descriptive comment for this step.<br />

Scope The name of a document (IData object) in the pipeline to which<br />

you want to restrict this step. If you want this step to have<br />

access to the entire pipeline, leave this property blank.<br />

Timeout The maximum number of seconds that this step should run.If<br />

this time elapses before the step completes, the server waits for<br />

the step to complete and then raises an exception.<br />

If you want to use the value of a pipeline variable for this<br />

property, type the variable name between % symbols (for<br />

example, %expiration%).<br />

If you do not need to specify a time-out period, leave Timeout<br />

blank.<br />

Label An optional name for this specific LOOP step, or a null,<br />

unmatched, or empty string ($null, $default, blank).<br />

Important! If you use this step as a target for a BRANCH or EXIT<br />

step, you must specify a value in the Label property. For more<br />

information about the BRANCH and EXIT steps, see “The<br />

BRANCH Step” on page 168 or “The EXIT Step” on page 190.<br />

Input array The name of the array variable on which the LOOP will<br />

operate. This variable must be one of the following types:<br />

String list, String table, Document list, Object list.<br />

Output array The name of the element that you want the server to collect<br />

each time the LOOP executes. You do not need to specify this<br />

property if the loop does not produce output values or if you<br />

are collecting the elements of Input array.<br />

<strong>webMethods</strong> <strong>Developer</strong> User’s <strong>Guide</strong> Version 6.5, Service Pack 3 � � � 189


The EXIT Step<br />

4 Build the body of the loop using the following steps:<br />

a Insert a flow step using the buttons on the editor toolbar.<br />

7. Inserting Flow Steps<br />

b Indent the flow step using on the editor toolbar to make it a child of the LOOP<br />

step.<br />

c Set the properties for the child step as needed.<br />

5 Use the Pipeline tab to link the elements of the input array to the input variables<br />

required by each child of the LOOP step. For more information about using the<br />

Pipeline tab, see Chapter 8, “Mapping Data in a Flow Service”.<br />

Important! When you build a LOOP step, make sure that you specify the output array<br />

variable in the LOOP Output array property before creating a link to the output array<br />

variable within a MAP or INVOKE step in the body of the LOOP. If you specify the output<br />

array variable after creating a link to it, the link will fail at run time. You can test the step in<br />

<strong>Developer</strong> to see if the link succeeds. If the link fails, delete the link to the output array<br />

variable and then recreate it.<br />

The EXIT flow step allows you to exit the entire flow service or a single flow step. You<br />

specify whether you want to exit from:<br />

� The nearest ancestor (parent) LOOP or REPEAT flow step to the EXIT flow step.<br />

� The parent flow step of the EXIT flow step.<br />

� A specified ancestor flow step to the EXIT flow step.<br />

� The entire flow service.<br />

When you use the EXIT step, you indicate whether exiting should return a successful<br />

condition or a failure condition. If the exit is considered a failure, an exception is thrown.<br />

You can specify the text of the error message that is displayed by typing it directly or by<br />

assigning it to a variable in the pipeline.<br />

Examples of when to use the EXIT step include to:<br />

� Exit an entire flow service from within a series of deeply nested steps.<br />

� Throw an exception when you exit a flow or a flow step without having to write a<br />

Java service to call Service.throwError( ).<br />

� Exit a LOOP or REPEAT flow step without throwing an exception.<br />

The following flow service contains two EXIT steps that, if executed, will exit the nearest<br />

ancestor LOOP step. If the value of CreditCardType is null or an empty string, the matching<br />

EXIT step executes and exits the LOOP over the '/PurchaseOrdersList' step.<br />

<strong>webMethods</strong> <strong>Developer</strong> User’s <strong>Guide</strong> Version 6.5, Service Pack 3 � � � 190


This LOOP exits<br />

when....<br />

...CreditCardType is<br />

null...<br />

...or empty.<br />

Use the EXIT step to exit the nearest ancestor LOOP step<br />

To build an EXIT step<br />

7. Inserting Flow Steps<br />

1 If you are inserting an EXIT step into an existing flow service, display that service in<br />

the editor and select the step immediately above where you want the EXIT step<br />

inserted.<br />

2 Click on the editor toolbar.<br />

3 Complete the following fields on the Properties panel:<br />

For this property… Specify…<br />

Comments An optional descriptive comment for this step.<br />

Label An optional name for this specific step, or a null, unmatched,<br />

or empty string ($null, $default, blank).<br />

Important! If you use this step as a target for a BRANCH step,<br />

you must specify a value in the Label property. For more<br />

information about the BRANCH step, see “The BRANCH<br />

Step” on page 168.<br />

Exit from The flow step from which you want to exit. Specify one of the<br />

following:<br />

Specify To exit from the...<br />

$loop Nearest ancestor LOOP or REPEAT flow step.<br />

<strong>webMethods</strong> <strong>Developer</strong> User’s <strong>Guide</strong> Version 6.5, Service Pack 3 � � � 191


The MAP Step<br />

For this property… Specify…<br />

7. Inserting Flow Steps<br />

The MAP step lets you adjust the contents of the pipeline at any point in a flow service.<br />

When you build a MAP step, you can:<br />

� Prepare the pipeline for use by a subsequent step in the flow service by linking,<br />

adding, and dropping variables in the pipeline.<br />

� Clean up the pipeline after a preceding step by removing fields that the step added<br />

but are not needed by subsequent steps.<br />

� Move variables or assign values to variables in the pipeline.<br />

� Initialize the input values for a flow service.<br />

$parent Parent flow step, regardless of the type of step.<br />

$flow Entire flow.<br />

Label Nearest ancestor flow step that has a label that<br />

matches this value.<br />

Note: If the label you specify does not match the<br />

label of an ancestor flow step, the flow will exit<br />

with an exception.<br />

Signal Whether the exit is to be considered a success or a failure.<br />

Specify one of the following:<br />

Specify… To…<br />

SUCCESS Exit the flow service or flow step with a success<br />

condition.<br />

FAILURE Exit the flow service or flow step with a failure<br />

condition. An exception is thrown after the exit.<br />

You specify the error message with the Failure<br />

message property.<br />

Failure message The text of the exception message you want to display. If you<br />

want to use the value of a pipeline variable for this property,<br />

type the variable name between % symbols (for example,<br />

%mymessage%).<br />

This property is not used when Signal is set to SUCCESS.<br />

<strong>webMethods</strong> <strong>Developer</strong> User’s <strong>Guide</strong> Version 6.5, Service Pack 3 � � � 192


� Invoke several services (transformers) in a single step.<br />

7. Inserting Flow Steps<br />

� Map documents form one format to another. For example, you can map a document<br />

in an XML format to an ebXML format or a proprietary format.<br />

Tip! The MAP step is especially useful for hard coding an initial set of input values in a<br />

flow service. To use it in this way, insert the MAP step at the beginning of your flow, and<br />

then use the Set Value modifier to assign values to the appropriate variables in Pipeline Out.<br />

For more information about the MAP step, see Chapter 8, “Mapping Data in a Flow<br />

Service”.<br />

<strong>webMethods</strong> <strong>Developer</strong> User’s <strong>Guide</strong> Version 6.5, Service Pack 3 � � � 193


7. Inserting Flow Steps<br />

<strong>webMethods</strong> <strong>Developer</strong> User’s <strong>Guide</strong> Version 6.5, Service Pack 3 � � � 194


Chapter 8. Mapping Data in a Flow Service<br />

� What Is Data Mapping? . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 196<br />

� What Does the Pipeline Tab Contain? . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 196<br />

� Basic Mapping Tasks . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 201<br />

� Working with Transformers . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 222<br />

<strong>webMethods</strong> <strong>Developer</strong> User’s <strong>Guide</strong> Version 6.5, Service Pack 3 � � � 195


What Is Data Mapping?<br />

8. Mapping Data in a Flow Service<br />

Data mapping is the process of performing transformations to resolve data representation<br />

differences between services or document formats. By mapping, you can accomplish the<br />

following types of data transformations:<br />

� Name transformations where different variable names represent the same data item. For<br />

example, one service or document format might use Telephone as the name of the<br />

variable for telephone number information and another might use PhoneNumber.<br />

When you perform name transformations, the value and position of a variable in the<br />

document (IData object) structure remain the same, but the name of the variable<br />

changes.<br />

� Structural transformations where different data structures represent a data item. For<br />

example, one service or document format might put the telephone number in a string<br />

called Telephone, and the next may expect to find it in an element of a document (IData<br />

object) array called CustInfo. When you perform structural transformations, the value<br />

of the variable remains the same, but the data type or position of the variable in the<br />

document (IData object) structure changes.<br />

� Value transformations where different formats represent the same value. This occurs<br />

commonly with date and time variables, where, for instance, one variable might use<br />

“01/01/99” and another “January 1, 1999.” In other cases, your services or document<br />

formats might use different notations for standard codes or values, different currency<br />

units, or a different system of weights and measures (metric instead of the U.S.<br />

Customary or British Imperial systems). When you perform value transformations,<br />

the name and position of the variable remain the same, but the data contained in the<br />

variable changes. (For example, you can change the format of a date, concatenate two<br />

strings, or add the values of two variables together.)<br />

When you build flow services or convert between document formats, you may need to<br />

perform one, two, or all of the above types of data transformation. The <strong>webMethods</strong> flow<br />

language provides two ways for you to accomplish data transformations between services<br />

and document formats: you can map variables to each other (create links) or you can<br />

insert transformers.<br />

<strong>webMethods</strong> <strong>Developer</strong> provides a graphical environment in which you can perform data<br />

mapping between variables and formats, which is the Pipeline tab.<br />

What Does the Pipeline Tab Contain?<br />

The Pipeline tab offers a graphical representation of all of your data through which you can<br />

map data and inspect the contents of the pipeline. You use the tools on this tab to route<br />

variables (data) between services or between document formats.<br />

The Pipeline tab displays in the editor for invoked services (INVOKE steps) or MAP steps<br />

in a flow service. The contents of this tab for INVOKE steps are slightly different than for<br />

MAP steps.<br />

<strong>webMethods</strong> <strong>Developer</strong> User’s <strong>Guide</strong> Version 6.5, Service Pack 3 � � � 196


Pipeline Tab for an INVOKE Step<br />

8. Mapping Data in a Flow Service<br />

For an INVOKE step, the Pipeline tab depicts two stages of the pipeline with respect to the<br />

selected service in the editor.<br />

Pipeline tab for an INVOKE step (service)<br />

The Pipeline tab<br />

depicts the service’s<br />

input and output with<br />

respect to the<br />

expected pipeline. 1 2<br />

This stage... Represents...<br />

1<br />

The expected state of the pipeline just before the selected service<br />

executes.<br />

Pipeline In depicts the set of variables that are expected to be in the<br />

pipeline before the service executes (based on the declared input<br />

and output parameters of the preceding services).<br />

Service In depicts the set of variables the selected service expects as<br />

input (as defined by its input parameters).<br />

On the Pipeline tab, you can insert “pipeline modifiers” at this stage<br />

to adjust the contents of the pipeline to suit the requirements of the<br />

service. For example, you can link variables, assign values to<br />

variables, drop variables from the pipeline, or add variables to the<br />

pipeline. Modifications that you specify during this stage are<br />

performed immediately before the service executes at run time.<br />

<strong>webMethods</strong> <strong>Developer</strong> User’s <strong>Guide</strong> Version 6.5, Service Pack 3 � � � 197


This stage... Represents...<br />

2<br />

8. Mapping Data in a Flow Service<br />

The expected state of the pipeline just after the service executes.<br />

Service Out depicts the set of variables that the selected service<br />

produces as output (as defined by its output parameters).<br />

Pipeline Out depicts the set of variables that are expected to be in the<br />

pipeline after the service executes. It represents the set of variables<br />

that will be available to the next service in the flow. If the selected<br />

service (INVOKE step) is the last step in the flow service, Pipeline<br />

Out displays the output variables for the flow service (as declared<br />

on the Input/Output tab).<br />

On the Pipeline tab, you can insert “pipeline modifiers” at this stage<br />

to adjust the contents of the pipeline. For example, you can link<br />

variables, assign values to variables, drop variables from the<br />

pipeline, or add variables to the pipeline. Modifications that you<br />

specify during this stage are performed immediately after the<br />

service executes at run time.<br />

Note: <strong>Developer</strong> displays small symbols next to a variable icon to indicate validation<br />

constraints. <strong>Developer</strong> uses to indicate an optional variable. <strong>Developer</strong> uses the ‡<br />

symbol to denote a variable with a content constraint. For information about applying<br />

constraints to variables, see “Applying Constraints to Variables” on page 261.<br />

<strong>webMethods</strong> <strong>Developer</strong> User’s <strong>Guide</strong> Version 6.5, Service Pack 3 � � � 198


Pipeline Tab for a MAP Step<br />

8. Mapping Data in a Flow Service<br />

For a MAP step, the Pipeline tab displays a single stage of the pipeline. The Pipeline tab<br />

contains two sets of variables: Pipeline In and Pipeline Out. Between these sets of variables,<br />

the Pipeline tab contains a column named Transformers.<br />

Pipeline tab for a MAP step<br />

� The Pipeline In column represents input to the MAP step. It contains the names of all of<br />

the variables in the pipeline at this point in the flow.<br />

� The Transformers column displays any services inserted in the MAP step to complete<br />

value transformations. For more information about invoking services in a MAP step,<br />

see “Inserting a Transformer into a MAP Step” on page 224.<br />

� The Pipeline Out column represents the output of the MAP step. It contains the names<br />

of variables that will be available in the pipeline when the MAP step completes.<br />

When you first insert a MAP step into your flow, Pipeline In and Pipeline Out are identical.<br />

However, if the MAP step is the only step in the flow service or is the last step in the flow<br />

service, Pipeline Out also displays the variables declared as output in the flow service.<br />

On the Pipeline tab, you can insert “pipeline modifiers” to adjust the contents of the<br />

pipeline. For example, you can link variables from Pipeline In to services in Transformers.<br />

You can also use pipeline modifiers to assign values to pipeline variables, drop variables<br />

from the pipeline, or add variables to the pipeline.<br />

<strong>webMethods</strong> <strong>Developer</strong> User’s <strong>Guide</strong> Version 6.5, Service Pack 3 � � � 199


Pipeline Modifiers<br />

8. Mapping Data in a Flow Service<br />

Pipeline modifiers are special commands that you apply to adjust the pipeline at run time.<br />

They execute immediately before or after the selected service or transformer, depending<br />

on where you add them on the Pipeline tab. Use the following buttons to add pipeline<br />

modifiers to the pipeline:<br />

Use this modifier... To...<br />

Link<br />

Drop<br />

Set Value<br />

Printing the Pipeline Tab<br />

The following procedure describes how to use the View as HTML command to produce a<br />

printable version of the Pipeline tab.<br />

1 Open the flow service for which you want to print the Pipeline tab.<br />

2 In the editor, select the INVOKE or MAP step for which you want to print the Pipeline<br />

tab.<br />

3 Click anywhere on the Pipeline tab.<br />

Link a pipeline variable to a service variable. The Link modifier lets you<br />

resolve variable-name and data-structure differences by “linking”<br />

(copying) the value of one variable to another at run time. For<br />

information about using this pipeline modifier, see “Linking<br />

Variables” on page 201.<br />

Drop a variable from the pipeline. The Drop modifier removes<br />

extraneous variables from the pipeline. For information about<br />

using this pipeline modifier, see “Dropping Variables from the<br />

Pipeline” on page 220.<br />

Assign a value to a variable. The Set Value modifier “hard codes” a<br />

value for a variable. For information about this pipeline modifier,<br />

see “Assigning Values to Pipeline Variables” on page 216.<br />

Note: When you view the Pipeline tab as HTML, the resulting HTML page displays only the<br />

portion of the pipeline that is visible within the tab. Before you select the View as HTML<br />

command, make sure the Pipeline tab displays the part of the pipeline that you want to<br />

view as HTML.<br />

To print the Pipeline tab<br />

4 Scroll or resize the Pipeline tab to display the portion of the pipeline you want to view<br />

as HTML.<br />

<strong>webMethods</strong> <strong>Developer</strong> User’s <strong>Guide</strong> Version 6.5, Service Pack 3 � � � 200


Basic Mapping Tasks<br />

5 On the File menu, click View as HTML.<br />

8. Mapping Data in a Flow Service<br />

<strong>Developer</strong> creates an HTML page and displays it in your default browser.<br />

6 If you want to print the pipeline, use your browser's print command.<br />

Basic mapping tasks are the tasks you perform to manage the pipeline contents and the<br />

values of variables in the pipeline. On the Pipeline tab, you can perform the following basic<br />

mapping tasks:<br />

� Link variables to each other. You can copy the value of a variable in one service or<br />

document format to a variable in another service or document format.<br />

� Assign values to variables. You can hard code variable values or assign a default value to<br />

variables.<br />

� Drop variables from the pipeline. You can remove pipeline variables that are not used by<br />

subsequent services in a flow.<br />

� Add variables to the pipeline. You can add variables that were not declared as input or<br />

output parameters of the flow service. You can also add input and output variables<br />

for services that the flow service invokes (internally invoked services).<br />

The following table identifies the sections that describe the basic mapping tasks.<br />

For more information about... See page...<br />

Linking variables 201<br />

Linking variables of different data types 209<br />

Linking to and from array variables 211<br />

Deleting links between variables 214<br />

Applying conditions to links between variables 214<br />

Assigning values to pipeline variables 216<br />

Dropping variables from the pipeline 220<br />

Adding variables to the pipeline 221<br />

Searching for variables in an editor tree 61<br />

Linking Variables<br />

When you want to copy the value of a variable in a service or document format to another<br />

variable, you link the variables. <strong>Developer</strong> connects service and pipeline variables on the<br />

Pipeline tab with a line called a link. Creating a link between variables copies the value<br />

from one variable to another at run time.<br />

<strong>webMethods</strong> <strong>Developer</strong> User’s <strong>Guide</strong> Version 6.5, Service Pack 3 � � � 201


Pipeline variables are<br />

automatically linked to<br />

service variables of the<br />

same name.<br />

8. Mapping Data in a Flow Service<br />

Within a flow, <strong>Developer</strong> implicitly links variables whose names are the same and whose<br />

data types are compatible. For example, the service in the following flow takes a variable<br />

called AcctNumber. Because a variable by this name already exists in Pipeline In, it is<br />

automatically linked to the AcctNumber variable in Service In. <strong>Developer</strong> connects<br />

implicitly linked variables with a gray link.<br />

Implicit links between pipeline and service variables<br />

Important! The Pipeline tab does not display implicit links for a MAP step.<br />

In cases where the services in a flow do not use the same names for a piece of information,<br />

use the Pipeline tab to explicitly link the variables to each other. Explicit linking is how you<br />

accomplish name and structure transformations required in a flow. <strong>Developer</strong> connects<br />

explicitly linked variables with a solid black line.<br />

On the input side of the Pipeline tab, use the Link modifier to link a variable from the<br />

pipeline to the service. In the following example, the service expects a value called<br />

OrderTotal, which is equivalent to the pipeline variable BuyersTotal (that is, they are simply<br />

different names for the same data). To use the value of BuyersTotal as the value for<br />

OrderTotal, you “link” the pipeline variable to the service using the Link modifier.<br />

At run time, the server will copy the value from the source variable (BuyersTotal) to the<br />

target variable (OrderTotal) before executing the service.<br />

<strong>webMethods</strong> <strong>Developer</strong> User’s <strong>Guide</strong> Version 6.5, Service Pack 3 � � � 202


When a pipeline variable<br />

name is different from the<br />

one used by the service,<br />

use the Link modifier to<br />

connect them.<br />

Linking the pipeline to service input<br />

8. Mapping Data in a Flow Service<br />

Important! Do not link variables with different Object constraints. If you link variables with<br />

different object constraints and input/output validation is selected, the run-time result is<br />

undefined.<br />

All the output variables that a service produces are automatically placed in the pipeline.<br />

Just as you can link variables from the Pipeline In stage to a service’s input variables, you<br />

can link the output from a service to a different variable in Pipeline Out.<br />

In the following example, a variable called TransNumber is linked to the field Num in a<br />

document called TransactionRecord. At run time, the server will copy the value of<br />

TransNumber to Num, and both TransNumber and Num will be available to subsequent<br />

services in the flow.<br />

<strong>webMethods</strong> <strong>Developer</strong> User’s <strong>Guide</strong> Version 6.5, Service Pack 3 � � � 203


Linking service output to the pipeline<br />

8. Mapping Data in a Flow Service<br />

When an output variable<br />

name is different from the<br />

name in the pipeline, use<br />

the Link modifier to<br />

connect them.<br />

When you link variables in the pipeline, keep the following points in mind:<br />

<strong>Developer</strong> automatically adds a<br />

service’s output variables to the<br />

pipeline and implicitly links them.<br />

� The variable that you are linking from is the source. For example, when you link a<br />

variable in Pipeline In to one in Service In, the Pipeline In variable is the source. When you<br />

link a variable in Service Out to one in Pipeline Out, the Service Out variable is the source.<br />

� The variable you are linking to is the target. For example, when you link a variable in<br />

Pipeline In to one in Service In, the Service In variable is the target. When you link a<br />

variable in Service Out to one in Pipeline Out, the Pipeline Out variable is the target.<br />

� A Service In variable can be the target of more than one Link modifier only if you use<br />

array indexing or if you place conditions on the links to the variable.<br />

� By linking variables to each other, you are copying data from the source variable to the<br />

target variable. (Documents, however, are copied by reference. For more information,<br />

see “What Happens When Integration Server Executes a Link Between Variables?” on<br />

page 206.)<br />

� Target variables can be connected to only one source variable. After you draw a link to<br />

a target variable, you cannot draw another link to the target variable. (Two exceptions<br />

to this rule involve array variables and conditional links. For more information about<br />

linking array variables, see “Linking to and from Array Variables” on page 211. For<br />

more information about placing conditions on links between variables, see “Applying<br />

Conditions to Links Between Variables” on page 214.<br />

<strong>webMethods</strong> <strong>Developer</strong> User’s <strong>Guide</strong> Version 6.5, Service Pack 3 � � � 204


8. Mapping Data in a Flow Service<br />

� You cannot create a link to a variable if you already used the Set Value modifier to<br />

assign a value to a variable.<br />

� After a Link modifier is executed, both the source and target variables exist in the<br />

pipeline. The target variable does not replace the source variable.<br />

To create a link between variables<br />

1 In the editor, select the INVOKE or MAP step containing the variables you want to<br />

link.<br />

2 Click the Pipeline tab.<br />

3 If you want to create a link between a variable in Pipeline In and one in Service In, do the<br />

following:<br />

a In Pipeline In, click the pipeline variable you want to use as the source variable.<br />

b In Service In, click the input variable you want to use as the target variable.<br />

c Click on the toolbar.<br />

4 If you want to create a link between a variable in Service Out and one in Pipeline Out, do<br />

the following:<br />

a In Service Out, click the output variable you want to use as the source variable.<br />

b In Pipeline Out, click the pipeline variable you want to use as the target variable.<br />

c Click on the toolbar.<br />

Notes:<br />

� If the variable types are incompatible and cannot be linked to one another,<br />

<strong>Developer</strong> displays a message stating that the operation is not allowed.<br />

� If you created a link to or from an array variable, you must specify which element<br />

in the array you are linking to or from. For more information about array linking,<br />

see “Linking to and from Array Variables” on page 211.<br />

� If you want to place a condition on the execution of the link, see “Applying<br />

Conditions to Links Between Variables” on page 214.<br />

� Do not link variables with different Object constraints. If you link variables with<br />

different object constraints and input/output validation is selected, the run-time<br />

result is undefined.<br />

Tip! You can also use your mouse to link variables to one another. To do this, select the<br />

source variable and drag your mouse to the appropriate target variable.<br />

<strong>webMethods</strong> <strong>Developer</strong> User’s <strong>Guide</strong> Version 6.5, Service Pack 3 � � � 205


8. Mapping Data in a Flow Service<br />

Tip! To scroll through the Pipeline In and Pipeline Out trees independently, display the<br />

left-hand scroll bar. Click to display the left-hand scroll bar. Click to hide the<br />

left-hand scroll bar. The left-hand scroll bar is only available on the Pipeline tab for a MAP<br />

step. When you expand a transformer, <strong>Developer</strong> hides the left-hand scroll bar<br />

automatically.<br />

What Happens When Integration Server Executes a Link Between Variables?<br />

When executing a link between variables at run time, Integration Server does one of the<br />

following:<br />

� Copies the value from the source variable to the target variable. For example, when<br />

you link a source String variable to a target String variable, Integration Server copies<br />

the value of the source String to the target String. This is called “copying by value.”<br />

� Creates a reference to the source variable and uses the reference as the value of the<br />

target variable. For example, when executing a link between a source document and a<br />

target document, Integration Server creates a reference to the source document value<br />

and uses the reference as the value of the target document. This is called “copying by<br />

reference.”<br />

Integration Server copies by value when the source or target variable is a String. (An<br />

exception to this behavior is that when executing a link from a String to an Object, the<br />

Integration Server copies by reference.)<br />

When executing links between all other types of variables, the Integration Server copies by<br />

reference. Copying by reference significantly reduces the memory and time required for<br />

executing a link at run time.<br />

When a value is copied by reference, any changes you make to the value of the source<br />

variable in subsequent flow steps affect the target variable. This is because the value of the<br />

source variable is the value of the target variable. The target variable does not contain a<br />

copy of the source variable value. If, in a later flow step, you used the Set Value modifier to<br />

assign a value to the source variable, you would be changing the value of the target<br />

variable as well. (The target variable references the value of the source variable.)<br />

The following images show a series of MAP steps in a flow service. In this example, the<br />

value of the source variable is changed after the link to the target variable executes. This<br />

action changes the value of the target variable as well.<br />

<strong>webMethods</strong> <strong>Developer</strong> User’s <strong>Guide</strong> Version 6.5, Service Pack 3 � � � 206


The value of String1 is set<br />

to “original value”.<br />

Document1 is linked to<br />

Document2. After the link<br />

executes, the value of<br />

Document2 is a reference<br />

to the contents of<br />

Document1.<br />

The value of String1 is<br />

changed to “modified”.<br />

This action changes the<br />

value of the string in<br />

Document2 as well.<br />

Step 1: The value of String1 is set to “original value”<br />

Step 2: Document1 is linked to Document2<br />

Step 3: The value of String1 is changed to “modified” after the link executes<br />

8. Mapping Data in a Flow Service<br />

<strong>webMethods</strong> <strong>Developer</strong> User’s <strong>Guide</strong> Version 6.5, Service Pack 3 � � � 207


The String1 in<br />

Document1 and the<br />

String1 in Document2<br />

have the same value<br />

because Document1<br />

was copied to<br />

Document2 by<br />

reference.<br />

When this flow service executes, it returns the following results.<br />

Results of flow service<br />

8. Mapping Data in a Flow Service<br />

In Step 3, the value of the String1 in Document1 was set to “modified.” However, the<br />

value of String1 in Document2 changed also. This is because in Step 2 of the flow service,<br />

the value of Document1 was copied to Document2 by reference. Changes to the value of<br />

Document1 in later flow steps also change the value of Document2.<br />

To prevent the value of the target variable from being overwritten by changes to the value<br />

of the source value in subsequent steps in the flow service, you can do one of the<br />

following:<br />

� When working with document variables, link each child of the document variable<br />

individually. This method can be time consuming and might significantly increase the<br />

memory and time required to run the service. However, this might be the best<br />

approach if the target document variable needs only a few values from the source<br />

document variable.<br />

� After you link the source variable to a target variable, use the Drop modifier to drop<br />

the source variable. Only the target variable will have the reference to the data. This<br />

method ensures that the value of the target variable will not be overwritten in a<br />

subsequent step, but does not increase the memory and time required to execute the<br />

service.<br />

� Create a service that performs a copy by value. Insert this service (as an INVOKE step<br />

or as a transformer) and link the variables to the service instead of linking them to<br />

each other. (In the case of document variables, you could create a Java service that<br />

clones the IData object underlying the document.) In situations where you link one<br />

document variable to another, using a “cloning” service would require less time than<br />

linking the contents of a document variable field by field.<br />

Linking to Document and Document List Variables<br />

When working with document variables in the pipeline, you can link a source variable to<br />

the document variable or to the children of the document variable. Keep the following<br />

points in mind when linking to document or document list variables:<br />

� A document (or a document list) and its children cannot both be targets. After a<br />

document or document list is the target of a Link modifier, its children cannot be the<br />

targets of Link modifiers.<br />

<strong>webMethods</strong> <strong>Developer</strong> User’s <strong>Guide</strong> Version 6.5, Service Pack 3 � � � 208


8. Mapping Data in a Flow Service<br />

� After the child variable of a document or document list is the target of a Link modifier,<br />

the parent document or document list cannot be a target of a Link modifier.<br />

� If you link from a document variable to another document variable, the structure of<br />

the source document variable overwrites the structure of the target document<br />

variable.<br />

Linking Variables of Different Data Types<br />

On the Pipeline tab, you can link different, but compatible, data types to one another. For<br />

example, you could link a String value called AccountNumber to a String list called<br />

Accounts. At run time, the server automatically performs the structural transformation<br />

necessary to link the data in AccountNumber to Accounts. (In this case, the transformation<br />

will result in a single-element String list.) By linking different data types to one another,<br />

you can perform structural transformations.<br />

If you link variables of different data types, keep the following points in mind:<br />

� Not all data types can be linked to one another. You cannot link a document (IData<br />

object) to a String, for instance. If two data types are incompatible, <strong>Developer</strong> will not<br />

allow you to connect them with the Link modifier.<br />

� You can only link a variable to another variable of the same primitive type. The<br />

primitive type refers to the data type of the variable when all dimensionality is<br />

removed. For example, the primitive type for a String list or a String table would be<br />

String. Two exceptions to this rule are: any variable can be linked to an Object or an<br />

Object list variable, and an Object can be linked to any data type. (If there is a type<br />

mismatch between the Object or Object list and the other variable at run time, the<br />

Integration Server does not execute the link.)<br />

� Object and Object list variables constrained with an assigned Java class should be<br />

linked only to other Object and Object list variables of the same Java class or to Object<br />

and Object list variables of unknown type. Although <strong>Developer</strong> permits a link<br />

between constrained Objects with different Java classes, the run-time result is<br />

undefined. For more information about specifying Java classes for Objects, see “Java<br />

Classes for Objects” on page 421.<br />

� When you link between scalar and array variables, you can specify which element of<br />

the array variable you want to link to or from. Scalar variables are those that hold a<br />

single value, such as String, document, and Object. Array variables are those that hold<br />

multiple values, such as String list, String table, document list, and Object list. For<br />

example, you can link a String to the second element of a String list. Alternatively, you<br />

can link the second element in a String list to a String.<br />

� When you link between scalar and array variables and you do not specify which<br />

element in the array variable that you want to link to or from, <strong>Developer</strong> uses the<br />

default behavior to determine the value of the target variable.<br />

For more information about the default behavior for linking array variables, see “Default<br />

Pipeline Rules for Linking to and from Array Variables” on page 424.<br />

<strong>webMethods</strong> <strong>Developer</strong> User’s <strong>Guide</strong> Version 6.5, Service Pack 3 � � � 209


Examples of Structural Transformations on the Pipeline Tab<br />

8. Mapping Data in a Flow Service<br />

The structural transformations you can perform by linking variables on the Pipeline tab can<br />

be more complex than transforming a String to a String list. For example, you can combine<br />

two String lists into one document list through linking. The following section explains a<br />

common structural transformation that you can complete via linking in the pipeline.<br />

Converting a String List to a Document List<br />

You can convert a String list to a document list using the Pipeline tab. In the following<br />

diagram, aList is the String list you want to convert to a document list. The variable<br />

documentList is the document list to which you want to copy the values contained in the<br />

String list. documentList has a String child aString. To convert the String list to a document<br />

list, link aList to aString.<br />

Converting a String list to a document list<br />

Two String lists can be combined into one document list through data mapping in the<br />

pipeline. For example, if in the above scenario you also had a String list variable named<br />

bList, and documentList had two String children named aString and bString, you could<br />

combine the two String lists by linking aList to aString and bList to bString.<br />

Converting two String lists to a document list<br />

<strong>webMethods</strong> <strong>Developer</strong> User’s <strong>Guide</strong> Version 6.5, Service Pack 3 � � � 210


8. Mapping Data in a Flow Service<br />

Tip! You can also convert a String list to a document list (IData[ ] object) by invoking the<br />

built-in service pub.list:stringListToDocumentList. You can insert the service as an INVOKE step<br />

or as a transformer. For more information about transformers, see “What Are<br />

Transformers?” on page 222. For more information about built-in services, see the<br />

<strong>webMethods</strong> Integration Server Built-In Services Reference.<br />

Linking to and from Array Variables<br />

When you link to or from an array variable (String list, String table, document list, or<br />

Object list), you can specify which element in the array you want to link to or from. After<br />

you link the variables, you specify the index that represents the position of the element in<br />

the array.<br />

� For String lists and Object lists, you can specify the index for the list element you want<br />

to link. For example, you can link the third element in a String list to a String.<br />

� For String tables, you can specify the row and column indexes for the cells you want<br />

to link. For example, you can link the value of the element in the third column of the<br />

second row of a String table to a String.<br />

� For document lists, you can specify the index for the document that you want to link.<br />

For example, you can link the second document in a document list to a document<br />

variable.<br />

� For a variable in a document list, you can specify the index of the document that<br />

contains the value that you want to link to or from. For example, if the document list<br />

POItems contains the String ItemNumber, you can link the ItemNumber value from the<br />

second POItems document to a String variable.<br />

For example, suppose that a buyer’s address information is initially stored in a String list.<br />

However, the information might be easier to work with if it were stored in a document. To<br />

map the information in the String list to a document, create a link between the String list<br />

and each field in the document. Then, specify an index value for each link. In the<br />

following pipeline, the elements in buyerAddress String list are mapped to the address<br />

document.<br />

<strong>webMethods</strong> <strong>Developer</strong> User’s <strong>Guide</strong> Version 6.5, Service Pack 3 � � � 211


You can specify the index<br />

for the element in<br />

buyerAddress that you<br />

want to link to each field<br />

in address.<br />

You can specify an index value when linking to or from an array variable<br />

8. Mapping Data in a Flow Service<br />

Note: <strong>Developer</strong> uses blue links on the Pipeline tab to indicate that properties (conditions or<br />

index values for arrays) have been applied to the link between variables.<br />

To specify the index for the element in the buyerAddress variable to be copied to the<br />

FirstName field, select the link between the variables, click the Indices property’s Edit button<br />

in the Properties panel to specify the index.<br />

If the source or target variable is an array, <strong>Developer</strong> displays a text box next to the<br />

variable (in this case, buyerAddress). If the source or target variable is not an array,<br />

<strong>Developer</strong> displays the words “Field not indexable” next to the variable name (in this<br />

case, FirstName). For example, if you want to link the first element of the buyerAddress<br />

variable to the FirstName field in address, type 0 in the field next to buyerAddress. (Index<br />

numbering in arrays begins at 0.)<br />

Link indices<br />

Indicates the index of the<br />

element in the buyerAddress<br />

String list that you want to copy<br />

to the FirstName field.<br />

Indicates the target variable is<br />

not an array.<br />

<strong>webMethods</strong> <strong>Developer</strong> User’s <strong>Guide</strong> Version 6.5, Service Pack 3 � � � 212


<strong>Guide</strong>lines for Linking to and from Array Variables<br />

8. Mapping Data in a Flow Service<br />

When you are linking to or from an array variable, keep the following points in mind:<br />

� To link to or from an element in an array variable, you need to know the index for the<br />

element’s position in the array. Array index numbering begins at 0 (the first element in<br />

the array has an index of 0, the second element has an index of 1, and so on).<br />

� To dynamically specify the index, you can set the index to the value of a pipeline<br />

variable. The variable you specify must be a String. To use a pipeline variable, specify<br />

the variable name enclosed in percent signs (%). For example, if the pipeline contains<br />

the variable itemNumber that will contain the index you want to use at run time,<br />

specify %itemNumber% for the index. For the link to execute successfully at run time,<br />

the value of the variable must be a non-negative integer.<br />

� If you link to an array variable and specify an index that does not exist, <strong>Developer</strong><br />

increases the length of the array to include the specified array index. For example,<br />

suppose that a String list has length 3. You can link to the String list and specify an<br />

index of 4; that is, you can link to the fifth position in the String list. At run time, the<br />

Integration Server increases the length of the String list from 3 to 5.<br />

� Each element in an array can be the source or target of a Link modifier; that is, each<br />

element in the array can be the start or end of a link. For example, if a source String list<br />

variable contains three elements, you can link each of the three elements to a target<br />

variable.<br />

� If the source and target variables are arrays, you can specify an index for each variable.<br />

For example, you can link the third element in a source String list to the fifth element<br />

in target String list.<br />

� If you do not specify an array index for an element when linking to or from arrays, the<br />

default behavior of the Pipeline tab will be used. For information about the default<br />

behavior of the Pipeline tab, see “Default Pipeline Rules for Linking to and from Array<br />

Variables” on page 424.<br />

� If you are linking to or from a String table, you need to specify an index value for the<br />

row and column.<br />

� When you link a document or document list variable to another document or<br />

document list variable, the structure of the source variable determines the structure of<br />

the target variable. For more information, see “Linking to Document and Document<br />

List Variables” on page 208.<br />

The following procedure explains how to link to or from an array variable.<br />

<strong>webMethods</strong> <strong>Developer</strong> User’s <strong>Guide</strong> Version 6.5, Service Pack 3 � � � 213


To create a link to or from an array variable<br />

8. Mapping Data in a Flow Service<br />

1 Create a link between the variables using the procedure described in “To create a link<br />

between variables” on page 205.<br />

2 Click the link that connects the variables.<br />

3 On the Properties panel, click the Indices property’s Edit button. <strong>Developer</strong> displays<br />

the Link Indices dialog box.<br />

4 If the source variable is an array variable, under Source, next to the source variable<br />

name, type the index that contains the value you want to link.<br />

5 If the target variable is an array variable, under Destination, next to the destination<br />

variable name, type the index to which you want to link the source value.<br />

6 Click OK.<br />

Note: At run time, the link (copy) fails if the source array index contains a null value or if<br />

you specify an invalid source or target index (such as a letter or non-numeric character).<br />

The Integration Server generates journal log messages (at debug level 6 or higher) when<br />

links to or from array variables fail.<br />

Deleting Links Between Variables<br />

Use the following procedure to delete the link created between variables. When you<br />

delete the link, the variables are no longer linked. <strong>Developer</strong> also deletes any properties<br />

you applied to the link.<br />

To delete a link between variables<br />

1 On the Pipeline tab, select the link that you want to delete.<br />

2 On the Edit menu, click Delete.<br />

Tip! You can also delete a link by selecting it and then clicking on the Pipeline tab<br />

toolbar or pressing the DELETE key.<br />

Applying Conditions to Links Between Variables<br />

You can place conditions on the links you draw between variables. At run time,<br />

<strong>webMethods</strong> Integration Server evaluates the condition and executes the link (copies the<br />

value) only if the condition evaluates to true.<br />

A condition consists of one or more expressions that you write using the syntax that<br />

<strong>Developer</strong> provides. An expression can check for the existence of a variable in the<br />

<strong>webMethods</strong> <strong>Developer</strong> User’s <strong>Guide</strong> Version 6.5, Service Pack 3 � � � 214


Use the Properties<br />

panel to view or create<br />

a condition for the link.<br />

8. Mapping Data in a Flow Service<br />

pipeline, check for the value of a variable, or compare a variable to another variable. For<br />

example, in the following service, you might want to link the BuyersTotal variable in<br />

Pipeline In to the OrderTotal variable in Service In only if the BuyersTotal has a value that is<br />

not null. After you connect the two variables with the Link modifier, you would edit the<br />

properties and add the condition that needs to be true.<br />

A blue link indicates that a condition is applied to the link connecting the variables<br />

<strong>Developer</strong> uses a blue link on the Pipeline tab to indicate that properties (that is, conditions<br />

or index values for arrays) have been applied to a link between variables.<br />

Note: You cannot add conditions to the links between implicitly linked variables.<br />

Linking Multiple Source Variables to a Target Variable<br />

By applying conditions to the links between variables, you can link more than one source<br />

variable to the same target variable. When you draw more than one link to the same target<br />

variable, at most, only one of the conditions you apply to the links can be true at run time.<br />

The conditions must be mutually exclusive.<br />

At run time, <strong>webMethods</strong> Integration Server executes all conditional links whose<br />

conditions evaluate to true. If more than one conditional link to the same target variable<br />

evaluates to true, the value of the target variable will be the result of whichever link<br />

executes last. Because the order in which links are executed at run time is not guaranteed,<br />

the final value of the target variable may vary.<br />

<strong>webMethods</strong> <strong>Developer</strong> User’s <strong>Guide</strong> Version 6.5, Service Pack 3 � � � 215


8. Mapping Data in a Flow Service<br />

Tip! If the conditions for links to the same target variable are not mutually exclusive,<br />

consider using a flow service containing a BRANCH step instead. In BRANCH steps,<br />

child steps are evaluated in a top to bottom sequence. <strong>webMethods</strong> Integration Server<br />

executes the first child step that evaluates to true and skips the remaining child steps. For<br />

more information about the BRANCH step, see “The BRANCH Step” on page 168.<br />

To apply a condition to the link between variables<br />

1 Create a link between the variables using the procedure described in “To create a link<br />

between variables” on page 205.<br />

2 Click the link (black line) that connects the variables.<br />

3 On the Properties panel, set the Evaluate copy condition property to True.<br />

4 In the Copy condition property text box, type the condition you want to place on the<br />

link.<br />

For information about the syntax used in conditions, see Appendix D, “Conditional<br />

Expressions”.<br />

Important! When drawing more than one link to the same target variable, make sure that<br />

the conditions assigned to each link are mutually exclusive.<br />

Note: You can temporarily disable the condition placed on a link. For more information,<br />

see “Disabling a Condition Placed on a Link Between Variables” on page 301.<br />

Assigning Values to Pipeline Variables<br />

The Set Value modifier allows you to assign values to variables in Service In or Pipeline<br />

Out. You use it to explicitly “hard code” a specific value in a variable. You can also use it to<br />

assign a default value to a variable.<br />

By attaching a Set Value modifier to a variable, you instruct the server to write a<br />

specific value to that variable at run time. This action occurs just before the selected<br />

service is executed (if you attach the modifier to a variable in Service In) or immediately<br />

after the selected service is executed (if you attach the modifier to a variable in Pipeline<br />

Out).<br />

<strong>webMethods</strong> <strong>Developer</strong> User’s <strong>Guide</strong> Version 6.5, Service Pack 3 � � � 216


You use the Set<br />

Value modifier to<br />

assign a value to a<br />

variable.<br />

Specify the value that<br />

you want the server to<br />

assign to this variable at<br />

run time.<br />

Hardcoding the value of a variable<br />

8. Mapping Data in a Flow Service<br />

To view (or change) the value that is assigned to the Set Value modifier, double-click the<br />

icon next to the variable’s name to open the Input For dialog box.<br />

Input For dialog box<br />

Assigning a Default Value to a Variable<br />

One common use of the Set Value modifier is to specify a default value for a variable (that is,<br />

a value that is only assigned if the variable is null at run time). To use the Set Value<br />

modifier in this way, disable the Overwrite pipeline value check box in the Input For dialog<br />

box. This instructs the server to use the specified value only when the selected variable is<br />

null.<br />

Note: If a variable to which you assigned a default value is implicitly linked to another<br />

variable in the pipeline, <strong>Developer</strong> displays a gray link on the Pipeline tab connecting the<br />

variables beneath the icon.<br />

<strong>webMethods</strong> <strong>Developer</strong> User’s <strong>Guide</strong> Version 6.5, Service Pack 3 � � � 217


Enclose the variable<br />

name in % symbols...<br />

...and the select the<br />

variable-substitution<br />

option.<br />

Initializing Variables in a Flow Service<br />

8. Mapping Data in a Flow Service<br />

You can use the Set Value modifier with the MAP step to hard code an initial set of input<br />

values in a flow service. To use it in this way, insert the MAP at the beginning of your flow,<br />

and then use the Set Value modifier to assign values to the appropriate variables in Pipeline<br />

Out.<br />

Referencing Other Variables<br />

In addition to assigning a literal value to a variable, the Set Value modifier lets you assign<br />

the value of another String variable to a String variable. (You might do this if you wanted<br />

to derive the default value from a variable in the pipeline at run time, for example.)<br />

To specify a variable name with the Set Value modifier, enclose the name of that variable<br />

between % symbols and then enable the Perform variable substitution option. This option<br />

instructs the server to interpret your value as a variable reference rather than a literal<br />

value.<br />

Referencing variables<br />

You can also format String values by specifying one or more pipeline variables in<br />

conjunction with a literal value. For example, if you specified (%areaCode%) %Phone%,<br />

the resulting string would be formatted to include the parentheses and space. If you<br />

specified %firstName% %initial%. %lastName% , the period and spacing would be<br />

included in the value.<br />

Setting a Value for a Pipeline Variable<br />

Keep the following points in mind when assigning a value to a pipeline variable:<br />

� You can only assign values to variables that are in Service In or Pipeline Out.<br />

� If the Service In or Pipeline Out variable is already the target for a Link modifier, you<br />

cannot use the Set Value modifier to assign a value to the variable.<br />

� You can mix literal values and pipeline variables when assigning values to String<br />

variables.<br />

� You cannot assign a value to a recursive IS document type (a document type that<br />

contains a document reference to itself).<br />

<strong>webMethods</strong> <strong>Developer</strong> User’s <strong>Guide</strong> Version 6.5, Service Pack 3 � � � 218


8. Mapping Data in a Flow Service<br />

� When you set values for constrained Objects, <strong>Developer</strong> automatically validates the<br />

values. If the value is not of the type specified by the object constraint, <strong>Developer</strong><br />

displays a message identifying the variable and the expected type.<br />

� You cannot set values for unconstrained Objects (Objects of unknown type) or for<br />

Objects constrained as a byte [ ].<br />

To assign a value to a variable in the pipeline<br />

1 In the editor, select the INVOKE or MAP step containing the variable you want to<br />

alter.<br />

2 Click the Pipeline tab.<br />

3 Select the variable to which you want to assign a value.<br />

4 Click on the toolbar.<br />

5 In the Input For dialog box, specify the value you want to assign to this variable.<br />

� If you want to assign a literal value to the variable, type that value. The value<br />

must be of the same data type as the variable.<br />

� If you want to derive the value from a String variable in the pipeline, type the<br />

name of that variable enclosed in % symbols (for example, %Phone%). Then select<br />

the Perform variable substitution check box.<br />

6 If you want the server to use the specified value only if the variable does not contain a<br />

value at run time, clear the Overwrite pipeline value check box. (If you select this check<br />

box, the server will always apply the specified value.)<br />

Copying Set Values Between Variables<br />

You can copy the set value assigned to a variable to other variables of the same data type<br />

in Service In or Pipeline Out. When you copy set values from one pipeline variable to<br />

another, keep the following points in mind:<br />

� You can only copy and paste set values between variables of the same data type. For<br />

example, you can only copy the set value assigned to a String variable to another<br />

String variable.<br />

� You can only copy and paste set values between variables if the target variable has the<br />

same structure as the source variable or has no defined structure. For example, you<br />

can copy the set value of a String list variable with length 3 to another String list<br />

variable only if the target String list also has length 3 or has an undefined length (no<br />

defined structure).<br />

� If you are copying a set value between document variables, the source document<br />

variable and the target document variable must have the same structure or the target<br />

document variable must have no structure defined. For example, if the source<br />

<strong>webMethods</strong> <strong>Developer</strong> User’s <strong>Guide</strong> Version 6.5, Service Pack 3 � � � 219


8. Mapping Data in a Flow Service<br />

document variable contains three String variables named City, State, and Zip as<br />

children, the target document variable must have three String variables named City,<br />

State, and Zip as children.<br />

To copy a set value<br />

1 In the editor, select the INVOKE or MAP step containing the variable with the value<br />

you want to copy and paste.<br />

2 Click the Pipeline tab.<br />

3 Select the you want to copy.<br />

4 Right-click and select Copy.<br />

5 Select the variable or variables to which you want to assign the copied value,<br />

right-click and select Paste.<br />

Note: You can only copy and paste values for variables that are in Service In or Pipeline Out.<br />

Note: You can only paste the set value if the target variable is the same data type as the<br />

source variable and if the target variable has either an identical structure to the source<br />

variable or has no defined structure.<br />

Dropping Variables from the Pipeline<br />

The Drop pipeline modifier allows you to remove a variable from Pipeline In or Pipeline<br />

Out. You can use it to eliminate pipeline variables that are not used by subsequent services<br />

in a flow. Dropping unneeded variables reduces the size of the pipeline at run time and<br />

reduces the length and complexity of the Pipeline In and Pipeline Out displays (this can make<br />

the Pipeline tab much easier to use when you are working with a complex flow).<br />

Important! Once you drop a variable from the pipeline, it is no longer available to<br />

subsequent services in the flow. Do not use the Drop modifier unless you are sure the<br />

variable is not used by services invoked after the point where you drop it.<br />

At run time, the server removes a dropped variable from the pipeline just before it<br />

executes the selected service (if you attach the Drop modifier to a variable in Pipeline In) or<br />

immediately after it executes the selected service (if you attach the Drop modifier to a<br />

variable in Pipeline Out).<br />

If you drop a linked variable from Pipeline In, the server executes the Link modifier before it<br />

drops the variable. The server does not link a null value to the destination variable.<br />

<strong>webMethods</strong> <strong>Developer</strong> User’s <strong>Guide</strong> Version 6.5, Service Pack 3 � � � 220


To drop a variable from the pipeline<br />

8. Mapping Data in a Flow Service<br />

1 In the editor, select the INVOKE or MAP step whose pipeline variables you want to<br />

drop.<br />

2 Click the Pipeline tab.<br />

3 Select the variable that you want to drop.<br />

4 Click on the toolbar.<br />

Note: You can only drop variables from Pipeline In and Pipeline Out. In a MAP step, you can<br />

only drop variables from Pipeline In.<br />

Adding Variables with the Pipeline Tab<br />

You can use the Pipeline tab to add variables that were not declared as input or output<br />

parameters for the flow service itself or any of its constituent services. You can use it to<br />

add variables that were omitted from a service’s input or output parameters or create<br />

temporary variables for use within the flow. (For example, you might attach a variable to<br />

each of the children in a BRANCH step to mark the path taken by the service at run time.)<br />

Variables that you create using the Pipeline tab can be used just like any declared variable<br />

in the flow.<br />

Important! If you create a new variable in a flow, you must immediately do one of the<br />

following:<br />

– Link a variable to it<br />

– Assign a value to it<br />

– Drop it<br />

If you do not take one of these steps, <strong>Developer</strong> automatically clears it from the Pipeline<br />

tab.<br />

Note: You might want to drop a variable immediately after adding it if a service produces a<br />

variable that is not declared in the service input or output parameters. The variable will<br />

not appear on the Pipeline tab if it is not an input or output parameter. By adding and then<br />

immediately dropping the variable, you can delete the variable if it does exist in the<br />

pipeline.<br />

<strong>webMethods</strong> <strong>Developer</strong> User’s <strong>Guide</strong> Version 6.5, Service Pack 3 � � � 221


To add a variable to the pipeline<br />

8. Mapping Data in a Flow Service<br />

1 In the editor, select the INVOKE or MAP step that represents the stage of the pipeline<br />

at which you want to add a new variable.<br />

2 Click the Pipeline tab.<br />

3 Select the point where you want to add the new variable.<br />

4 Click and select the type of variable that you want to create.<br />

5 Type the name of the variable and press ENTER.<br />

6 If the variable is a document or a document list, repeat steps 4 and 5 to define its<br />

member variables. Then use to indent each member variable beneath the<br />

document or document list variable.<br />

7 Assign one of the pipeline modifiers to the new variable (Link, Drop, or Set Value). (If<br />

you do not assign a modifier to the variable, <strong>Developer</strong> considers it extraneous to the<br />

flow and automatically clears the variable when it refreshes the Pipeline tab.)<br />

Working with Transformers<br />

Note: In an INVOKE step, you can add a new variable to Pipeline In, Service In, Service<br />

Out, or Pipeline Out. In a MAP step, you can only add new variables in Pipeline Out.<br />

By linking variables to each other on the Pipeline tab, you can accomplish name<br />

transformations and structural transformations. However, to perform value<br />

transformations you must execute some code or logic (that is, you must invoke a service).<br />

<strong>Developer</strong> provides two ways for you to invoke services: You can insert INVOKE steps or<br />

you can insert transformers onto the Pipeline tab.<br />

What Are Transformers?<br />

Transformers are the services you use to accomplish value transformations on the Pipeline<br />

tab. You can only insert a transformer into a MAP step. You can use any service as a<br />

transformer. This includes any Java, C or flow service that you create and any built-in<br />

services in WmPublic, such as the pub.date.getCurrentDateString and the pub.string.concat<br />

services. By using transformers, you can invoke multiple services (and perform multiple<br />

value transformations) in a single flow step.<br />

Note: Services that you insert using the INVOKE step might also perform value<br />

transformations. However, only transformers can accomplish multiple value<br />

transformations in a single flow step.<br />

<strong>webMethods</strong> <strong>Developer</strong> User’s <strong>Guide</strong> Version 6.5, Service Pack 3 � � � 222


8. Mapping Data in a Flow Service<br />

You can think of transformers as a series of INVOKE steps embedded in a MAP step. And<br />

like INVOKE steps, when you insert a transformer, you need to create links between<br />

pipeline variables and the transformer. You can also set properties for the transformer and<br />

validate the input and/or output of the transformer. Because transformers are contained<br />

within a MAP step, they do not appear as a separate flow step in the editor.<br />

Transformers are well suited for use when mapping data from one document format to<br />

another. When you map data between formats, you usually need to perform several name,<br />

structure, and value transformations. By using transformers, the flow service in which<br />

you map data between formats could potentially consist of a single MAP step in where<br />

transformers and links between variables handle all of the data transformations. In this<br />

way, you could see your entire document-to-document mapping in a single view.<br />

Tip! You can create a flow service that uses transformers to convert data between<br />

document formats (such as an IDOC to an XML document or RosettaNet PIP to a<br />

proprietary format). You could then invoke this service in other flow services each time<br />

you need to convert between the specific document formats before you begin processing<br />

data.<br />

MAP step with transformers<br />

Note: In a MAP step, <strong>Developer</strong> only displays the links between pipeline variables and<br />

transformers. <strong>Developer</strong> does not display any implicit linking for a MAP step.<br />

<strong>webMethods</strong> <strong>Developer</strong> User’s <strong>Guide</strong> Version 6.5, Service Pack 3 � � � 223


Using Built-in Services as Transformers<br />

8. Mapping Data in a Flow Service<br />

Any service in the Navigation panel can be used as a transformer. <strong>webMethods</strong> provides<br />

several built-in services specifically designed to translate values between formats. These<br />

services can be found in the following folders in the WmPublic package:<br />

This folder… Contains services to…<br />

pub.date Transform time and date information from one format to another.<br />

pub.document Transform documents to and from document lists and XML<br />

values.<br />

pub.list Transform a String list to a document list (IData[ ] object) and<br />

append items to a document list (IData[ ] object) or a String list.<br />

pub.math Perform simple arithmetic calculations (add, subtract, multiply,<br />

and divide) on integers and decimals contained in string variables.<br />

pub.string Transform string values in various ways (for example, pad,<br />

substring, concat, replace through a lookup table).<br />

For more information about built-in services, see the <strong>webMethods</strong> Integration Server Built-In<br />

Services Reference.<br />

Inserting a Transformer into a MAP Step<br />

When you insert a transformer, you are essentially inserting an INVOKE step into a MAP<br />

step. When inserting transformers, keep the following points in mind:<br />

� Transformers can only be inserted in a MAP step.<br />

� Any service can be used as a transformer, including flow services, C services, and Java<br />

services.<br />

� The transformers you insert into a MAP step operate on the same set of pipeline data.<br />

� The output of one transformer cannot be used as the input of another transformer in<br />

the same MAP step.<br />

� Transformers in a MAP step are independent of each other and do not execute in a<br />

specific order. When inserting transformers, assume that <strong>webMethods</strong> Integration<br />

Server concurrently executes the transformers at run time.<br />

To insert a transformer<br />

1 In the editor, select the MAP step in which you want to insert a transformer.<br />

2 Click the Transformers area on the Pipeline tab.<br />

<strong>webMethods</strong> <strong>Developer</strong> User’s <strong>Guide</strong> Version 6.5, Service Pack 3 � � � 224


8. Mapping Data in a Flow Service<br />

3 Click on the Pipeline tab toolbar and then select the service you want to invoke.<br />

If the service you want to insert does not appear in the list, select Browse to select the<br />

service from the Navigation panel. The transformer appears under Transformers on the<br />

Pipeline tab.<br />

4 Select the transformer and, in the Properties panel, set its properties:<br />

For this property... Specify...<br />

Service The fully qualified name of the service that will be invoked at<br />

run time as a transformer. When you insert a transformer,<br />

<strong>Developer</strong> automatically assigns the name of that service to<br />

the service property. If you want to change the service that is<br />

invoked by a transformer, specify the service’s fully qualified<br />

name in the folderName:serviceName format or click to<br />

select a service from a list.<br />

Validate input Whether or not you want to validate the input to the<br />

transformer against the signature of the service. Select True to<br />

validate the input of the transformer. Select False if you do not<br />

want to validate the input of the transformer.<br />

For information about validating transformers, see “Validating<br />

Input and Output for Transformers” on page 229.<br />

Validate output Whether or not you want to validate the output of the<br />

transformer against the signature of the service. Select True to<br />

validate the output of the transformer. Select False if you do<br />

not want to validate the output of the transformer.<br />

5 Click OK.<br />

For information about validating transformers, see “Validating<br />

Input and Output for Transformers” on page 229.<br />

For information about debugging transformers, see “Debugging Transformers” on<br />

page 232.<br />

Tip! When you expand a transformer in the Transformers area of the Pipeline tab, you can see<br />

the Service In variables and the Service Out variables and all of the explicit links between the<br />

transformer and the pipeline. You might find it easier to link transformer variables when<br />

you are zoomed in on the transformer.<br />

<strong>webMethods</strong> <strong>Developer</strong> User’s <strong>Guide</strong> Version 6.5, Service Pack 3 � � � 225


Linking Variables to a Transformer<br />

8. Mapping Data in a Flow Service<br />

When you map data to and from a transformer, you create links between the pipeline<br />

variables and the transformer. Keep the following points in mind when you create links<br />

between pipeline and transformer variables:<br />

� <strong>Developer</strong> does not implicitly link pipeline variables to the input or output variables<br />

of a transformer. Even if the pipeline variables have the same name and data type as<br />

the transformer variables, no implicit linking occurs. You need to explicitly link<br />

pipeline variables to the input and output variables of a transformer.<br />

� Output for a transformer is not automatically added to the pipeline. If you want the<br />

output of a transformer to appear in the pipeline, you need to explicitly link the<br />

output variable to a Pipeline Out variable. If you do not link the output variable to a<br />

Pipeline Out variable, the output variable does not appear in the pipeline.<br />

� If you do not link any output variables or the transformer does not have any declared<br />

output variables, the transformer service will not run.<br />

� The transformers you insert into a single MAP step act on the same set of pipeline<br />

data.<br />

To provide the cleanest and simplest view when working with transformers, the Pipeline<br />

tab only displays one link between the transformer and a Pipeline In variable and one link<br />

between the transformer and a Pipeline Out variable. (The Pipeline tab displays the links<br />

between the transformer and the highest positioned Pipeline In variable and Pipeline Out<br />

variable to which the transformer is linked.)<br />

To create a link between a pipeline variable and a transformer<br />

1 To create a link between a Pipeline In variable and a transformer variable, do the<br />

following:<br />

a In Pipeline In, select the variable you want to use as input to the transformer and<br />

drag your mouse to the transformer.<br />

b In the Link To list, select the transformer variable to which you want to link the<br />

Pipeline In variable.<br />

Once you link a transformer input variable to a Pipeline In variable, <strong>Developer</strong><br />

displays the phrase “has already been chosen” next to the transformer variable in<br />

the Link To list.<br />

c Repeat steps a and b for each transformer input variable you want to link to a<br />

pipeline variable.<br />

<strong>webMethods</strong> <strong>Developer</strong> User’s <strong>Guide</strong> Version 6.5, Service Pack 3 � � � 226


8. Mapping Data in a Flow Service<br />

Note: You can assign a value to a transformer input variable using the Set Value<br />

modifier . To assign an input value to a transformer, first expand the transformer<br />

by double-clicking the transformer name, by clicking Compose�Expand, or by clicking<br />

next to the transformer.<br />

2 To create a link between a transformer output variable and a Pipeline Out variable, do<br />

the following:<br />

a Select the transformer and drag your mouse to the variable in Pipeline Out to which<br />

you want to link the transformer variable.<br />

b In the Link From list, select the transformer variable that you want to link to the<br />

selected Pipeline Out variable.<br />

c Repeat steps a and b for each output variable produced by the transformer.<br />

You can link a transformer output variable to more than one Pipeline Out variable.<br />

Important! <strong>Developer</strong> does not automatically add the output of a transformer to the<br />

pipeline. If you want the output of a transformer to appear in the pipeline after the<br />

transformer executes, you need to explicitly link the output variable to a variable in<br />

Pipeline Out.<br />

Important! If you do not link any output variables or the transformer does not have any<br />

output variables, the transformer will not execute.<br />

Transformer Movement<br />

When you link to and from a selected transformer, it moves up and down in the<br />

Transformers column. This movement or “jumping” is by design to help minimize the<br />

distance between the transformer and the variable you are linking it to.<br />

Transformers exhibit the following behavior or movement:<br />

� When a transformer is selected and you select a variable in Pipeline In or Pipeline Out,<br />

the transformer “jumps” or moves up or down in the Transformers column so that it is<br />

directly across from the selected pipeline variable.<br />

� When you finish linking a transformer and it is no longer selected, <strong>Developer</strong><br />

“anchors” or aligns the transformer next to the highest Pipeline Out variable it is linked<br />

to.<br />

To stop the transformer from jumping, click the transformer again or click in the empty<br />

areas of the Pipeline tab.<br />

<strong>webMethods</strong> <strong>Developer</strong> User’s <strong>Guide</strong> Version 6.5, Service Pack 3 � � � 227


8. Mapping Data in a Flow Service<br />

Note: To expand your view of the Pipeline tab, drag the movable border above the tab. The<br />

Pipeline tab expands to fit in the <strong>Developer</strong> window.<br />

Transformers and Array Variables<br />

When creating links between pipeline variables and transformers, differences in<br />

dimensionality for the source and target variables may cause an exception. If the<br />

dimensionality of the target variable is greater than the dimensionality of the source<br />

variable, an exception will not be thrown. However, if the dimension of the source<br />

variable is greater than the dimension of the target variable, an exception will occur.<br />

What Is Dimensionality?<br />

Dimensionality refers to the number of arrays to which a variable belongs. For example,<br />

the dimensionality of a single String is 0, that of a single String list or document list is 1,<br />

and that of a single String table is 2. A String that is a child of a document list has a<br />

dimensionality of 1. A String list that is a child of a document list has a dimensionality<br />

of 2.<br />

Example<br />

In the following example, the unitPrice variable cannot be linked to num1 because the<br />

unitPrice variable has a dimensionality of 1 ( string (0) + document list (1) = 1) and num1<br />

has a dimension of 0.<br />

unitPrice cannot be linked to num1 because of dimensionality differences<br />

<strong>webMethods</strong> <strong>Developer</strong> User’s <strong>Guide</strong> Version 6.5, Service Pack 3 � � � 228


Solution<br />

To solve this, you can either:<br />

8. Mapping Data in a Flow Service<br />

� Change the service invoked by the transformer to accept arrays as data, or<br />

� Create a flow service in which a LOOP step loops over the array variable. Then, (in the<br />

same flow service) invoke the service you originally wanted to use as a transformer,<br />

and make that INVOKE step a child of the LOOP. Finally, insert the resulting flow<br />

service as a transformer in the MAP.<br />

Of the two options, changing the service to accept arrays as data results in faster execution<br />

of flow services.<br />

Validating Input and Output for Transformers<br />

As with any service you insert using an INVOKE, you can validate the inputs and outputs<br />

of the transformer service before and/or after it executes. To indicate that you want to<br />

validate a transformer’s inputs and outputs, you change the properties of the transformer.<br />

You do not have to use validation for all of the transformers you insert into a MAP step.<br />

When the server validates a transformer’s inputs and outputs at run time, it validates the<br />

transformer against the input and output parameters of the invoked service. To view the<br />

input and output parameters of the invoked service, open the service and then click the<br />

service’s Input/Output tab. The variables on the input and output sides of the tab represent<br />

the declared parameters for the service. To view the constraints placed on a variable, click<br />

the variable and view its Constraints properties in the Properties panel.<br />

Note: If the Validate input and/or Validate output properties of the invoked service are set to<br />

True, the input and/or output for the service will automatically be validated every time the<br />

service is executed. If you set up validation via the properties for a transformer when it is<br />

already set up for validation via the service’s Properties panel, then you are performing<br />

validation twice. This can slow down the execution of a transformer and, ultimately, the<br />

flow service.<br />

To validate the input and output of a transformer<br />

1 In the editor, select the MAP step containing the transformer you want to validate.<br />

2 Click the Pipeline tab.<br />

3 Under Transformers, select the transformer for which you want to validate input or<br />

output.<br />

4 On the Properties panel, for the Validate input property, select True if you want to<br />

validate the input to the transformer against the input parameters of the invoked<br />

service.<br />

<strong>webMethods</strong> <strong>Developer</strong> User’s <strong>Guide</strong> Version 6.5, Service Pack 3 � � � 229


8. Mapping Data in a Flow Service<br />

5 For the Validate output property, select True if you want to validate the output of the<br />

transformer against the output parameters of the invoked service.<br />

6 Click OK.<br />

Copying Transformers<br />

You may want to use the same transformer more than once in a MAP step. For example,<br />

you might want to convert all the dates in a purchase order to the same format. Instead of<br />

using the button to locate and select the service, you can copy and paste the<br />

transformer service.<br />

You can also copy transformers between MAP steps in the same flow or MAP steps in<br />

different flow services.<br />

Important! Copying a transformer does not copy the links between transformer variables<br />

and pipeline variables or any values you might have assigned to transformer variables<br />

using the Set Value modifier.<br />

To copy a transformer<br />

1 In the editor, select the MAP step containing the transformer service you want to copy.<br />

2 Click the Pipeline tab.<br />

3 Under Transformers, select the transformer service you want to copy. Right-click the<br />

transformer and then select Copy.<br />

4 To paste the transformer, click anywhere under Transformers. Right-click and select<br />

Paste.<br />

5 Link the input and output variables of the transformer using the procedures<br />

described in “Linking Variables to a Transformer” on page 226.<br />

Expanding Transformers<br />

You might find it easier to create links to transformers when you expand the transformer.<br />

When you expand a transformer, you can see the Service In and the Service Out variables for<br />

the transformer and all of the links between the pipeline and the transformer variables.<br />

<strong>webMethods</strong> <strong>Developer</strong> User’s <strong>Guide</strong> Version 6.5, Service Pack 3 � � � 230


Pipeline tab with an expanded transformer<br />

8. Mapping Data in a Flow Service<br />

When you expand a transformer, you can only perform actions for that transformer, for<br />

example, you can only link variables or set properties for the expanded transformer. Other<br />

transformers and links to other transformers remain hidden until you collapse the<br />

transformer.<br />

Note: If you expand a transformer, you can use the Set Value modifier to assign a value to a<br />

variable in Service In.<br />

To expand and collapse the contents of a transformer<br />

� To expand the contents of a transformer, click Compose�Expand.<br />

� To collapse the contents of a transformer, click Compose�Collapse.<br />

Tip! You can also expand/collapse a transformer by double-clicking it.<br />

Note: If Integration Server displays a message stating that the transformer cannot be<br />

found, then the service invoked by the transformer has been renamed, moved, or<br />

deleted. You must use the transformer properties to rename the transformer. See the<br />

following section for more information.<br />

Renaming Transformers<br />

If Integration Server displays the message “Transformer not found” when you try to<br />

expand a transformer or when you point the mouse to the transformer, then the service<br />

referenced by the transformer has been renamed, moved, or deleted. You need to change<br />

<strong>webMethods</strong> <strong>Developer</strong> User’s <strong>Guide</strong> Version 6.5, Service Pack 3 � � � 231


8. Mapping Data in a Flow Service<br />

the Service property of the transformer so that the transformer points to the moved, or<br />

renamed service.<br />

If the service referenced by the transformer has been deleted, you may want to delete the<br />

transformer.<br />

Tip! You can enable safeguards so that you do not inadvertently affect or break other<br />

services when you move, rename, or delete a service. For more information, see<br />

“Specifying Dependency Checking Safeguards” on page 47.<br />

To rename a transformer<br />

1 Use the Navigation panel to determine the new name or location of the service called<br />

by the transformer.<br />

2 Open the flow service containing the transformer you want to rename.<br />

3 In the editor, select the MAP step containing the transformer. Then, on the Pipeline tab,<br />

select the transformer you want to rename.<br />

4 In the Service property on the Properties panel, delete the old name and type in the<br />

service’s new fully qualified name in the folderName:serviceName format, or click to<br />

select a service from a list.<br />

Debugging Transformers<br />

When you test and debug a flow service, you can use the following testing and debugging<br />

techniques with transformers:<br />

� Step into a MAP step and step through the execution of each transformer. For more<br />

information about stepping into and out of a MAP step, see “Using the Step Tools<br />

with a MAP Step” on page 294.<br />

� Set a breakpoint on a transformer so that service execution stops when the<br />

transformer is encountered. For more information about setting breakpoints, see<br />

“Setting Breakpoints” on page 295.<br />

� Disable a transformer so that it does not execute at run time. For more information<br />

about disabling transformers, see “Disabling Transformers” on page 299.<br />

<strong>webMethods</strong> <strong>Developer</strong> User’s <strong>Guide</strong> Version 6.5, Service Pack 3 � � � 232


Chapter 9. Creating IS Schemas, IS Document Types, and<br />

Specifications<br />

� Creating an IS Schema . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 234<br />

� Creating an IS Document Type . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 244<br />

� Creating a Specification . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 256<br />

<strong>webMethods</strong> <strong>Developer</strong> User’s <strong>Guide</strong> Version 6.5, Service Pack 3 � � � 233


Creating an IS Schema<br />

9. Creating IS Schemas, IS Document Types, and Specifications<br />

An IS schema is a “free-standing” element in the Navigation panel that acts as the<br />

blueprint or model against which you validate an XML document. The IS schema<br />

provides a formal description of the structure and content for a valid instance document<br />

(the XML document). The formal description is created through the specification of<br />

constraints. An IS schema can contain the following types of constraints:<br />

� Structural constraints in an IS schema describe the elements, attributes, and types that<br />

appear in a valid instance document. For example, an IS schema for a purchase order<br />

might specify that a valid element must consist of the ,<br />

, , , and elements in that order.<br />

� Content constraints in an IS schema describe the type of information that elements and<br />

attributes can contain in a valid instance document. For example, the <br />

element might be required to contain a value that is a positive integer.<br />

During data validation, the validation engine in <strong>webMethods</strong> Integration Server compares<br />

the elements and attributes in the instance document with the structural and content<br />

constraints described for those elements and attributes in the IS schema.The validation<br />

engine considers the instance document to be valid when it complies with the structural<br />

and content constraints described in the IS schema. For more information about data<br />

validation, see Chapter 10, “Performing Data Validation”.<br />

You can create IS schemas from an XML Schema, a DTD (Document Type Definition), or<br />

an XML document that references an existing DTD. For information about creating IS<br />

schemas, see “Creating an IS Schema” on page 239.<br />

What Does an IS Schema Look Like?<br />

The appearance and content of an IS schema depends on whether you generate an IS<br />

schema from an XML Schema or a DTD. For example, if you create an IS schema from an<br />

XML Schema, the resulting IS schema displays type definitions, element declarations, and<br />

attribute declarations. If you create an IS schema from a DTD, the resulting IS schema<br />

displays element type declarations.<br />

When you select an IS schema in the Navigation panel, <strong>Developer</strong> displays the contents of<br />

the IS schema in the editor. The schema editor is divided into two areas: the schema<br />

browser on the left and the schema details area on the right. Above these areas, the editor<br />

identifies the target namespace for the IS schema.<br />

<strong>webMethods</strong> <strong>Developer</strong> User’s <strong>Guide</strong> Version 6.5, Service Pack 3 � � � 234


Specifies the target<br />

namespace to which<br />

the schema belongs.<br />

Select a component in<br />

the schema browser...<br />

...to view and/or edit the<br />

component in the<br />

schema details area.<br />

Schema editor<br />

Schema Browser<br />

9. Creating IS Schemas, IS Document Types, and Specifications<br />

The schema browser displays the components of an IS schema in a format that mirrors the<br />

structure and content of the source file. The schema browser groups the global element<br />

declarations, attribute declarations, simple type definitions, and complex type definitions<br />

from the source file under the top-level headings ELEMENTS, ATTRIBUTES, SIMPLE<br />

TYPES, and COMPLEX TYPES. For example, the ELEMENTS heading contains all of the<br />

global element declarations from the XML Schema or the DTD.<br />

If the source file does not contain one of these global components, the corresponding<br />

heading is absent. For example, if you create an IS schema from an XML Schema that does<br />

not contain any global attribute declarations, the schema browser does not display the<br />

ATTRIBUTES heading. An IS schema created from a DTD never displays the SIMPLE<br />

TYPES or COMPLEX TYPES headings because DTDs do not contain type definitions.<br />

Note: A DTD does contain attribute declarations. However, the schema browser does not<br />

display the ATTRIBUTES heading for IS schemas generated from DTDs. This is because<br />

an attribute declaration in a DTD associates the attribute with an element type.<br />

Accordingly, the schema browser displays attributes as children of the element type<br />

declaration to which they are assigned. For more information, see the <strong>webMethods</strong><br />

Integration Server Schema Reference.<br />

The schema browser uses unique symbols to represent the components of the IS schema.<br />

Each of these symbols relates to a component of an XML Schema or a DTD. The following<br />

table identifies the symbol for each component that can appear in an IS schema.<br />

<strong>webMethods</strong> <strong>Developer</strong> User’s <strong>Guide</strong> Version 6.5, Service Pack 3 � � � 235


9. Creating IS Schemas, IS Document Types, and Specifications<br />

Note: In the following table, global refers to elements, attributes, and types declared or<br />

defined as immediate children of the element in an XML Schema. All element<br />

type declarations in a DTD are considered global declarations.<br />

Symbol Description<br />

Element declaration. An element declaration associates an element name<br />

with a type definition. This symbol corresponds to the <br />

declaration in an XML Schema and the ELEMENT declaration in a DTD.<br />

Element reference. An element reference is a reference from an element<br />

declaration in a content specification to a globally declared element.<br />

In an IS schema generated from an XML Schema, this symbol corresponds<br />

to the ref="globalElementName" attribute in an declaration.<br />

In an IS schema generated from DTD, this symbol appears next to an<br />

element that is a child of another element. The parent element has only<br />

element content.<br />

Any element declaration. In XML Schema, an element declaration is a<br />

wildcard declaration used as a placeholder for one or more undeclared<br />

elements in an instance document.<br />

In a DTD, an element declared to be of type ANY can contain any<br />

well-formed XML. This symbol corresponds to an element declared to be<br />

of type ANY.<br />

Because an element declaration does not have a name, the schema<br />

browser uses 'Any' as the name of the element.<br />

Attribute declaration. An attribute declaration associates an attribute name<br />

with a simple type definition. This symbol corresponds to the XML<br />

Schema declaration or the attribute in a DTD ATTLIST<br />

declaration.<br />

Attribute reference. An attribute reference is a reference from a complex type<br />

definition to a globally declared attribute. This symbol corresponds to the<br />

ref="globalAttributeName" attribute in an attribute declaration.<br />

DTDs do not have attribute references. Consequently, attribute references<br />

do not appear in IS schemas generated from DTDs.<br />

Any attribute declaration. An any attribute declaration is a wildcard<br />

declaration used as a placeholder for undeclared attributes in an instance<br />

document. This symbol corresponds to the declaration in<br />

an XML Schema.<br />

Because an declaration does not specify an attribute<br />

name, the schema browser uses 'Any' as the name of the attribute.<br />

<strong>webMethods</strong> <strong>Developer</strong> User’s <strong>Guide</strong> Version 6.5, Service Pack 3 � � � 236


Symbol Description<br />

9. Creating IS Schemas, IS Document Types, and Specifications<br />

Simple type definition. A simple type definition specifies the data type for a<br />

text-only element or an attribute. Unlike complex type definitions, simple<br />

type definitions cannot carry attributes. This symbol corresponds to the<br />

element in an XML Schema.<br />

If the simple type definition is unnamed (an anonymous type), the schema<br />

browser displays 'Anonymous' as the name of the simple type definition.<br />

Complex type definition. A complex type definition defines the structure and<br />

content for elements of complex type. (Elements of complex type can<br />

contain child elements and carry attributes.) This symbol corresponds to<br />

the element in an XML Schema.<br />

If the complex type definition is unnamed (an anonymous type), the<br />

schema browser displays 'Anonymous' as the name of the complex type<br />

definition.<br />

Sequence content model. A sequence content model specifies that the child<br />

elements in the instance document must appear in the same order in which<br />

they are declared in the content model. This symbol corresponds to the<br />

compositor in an XML Schema or a sequence list in an element<br />

type declaration in a DTD.<br />

Choice content model. A choice content model specifies that only one of the<br />

child elements in the content model can appear in the instance document.<br />

This symbol corresponds to the compositor in an XML Schema<br />

or a choice list in a DTD element type declaration.<br />

All content model. An all content model specifies that child elements can<br />

appear once, or not at all, and in any order in the instance document. This<br />

symbol corresponds to the compositor in an XML Schema.<br />

Mixed content. Elements that contain mixed content allow character data to<br />

be interspersed with child elements. This symbol corresponds to the<br />

mixed="true" attribute in an XML Schema complex type definition or a<br />

DTD element list in which the first item is #PCDATA.<br />

Empty content. In an XML Schema, an element has empty content when its<br />

associated complex type definition does not contain any element<br />

declarations. An element with empty content may still carry attributes.<br />

In a DTD, an element has empty content when it is declared to be of type<br />

EMPTY.<br />

<strong>webMethods</strong> <strong>Developer</strong> User’s <strong>Guide</strong> Version 6.5, Service Pack 3 � � � 237


If you select an<br />

element declaration...<br />

... the schema details<br />

area displays information<br />

about that element.<br />

Schema Details Area<br />

9. Creating IS Schemas, IS Document Types, and Specifications<br />

The schema details area displays information that you use to examine and edit the<br />

selected component in the schema browser. The contents of the schema details area vary<br />

depending on what component you select. For example, when you select a globally<br />

declared element of complex type, the schema details area looks like the following.<br />

Schema details area for a global element declaration of complex type<br />

<strong>webMethods</strong> <strong>Developer</strong> User’s <strong>Guide</strong> Version 6.5, Service Pack 3 � � � 238


If you select a simple<br />

type definition...<br />

... the schema details<br />

area displays fields for<br />

viewing/editing the<br />

simple type.<br />

9. Creating IS Schemas, IS Document Types, and Specifications<br />

When you select a simple type definition, the schema details area looks like the following:<br />

Schema details area for a simple type definition<br />

Creating an IS Schema<br />

In <strong>Developer</strong>, you can create IS schemas from XML Schema definitions, DTDs, and XML<br />

documents that reference an existing DTD. The resulting IS schema contains all of the<br />

defined types, declared elements, and declared attributes from the source file.<br />

Note: The actual work of creating an IS schema is performed by the schema processor. The<br />

schema processor is the subsystem of the <strong>webMethods</strong> Integration Server that compiles an<br />

IS schema from a source file.<br />

Note: You can find sample XML Schema definitions in the following directory:<br />

<strong>webMethods</strong>6\<strong>Developer</strong>\samples\xml\xsd. You can also find XML Schema definitions<br />

and DTDs on the Web sites for these groups: (www.w3c.org and<br />

www.openapplications.org).<br />

<strong>webMethods</strong> <strong>Developer</strong> User’s <strong>Guide</strong> Version 6.5, Service Pack 3 � � � 239


To create an IS schema<br />

1 On the File menu, click New.<br />

2 In the New dialog box, select Schema, and then click Next.<br />

9. Creating IS Schemas, IS Document Types, and Specifications<br />

3 In the New Schema dialog box, next to Folder, select the folder where you want to save<br />

the IS schema.<br />

4 In the Name field, type a name for the IS schema using any combination of letters,<br />

numbers, and the underscore character. Click Next.<br />

Important! If you specify a name that uses a reserved word or character, <strong>webMethods</strong><br />

Integration Server displays an error message. When this happens, use a different<br />

name or try adding a letter or number to the name to make it valid. For more<br />

information about restricted characters for packages, folders, and elements, see<br />

“About Element Names” on page 45.<br />

5 In the New Schema dialog box, select one of the following to specify the source for the<br />

IS schema.<br />

Specify... To...<br />

XML Create an IS schema based on an existing DTD referenced by an<br />

XML document.<br />

DTD Create an IS schema based on a DTD.<br />

XML Schema Create an IS schema based on an XML Schema definition.<br />

Important! You can create an IS schema from an XML document only if the XML<br />

document references an existing DTD.<br />

6 Click Next.<br />

7 In the Enter the URL or select a local file box, do one of the following:<br />

� If you want to base the IS schema on an XML document, DTD, or XML Schema<br />

definition that resides on the Internet, type the URL of the resource. (The URL you<br />

specify must begin with http: or https:.)<br />

� If you want to base the IS schema on an XML document, DTD, or XML Schema<br />

definition that resides on your local file system, type the path and file name, or<br />

click to navigate to and select the file.<br />

8 Click Finish. <strong>Developer</strong> generates the IS schema using the document you specified and<br />

displays it in the editor.<br />

<strong>webMethods</strong> <strong>Developer</strong> User’s <strong>Guide</strong> Version 6.5, Service Pack 3 � � � 240


9. Creating IS Schemas, IS Document Types, and Specifications<br />

Note: You might receive errors or warnings when creating an IS schema from an XML<br />

Schema definition or DTD. For more information about these errors and warnings, see<br />

Appendix G, “Validation Errors and Exceptions”.<br />

Note: When creating an IS schema from an XML Schema definition, <strong>Developer</strong> validates<br />

the schema and does not create the IS schema if the XML Schema definition is not valid.<br />

For more information, see “IS Schema Generation Errors and Warnings” on page 486.<br />

Creating IS Schemas from XML Schemas that Reference Other Schemas<br />

A schema author can insert the elements, attributes, and type definitions from another<br />

schema into the schema they are creating. A schema author might do this to break up a<br />

large XML Schema into several small, more reusable XML Schemas. When you generate<br />

an IS schema from an XML Schema that references another schema, the schema processor<br />

either includes all of the schema components in a single IS schema, creates multiple IS<br />

schemas, or creates no IS schema at all. The behavior of the schema processor depends on<br />

the mechanism the source XML Schema uses to reference the other schema. The following<br />

mechanisms can be used to reference an external schema:<br />

� Include. When you generate an IS schema from an XML Schema that uses <br />

to include the contents of an external schema in the same namespace, the resulting IS<br />

schema contains all of the defined types, declared elements, and declared attributes<br />

from the source schema and the external schema. If the including, or root, XML<br />

Schema references an external schema that does not contain a target namespace<br />

declaration, the external schema assumes the target namespace of the root schema.<br />

� Import. When you generate an IS schema from an XML Schema that contains an<br />

element to import the contents of an external schema in a different<br />

namespace, the schema processor creates one IS schema per namespace. For example,<br />

if the source XML Schema imports two XML Schemas from the same namespace, the<br />

schema processor creates an IS schema for the source XML Schema and then a second<br />

IS schema that includes the components from the two imported XML schemas. The<br />

schema processor assigns each imported schema the name that you specify and<br />

appends an underscore and a number to each name. For example, if you create an IS<br />

schema named “mySchema” from mySchema.xsd, the schema processor generates an<br />

IS schema named “mySchema_2” for the imported XML Schema.<br />

� Redefine. Schema authors can also use to include and then redefine type<br />

definitions, model groups, and attribute groups from an external XML Schema in the<br />

same namespace. The schema processor in Integration Server does not support<br />

at this time. The schema processor will not generate an IS schema for an<br />

XML Schema that contains a mechanism. When the schema processor<br />

encounters a mechanism in an XML Schema, <strong>Developer</strong> displays the<br />

following message:<br />

Detected use of "redefine" in {XML Schema Name}. <strong>webMethods</strong> Integration Server<br />

does not support "redefine".<br />

<strong>webMethods</strong> <strong>Developer</strong> User’s <strong>Guide</strong> Version 6.5, Service Pack 3 � � � 241


The string simple type<br />

cannot be edited.<br />

This globally defined<br />

simple type can be<br />

edited.<br />

This simple type cannot<br />

be edited because it<br />

refers to a globally<br />

defined simple type.<br />

This anonymous simple<br />

type can be edited.<br />

Editing a Simple Type in an IS Schema<br />

9. Creating IS Schemas, IS Document Types, and Specifications<br />

You can modify a simple type definition in an IS schema without editing the source XML<br />

Schema definition. You edit a simple type by adding or changing the value of one or more<br />

constraining facets applied to the simple type. For example, you can modify a simple type<br />

by adding an enumerated value, a pattern constraint, or changing the length constraint.<br />

Editing the simple type through <strong>Developer</strong> is an alternative to editing the source XML<br />

Schema definition and regenerating the IS schema.<br />

You can edit any of the globally defined simple types (those that appear under the<br />

SIMPLE TYPES heading) or anonymous simple types (those defined as part of an element<br />

or attribute declaration.) A named simple type that appears as a child of an element or<br />

attribute in the schema browser cannot be edited. (These simple types are global simple<br />

types used to define the element or attribute they appear under.) The following<br />

illustration identifies the simple type definitions that you can and cannot edit.<br />

Editable simple type definitions in an IS schema<br />

When modifying a simple type definition, keep the following points in mind:<br />

� Changes to a simple type definition affect the elements and attributes for which the<br />

simple type is the defined type. For example, if the attribute partNum is defined to be<br />

of type SKU, changes to the SKU simple type definition affect the partNum attribute.<br />

<strong>webMethods</strong> <strong>Developer</strong> User’s <strong>Guide</strong> Version 6.5, Service Pack 3 � � � 242


9. Creating IS Schemas, IS Document Types, and Specifications<br />

� Changes to a global simple type definition in an IS schema do not affect simple types<br />

derived from the global simple type; that is, the changes are not propagated to the<br />

derived types in the IS schema.<br />

� Simple types in an IS schema can be used as content constraints for fields in pipeline<br />

validation. Consequently, changes to a simple type also affect every field to which the<br />

simple type is applied as a content constraint.<br />

Tip! You can create a custom simple type to apply to a field as a content type<br />

constraint. For more information about creating a custom simple type and applying<br />

constraints to fields, see “Setting Constraining Facet Values” on page 243.<br />

� Changes to a simple type definition are saved in the IS schema. If you regenerate the<br />

IS schema from the XML Schema definition, your changes will be overwritten.<br />

� When you edit the constraining facets applied to a simple type definition, you can<br />

only make the constraining facet values more restrictive. The constraining facets<br />

cannot become less restrictive. For more information about setting values for<br />

constraining facets, see “Setting Constraining Facet Values” on page 243.<br />

Tip! If you want to edit complex type definitions, attribute declarations, element<br />

declarations, or the structure of the schema, you need to edit the XML Schema and then<br />

regenerate the IS schema.<br />

To edit a simple type definition<br />

1 Open the IS schema that contains the simple type you want to edit.<br />

2 In the schema browser area of the editor, select the simple type that you want to edit.<br />

The symbol appears next to simple types.<br />

3 In the schema details area, specify the constraining facets that you want to apply to<br />

the simple type. For more information about constraining facets, see “Constraining<br />

Facets” on page 464.<br />

4 On the File menu, click Save.<br />

Setting Constraining Facet Values<br />

You can edit any of the constraining facet values that appear in the schema details area<br />

when you select an editable simple type definition in the schema browser. The<br />

constraining facets displayed in the schema details area depend on the primitive type<br />

from which the simple type was derived. For example, if the simple type definition is<br />

derived from string, the schema details area displays the enumeration, length, minLength,<br />

maxLength, pattern, and whiteSpace facets. The schema details area only displays<br />

constraining facet values set in the simple type definition. It does not display constraining<br />

<strong>webMethods</strong> <strong>Developer</strong> User’s <strong>Guide</strong> Version 6.5, Service Pack 3 � � � 243


9. Creating IS Schemas, IS Document Types, and Specifications<br />

facet values the simple type definition inherited from the simple types from which it was<br />

derived.<br />

You can view the constraining facet values set in the type definitions from which a simple<br />

type was derived by clicking the Base Constraints button. Base constraints are the<br />

constraining facet values set in all the type definitions from which a simple type is<br />

derived—from the primitive type to the immediate parent type. These constraint values<br />

represent the cumulative facet values for the simple type.<br />

When you edit the constraining facets for a simple type definition, you can only make the<br />

constraining facets more restrictive—the applied constraining facets cannot become less<br />

restrictive. For example, if the length value is applied to the simple type, the maxLength or<br />

minLength values cannot be set because the maxLength and minLength facets are less<br />

restrictive than length.<br />

Creating an IS Document Type<br />

An IS document type contains a set of fields used to define the structure and type of data<br />

in a document (IData object). You can use an IS document type to specify input or output<br />

parameters for a service or specification. You can also use an IS document type to build a<br />

document or document list field and as the blueprint for pipeline validation and<br />

document (IData object) validation.<br />

IS document types can provide the following benefits:<br />

� Using an IS document type as the input or output signature for a service can reduce<br />

the effort required to build a flow.<br />

� Using an IS document type to build document or document list fields can reduce the<br />

effort needed to declare input or output parameters or the effort/time needed to build<br />

other document fields.<br />

� IS document types improve accuracy, because there is less opportunity to introduce a<br />

typing error typing field names.<br />

� IS document types make future changes easier to implement, because you can make a<br />

change in one place (the IS document type) rather than everywhere the IS document<br />

type is used.<br />

You can create an IS document type in the following ways:<br />

� Create an empty IS document type and define the structure of the document type<br />

yourself by inserting fields.<br />

� Create an IS document type from a source file, such as an XML Schema, DTD, or XML<br />

document. The structure and content of the IS document type will match that of the<br />

source file.<br />

� Create an IS document type from a Broker document type.<br />

<strong>webMethods</strong> <strong>Developer</strong> User’s <strong>Guide</strong> Version 6.5, Service Pack 3 � � � 244


Creating an Empty IS Document Type<br />

9. Creating IS Schemas, IS Document Types, and Specifications<br />

When you create an empty IS document type, you insert fields to define the contents and<br />

structure of the IS document type.<br />

Note: If you intend to make the IS document type publishable, keep in mind that the<br />

Broker has restrictions for field names. If you create a trigger that subscribes to the<br />

publishable document type, any filters that include field names containing restricted<br />

characters will be saved on the Integration Server only. The filters will not be saved on the<br />

Broker, possibly affecting Integration Server performance. For more information, see the<br />

Publish-Subscribe <strong>Developer</strong>’s <strong>Guide</strong>.<br />

To create an empty IS document type<br />

1 On the File menu, click New.<br />

2 In the New dialog box, select Document Type and click Next.<br />

3 In the New Document Type dialog box, do the following:<br />

a In the list next to Folder, select the folder in which you want to save the IS<br />

document type.<br />

b In the Name field, type a name for the IS document type using any combination of<br />

letters, numbers, and/or the underscore character. For information about<br />

restricted characters, see “About Element Names” on page 45.<br />

c Click Next.<br />

4 Under Select a source, select None to indicate that you want to create an empty IS<br />

document type in which you define the structure and fields.<br />

5 Click Finish.<br />

6 To add fields in the IS document type, do the following:<br />

a Click on the toolbar and select the type of field that you want to define.<br />

b Type the name of the field and then press ENTER.<br />

Note: <strong>Developer</strong> prevents the insertion of fields named _env in an IS document<br />

type. For more information about the _env field, see “The Envelope Field” on<br />

page 251.<br />

<strong>webMethods</strong> <strong>Developer</strong> User’s <strong>Guide</strong> Version 6.5, Service Pack 3 � � � 245


9. Creating IS Schemas, IS Document Types, and Specifications<br />

c With the field selected, set field properties and apply constraints in the Properties<br />

panel (optional).<br />

For more information about setting field properties, see “Specifying Field<br />

Properties” on page 255. For information about applying constraints, see<br />

“Applying Constraints to Variables” on page 261.<br />

d If the field is a document or a document list, repeat steps a–c to define and set the<br />

properties and constraints for each of its members. Use to indent each<br />

member field beneath the document or document list field.<br />

7 On the File menu, click Save.<br />

Note: <strong>Developer</strong> displays small symbols next to a field icon to indicate validation<br />

constraints. <strong>Developer</strong> uses to indicate an optional field. <strong>Developer</strong> uses the ‡ symbol<br />

to denote a field with a content constraint. For information about applying constraints to<br />

fields, see “Applying Constraints to Variables” on page 261.<br />

Creating an IS Document Type from an XML Document, DTD,<br />

or XML Schema<br />

You can create an IS document type based on the structure and content of a source file,<br />

such as an XML Schema, DTD, or XML document. When you base the IS document type<br />

on a source file, <strong>Developer</strong> creates an IS document type and an IS schema. The IS<br />

document type has the same structure and field constraints as the source document. The<br />

IS schema contains the elements, attributes, and data types defined in the XML Schema or<br />

DTD. The IS document type, which displays the fields and structure of the source<br />

document, uses links to the IS schema to obtain content type information about named<br />

simple types.<br />

Keep the following points in mind when creating an IS document type from an XML<br />

Schema, DTD, or XML document:<br />

� When creating a field from an attribute declaration, the Integration Server inserts the<br />

@ symbol at the beginning of the field name. For example, an attribute named<br />

myAttribute in the source file corresponds to a field named @myAttribute in the IS<br />

document type.<br />

� Before creating the IS document type and the IS schema, Integration Server validates<br />

the XML Schema. If the XML Schema does not conform syntactically to the schema for<br />

XML Schemas defined in XML Schema Part 1: Structures, Integration Server does not<br />

create an IS schema or an IS document type. Instead, <strong>Developer</strong> displays an error<br />

message that lists the number, title, location, and description of the validation errors<br />

within the XML Schema.<br />

<strong>webMethods</strong> <strong>Developer</strong> User’s <strong>Guide</strong> Version 6.5, Service Pack 3 � � � 246


9. Creating IS Schemas, IS Document Types, and Specifications<br />

� When you use an XML Schema to create the IS document type, the Integration Server<br />

uses the prefixes declared in the XML Schema as part of the field names. Field names<br />

have the format prefix:elementName or prefix:@attributeName.<br />

� If the XML Schema does not use prefixes, the Integration Server creates prefixes for<br />

each unique namespace and uses those prefixes in the field names. Integration Server<br />

uses “ns” as the prefix for the first namespace, “ns1” for the second namespace, “ns2”<br />

for the third namespace, and so on.<br />

� If you generate an IS document type from an XML Schema for which you already<br />

generated an IS schema, the Integration Server does not include prefixes in the field<br />

names. To ensure that the Integration Server uses prefixes in field names, use<br />

<strong>Developer</strong> to generate an IS document type from the XML Schema and allow the<br />

Integration Server to generate the IS schema automatically.<br />

� If you generate an IS document type from a DTD, the Integration Server assumes that<br />

the DTD is UTF8-encoded. If the DTD is not UTF8-encoded, add the XML prolog to<br />

the top of the DTD and explicitly state the encoding. For example, for a DTD encoded<br />

in 8859-1, you would insert the following at the top of the document:<br />

<br />

To create an IS document type from an XML document, DTD, or XML Schema<br />

1 On the File menu, click New.<br />

2 In the New dialog box, select Document Type and click Next.<br />

3 In the New Document Type dialog box, do the following:<br />

a In the list next to Folder, select the folder in which you want to save the IS<br />

document type.<br />

b In the Name field, type a name for the IS document type using any combination of<br />

letters, numbers, and/or the underscore character. For information about reserved<br />

words or characters, see “About Element Names” on page 45.<br />

c Click Next.<br />

4 Under Select a source, select one of the following:<br />

Select... To...<br />

XML Create an IS document type that matches the structure and fields in<br />

an XML document.<br />

DTD Create an IS document type that matches the structure and fields in<br />

a DTD.<br />

<strong>webMethods</strong> <strong>Developer</strong> User’s <strong>Guide</strong> Version 6.5, Service Pack 3 � � � 247


Select... To...<br />

5 Click Next.<br />

9. Creating IS Schemas, IS Document Types, and Specifications<br />

XML Schema Create an IS document type that matches the structure and fields in<br />

an XML Schema definition.<br />

6 In the Enter the URL or select a local file box, do one of the following:<br />

� If you want to base the IS document type on a file that resides on the Internet, type<br />

the URL of the resource. (The URL you specify must begin with http: or<br />

https:.)<br />

� If you want to base the IS document type on a file that resides on your local file<br />

system, type in the path and file name, or click to navigate to and select the<br />

file.<br />

7 Do one of the following:<br />

� If you selected XML in step 4, click Finish. <strong>Developer</strong> generates the IS document<br />

type using the XML document you specified and displays it in the editor.<br />

� If you selected DTD or XML Schema in step 4, click Next. <strong>Developer</strong> prompts you to<br />

select the root element of the document. Select the root element and click OK.<br />

<strong>Developer</strong> generates the IS document type and displays it in the editor. <strong>Developer</strong><br />

also generates an IS schema and displays it in the Navigation panel.<br />

<strong>Developer</strong> creates the IS document type and saves it on the Integration Server. If you<br />

want to add or edit fields in the IS document type, see “Creating an Empty IS<br />

Document Type” on page 245.<br />

Note: You might receive errors or warnings when creating an IS document type from a<br />

DTD or XML Schema definition. For more information about these errors and<br />

warnings, see “Validation Errors” on page 468.<br />

Tip! You can modify the generated IS document type by adding, moving, or deleting fields<br />

or by applying properties to the fields. For more information about applying properties to<br />

fields, see “Specifying Field Properties” on page 255<br />

Creating an IS Document Type from a Broker Document Type<br />

If your Integration Server is connected to a Broker, you can create an IS document type<br />

from a Broker document type. The IS document type retains the structure, fields, data<br />

types, and publication properties defined in the Broker document type. For detailed<br />

information about how a Broker document type translates to an IS document type and<br />

vice versa, see the Publish-Subscribe <strong>Developer</strong>’s <strong>Guide</strong>.<br />

<strong>webMethods</strong> <strong>Developer</strong> User’s <strong>Guide</strong> Version 6.5, Service Pack 3 � � � 248


9. Creating IS Schemas, IS Document Types, and Specifications<br />

When you create an IS document type from a Broker document type, you essentially<br />

create a publishable document type. A publishable document type is an IS document type<br />

with specific publishing properties, such as storage type and time to live. Additionally, a<br />

publishable document type on an Integration Server is bound to a Broker document type.<br />

An instance of a publishable document type can be published to a Broker or locally within<br />

an Integration Server.<br />

A publishable document type can be used anywhere an IS document type can be used.<br />

For example, you can use a publishable document type to define the input or output<br />

parameters of a service. A document reference field can reference an IS document type or<br />

a publishable document type. You can use a publishable document type as the blueprint<br />

for performing document or pipeline validation.<br />

Tip! Any IS document type can be made into a publishable document type. For<br />

information about making a document type publishable or setting publication properties,<br />

see the Publish-Subscribe <strong>Developer</strong>’s <strong>Guide</strong>.<br />

When you create an IS document type from a Broker document type that references other<br />

elements, <strong>Developer</strong> will also create an element for each referenced element. The<br />

Integration Server will contain a document type that corresponds to the Broker document<br />

type and one new element for each element the Broker document type references.<br />

<strong>Developer</strong> also creates the folder in which the referenced element was located. <strong>Developer</strong><br />

saves the new elements in the package you selected for storing the new publishable<br />

document type.<br />

For example, suppose that the Broker document type references a document type named<br />

address in the customerInfo folder. <strong>Developer</strong> would create an IS document type named<br />

address and save it in the customerInfo folder. If a field in the Broker document type was<br />

constrained by a simple type definition declared in the IS schema purchaseOrder, <strong>Developer</strong><br />

would create the referenced IS schema purchaseOrder.<br />

An element referenced by a Broker document type might have the same name as an<br />

existing element on your Integration Server. However, element names must be unique on<br />

the Integration Server. <strong>Developer</strong> gives you the option of overwriting the existing<br />

elements with the referenced elements.<br />

Important! If you do not select the Overwrite existing elements when importing referenced<br />

elements check box and the Broker document type references an element with the same<br />

name as an existing Integration Server element, <strong>Developer</strong> will not create the publishable<br />

document type.<br />

<strong>webMethods</strong> <strong>Developer</strong> User’s <strong>Guide</strong> Version 6.5, Service Pack 3 � � � 249


9. Creating IS Schemas, IS Document Types, and Specifications<br />

Important! If you choose to overwrite existing elements with new elements, keep in mind<br />

that dependents of the overwritten elements will be affected. For example, suppose the<br />

address document type defined the input signature of a flow service deliverOrder.<br />

Overwriting the address document type might break the deliverOrder flow service and any<br />

other services that invoked deliverOrder.<br />

To create an IS document type from a Broker document type<br />

1 On the File menu, click New.<br />

2 In the New dialog box, select Document Type and click Next.<br />

3 In the New Document Type dialog box, do the following:<br />

a In the list next to Folder, select the folder in which you want to save the IS<br />

document type.<br />

b In the Name field, type a name for the IS document type using any combination of<br />

letters, numbers, and/or the underscore character.<br />

c Click Next.<br />

4 Under Select a source, select Broker Document Type, and click Next.<br />

5 In the New Document Type dialog box, do the following:<br />

a In the Broker Namespace field, select the Broker document type from which you<br />

want to create an IS document type. The Broker Namespace field lists all of the<br />

Broker document types on the Broker territory to which the Integration Server is<br />

connected.<br />

b If you want to replace existing elements in the Navigation panel with identically<br />

named elements referenced by the Broker document type, select the Overwrite<br />

existing elements when importing referenced elements check box.<br />

Important! Overwriting the existing elements completely replaces the existing<br />

element with the content of the referenced element. Any elements on the<br />

Integration Server that depend on the replaced element, such as flow services, IS<br />

document types, and specifications, might be affected.<br />

6 Click Finish. <strong>Developer</strong> automatically refreshes the Navigation panel and displays<br />

beside the document type name to indicate it is a publishable document type.<br />

<strong>webMethods</strong> <strong>Developer</strong> User’s <strong>Guide</strong> Version 6.5, Service Pack 3 � � � 250


Notes:<br />

9. Creating IS Schemas, IS Document Types, and Specifications<br />

� You can associate only one IS document type with a given Broker document type.<br />

If you try to create a publishable document type from a Broker document type<br />

that is already associated with a publishable document type on your Integration<br />

Server, <strong>Developer</strong> displays an error message.<br />

� In the Publication category of the Properties panel, the Broker doc type property<br />

displays the name of the Broker document type used to create the publishable<br />

document type. Or, if you are not connected to a Broker, this field displays Not<br />

Publishable. You cannot edit the contents of this field. For more information about<br />

the contents of this field, see the Publish-Subscribe <strong>Developer</strong>’s <strong>Guide</strong>.<br />

� Once a publishable document type has an associated Broker document type, you<br />

need to make sure that the document types remain in sync. That is, changes in one<br />

document type must be made to the associated document type. You can update<br />

one document type with changes in the other by synchronizing them. For<br />

information about synchronizing document types, see the Publish-Subscribe<br />

<strong>Developer</strong>’s <strong>Guide</strong>.<br />

The Envelope Field<br />

All publishable document types contain an envelope (_env) field. This field is a document<br />

reference to the pub:publish:envelope document type. This document type defines the content<br />

and structure of the envelope that accompanies instances of the publishable document.<br />

The envelope records information such as the sender’s address, the time the document<br />

was sent, sequence numbers, and other useful information for routing and control. The<br />

envelope is much like a header in an e-mail message.<br />

Because the _env field is needed for publication, <strong>Developer</strong> controls the usage of the _env<br />

field in the following ways:<br />

� You cannot insert an _env field in a document type. <strong>Developer</strong> automatically inserts<br />

the _env field at the end of the document type when you make the document type<br />

publishable.<br />

� You cannot copy and paste the _env field from one document type to another. You can<br />

copy this field to the Input/Output tab.<br />

� You cannot move, rename, or cut the _env field from a document type. <strong>Developer</strong><br />

automatically removes the _env field when you make a document type unpublishable.<br />

� You can only delete an _env field from a document type that is not publishable.<br />

� The _env field is always the last field in a publishable document type.<br />

For more information about the _env field and the contents of the pub:publish:envelope<br />

document type, see the Publish-Subscribe <strong>Developer</strong>’s <strong>Guide</strong>.<br />

<strong>webMethods</strong> <strong>Developer</strong> User’s <strong>Guide</strong> Version 6.5, Service Pack 3 � � � 251


9. Creating IS Schemas, IS Document Types, and Specifications<br />

Note: If an IS document type contains a field named _env, you need to delete that field<br />

before you can make the IS document type publishable.<br />

Adapter Notifications and Publishable Document Types<br />

Adapter notifications notify <strong>webMethods</strong> components whenever a specific event occurs on<br />

an adapter's resource. The adapter notification publishes a document when the specified<br />

event occurs on the resource. For example, if you are using the JDBC Adapter and a<br />

change occurs in a database table that an adapter notification is monitoring, the adapter<br />

notification publishes a document containing data from the event and sends it to the<br />

Integration Server.<br />

An adapter notification can have an associated publishable document type . When you<br />

create a polling or asynchronous listener adapter notification in <strong>Developer</strong>, the<br />

Integration Server automatically generates a corresponding publishable document type.<br />

<strong>Developer</strong> assigns the publishable document type the same name as the adapter<br />

notification, but appends PublishDocument to the name. That is, <strong>Developer</strong> assigns the<br />

publishable document type the name: NotificationNamePublishDocument. You can use this<br />

publishable document type with triggers and flow services just as you would any other<br />

publishable document type.<br />

In a publishable document type associated with an adapter notification, you can edit only<br />

the Storage type and Time to live publication properties. To make any other modifications to<br />

the publishable document type, you must modify the adapter notification type.<br />

Integration Server automatically applies the changes to the publishable document type.<br />

For information about publication properties, see the Publish-Subscribe <strong>Developer</strong>’s <strong>Guide</strong>.<br />

For more information about creating and using adapter notifications, see the appropriate<br />

adapter user guide. For more information about performing actions on adapter<br />

notifications and their associated publishable document types, see Chapter 2, “Managing<br />

Elements in the Navigation Panel”.<br />

Editing an IS Document Type<br />

When you make a change to an IS document type, keep in mind that any change is<br />

automatically propagated to all services, specifications, document fields, and document<br />

list fields that use or reference the IS document type. (This happens when you save the<br />

updated IS document type to the server.) You can use the Tools�Find Dependents command<br />

to view a list of elements that use the IS document type and will be affected by any<br />

changes.<br />

Important! If you use an IS document type as the blueprint for pipeline or document<br />

validation, any changes you make to the IS document type can affect whether the object<br />

being validated (pipeline or document) is considered valid. For more information about<br />

validation, see Chapter 10, “Performing Data Validation”.<br />

<strong>webMethods</strong> <strong>Developer</strong> User’s <strong>Guide</strong> Version 6.5, Service Pack 3 � � � 252


Modifying Publishable Document Types<br />

9. Creating IS Schemas, IS Document Types, and Specifications<br />

When you modify a publishable document type, such as by deleting a field or changing a<br />

property, the publishable document type is no longer synchronized with the<br />

corresponding document type on the Broker. When you save your changes to the<br />

publishable document type, <strong>Developer</strong> displays a message stating:<br />

This document type is now out of sync with the associated Broker<br />

document type. Use Sync Document Type to synchronize the document type<br />

with the Broker.<br />

<strong>Developer</strong> displays this message only if a Broker is configured for the Integration Server.<br />

To update the associated Broker document type with the changes, synchronize the<br />

publishable document type with the Broker document type. For more information about<br />

synchronizing document types, see the Publish-Subscribe <strong>Developer</strong>’s <strong>Guide</strong>.<br />

Printing an IS Document Type<br />

You can use the View as HTML command to produce a printable version of an IS document<br />

type.<br />

To print an IS document type<br />

1 Open the IS document type you want to print and click its title bar in the editor to give<br />

it the focus.<br />

2 From the File menu, select View as HTML.<br />

<strong>Developer</strong> expands any document and document list fields in the IS document type,<br />

creates an HTML page containing the IS document type, and displays the HTML page<br />

in your default browser.<br />

3 If you want to print the IS document type, select your browser’s print command.<br />

Using an IS Document Type to Specify Service Input or<br />

Output Parameters<br />

You can use an IS document type as the set of input or output parameters for a service or<br />

specification. If you have multiple services with identical input parameters but different<br />

output parameters, you can use an IS document type to define the input parameters rather<br />

than manually specifying individual input fields for each service.<br />

To use an IS document type as service input or output parameters<br />

1 Open the service to which you want to assign the IS document type.<br />

2 Click the Input/Output tab.<br />

<strong>webMethods</strong> <strong>Developer</strong> User’s <strong>Guide</strong> Version 6.5, Service Pack 3 � � � 253


9. Creating IS Schemas, IS Document Types, and Specifications<br />

3 In the Input or Output box (depending on which half of the Input/Output tab you want to<br />

apply the IS document type to), type the fully qualified name of the IS document type<br />

or click to select it from a list. You can also drag an IS document type from the<br />

Navigation panel to the box below the Validate input or Validate output check boxes on<br />

the Input/Output tab.<br />

4 On the File menu, click Save.<br />

Important! When an IS document type is assigned to the input or output of a service,<br />

you cannot add, delete, or modify the fields on that half of the Input/Output tab.<br />

Using an IS Document Type to Build a Document Reference<br />

or Document Reference List Field<br />

You can use an IS document type to build a document reference or document reference list<br />

field. By referencing an IS document type instead of creating a new one, you can reduce<br />

the time required to create fields and maintain better consistency for field names. You<br />

might find referencing fields especially useful for information that is repeated over and<br />

over again, such as address information.<br />

Tip! You can also use a publishable document type to build a document reference or<br />

document reference list field.<br />

To use a document type to build a document reference or document reference list<br />

1 On the Input/Output tab, click on the toolbar and select one of the following:<br />

Click... To...<br />

Document Reference Create a document field based on an IS document type.<br />

Document Reference<br />

List<br />

Create a document list field based on an IS document type.<br />

2 In the Name field, type the fully qualified name of the IS document type or select it<br />

from the list next to Folder.<br />

3 Click OK.<br />

4 Type the name of the field.<br />

5 Press ENTER.<br />

<strong>webMethods</strong> <strong>Developer</strong> User’s <strong>Guide</strong> Version 6.5, Service Pack 3 � � � 254


9. Creating IS Schemas, IS Document Types, and Specifications<br />

Important! If you are creating a document reference or document reference list field<br />

based on an IS document type, you cannot directly add, delete, or modify its members<br />

on the Input/Output tab. To edit the referenced document or document list, select it in<br />

the Navigation panel, lock it, and then edit its fields in the editor.<br />

Tip! You can also add a document reference by dragging an IS document type from the<br />

Navigation panel to the box below the Validate input or Validate output check boxes on the<br />

Input/Output tab.<br />

Specifying Field Properties<br />

You can specify additional properties for the field. These properties are located in the<br />

Properties panel.<br />

Field properties<br />

On the Properties panel, the General category contains the properties of the field and the<br />

Constraints category contains validation constraints for the field. (For more information<br />

about specifying validation constraints, see “Applying Constraints to Variables” on<br />

page 261.)<br />

Note: Use the XML Namespace property to assign a namespace name to a field. The<br />

namespace name indicates the namespace to which the field belongs. When generating<br />

XML Schema definitions and WSDL documents, the Integration Server uses the value of<br />

the XML Namespace field along with the field name (the local name) to create a qualified<br />

name (QName) for the field. For more information about setting the XML Namespace<br />

property, see the Web Services <strong>Developer</strong>’s <strong>Guide</strong>.<br />

The Text Field, Password, Large Editor, and Pick List options of the String display type property<br />

affect how you input data for the field as follows. These options are not available for<br />

Objects and Object lists.<br />

<strong>webMethods</strong> <strong>Developer</strong> User’s <strong>Guide</strong> Version 6.5, Service Pack 3 � � � 255


Creating a Specification<br />

9. Creating IS Schemas, IS Document Types, and Specifications<br />

If you want the input… Select...<br />

Entered in a text field Text Field (default)<br />

Entered as a password, with asterisks reflected instead of<br />

characters<br />

Password<br />

Entered in a large text area instead of a text field. This is useful if<br />

you expect a large amount of text as input for the field, or you need<br />

to have TAB or new line characters in the input<br />

To be limited to a predefined list of values<br />

Use the Pick list choices property’s Edit button to define the values<br />

that will appear as choices when <strong>Developer</strong> prompts for input at<br />

run time.<br />

A specification is a “free-standing” IS element that defines a set of service inputs and<br />

outputs. If you have multiple services with the same input and output requirements, you<br />

can point each service to a single specification rather than manually specify individual<br />

input and output fields in each service.<br />

Using specifications provides the following benefits:<br />

� It reduces the effort required to build each flow.<br />

� It improves accuracy, because there is less opportunity to introduce a typing error<br />

when defining a field name.<br />

� It makes future specification changes easier to implement, because you can make the<br />

change in one place (the specification) rather than in each individual service.<br />

If you use a specification, keep in mind that:<br />

Large Editor<br />

Pick List<br />

� Any change that you make to the specification is automatically propagated to all<br />

services that reference that specification. (This happens the moment you save the<br />

updated specification to the server.)<br />

� A specification wholly defines the input and output parameters for a service that<br />

references it. This means that you cannot directly alter the service’s input and output<br />

parameters through its Input/Output tab. (<strong>Developer</strong> displays the parameters, but does<br />

not allow you to change them.) To make changes to the input and output parameters<br />

of the service, you must modify the specification (which affects all services that<br />

reference it) or detach the specification so you can manually define the parameters on<br />

the service’s Input/Output tab.<br />

You create a specification with <strong>Developer</strong>. You assign a specification to a service using the<br />

Input/Output tab for the service.<br />

<strong>webMethods</strong> <strong>Developer</strong> User’s <strong>Guide</strong> Version 6.5, Service Pack 3 � � � 256


To create a specification<br />

1 On the File menu, click New.<br />

2 In the New dialog box, select Specification, and click Next.<br />

9. Creating IS Schemas, IS Document Types, and Specifications<br />

3 In the New Service Specification dialog box, do the following:<br />

a In the list next to Folder, select the folder to which you want to save the<br />

specification.<br />

b In the Name field, type a name for the specification using any combination of<br />

letters, numbers, and the underscore character.<br />

Important! <strong>Developer</strong> does not allow the use of certain reserved words (such as for,<br />

while, and if ) as names. If you specify a name that is a reserved word, you will receive<br />

an error message. When this happens, use a different name or try adding a letter or<br />

number to the name you specified to make it valid.<br />

c Click Finish.<br />

4 If you want this specification to reference another specification, do the following in<br />

the editor:<br />

a In Specification Reference field, type the specification’s name or click to select it<br />

from a list.<br />

b Skip the rest of this procedure.<br />

Important! Typically, you do not build a specification by referencing another<br />

specification. However, it is useful to do this in the situation where you will use the<br />

specification with a group of services whose requirements are expected to change<br />

(that is, they match an existing specification now but are expected to change at some<br />

point in the future). Referencing a specification gives you the convenience of using an<br />

existing specification and the flexibility to change the specification for only that single<br />

group of services in the future.<br />

5 If you want to reference an IS document type for the Input or Output half of the<br />

specification, do the following:<br />

a In the Input or Output field (depending on which half of the specification you want<br />

to assign the IS document type to), type the IS document type name or click to<br />

select it from a list. You can also drag an IS document type from the Navigation<br />

panel to the box below the Validate input or Validate output check boxes on the<br />

<strong>webMethods</strong> <strong>Developer</strong> User’s <strong>Guide</strong> Version 6.5, Service Pack 3 � � � 257


9. Creating IS Schemas, IS Document Types, and Specifications<br />

Input/Output tab. For information about creating IS document types, see “Creating<br />

an IS Document Type” on page 244.<br />

Tip! You can select a publishable document type or an IS document type to define<br />

the input or output half of the specification.<br />

b Proceed to the next step to specify the fields for the other half of the specification.<br />

(If you assigned IS document types to both the Input and Output sides of this<br />

specification, skip the rest of this procedure.)<br />

Important! Once you assign an IS document type to the Input or Output side of a<br />

specification, you cannot add, delete, or modify the fields on that half of the<br />

Input/Output tab.<br />

6 For each input or output field that you want to define, do the following:<br />

a Select the half of the specification (Input or Output) where you want to define the<br />

field by clicking anywhere in that half’s large white text box.<br />

b Click on the toolbar and select the type of field that you want to specify.<br />

c Type the name of the field and then press ENTER.<br />

d With the field selected, set its properties and apply constraints on the Properties<br />

panel (optional).<br />

For details on setting field properties, see “Specifying Field Properties” on<br />

page 255. For details on applying constraints, see “Applying Constraints to<br />

Variables” on page 261.<br />

e If the field is a document or a document list, repeat steps b–d to define each of its<br />

members. Use to indent each member beneath the document or document list<br />

field.<br />

7 On the File menu, click Save.<br />

To assign a specification to a service<br />

1 Open the service to which you want to assign a specification.<br />

2 Click the Input/Output tab.<br />

3 In Specification Reference, type the fully qualified name of the specification, or click<br />

to select it from a list.<br />

Important! When a specification is assigned to a service, you cannot add, delete, or modify<br />

the declared fields using that service’s Input/Output tab.<br />

<strong>webMethods</strong> <strong>Developer</strong> User’s <strong>Guide</strong> Version 6.5, Service Pack 3 � � � 258


Chapter 10. Performing Data Validation<br />

� What Is Data Validation? . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 260<br />

� Applying Constraints to Variables . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 261<br />

� Performing Input/Output Validation . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 266<br />

� Performing Document Validation . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 269<br />

� Performing Pipeline Validation . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 270<br />

� Performing XML Validation in <strong>webMethods</strong> Integration Server . . . . . . . . . . . . . . . . . . . . . . . . . 271<br />

� Performing Validation from within a Java Service . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 271<br />

� Validation Errors and Exceptions . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 273<br />

<strong>webMethods</strong> <strong>Developer</strong> User’s <strong>Guide</strong> Version 6.5, Service Pack 3 � � � 259


What Is Data Validation?<br />

10. Performing Data Validation<br />

Data validation is the process of verifying that run-time data conforms to a predefined<br />

structure and format. Data validation also verifies that run-time data is a specific data<br />

type and falls within a defined range of values.<br />

By performing data validation, you can make sure that:<br />

� The pipeline, a document (IData object), or an XML document contains the data<br />

needed to execute subsequent services. For example, if a service processes a purchase<br />

order, you might want to verify that the purchase order contains a customer name and<br />

address.<br />

� The data is in the structure expected by subsequent services. For example, a service<br />

that processes a purchase order might expect the customer address to be a document<br />

field with the following fields: name, address, city, state, and zip.<br />

� Data is of the type and within a value range expected by a service. For example, if a<br />

service processes a purchase order, you might want to make sure that the purchase<br />

order does not contain a negative quantity of an item (such as -5 shirts).<br />

By using the data validation capabilities built into <strong>webMethods</strong> Integration Server, you<br />

can decide whether or not to execute a service based on the validity of data. The validation<br />

capabilities can also eliminate extra validation code from your services.<br />

What Is Data Validated Against?<br />

During validation, run-time data is compared to a blueprint or model. The blueprint or<br />

model is a formal description of the structure and the allowable content for the data. The<br />

blueprint identifies structural and content constraints for the data being validated. The<br />

validation engine in <strong>webMethods</strong> Integration Server considers the data to be valid when it<br />

conforms to the constraints specified in the blueprint. A blueprint can be an IS schema, an<br />

IS document type, or a set of input and output parameters.<br />

The blueprint used to validate data depends on the type of validation you are performing.<br />

In <strong>webMethods</strong> Integration Server, you can perform the following types of validation:<br />

� Input/Output validation. The validation engine in <strong>webMethods</strong> Integration Server<br />

validates the input and/or output of a service against the signature of the service.<br />

� Document validation. The validation engine in <strong>webMethods</strong> Integration Server validates<br />

the structure and content of a document (IData object) in the pipeline against an IS<br />

document type.<br />

� Pipeline validation. The validation engine in <strong>webMethods</strong> Integration Server validates<br />

the structure and content of the pipeline against an IS document type.<br />

� XML validation. The validation engine in <strong>webMethods</strong> Integration Server validates the<br />

structure and content of an XML document against an IS schema.<br />

<strong>webMethods</strong> <strong>Developer</strong> User’s <strong>Guide</strong> Version 6.5, Service Pack 3 � � � 260


10. Performing Data Validation<br />

The following sections provide information about performing each type of validation and<br />

information about applying constraints to fields.<br />

Applying Constraints to Variables<br />

In pipeline, document, and input/output validation, the blueprint used for data validation<br />

requires constraints to be applied to its variables. Constraints are the restrictions on the<br />

structure or content of variables. You can apply the following types of constraints to<br />

variables:<br />

� Structural constraints specify the existence and structure of variables at run time. For<br />

example, if the flow service in which you are validating the pipeline processes a<br />

purchase order, you might want to check that values for the purchaseOrderNumber,<br />

accountNumber, and customerName variables exist at run time.<br />

For document and document list variables, you can also specify the structure of the<br />

variable; that is, you can specify what variables can be contained in the document<br />

(IData object) or document list (IData[ ] object) at run time. For example, you could<br />

specify that the lineItem document variable must contain the child variables<br />

itemNumber, quantity, size, color, and unitPrice. You could also specify that the lineItem<br />

document can optionally contain the child variable specialInstructions.<br />

� Content constraints describe the data type for a variable and the possible values for the<br />

variable at run time. You can apply content constraints to String, String list, String<br />

table, Object, and Object list variables.<br />

When you specify a content constraint for a String, String list or String table variable,<br />

you can also apply a constraining facet to the content. A constraining facet places<br />

limitations on the content (data type). For example, for a String variable named<br />

itemQuantity, you might apply a content constraint that requires the value to be an<br />

integer. You could then apply constraining facets that limit the content of itemQuantity<br />

to a value between 1 and 100.<br />

You can use simple types from an IS schema as content constraints for String, String<br />

list, or String table variables.<br />

For pipeline and document validation, the IS document type used as the blueprint needs<br />

to have constraints applied to its variables. For input/output validation, constraints need<br />

to be applied to the declared input and output parameters of the service being validated.<br />

Note: When you create an IS document type from an XML Schema or a DTD, the<br />

constraints applied to the elements and attributes in the original document are preserved<br />

in the new IS document type. For more information about creating IS document types, see<br />

“Creating an IS Document Type” on page 244.<br />

<strong>webMethods</strong> <strong>Developer</strong> User’s <strong>Guide</strong> Version 6.5, Service Pack 3 � � � 261


To apply constraints to a variable<br />

1 Select the variable to which you want to apply constraints.<br />

10. Performing Data Validation<br />

You can apply constraints to variables in IS document types, variables in a<br />

specification, and variables declared on the Input/Output tab.<br />

2 In the Constraints category on the Properties panel, do the following:<br />

a If you want to require the selected variable to exist at run time, set the Required<br />

property to True. If the existence of the variable is optional, set this property to<br />

False.<br />

b If you want to allow a variable to have a null value, set the Allow null property to<br />

True. If you want the validation engine to generate an error when the variable has<br />

a null value, set the Allow null property to False.<br />

c If the selected variable is a document or document list and you want to allow it to<br />

contain undeclared child variables, set the Allow unspecified fields property to True.<br />

If this property is set to False, any child variables that exist in the pipeline but do<br />

not appear in the declared document field will be treated as errors at run time.<br />

Note: The state of the Allow unspecified fields property determines whether the<br />

document is open or closed. An open document permits undeclared fields<br />

(variables) to exist at run time. A closed document does not allow undeclared<br />

fields to exist at run time. The Integration Server considers a document to be open<br />

if the Allow unspecified fields property is set to True and considers a document to be<br />

closed if the Allow unspecified fields property is set to False.<br />

d If the selected variable is a String, String list, or String table, and you want to<br />

specify content constraints for the variable, click and then do one of the<br />

following:<br />

� If you want to use a content type that corresponds to a built-in simple type in<br />

XML Schema, in the Content type list, select the type for the variable contents.<br />

(For a description of these content constraints, see Appendix F, “Validation<br />

Content Constraints”.) To apply the selected type to the variable, click OK.<br />

If you want to customize the content type by changing the constraining facets<br />

applied to the type, see “Customizing a String Content Type” on page 264.<br />

� If you want to use a simple type from an IS schema as the content constraint,<br />

click the Browse button. In the Browse dialog box, select the IS schema<br />

containing the simple type you want to apply. Then, select the simple type<br />

you want to apply to the variable. To apply the selected type to the variable,<br />

click OK.<br />

<strong>webMethods</strong> <strong>Developer</strong> User’s <strong>Guide</strong> Version 6.5, Service Pack 3 � � � 262


10. Performing Data Validation<br />

If you want to customize the content type by changing the constraining facets<br />

applied to the type, see “Customizing a String Content Type” on page 264.<br />

Note: A content type corresponds to a simple type from an XML Schema<br />

definition. All of the choices in the Content type list correspond to simple types<br />

defined in XML Schema Part 2: Datatypes.<br />

e If the selected variable is an Object or Object list, for the Java wrapper type property,<br />

select the Java class for the variable contents. If you do not want to apply a Java<br />

class or if the Java class is not listed, select UNKNOWN.<br />

For more information about supported Java classes for Objects and Object lists,<br />

see “Java Classes for Objects” on page 421.<br />

3 Repeat this procedure for each variable to which you want to apply constraints in the<br />

IS document type, specification, service input, or service output.<br />

4 On the File menu, click Save.<br />

Considerations for Object Constraints<br />

Constraints for Object and Object list variables correspond to Java classes, whereas<br />

constraints for String variables correspond to simple types in XML schemas. When you<br />

apply constraints to Objects and perform validation, the data is validated as being of the<br />

specified Java class. For details on the Java classes you can apply to an Object or Object<br />

list, see “Java Classes for Objects” on page 421.<br />

A constrained Object is validated when one of the following occur:<br />

� A service runs with the Validate input or Validate output check box selected on the<br />

Input/Output tab.<br />

� A service runs via the INVOKE step in a flow service with the Validate input or Validate<br />

output properties set on the INVOKE step.<br />

� The pub.schema:validate service runs.<br />

� A document is published. When this occurs, the contents of the document are<br />

validated against the specified document type. For details, see the Publish-Subscribe<br />

<strong>Developer</strong>’s <strong>Guide</strong>.<br />

� During testing, when you enter values for a constrained Object or Object list in the<br />

Input dialog box.<br />

� When you assign a value to an Object or Object list variable on the Pipeline tab using<br />

the Set Value modifier.<br />

<strong>webMethods</strong> <strong>Developer</strong> User’s <strong>Guide</strong> Version 6.5, Service Pack 3 � � � 263


Customizing a String Content Type<br />

10. Performing Data Validation<br />

Instead of applying an existing content type or simple type to a String, String list, or String<br />

table variable, you can customize an existing type and apply the new, modified type to a<br />

variable. You customize a content type or simple type by changing the constraining facets<br />

applied to the type.<br />

When you customize a type, you actually create a new content type. <strong>Developer</strong> saves the<br />

changes as a new content type named contentType_customized. For example, if you<br />

customize the string content type, <strong>Developer</strong> saves the new content type as<br />

string_customized.<br />

Note: When you edit a simple type definition in an IS schema, the changes are saved to the<br />

selected type definition in the IS schema. The modifications affect any variable to which<br />

the simple type is applied as a content type constraint. For more information about<br />

editing a simple type definition, see “Editing a Simple Type in an IS Schema” on page 242.<br />

When customizing a content type, keep the following points in mind:<br />

� When you edit the constraining facets applied to a content type, you can only make<br />

the constraining facet values more restrictive. The constraining facets cannot become<br />

less restrictive. For more information about setting values for constraining facets, see<br />

“Setting Constraining Facet Values” on page 243.<br />

� The constraining facets you can specify depend on the content type. For more<br />

information about the constraining facets for each content type, see Appendix C,<br />

“Supported Data Types” on page 419.<br />

� The customized content type applies only to the selected variable. To make changes<br />

that affect all variables to which the content type is applied, edit the content type in<br />

the IS schema. (String content types are simple types from IS schemas.) For more<br />

information about editing simple types, see “Editing a Simple Type in an IS Schema”<br />

on page 242.<br />

To customize a content type<br />

1 Select the variable to which you want to apply a customized content type.<br />

2 In the Constraints category on the Properties panel, click the Content type browse button<br />

( ) and then do one of the following to select the content type you want to<br />

customize:<br />

� In the Content type list, select the content type you want to customize.<br />

� If you want to customize a simple type from an IS schema, click the Browse button.<br />

In the Browse dialog box, select the IS schema containing the simple type. Then,<br />

select the simple type you want to customize and apply to the variable.<br />

<strong>webMethods</strong> <strong>Developer</strong> User’s <strong>Guide</strong> Version 6.5, Service Pack 3 � � � 264


10. Performing Data Validation<br />

3 Click the Customize button. <strong>Developer</strong> makes the constraining facet fields below the<br />

Content type list available for data entry (that is, changes the background of the<br />

constraining facet fields from grey to white). <strong>Developer</strong> changes the name of the<br />

content type to contentType_customized.<br />

4 In the fields below the Content type list, specify the constraining facet values you want<br />

to apply to the content type. For more information about constraining facets, see<br />

“Constraining Facets” on page 464.<br />

5 Click OK. <strong>Developer</strong> saves the changes as a new content type named<br />

contentType_customized.<br />

Note: The constraining facets displayed below the Content type list depend on the<br />

primitive type from which the simple type is derived. Primitive types are the basic data<br />

types from which all other data types are derived. For example, if the primitive type is<br />

string, <strong>Developer</strong> displays the constraining facets enumeration, length, minLength,<br />

maxLength, and pattern. For more information about primitive types, refer to XML<br />

Schema Part 2: Datatypes at http://www.w3.org/TR/xmlschema-2/.<br />

Important! <strong>Developer</strong> throws exceptions at design time if the constraining facet values<br />

for a content type are not valid. For more information about these exceptions, see<br />

Appendix G, “Validation Errors and Exceptions”<br />

Viewing the Constraints Applied to Variables<br />

<strong>Developer</strong> displays small symbols next to a variable icon to indicate the constraints<br />

applied to the variable. <strong>Developer</strong> displays variables in the following ways:<br />

Variable Constraint status<br />

Required field.<br />

Optional field.<br />

Required field with content type constraint<br />

Optional field with content type constraint<br />

<strong>webMethods</strong> <strong>Developer</strong> User’s <strong>Guide</strong> Version 6.5, Service Pack 3 � � � 265


10. Performing Data Validation<br />

Note: <strong>Developer</strong> displays the ‡ symbol next to String, String list, and String table variables<br />

with a content type constraint only. <strong>Developer</strong> does not display the ‡ symbol next to<br />

Object and Object list variables with a specified Java class constraint. Object and Object<br />

lists with an applied Java class constraint have a unique icon. For more information about<br />

icons for constrained Objects, see “Java Classes for Objects” on page 421.<br />

Performing Input/Output Validation<br />

In input/output validation, the validation engine in <strong>webMethods</strong> Integration Server<br />

validates the inputs and/or outputs of a service against the declared input and output<br />

parameters of the service. If you specify that you want to validate the inputs to the service,<br />

the validation engine validates the service input values immediately before the service<br />

executes. If you specify that you want to validate the outputs of the service, the validation<br />

engine validates the service output values immediately after the service executes. An<br />

input or output value is invalid if it does not conform to the constraints applied to the<br />

input or output parameter.<br />

For input/output validation, the services’s declared input and output parameters act as the<br />

blueprint or model against which input/output values are validated. To effectively use the<br />

input and output parameters as the blueprint for validation, you need to apply constraints<br />

to the parameters. For information about applying constraints to variables, see “Applying<br />

Constraints to Variables” on page 261. For information about declaring service input and<br />

output parameters, see “Declaring Input and Output Parameters for a Service” on<br />

page 129.<br />

.<br />

Note: The declared input and output parameters for a service are sometimes called the<br />

signature of the service.<br />

You can specify that you want to perform input/output validation for a service in the<br />

following ways:<br />

� Input/Output tab. Set properties on the Input/Output tab to instruct the validation engine<br />

in <strong>webMethods</strong> Integration Server to validate the inputs and/or outputs of the service<br />

every time the service executes. If a client calls the service and the inputs are invalid,<br />

the service fails and does not execute.<br />

� INVOKE step properties. Set up input/output validation via the INVOKE step properties<br />

to instruct the validation engine to validate the service input and/or output only when<br />

it is called from within another flow service. At run time, if the inputs and/or outputs<br />

of the service are invalid, the INVOKE flow step that calls the service fails.<br />

To determine which method to use, determine whether or not you want the service input<br />

and output values validated every time the service runs. If you want to validate the input<br />

and output values every time the service runs, specify validation via the Input/Output tab.<br />

<strong>webMethods</strong> <strong>Developer</strong> User’s <strong>Guide</strong> Version 6.5, Service Pack 3 � � � 266


10. Performing Data Validation<br />

For example, if your service requires certain input to exist or fall within a specified range<br />

of values, you might want the pipeline validated every time the service runs.<br />

If the input and/or output values do not need to be validated every time the service<br />

executes, set up validation via the INVOKE step properties. Specifying input/output<br />

validation via the INVOKE step properties allows you to decide on a case-by-case basis<br />

whether you want validation performed.<br />

Note: If you specify input/output validation via the INVOKE step and an input or output<br />

value is invalid, the service itself does not actually fail. The validation engine validates<br />

input values before <strong>webMethods</strong> Integration Server executes the service. If the service<br />

input is not valid, the INVOKE flow step for the service fails. Similarly, the validation<br />

engine validates output values after <strong>webMethods</strong> Integration Server executes the service.<br />

If the service output is not valid, the INVOKE flow step for the service fails. Whether or<br />

not the entire flow service fails when an individual flow step fails depends on the exit<br />

conditions for the service. For information about specifying exit conditions, see “Using<br />

SEQUENCE to Specify an Exit Condition” on page 185.<br />

Specifying Input/Output Validation via the Input/Output Tab<br />

You can specify that you want the inputs and/or outputs of a service validated every time it<br />

executes by setting properties on the Input/Output tab of the service. Every time the service<br />

executes, the validation engine validates the input and/or output values of the service<br />

against the input and output parameters declared for the service.<br />

To set up input and output validation via the Input/Output tab<br />

1 Open the service for which you want to validate input and/or output every time the<br />

service is invoked.<br />

2 Click the Input/Output tab.<br />

3 If you want the input of the service validated every time the service executes, select<br />

the Validate input check box.<br />

4 If you want the output of the service validated every time the service executes, select<br />

the Validate output check box.<br />

5 On the File menu, click Save.<br />

<strong>webMethods</strong> <strong>Developer</strong> User’s <strong>Guide</strong> Version 6.5, Service Pack 3 � � � 267


Service input values will<br />

be validated every time<br />

the service executes.<br />

Input/Output tab with validation processing enabled<br />

10. Performing Data Validation<br />

Specifying Input/Output Validation via the INVOKE Step<br />

You can also specify input/output validation by setting properties for the INVOKE step<br />

that calls the service. Each time you insert a service into a flow, you can decide whether<br />

you want the validation engine to validate service inputs and/or outputs at run time.<br />

To set up input and output validation via the INVOKE step<br />

1 In the flow editor, select the INVOKE step containing the service for which you want<br />

Integration Server to validate input and/or output values.<br />

2 In the General category on the Properties panel, do the following:<br />

� If you want to validate input to the service, set the Validate input property to True.<br />

� If you want to validate the output of the service, set the Validate output property to<br />

True.<br />

3 On the File menu, click Save.<br />

Service output<br />

values will not be<br />

validated.<br />

<strong>webMethods</strong> <strong>Developer</strong> User’s <strong>Guide</strong> Version 6.5, Service Pack 3 � � � 268


INVOKE properties with validation processing enabled<br />

Performing Document Validation<br />

10. Performing Data Validation<br />

Inputs to the invoked<br />

service will be<br />

validated.<br />

Outputs of the<br />

service will not be<br />

validated.<br />

Important! Keep in mind that the Validate input and Validate output properties are independent<br />

of any validation settings that you might have already set in the service. If you select the<br />

Validate input and/or Validate output check boxes on the Input/Output tab of the invoked<br />

service, then every time the service executes, input/output validation is performed. If you<br />

also specify input/output validation via the INVOKE step, duplicate validation will result,<br />

possibly slowing down the execution of the service.<br />

Sometimes, you might want to validate an individual document (IData object) in the<br />

pipeline instead of the entire pipeline. Using the pub.schema:validate service, you can<br />

validate a single document (IData object) in the pipeline against an IS document type.<br />

For example, suppose that you invoke the pub.ldap:lookup service in a flow to retrieve an<br />

IData object from an LDAP directory service. If you want to validate that object before you<br />

use it in other services, invoke the pub.schema:validate service after retrieving the object. As<br />

another example, you might want to validate an XML document that has been converted<br />

to document (IData object). You would use the pub.schema:validate service to validate the<br />

resulting document (IData object) against an IS document type.<br />

The pub.schema:validate service considers a document (IData object) to be valid when it<br />

complies with the structural and content constraints described in the IS document type it<br />

<strong>webMethods</strong> <strong>Developer</strong> User’s <strong>Guide</strong> Version 6.5, Service Pack 3 � � � 269


10. Performing Data Validation<br />

is validated against. This service returns a string that indicates whether validation was<br />

successful and an IData array that contains any validation errors. When you insert the<br />

pub.schema:validate service into a flow service, you can specify the maximum number of<br />

errors to be collected by the service. You can also specify whether the pub.schema:validate<br />

service should fail if the document (IData object) is invalid.<br />

For more information about the pub.schema:validate service, see the <strong>webMethods</strong> Integration<br />

Server Built-In Services Reference.<br />

Note: The validation engine in Integration Server performs document (IData object)<br />

validation automatically when a document is published. The validation engine validates<br />

the published document against the publishable document type.<br />

Tip! If you want to validate only String, String list, or String table variables in the pipeline,<br />

use the pub.schema:validatePipeline service. Define an IS document type that contains the<br />

variables you want to validate and apply constraints to the variables. Then use this IS<br />

document type as the blueprint for the pub.schema:validatePipeline service. Only the variables<br />

in the IS document type will be validated. The validation engine ignores other variables<br />

that exist in the pipeline at run time. (An IS document type implicitly allows unspecified<br />

variables to exist at run time.)<br />

Performing Pipeline Validation<br />

Pipeline validation is the process of verifying the contents of the pipeline against an IS<br />

document type. By validating pipeline data, you can:<br />

� Ensure a higher degree of accuracy for pipeline content.<br />

� Execute or not execute a service based on the validity of the pipeline data.<br />

� Eliminate extra validation code in your service.<br />

In pipeline validation, an IS document type is the blueprint or model against which you<br />

validate the pipeline. The constraints applied to the variables in the IS document type<br />

determine what can and cannot be included in the pipeline. For more information about<br />

applying constraints to variables, see “Applying Constraints to Variables” on page 261.<br />

To validate the pipeline, invoke the built-in service pub.schema:validatePipeline. This service<br />

instructs the validation engine to compare the pipeline contents against a specified IS<br />

document type. The pipeline is valid when it conforms to the structural and content<br />

constraints applied to the IS document type. The pub.schema:validatePipeline service returns a<br />

string that indicates whether validation was successful and an IData array (errors variable)<br />

that contains any validation errors. For more information about the<br />

pub.schema:validatePipeline service, see the <strong>webMethods</strong> Integration Server Built-In Services<br />

Reference.<br />

<strong>webMethods</strong> <strong>Developer</strong> User’s <strong>Guide</strong> Version 6.5, Service Pack 3 � � � 270


10. Performing Data Validation<br />

Performing XML Validation in <strong>webMethods</strong> Integration Server<br />

In <strong>webMethods</strong> Integration Server, XML validation is the process of verifying the<br />

structure and content of an XML document against an IS schema. By validating an XML<br />

document, you can ensure that the XML document contains the elements and attributes<br />

organized in the structure or format expected by subsequent services. You can also ensure<br />

that the elements and attributes contain values that are of the data type expected by<br />

subsequent services. In <strong>webMethods</strong> Integration Server, an XML document is valid when<br />

it complies with the structural and content constraints described in the IS schema it is<br />

validated against.<br />

For example, if you receive an XML document that contains new employee information,<br />

you might want to validate the employee information before executing subsequent<br />

services. You might want to make certain the XML document contains an employee name,<br />

an address, telephone number, and date of birth information. Additionally, you might<br />

want to validate the date of birth information to make sure that it conforms to a specific<br />

date format.<br />

To validate an XML document, invoke the pub.schema:validate service. This service instructs<br />

the validation engine to validate an XML document by comparing it to a specified IS<br />

schema or an IS document type in the Navigation panel. The XML document is valid if it<br />

complies with the structural and content constraints described in the IS schema or IS<br />

document type. The pub.schema:validate service returns a string that indicates whether<br />

validation was successful and an errors variable (an IData array) that contains any<br />

validation errors.<br />

Important! The pub.schema:validate service requires a parsed XML document as input (an<br />

XML node). The Integration Server parses XML documents it receives via HTTP or FTP<br />

automatically. You can also use the pub.xml:loadXMLNode service or the<br />

pub.xml:xmlStringToXMLNode to parse an XML document. For more information about<br />

submitting XML documents to services, see the XML Services <strong>Developer</strong>’s <strong>Guide</strong>. For more<br />

information about the pub.xml services, see the <strong>webMethods</strong> Integration Server Built-In<br />

Services Reference.<br />

Note: For information about errors that can occur during validation, see “Validation Errors<br />

and Exceptions” on page 273.<br />

Performing Validation from within a Java Service<br />

You can use built-in services pub.schema:validate and pub.schema:validatePipeline to perform<br />

validation from within a Java service. In the following example, the pub.schema:validate<br />

service is used to validate the results of the pub.xml:xmlNodeToDocument service against a<br />

specification for an O<strong>AG</strong> purchase order.<br />

<strong>webMethods</strong> <strong>Developer</strong> User’s <strong>Guide</strong> Version 6.5, Service Pack 3 � � � 271


.<br />

.<br />

.<br />

IData validInput;<br />

IData dtrResult;<br />

.<br />

.<br />

.<br />

10. Performing Data Validation<br />

// initialize the folder and document type name to point to a document type<br />

// that exists on <strong>webMethods</strong> Integration Server<br />

String ifc = "O<strong>AG</strong>.PO"<br />

String rec = "purchaseOrder"<br />

// put the result from the xmlNodeToDocument service (i.e, the object to be<br />

// validated) into the key named <br />

IDataCursor validCursor = validInput.getCursor();<br />

IDataCursor dtrCursor = drtResult.getCursor();<br />

if (dtrCursor.first("boundNode")) {<br />

// assumption here that there's data at the current cursor position<br />

validCursor.insertAfter( "object", dtrCursor.getValue() );<br />

}<br />

dtrCursor.destroy();<br />

// set the parameter to point to the document type to validate<br />

// against<br />

// This document type must exist on <strong>webMethods</strong> Integration Server<br />

validCursor.insertAfter( "conformsTo", ifc+":"+rec );<br />

// set the parameter to the number of allowed validation errors<br />

validCursor.insertAfter( "maxErrors", "1000" );<br />

validCursor.destroy();<br />

// invoke pub.schema.validate to validate contents of <br />

IData validResult = context.invoke("pub.schema", "validate", validInput);<br />

// check to see whether is valid and process accordingly<br />

IDataCursor validCursor = validResult.getCursor();<br />

if(validCursor.first("isValid"))<br />

{<br />

if (IDataUtil.getString(validCursor).equals("false"))<br />

{<br />

IData [] vr = IDataUtil.getIDataArray(validCursor, "errors");<br />

System.out.println ( vr.length+" ERROR(s) found with example");<br />

for (int j=0; j < vr.length; j++ )<br />

{<br />

System.out.println( vr[j].toString() );<br />

}<br />

}<br />

}<br />

validCursor.destroy();<br />

.<br />

.<br />

.<br />

<strong>webMethods</strong> <strong>Developer</strong> User’s <strong>Guide</strong> Version 6.5, Service Pack 3 � � � 272


10. Performing Data Validation<br />

For additional information about pub.schema:validate and pub.schema:validatePipeline, see the<br />

Schema services in the <strong>webMethods</strong> Integration Server Built-In Services Reference.<br />

Validation Errors and Exceptions<br />

During data validation, the validation engine generates errors when it encounters values<br />

that do not conform to the structural and content constraints specified in the blueprint.<br />

The format in which the validation engine returns errors depends on whether validation<br />

was performed using the built-in services or by checking the declared input and output<br />

parameters for the service.<br />

� When the validation engine performs data validation by executing the built-in<br />

services pub.schema:validate or pub.schema:validatePipeline, errors are returned in the errors<br />

output variable (an IData list). For each validation error, the errors variable lists the<br />

error code, the error message, and the location of the error.<br />

� When the validation engine performs validation by comparing run-time data to the<br />

declared input and output parameters, the validation engine returns all the validation<br />

errors in a string. This string contains the error code, error message, and error location<br />

for each error found during input/output validation.<br />

For more information about validation errors, see Appendix G, “Validation Errors and<br />

Exceptions”.<br />

Validation Exceptions<br />

If you use the pub.schema:validate and pub.schema:validatePipeline services to perform data<br />

validation, you can determine whether the service should succeed or fail if the data being<br />

validated is invalid. You might want a service to succeed even if the data is invalid. In the<br />

pub.schema:validate and pub.schema:validatePipeline services, the value of the failIfInvalid input<br />

variable determines whether a service fails because of an invalid object.<br />

If the pub.schema:validate and pub.schema:validatePipeline service fails, <strong>webMethods</strong> Integration<br />

Server throws a validation exception. A validation exception is generated if one of the<br />

following is true:<br />

� Errors are detected in the object (XML node, pipeline, or document (IData object)) that<br />

is passed (for example, null value).<br />

� The basic validation contract is violated (for example, a binary tree is passed instead<br />

of a document (IData object) as expected).<br />

� You specify that the service should fail if the object to be validated (XML node,<br />

pipeline, or document (IData object)) did not conform to the IS schema or IS<br />

document type (for example, failIfInvalid = true). If this is the reason for the exception,<br />

<strong>webMethods</strong> Integration Server inserts the validation errors into the exception<br />

message.<br />

<strong>webMethods</strong> <strong>Developer</strong> User’s <strong>Guide</strong> Version 6.5, Service Pack 3 � � � 273


Running Out of Memory During Validation<br />

10. Performing Data Validation<br />

During validation of an XML node, a large maxOccurs value for an element in the IS<br />

schema used as the blueprint can cause an out of memory error or a stack overflow. To<br />

prevent a stack overflow or out of memory error, you can set a threshold value for<br />

maxOccurs. When the validation engine encounters a maxOccurs value greater than the<br />

threshold value, it proceeds as if the maxOccurs value was equal to 'unbounded'.<br />

To set a maxOccurs threshold value, you can edit the server configuration parameter<br />

watt.core.schema.maxOccursThresholdValue. By default, this parameter does not<br />

have a value.<br />

To set a maxOccurs threshold value<br />

1 Start <strong>webMethods</strong> Integration Server and open the Integration Server Administrator.<br />

2 In the Settings menu of the navigation area, click Extended.<br />

3 Click Edit Extended Settings. The server displays the Extended Settings screen.<br />

4 In the text area under Extended Settings, type<br />

watt.core.schema.maxOccursThresholdValue=value where value is the number<br />

you want to use as the maxOccurs threshold.<br />

5 Click Save Changes.<br />

<strong>webMethods</strong> <strong>Developer</strong> User’s <strong>Guide</strong> Version 6.5, Service Pack 3 � � � 274


Chapter 11. Testing and Debugging Services<br />

� Testing and Debugging . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 276<br />

� Testing Services . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 276<br />

� Testing Services from <strong>Developer</strong> . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 277<br />

� Testing Services from a Browser . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 286<br />

� Testing Services that Expect XML Documents as Input . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 287<br />

� Working in Debug Mode . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 288<br />

� Setting Breakpoints . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 295<br />

� Disabling Flow Steps, Transformers, and Conditions . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 298<br />

� Modifying the Current Pipeline . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 302<br />

� Saving and Restoring the Pipeline . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 303<br />

� Other Debugging Techniques . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 308<br />

<strong>webMethods</strong> <strong>Developer</strong> User’s <strong>Guide</strong> Version 6.5, Service Pack 3 � � � 275


Testing and Debugging<br />

Testing Services<br />

11. Testing and Debugging Services<br />

Like other types of computer programming, developing a service is an iterative process of<br />

building, testing, and correcting (debugging) your code.<br />

<strong>Developer</strong> provides a range of tools to assist you during the testing and debugging<br />

phases. For example, you can:<br />

� Test services, specify their input values, and inspect their results.<br />

� Examine the call stack and the pipeline when an error occurs.<br />

� Execute services in “debug” mode, a mode that lets you monitor a flow service’s<br />

execution path and/or execute its steps one at a time.<br />

� Temporarily disable steps in a flow and/or specify points where you want to halt<br />

execution.<br />

Additionally, <strong>webMethods</strong> provides tools for collecting run-time information that can<br />

help debug a service. These include tools to:<br />

� Write arbitrary messages to the server log.<br />

� Trace the pipeline at run time.<br />

� Modify and save the contents of the pipeline at a specified point.<br />

Note: For information about testing triggers and publishable document types, see the<br />

Publish-Subscribe <strong>Developer</strong>’s <strong>Guide</strong>.<br />

You can test any type of service (flow services or coded services) with <strong>Developer</strong>,<br />

eliminating the need to build special clients simply for testing. It also allows you to easily<br />

pass different sets of test data to your service, which makes it easy to test your service<br />

under a variety of data conditions.<br />

You can use <strong>Developer</strong> to test services in two ways:<br />

� From <strong>Developer</strong>. With this technique, <strong>Developer</strong> is the client. That is, <strong>Developer</strong> invokes<br />

the service and receives the results.<br />

� From a browser. With this technique, <strong>Developer</strong> formulates the URL necessary to<br />

invoke the service and passes that URL to your browser. Your browser actually<br />

invokes the service and receives the results. When you develop services for browserbased<br />

clients (especially ones whose output will be formatted using output templates)<br />

you will want to test those services at least once using this technique.<br />

<strong>webMethods</strong> <strong>Developer</strong> User’s <strong>Guide</strong> Version 6.5, Service Pack 3 � � � 276


Testing Services from <strong>Developer</strong><br />

11. Testing and Debugging Services<br />

In most cases, you will test your services using <strong>Developer</strong> (not a browser) as the client.<br />

You do this using the Run command on the Test menu.<br />

When you execute a service with the Run command, <strong>Developer</strong> invokes the service (just as<br />

an ordinary IS client would) and receives its results. The service executes once, from<br />

beginning to end (or until an error condition forces it to stop) on the server on which you<br />

have an open session.<br />

Before <strong>Developer</strong> invokes the service, it prompts you for input values. You can type the<br />

input values into the dialog box provided by <strong>Developer</strong> or load the values from a file that<br />

was saved during an earlier test.<br />

Results from the service are returned to <strong>Developer</strong> and displayed in the Results panel.<br />

This allows you to quickly examine the data produced by the service and optionally<br />

change it or save it to a file. You can use the saved data as input for a later test or to<br />

populate the pipeline during a debugging session.<br />

Note: If you selected the Switch to Test perspective check box on the Test page of the Options<br />

dialog box (Tools�Options), <strong>Developer</strong> displays the Test perspective when you begin<br />

testing a service. For more information about perspectives, see “Switching Perspectives”<br />

on page 36.<br />

To test a service using <strong>Developer</strong> as the client<br />

1 Open the service that you want to test.<br />

2 On the Test menu, select Run. If you have not yet saved changes to the service,<br />

<strong>Developer</strong> prompts you to save them.<br />

3 If the service has input parameters, type the input values for each variable in the Input<br />

dialog box or click the Load button to retrieve the values from a file. For more<br />

information, see “Entering Input for a Service” on page 278.<br />

4 If you want <strong>Developer</strong> to pass empty variables (variables that have no value) to the<br />

service, select the Include empty values for String Types check box. When you select this<br />

option, empty Strings are passed with a zero-length value. If you do not select this<br />

option, empty Strings are not passed to the service.<br />

5 If you want to save the input values that you have entered, click Save. Input values<br />

that you save can be recalled and reused in later tests. For more information about<br />

saving input values, see “Saving Input Values to a File” on page 280.<br />

6 Click OK. <strong>Developer</strong> invokes the service with the specified set of input values.<br />

<strong>webMethods</strong> <strong>Developer</strong> User’s <strong>Guide</strong> Version 6.5, Service Pack 3 � � � 277


You can enter<br />

simple Strings...<br />

...and complex<br />

documents and<br />

document lists.<br />

Notes:<br />

11. Testing and Debugging Services<br />

� If the service executes to completion, its results appear on the Results panel. For more<br />

information about the Results panel, see “Viewing the Results of the Service” on<br />

page 281.<br />

� If the service throws an exception, an error message displays. Click Details in the<br />

message box to view the call stack and the state of the pipeline where the error<br />

occurred. For more information about errors that occur while testing a service, see<br />

“Run-Time Exceptions” on page 284.<br />

Entering Input for a Service<br />

When you test a service with <strong>Developer</strong>, <strong>Developer</strong> displays the Input dialog box, which<br />

prompts you for input to the service. This dialog box contains an entry for each variable<br />

defined by the service’s input parameters. Object variables without constraints are noted<br />

as “Not editable by user.”<br />

You can also enter documents and document lists containing string-based children and<br />

constrained objects through the Input dialog box.<br />

Enter input values in the Input dialog box<br />

You can manually type your input values into the Input dialog box or, if you saved the<br />

input values from an earlier test, you can load them from a file.<br />

<strong>webMethods</strong> <strong>Developer</strong> User’s <strong>Guide</strong> Version 6.5, Service Pack 3 � � � 278


11. Testing and Debugging Services<br />

Note: If your service expects Object variables that do not have constraints assigned or an<br />

Object defined as a byte[ ], you will not be able to enter those values in the Input dialog<br />

box. To test these values in a service, you must also create a service that generates input<br />

values for your service. Then you need to construct a test harness (a flow service that<br />

executes both the service that produces the test data and the service you want to test) and<br />

use that harness to test your service.<br />

To enter values by typing them<br />

1 Open the service and execute it as described in “Testing Services from <strong>Developer</strong>” on<br />

page 277 or “Testing Services from a Browser” on page 286.<br />

2 For each variable listed in the Input dialog box, type an input value. If the service<br />

takes complex variables such as a String lists, documents, or document lists, use the<br />

following buttons to specify the variable's individual elements.<br />

Use this… To...<br />

Add a row to the variable.<br />

Insert a blank row above the currently selected row.<br />

Add a column to the variable.<br />

Delete the selected row from the variable.<br />

Delete the selected column from the variable.<br />

3 If you want <strong>Developer</strong> to pass empty Strings to the service, select the Include empty<br />

values for String Types check box. When you select this check box, empty Strings are<br />

passed with a zero-length value. If you do not select this check box, empty strings are<br />

not passed to the service.<br />

Note: When you enter values for constrained objects in the Input dialog box, <strong>Developer</strong><br />

automatically validates the values. If the value is not of the type specified by the object<br />

constraint, <strong>Developer</strong> displays a message identifying the variable and the expected type.<br />

<strong>webMethods</strong> <strong>Developer</strong> User’s <strong>Guide</strong> Version 6.5, Service Pack 3 � � � 279


Saving Input Values to a File<br />

11. Testing and Debugging Services<br />

You can save values that you type in the Input dialog box to a file so that you can reuse<br />

them in later tests.<br />

When saving input values to a file, keep the following points in mind:<br />

� Empty variables (variables that do not have a value) are only saved if the Include empty<br />

values for String Types check box is selected. If you do not select this check box,<br />

<strong>Developer</strong> does not save empty variables in the file.<br />

� You can store the file in any directory that is accessible to the computer on which<br />

<strong>Developer</strong> is running. Because these files are not actual run-time components, they do<br />

not need to be saved in Integration Server’s namespace or even on the server machine<br />

itself.<br />

Note: You might want to consider creating an input file for each set of data that you<br />

routinely test your service against. This will provide you with a ready-made set of test<br />

cases against which to verify the service when it is modified by you or other<br />

developers in the future. Many sites establish a special directory on their development<br />

server just for holding sets of test data that they generate in this manner.<br />

To save input values that you have entered for a service<br />

1 Open the service and execute it as described in “Testing Services from <strong>Developer</strong>” on<br />

page 277 or “Testing Services from a Browser” on page 286.<br />

2 Enter input values into the Input dialog box as described in “Entering Input for a<br />

Service” on page 278.<br />

3 When you are finished entering values, click Save.<br />

4 In the Save File dialog box, specify the name of the file to which you want the values<br />

saved.<br />

Loading Input Values from a File<br />

You can reload input values that you have saved to a file instead of rekeying the values in<br />

the Input dialog box. To do this, click the Load button in the Input dialog box and then<br />

select the file that contains the input values you want to use.<br />

When you use input values from a file, keep the following points in mind:<br />

� <strong>Developer</strong> only loads variables whose name and type match those displayed in the<br />

Input dialog box. Variables that exist in the file, but not in the dialog box, are ignored.<br />

In the case of Object variables without constraints or Object variables of type byte [],<br />

the values in the file are not used.<br />

� Values from the file replace those already in the Input dialog box.<br />

<strong>webMethods</strong> <strong>Developer</strong> User’s <strong>Guide</strong> Version 6.5, Service Pack 3 � � � 280


To examine the<br />

contents of a variable,<br />

select it in the top<br />

pane...<br />

...and view it in the<br />

bottom pane.<br />

11. Testing and Debugging Services<br />

� Variables that exist in the Input dialog box, but not in the file, are set to null.<br />

� Besides loading values that were saved from the Input dialog box, you can also load<br />

values that were saved using pub.flow:savePipelineToFile service or the Save Pipeline<br />

commands on the File menu. In addition, you can change values in the pipeline during<br />

testing. For information about saving the state of the pipeline, see “Saving and<br />

Restoring the Pipeline” on page 303. For information about modifying values in the<br />

pipeline, see “Modifying the Current Pipeline” on page 302.<br />

To load input values that have been saved to a file<br />

1 Open the service and execute it as described in “Testing Services from <strong>Developer</strong>” on<br />

page 277.<br />

2 When the Input dialog box appears, click Load. The Load File dialog box appears.<br />

3 Select the file containing the input values that you want to load.<br />

Viewing the Results of the Service<br />

When you execute a service with the Run command or with one of <strong>Developer</strong>’s debugging<br />

tools, its results are displayed in the Results panel.<br />

Results from a service you run in <strong>Developer</strong> are displayed in the Results panel<br />

<strong>webMethods</strong> <strong>Developer</strong> User’s <strong>Guide</strong> Version 6.5, Service Pack 3 � � � 281


11. Testing and Debugging Services<br />

The upper half of the Results panel displays all the variables in the pipeline. To view the<br />

contents of a particular variable, you select the variable in the upper half. Its contents are<br />

shown in the lower half.<br />

When viewing the Results panel, keep the following points in mind:<br />

� The Results panel represents the contents of the pipeline.<br />

� The Results panel shows all variables placed in the pipeline by the service, not just<br />

those that were declared in the service’s input/output parameters.<br />

� Variables that a service explicitly drops from the pipeline do not appear on the Results<br />

panel.<br />

� You can browse the contents of the Results panel, but you cannot edit it directly.<br />

� You can save the contents of the Results panel to a file and use that file to restore the<br />

pipeline at a later point. For additional information about saving and restoring the<br />

contents of the Results panel, see “Saving and Restoring the Pipeline” on page 303.<br />

� If you run a service and an error occurs, results are not displayed in the Results panel.<br />

However, you can click the Details button in the error message box to examine the state<br />

of the pipeline at the point where the exception occurred.<br />

� When debugging a flow service in step mode, you can use the Results panel to<br />

examine the state of the pipeline after each flow step. You can optionally load a<br />

different pipeline or modify the existing pipeline between steps. For information<br />

about loading a pipeline in the Results panel, see “Saving and Restoring the Pipeline”<br />

on page 303. For information about modifying an existing pipeline, see “Modifying<br />

the Current Pipeline” on page 302.<br />

� When you use a breakpoint or the Trace to Here command to halt execution of a flow<br />

service, you can use the Results panel to examine the pipeline at that point where you<br />

halted the flow. You may also optionally load a different pipeline or modify the<br />

existing pipeline at this point. For information about loading a pipeline in the Results<br />

panel, see “Saving and Restoring the Pipeline” on page 303. For information about<br />

modifying an existing pipeline, see “Modifying the Current Pipeline” on page 302.<br />

� Variables whose object types are not directly supported by the <strong>Developer</strong> will appear<br />

in the Results panel, but because <strong>Developer</strong> cannot render the values of such objects, a<br />

value does not appear in the Value column. Instead, the Value column displays the<br />

object’s Java class message.<br />

� Variables that contain com.wm.util.Table objects appear as document lists in the Results<br />

panel.<br />

<strong>webMethods</strong> <strong>Developer</strong> User’s <strong>Guide</strong> Version 6.5, Service Pack 3 � � � 282


Copying Variables from the Results Panel<br />

11. Testing and Debugging Services<br />

You can use the Copy command to copy information from the Results panel and paste it<br />

into other fields in <strong>Developer</strong>. The information that <strong>Developer</strong> inserts when you paste an<br />

element from the Results panel depends on the field into which you paste it.<br />

If you paste to a field that expects… <strong>Developer</strong> inserts…<br />

A data definition (for example, the<br />

Pipeline tab, the Input/Output tab, or a<br />

document (IData object))<br />

1 Display the Results panel and select the element that you want to copy. (When<br />

copying elements from the lower half, you can select a group of contiguous elements<br />

by pressing the SHIFT key and selecting the first and last element in the group that<br />

you want to copy.)<br />

2 On the Edit menu, click Copy.<br />

The copied element's data definition.<br />

The name of an element The copied element’s name (and position if it<br />

is a member of a complex element such as a<br />

String table, document (IData object), or<br />

document list (IData [ ])).<br />

To copy and paste elements from the Results panel<br />

3 Select the field into which you want to paste the information, then click Edit�Paste<br />

After. (If the Paste command is not available, it indicates that the information cannot be<br />

pasted into the selected field.)<br />

<strong>webMethods</strong> <strong>Developer</strong> User’s <strong>Guide</strong> Version 6.5, Service Pack 3 � � � 283


...to display the call<br />

stack and the<br />

pipeline.<br />

Run-Time Exceptions<br />

11. Testing and Debugging Services<br />

If a service that you run from <strong>Developer</strong> throws an exception, <strong>Developer</strong> reports the error<br />

in a following message box.<br />

You can click the Details button to display the call stack and the pipeline at the point where<br />

the error occurred.<br />

The Details button shows the call stack and the pipeline<br />

Note: You can improve performance and memory usage in <strong>Developer</strong> by caching elements,<br />

such as services and schemas. For details, see “Caching Elements” on page 70.<br />

<strong>webMethods</strong> <strong>Developer</strong> User’s <strong>Guide</strong> Version 6.5, Service Pack 3 � � � 284


This service threw<br />

the exception.<br />

This service threw<br />

the exception.<br />

The Call Stack<br />

11. Testing and Debugging Services<br />

The call stack identifies which flow step generated the error and lists its antecedents. For<br />

example, let’s say you have a service called PARENT that invokes three services, CHILD_A,<br />

CHILD_B, and CHILD_C. If CHILD_B is a Java service and it throws an exception, the call stack<br />

will look like this:<br />

Call stack from a nested service<br />

Now let’s assume that CHILD_B is a flow service that calls three Java services: CHILD_B1,<br />

CHILD_B2, and CHILD_B3. If CHILD_B3 throws an exception, the call stack will look like this:<br />

Call stack from a deeply nested service<br />

<strong>webMethods</strong> <strong>Developer</strong> User’s <strong>Guide</strong> Version 6.5, Service Pack 3 � � � 285


11. Testing and Debugging Services<br />

Note that the call stack is LIFO based. That is, the top entry in the stack identifies the last<br />

(that is, most recent) service invoked. The bottom entry identifies the parent service (the<br />

one that you originally invoked from <strong>Developer</strong>). If the parent itself throws the exception,<br />

it will be the only entry in the call stack.<br />

Note: Services invoked from within a Java service are not reported in the call stack, even if<br />

they throw the exception.<br />

The Pipeline Dump<br />

The Service Failures Detail dialog box contains the contents of the pipeline at the point of<br />

failure. Note that when a failure occurs within a Java service, the Pipeline area represents<br />

the state of the pipeline at the point when that service was initially called. If the Java<br />

service made changes to these values before throwing the exception, those changes will<br />

not be reflected in the Pipeline information.<br />

Testing Services from a Browser<br />

You can use the Run in Browser command in <strong>Developer</strong> to test a service from a browser<br />

(that is, to simulate a browser-based client). When you use this command, <strong>Developer</strong><br />

prompts you for the service’s input values, builds the URL necessary to invoke the service<br />

with the inputs you specify, and then passes the URL to your browser. When you use this<br />

command to test a service, your browser (not <strong>Developer</strong>) actually invokes the service and<br />

receives its results.<br />

If you are developing services that will be invoked by browser-based clients, particularly<br />

ones whose output will be formatted using output templates, you will want to test those<br />

services using the Run in Browser command to verify that they work as expected.<br />

To test a service using a browser as the client<br />

1 Open the service that you want to test.<br />

2 On the Test menu, click Run in Browser. If you have unsaved edits, <strong>Developer</strong> prompts<br />

you to save them.<br />

3 If the service has input parameters, type the input values for each variable in the Input<br />

dialog box or click the Load button to retrieve the values from a file. For more<br />

information, see “Entering Input for a Service” on page 278.<br />

Note: Only Strings and String lists are passed to the browser.<br />

4 If you want to pass empty variables (variables that have no value) to the service, select<br />

the Include empty values for String Types check box. When you select this option, empty<br />

<strong>webMethods</strong> <strong>Developer</strong> User’s <strong>Guide</strong> Version 6.5, Service Pack 3 � � � 286


11. Testing and Debugging Services<br />

Strings are passed with a zero-length value. If you do not select this option, <strong>Developer</strong><br />

excludes empty variables from the query string that it passes to the browser.<br />

5 If you want to save the input values that you have entered, click Save. Input values<br />

that you save can be recalled and reused in later tests. For more information about<br />

saving input values, see “Saving Input Values to a File” on page 280.<br />

6 Click OK. <strong>Developer</strong> builds the URL to invoke the service with the inputs you have<br />

specified, launches your browser, and passes it the URL.<br />

� If the service executes successfully, its results appear in your browser. (If an<br />

output template is assigned to the service, the template will be applied to the<br />

results before they are returned.)<br />

� If the service experiences an error, an error message is displayed in the browser.<br />

Testing Services that Expect XML Documents as Input<br />

If your service expects an XML document as input (that is, it takes a node as input), you<br />

can test it using the Send XML File command. This command prompts you for the name of<br />

the XML file and submits the file to the service, emulating the way in which the service<br />

would execute if an XML document were posted to it.<br />

To test a service by sending an XML file to the service, you must have Read access to the<br />

service.<br />

To test a service that expects an XML document as input<br />

1 Open the service that you want to test.<br />

2 From the Test menu, select Send XML File. If you have unsaved edits, <strong>Developer</strong><br />

prompts you to save them.<br />

3 In the Select Test Mode dialog box, specify whether you want the service to run in<br />

Trace mode or Step mode and click OK.<br />

4 In the Select File dialog box, select the XML file that you want to submit to this service<br />

and click OK. <strong>Developer</strong> submits the file to the server, which parses it into a node object<br />

and passes it to selected service.<br />

� If the service executes to completion, its results appear on the Results panel. For<br />

more information, see “Viewing the Results of the Service” on page 281.<br />

� If the service experiences an error, an error message displays. Click Details in the<br />

message box to view the call stack and the state of the pipeline where the error<br />

occurred. For additional information about errors that occur while testing a<br />

service, see “Run-Time Exceptions” on page 284.<br />

<strong>webMethods</strong> <strong>Developer</strong> User’s <strong>Guide</strong> Version 6.5, Service Pack 3 � � � 287


Working in Debug Mode<br />

11. Testing and Debugging Services<br />

When you use <strong>Developer</strong> to execute a service using the Run or Run In Browser commands, it<br />

executes as a normal service. That is, the server does not execute it any differently than it<br />

would if any other client requested it. However, <strong>Developer</strong> also allows you to test a<br />

service in debug mode, a mode that allows you to monitor the execution path of a flow<br />

service and/or move through its steps one at a time.<br />

When you run a flow service in debug mode, it is executed in a special way that returns<br />

results and other debugging information back to <strong>Developer</strong> after each step.<br />

Note: You can only debug one flow service at a time.<br />

Entering Debug Mode<br />

You automatically enter debug mode when you select any of the following commands<br />

from the Test menu:<br />

Command Description<br />

Trace Executes flow steps one after another to the end of the service and<br />

visually marks steps as they execute. For information about using<br />

this command, see “Using the Trace Tools” on page 290.<br />

Trace to Here Executes flow steps one after another up to a specified point and<br />

visually marks steps as they execute. For information about using<br />

this command, see “Using the Trace Tools” on page 290.<br />

Trace Into Executes flow steps one after another to the end of the service and<br />

visually marks steps as they execute, including steps in child<br />

flows. For information about using this command, see “Tracing<br />

into a Child Flow” on page 292.<br />

Step Executes the next flow step and then halts. For information about<br />

using this command, see “Using the Step Tools” on page 292.<br />

Step Into Opens a child flow or a MAP step so that you can debug the<br />

individual flow steps within it. For information about using this<br />

command, see “Stepping though a Child Flow” on page 294 and<br />

“Using the Step Tools with a MAP Step” on page 294.<br />

Important! The debug commands are only available for flow services. When a Java service<br />

is selected, these commands are not available.<br />

When you first enter debug mode, processing always starts from the first step in the flow<br />

service. Completed steps are marked with a gray outline. A step that is “in process” or is<br />

<strong>webMethods</strong> <strong>Developer</strong> User’s <strong>Guide</strong> Version 6.5, Service Pack 3 � � � 288


This BRANCH target<br />

was executed with its<br />

respective nested<br />

steps.<br />

The results of this step<br />

are currently on the<br />

Results panel.<br />

This step will be<br />

executed next.<br />

11. Testing and Debugging Services<br />

the next in line to be processed is marked with a green outline. When you step though a<br />

flow service or you halt execution using a breakpoint or the Trace to Here command, the<br />

green outline indicates which step will execute when you resume processing.<br />

Tip! You can remove the gray and green trace lines by using the Test�Reset command.<br />

Note, however, that this will also end your debugging session.<br />

The following example shows a flow service that is being executed using the Step<br />

command. As you can see, the BRANCH on ‘PaymentType’ step has three targets. The gray<br />

outline shows which path was executed. The green outline indicates that BRANCH on<br />

‘/AuthorizationCode’ is the step that will execute when the next Step command is performed.<br />

Debug mode visually shows you the service’s execution path<br />

Combining the Step and Trace Commands in Debug Mode<br />

Once you enter debugging mode, you can switch among the different debugging<br />

commands and examine certain segments of the service more closely than others. For<br />

example, you might want to execute the first few steps of a service with the Step command<br />

and then simply trace the remainder. Or, you might want to use Trace to Here to execute to<br />

a particular point and then execute the remaining flow steps in the service one step at a<br />

time.<br />

<strong>webMethods</strong> <strong>Developer</strong> User’s <strong>Guide</strong> Version 6.5, Service Pack 3 � � � 289


11. Testing and Debugging Services<br />

When you combine techniques, remember that the flow step outlined in green always<br />

indicates the current point of execution and marks the next flow step that will execute<br />

when you resume processing.<br />

Resetting Debug Mode<br />

The Test�Reset command resets debug mode. You must use this command when you<br />

want to begin debugging the same service again from the beginning of the flow. The<br />

following actions also reset a debugging session:<br />

� Executing the Run command<br />

� Refreshing <strong>Developer</strong>’s session on the server<br />

� Editing the flow service<br />

� The service throws an exception<br />

When a session is reset, trace lines are cleared and the point of execution is set back to the<br />

top of the flow service.<br />

The following actions do not reset a debugging session:<br />

� Setting breakpoints<br />

� Examining the contents of any of the other tabs associated with the service<br />

� Saving or restoring the contents of the Results panel<br />

Using the Trace Tools<br />

If a flow service has a complex path of execution (for example, it contains many branching<br />

sequences), it is often useful to simply see which path was taken when the flow executed.<br />

The trace tools, Trace, Trace to Here, and Trace Into, allow you to do this. They visually mark<br />

the flow steps that are executed within a flow service.<br />

If you want to... Use...<br />

Trace to the end of the service without tracing child services<br />

(breakpoints are ignored in this mode)<br />

Trace to a specified point in the service without tracing child<br />

services (breakpoints are ignored in this mode)<br />

Trace to the end of the service or the next breakpoint, including the<br />

paths of all child services that this service invokes<br />

<strong>webMethods</strong> <strong>Developer</strong> User’s <strong>Guide</strong> Version 6.5, Service Pack 3 � � � 290<br />

Trace<br />

Trace to Here<br />

Trace Into


11. Testing and Debugging Services<br />

Note: To trace through a top-level service, you must have Execute, Read, and List access to<br />

the service. To trace through all the services within a top-level service, you must have<br />

Execute, List, and Read access to all services that the top-level service invokes. For more<br />

information about ACLs and the trace tools, see “ACLs and Testing/Debugging Services”<br />

on page 118.<br />

To trace to the end of a service<br />

1 Open the service that you want to trace.<br />

2 On the Test menu, click Trace.<br />

� If the service is already in debug mode, <strong>Developer</strong> traces the remaining steps,<br />

starting from the current point of execution (the step outlined in green.)<br />

� If the service is not in debug mode, <strong>Developer</strong> starts the trace at the top of the<br />

flow. If you have any unsaved changes, <strong>Developer</strong> prompts you to save those<br />

changes before it starts the trace. If the service takes input, you will be prompted<br />

for its input values.<br />

To trace to a specified point<br />

1 Open the service that you want to trace.<br />

2 In the editor, select the flow step up to which you want to trace. (<strong>Developer</strong> will trace<br />

all steps up to, but not including, the one you select.)<br />

Note: If the point to which you want to trace resides in a child of the service that you<br />

are testing, you must use the breakpoint feature to trace to that point. For information<br />

about setting breakpoints, see “Setting Breakpoints” on page 295.<br />

3 On the Test menu, click Trace to Here.<br />

� If the service is already in debug mode, <strong>Developer</strong> starts at the current point of<br />

execution (the step outlined in green) and traces to the selected step. If the<br />

selected step is before the current point of execution, the trace starts at the top of<br />

the flow.<br />

� If the service is not in debug mode, <strong>Developer</strong> starts the trace at the top of the<br />

flow service and traces to the selected step. If you have any unsaved changes,<br />

<strong>Developer</strong> prompts you to save those changes before it starts the trace. If the<br />

service takes input, you will be prompted for its input values.<br />

<strong>webMethods</strong> <strong>Developer</strong> User’s <strong>Guide</strong> Version 6.5, Service Pack 3 � � � 291


11. Testing and Debugging Services<br />

4 When <strong>Developer</strong> reaches the selected flow step, it halts. At this point, you may do any<br />

of the following:<br />

� Examine the contents of the Results panel.<br />

� Modify, save, and/or restore the contents of the Results panel.<br />

� Use Step or Step Into to execute subsequent flow steps one at a time.<br />

� Select another step in the flow service and use Trace to Here to trace to that point.<br />

� Select Trace to trace the remainder of the service.<br />

� Select Reset to clear the debugging session and reset the starting execution point<br />

to the top of the service.<br />

Tracing into a Child Flow<br />

Many times, the service you are debugging invokes other flow services (child services). In<br />

these cases it is useful to trace the execution paths of the child services as well as the<br />

parent that you are testing. You do this with the Trace Into command.<br />

When you initiate a trace with Trace Into, <strong>Developer</strong> automatically opens and traces the<br />

individual steps in every child flow that the parent invokes, including the children of the<br />

child services if there are any.<br />

To trace into a child service<br />

1 Open the parent service that you want to test.<br />

2 On the Test menu, click Trace Into.<br />

� If the service is already in debug mode, <strong>Developer</strong> starts the trace at the current<br />

point of execution (the step outlined in green) and traces the service and its<br />

children until it reaches a breakpoint or the end of the flow.<br />

� If the service is not in debug mode, <strong>Developer</strong> starts the trace at the top of the<br />

flow and traces the service and its children until it reaches a breakpoint or the end<br />

of the flow. If you have any unsaved changes, <strong>Developer</strong> prompts you to save<br />

those changes before it starts the trace. If the service takes input, you will be<br />

prompted for its input values.<br />

Using the Step Tools<br />

You use the Step, Step Into, and Step Out commands on the Test menu to interactively<br />

execute a flow service one flow step at a time. Stepping through a flow is an effective<br />

debugging technique because it allows you to examine (and optionally modify) the data<br />

in the pipeline before and after each step. Additionally, if you are trying to isolate an error,<br />

step mode can quickly help you pinpoint the offending flow step.<br />

<strong>webMethods</strong> <strong>Developer</strong> User’s <strong>Guide</strong> Version 6.5, Service Pack 3 � � � 292


11. Testing and Debugging Services<br />

If you want to... Use...<br />

Execute the current flow step (the one with the green outline) Step<br />

Open a child flow so that you can debug the individual flow steps<br />

within it<br />

Step Into<br />

Return to the parent flow from a child that you have stepped into Step Out<br />

Note: To step through a top-level service, you must have Execute, Read, and List access to<br />

the service. To step through all the services within a top-level service, you must have<br />

Execute, List, and Read access to all services that the top-level service invokes. For more<br />

information about ACLs and the step tools, see “ACLs and Testing/Debugging Services”<br />

on page 118.<br />

Note: When you step into a child flow, <strong>Developer</strong> displays the child flow in the editor.<br />

Note that at any point while stepping through a flow service, you can do any of the<br />

following:<br />

� Examine the contents of the Results panel.<br />

� Modify, save, and/or restore the contents of the Results panel.<br />

� Select a step in the flow service and use Trace to Here to trace to that point.<br />

� Select Trace to trace the remainder of the service.<br />

� Select Reset to clear the debugging session and reset the starting execution point to the<br />

top of the service.<br />

To step through a flow service<br />

1 Open the service that you want to step through.<br />

2 On the Test menu, click Step.<br />

� If the service is already in debug mode, <strong>Developer</strong> executes the current step (the<br />

step outlined in green) and then stops.<br />

� If the service is not in debug mode, <strong>Developer</strong> enters debug mode and selects the<br />

first step in the flow service. To execute that flow step, select Step again. If you<br />

have any unsaved changes, <strong>Developer</strong> prompts you to save those changes before<br />

it enters debug mode. If the service takes input, you will be prompted for its input<br />

values.<br />

<strong>webMethods</strong> <strong>Developer</strong> User’s <strong>Guide</strong> Version 6.5, Service Pack 3 � � � 293


Stepping though a Child Flow<br />

11. Testing and Debugging Services<br />

Many times, the flow service you are debugging invokes other flow services (child<br />

services). In these cases it is useful to step through the individual flow steps within a child<br />

service, too. You do this with the Step Into and Step Out commands.<br />

To step into and out of a child flow<br />

1 Select the parent flow service and step or trace to the flow step that invokes the child<br />

flow. See “To step through a flow service” on page 293 or “To trace to a specified<br />

point” on page 291 if you need procedures for this step.<br />

2 On the Test menu, click Step Into. <strong>Developer</strong> opens the child flow service and selects<br />

(but does not execute) the first step.<br />

3 On the Test menu, click Step to execute the first step in the child service. Repeat this<br />

step for each flow step that you want to individually execute within the child.<br />

4 If you want to return to the parent flow service without stepping through the entire<br />

child, click Step Out from the Test menu. This command will trace the remaining steps<br />

in the child flow, return to the parent, and then select (but not execute) the next step in<br />

the parent flow.<br />

Notes:<br />

� While you are debugging the child, you may use Trace to Here or set a breakpoint<br />

to execute up to particular point in the child.<br />

� If you select Trace or Trace Into while you are debugging the child, <strong>Developer</strong> traces<br />

the remaining steps in the child and returns to the parent automatically.<br />

� If you select Step on the last step in the child flow service, <strong>Developer</strong><br />

automatically returns you to the parent.<br />

� You can use Step Into to step into a child flow that is nested within a child that you<br />

have stepped into.<br />

� If you select Step Into on a step that is not a flow service, Step is executed.<br />

Using the Step Tools with a MAP Step<br />

You can use the Step Into and Step Out commands to debug individual transformers in a<br />

MAP step.<br />

<strong>webMethods</strong> <strong>Developer</strong> User’s <strong>Guide</strong> Version 6.5, Service Pack 3 � � � 294


11. Testing and Debugging Services<br />

1 Select the parent service that contains the MAP step and then step or trace to the MAP<br />

step. (That is, make the MAP step the current flow step. <strong>Developer</strong> indicates this by<br />

outlining the step in green.) See “To step through a flow service” on page 293 or “To<br />

trace to a specified point” on page 291 if you need procedures for this step.<br />

2 On the Test menu, click Step Into. <strong>Developer</strong> selects on the Pipeline tab (but does not<br />

execute) the first transformer in the MAP step.<br />

3 On the Test menu, click Step to execute the first transformer. Repeat this step for each<br />

transformer that you want to individually execute within the MAP step.<br />

4 If you want to return to the parent without stepping through the entire MAP, select<br />

Step Out from the Test menu. This traces the remaining transformers in the MAP,<br />

returns to the parent, and selects (but does not execute) the next step in the parent<br />

flow.<br />

Notes:<br />

Setting Breakpoints<br />

To step into and out of a MAP step<br />

� If you select Trace or Trace Into while you are debugging the MAP, <strong>Developer</strong> traces<br />

the remaining steps in the MAP and returns to the parent automatically.<br />

� If you select Step on the last transformer in the MAP, <strong>Developer</strong> automatically<br />

executes that transformer and returns you to the parent flow.<br />

� You can use Step Into to step into a transformer that is a flow service.<br />

� If you select Step Into on a transformer that is not a flow service, Step is executed.<br />

A breakpoint is a point in a flow service where you want processing to halt when you<br />

execute that flow service with certain debug modes. Breakpoints can help you isolate a<br />

section of code or examine data values at a particular point in the execution path. For<br />

example, you might want to set a pair of breakpoints before and after a particular segment<br />

of a flow so that you can examine the pipeline on the Results panel before and after that<br />

segment executes.<br />

When working with breakpoints, keep the following points in mind:<br />

� Breakpoints are not persistent. They exist only during the life of the <strong>Developer</strong> session<br />

on the current server in which you set them. When you close <strong>Developer</strong> or refresh the<br />

session on the current server, your breakpoints are cleared. (Note that resetting debug<br />

mode does not clear your breakpoints.)<br />

� Breakpoints are also local to your <strong>Developer</strong> session on the current server. Breakpoints<br />

that you set on your machine do not affect other developers or users who might be<br />

executing or debugging services in which you have set breakpoints.<br />

<strong>webMethods</strong> <strong>Developer</strong> User’s <strong>Guide</strong> Version 6.5, Service Pack 3 � � � 295


11. Testing and Debugging Services<br />

� Breakpoints are only recognized when you execute a service with the Trace Into<br />

command from <strong>Developer</strong>. If you execute a service using any of the other testing or<br />

debugging commands, breakpoints are ignored.<br />

� If you are caching services by using the General area of the Options dialog box, and<br />

your flow service has a breakpoint, you cannot clear the cache of the flow service until<br />

the breakpoint is removed. For more information about caching, see “Configuring a<br />

Service’s Use of Cache” on page 138.<br />

� To set a breakpoint in a service, you must have Read access to a service. However, if<br />

the service is invoked within another service (a top-level service) to which you have<br />

Read access, you can set a breakpoint on the service within the top-level service.<br />

What Happens When a Breakpoint Is Encountered?<br />

When you execute a service that contains a breakpoint or call a child service that contains<br />

a breakpoint, the service is executed up to, but not including, the designated breakpoint<br />

step. At this point, processing stops and will not resume until you select another one of<br />

<strong>Developer</strong>’s debugging commands. (Remember, if you want <strong>Developer</strong> to stop at<br />

subsequent breakpoints, you must select the Trace Into command.)<br />

To set a breakpoint on a flow step<br />

1 Open the flow service in which you want to set a breakpoint.<br />

2 In the editor, select the step that will function as the breakpoint. (During debugging,<br />

processing will halt immediately before this step).<br />

3 On the Test menu, click Set Breakpoint. The step’s icon turns red, indicating that it is a<br />

breakpoint.<br />

To clear a breakpoint from a flow step<br />

1 Open the flow service in which you want to clear a breakpoint.<br />

2 In the editor, select the breakpoint step.<br />

3 On the Test menu, click Clear Breakpoint. The step’s icon returns to its normal color,<br />

indicating that it is no longer a breakpoint.<br />

–OR–<br />

1 On the Test menu, click Breakpoints to display the current list of breakpoints on the<br />

current server.<br />

2 In the list, select the breakpoint that you want to clear.<br />

3 Click Remove.<br />

<strong>webMethods</strong> <strong>Developer</strong> User’s <strong>Guide</strong> Version 6.5, Service Pack 3 � � � 296


Setting Breakpoints on Transformers<br />

11. Testing and Debugging Services<br />

You can set a breakpoint on a transformer in a MAP step. When you execute a service that<br />

contains a breakpoint or calls a service that contains a breakpoint on a transformer, the<br />

service is executed up to, but not including, the designated breakpoint transformer.<br />

Note: Transformers in a MAP step execute in an arbitrary order. You cannot assume an<br />

order of execution. Consequently, some of the transformers in the MAP step might<br />

execute before <strong>Developer</strong> reaches the breakpoint, even if the transformers appear below<br />

the breakpoint on the Pipeline tab. Likewise, transformers above the breakpoint might not<br />

execute before the breakpoint is encountered. (These will execute when you resume<br />

tracing.) Executed transformers have a gray outline.<br />

To set a breakpoint on a transformer<br />

1 Open the flow service in which you want to set a breakpoint.<br />

2 In the editor, select the MAP step containing the transformer that will function as the<br />

breakpoint.<br />

3 On the Pipeline tab, select the transformer that will function as the breakpoint. (During<br />

debugging, processing will halt immediately before this transformer.)<br />

4 On the Test menu, select Set Breakpoint. The icon appears next to the transformer<br />

name, indicating that it is a breakpoint.<br />

To clear a breakpoint on a transformer<br />

1 Open the flow service in which you want to clear a breakpoint.<br />

2 In the editor, select the MAP step that contains the transformer from which you want<br />

to clear a breakpoint.<br />

3 On the Pipeline tab, select the transformer from which you want to clear a breakpoint.<br />

4 On the Test menu, click Clear Breakpoint. <strong>Developer</strong> removes the icon next to the<br />

transformer name.<br />

–OR–<br />

1 On the Test menu, click Breakpoints to display the current list of breakpoints on the<br />

current server.<br />

2 In the list, select the breakpoint that you want to clear.<br />

3 Click Remove.<br />

<strong>webMethods</strong> <strong>Developer</strong> User’s <strong>Guide</strong> Version 6.5, Service Pack 3 � � � 297


Viewing a List of Breakpoints<br />

11. Testing and Debugging Services<br />

Use the following procedure to view the list of breakpoints that are currently set in your<br />

<strong>Developer</strong> session. From this list, you can also clear and/or go to specific breakpoints.<br />

1 On the Test menu, click Breakpoints.<br />

2 If you want to go to a specific breakpoint, select it and then click Go to Breakpoint.<br />

3 If you want to clear a breakpoint, select it and then click Remove.<br />

Disabling Flow Steps, Transformers, and Conditions<br />

Disabled steps appear<br />

dimmed in the editor.<br />

To display the list of current breakpoints<br />

Note: Remember, breakpoints are not persistent. They only exist during the <strong>Developer</strong><br />

session on the current server in which you set them. When you refresh or close your<br />

session on the current server, your breakpoints are cleared.<br />

When testing and debugging services, you can disable flow steps and transformers. You<br />

can also disable the condition placed on a link between variables on the Pipeline tab. The<br />

follow sections provide more information about disabling each of these items.<br />

Disabling Flow Steps<br />

You use the Compose�Disable Step command to disable a step in a flow service. Steps that<br />

you disable are not executed at run time.<br />

Disabled steps appear dimmed when viewed in <strong>Developer</strong>. If you disable a parent step<br />

(for example, a LOOP or a BRANCH), its children are also automatically disabled. If you<br />

disable a MAP step, the transformers in the MAP step are also automatically disabled.<br />

Disabled steps are not executed at run time<br />

<strong>webMethods</strong> <strong>Developer</strong> User’s <strong>Guide</strong> Version 6.5, Service Pack 3 � � � 298


11. Testing and Debugging Services<br />

Disabling a step is useful in many testing and debugging situations. For example, you<br />

might want to disable one or more steps to isolate a particular segment of a flow, similar to<br />

the way you might “comment out” a section of source code in a program you are testing.<br />

Be aware that disabling a step sets a persistent attribute that is saved in the flow service.<br />

Once you disable a step, it remains disabled until you explicitly re-enable it with<br />

<strong>Developer</strong>.<br />

Important! The run-time effect of disabling a step is the same as deleting it. Disabling a key<br />

step or forgetting to re-enable a disabled step can break the logic of a service and/or cause<br />

the service to fail. <strong>Developer</strong> allows you to disable any step in a flow service, but it is your<br />

responsibility to use this feature carefully.<br />

To disable a step in a flow service<br />

1 Open the flow service that you want to edit.<br />

2 In the editor, select the step that you want to disable.<br />

3 On the Compose menu, click Disable Step.<br />

The step dims, indicating that it is disabled.<br />

To enable a step in a flow service<br />

1 Open the flow service that you want to edit.<br />

2 In the editor, select the disabled step that you want to re-enable.<br />

3 On the Compose menu, click Enable Step.<br />

Disabling Transformers<br />

You can also use the Compose�Disable Step command to disable a transformer in a MAP<br />

step. Transformers that you disable are not executed at run time. In fact, <strong>webMethods</strong><br />

Integration Server does not execute any of the links between pipeline variables and the<br />

variables for a disabled transformer.<br />

Disabled transformers appear dimmed when viewed in <strong>Developer</strong>.<br />

<strong>webMethods</strong> <strong>Developer</strong> User’s <strong>Guide</strong> Version 6.5, Service Pack 3 � � � 299


Transformers that are<br />

disabled appear dimmed<br />

on the Pipeline tab.<br />

Disabled transformers are not executed at run time<br />

1 Open the flow service that you want to edit.<br />

11. Testing and Debugging Services<br />

Note: When you disable the MAP step, <strong>Developer</strong> automatically disables all of the<br />

transformers in a MAP step<br />

Important! The run-time effect of disabling a transformer is the same as deleting it.<br />

Disabling a transformer or forgetting to re-enable a disabled transformer can break the<br />

logic of a service and/or cause the service to fail. Although <strong>Developer</strong> allows you to<br />

disable any transformer or step in a flow service, use this feature carefully.<br />

To disable a transformer in a MAP step<br />

2 In the editor, select the MAP step containing the transformer that you want to disable.<br />

3 On the Pipeline tab, select the transformer you want to disable.<br />

4 On the Compose menu, click Disable Step.<br />

The transformer dims, indicating that it is disabled.<br />

<strong>webMethods</strong> <strong>Developer</strong> User’s <strong>Guide</strong> Version 6.5, Service Pack 3 � � � 300


To enable a transformer in a MAP step<br />

1 Open the flow service that you want to edit.<br />

11. Testing and Debugging Services<br />

2 In the editor, select the MAP step containing the disabled transformer that you want<br />

to enable.<br />

3 On the Pipeline tab, select the disabled transformer that you want to enable.<br />

4 On the Compose menu, click Enable Step.<br />

Disabling a Condition Placed on a Link Between Variables<br />

When you link variables to each other, you can apply a condition to the link that connects<br />

the variables. At run time, this condition needs to be true for the value of the source<br />

variable to be copied to the target variable. During testing and debugging, you might<br />

want to disable or remove the condition from the link to make sure that <strong>Developer</strong><br />

properly copies data between variables. By disabling the condition, you instruct<br />

<strong>Developer</strong> to ignore the condition placed on the link and automatically execute the link<br />

(copy the value from the source variable to the target variable).<br />

Disabling the condition preserves the written expression. When you enable the condition,<br />

you do not need to rewrite the expression.<br />

The Pipeline tab uses a blue link (line) to indicate that properties (such as conditions and<br />

array indexes) have been applied to the link between variables. <strong>Developer</strong> retains the blue<br />

color even when you disable the applied condition to remind you that properties have<br />

been set.<br />

To disable a condition placed on a link between variables<br />

1 Open the flow service that you want to edit.<br />

2 In the editor, select the INVOKE or MAP step that contains the link with the condition<br />

you want to disable.<br />

3 On the Pipeline tab, select the link with the condition that you want to disable.<br />

4 In the General category of the Properties panel, set the Evaluate copy condition property<br />

to False.<br />

To enable a condition placed on a link between variables<br />

1 Open the flow service that you want to edit.<br />

2 In the editor, select the INVOKE or MAP step containing the link with the condition<br />

you want to enable.<br />

<strong>webMethods</strong> <strong>Developer</strong> User’s <strong>Guide</strong> Version 6.5, Service Pack 3 � � � 301


11. Testing and Debugging Services<br />

3 On the Pipeline tab, select the link with the condition that you want to enable.<br />

4 In the General category of the Properties panel, set the Evaluate copy condition property<br />

to True.<br />

Modifying the Current Pipeline<br />

During debugging, you can modify the contents of the pipeline and submit those changed<br />

values to the next step in the flow service. For example, if you want to see the effect that<br />

different values for a variable have on the rest of the service, you can modify the values in<br />

the pipeline temporarily and continue debugging. You can also drop values from the<br />

pipeline. This functionality is useful for debugging.<br />

When modifying the pipeline, keep the following points in mind:<br />

� You can only modify the pipeline when a subsequent step in the service exists to<br />

which to pass the pipeline values. For example, if you use Trace for the entire service,<br />

you cannot modify the values of the pipeline after the service ends. However, if you<br />

use Step to debug the service, you can modify the pipeline values for the next step in<br />

the service.<br />

� You cannot modify the values of unconstrained Objects and Object lists. However,<br />

you can drop them from the pipeline.<br />

� You cannot modify the values of recursive documents at the top level. However, you<br />

can expand the document and set values at the individual element level.<br />

� When you modify values or drop variables from the pipeline, the changes only apply<br />

to the current debugging session. The service is not permanently changed.<br />

� You can only modify or drop existing variables. You cannot add new variables to the<br />

pipeline.<br />

� You cannot use a larger editor or have a password field when you modify String<br />

values in the pipeline.<br />

To modify values in the current pipeline<br />

1 Use the Step, Step Into, or Trace to Here command to load values into the pipeline for the<br />

current step.<br />

2 In the Results panel, select the name of the variable for which you want to change the<br />

value.<br />

3 Right-click and select Modify Value.<br />

4 In the Modify Value dialog box, type the new pipeline value for the variable.<br />

<strong>webMethods</strong> <strong>Developer</strong> User’s <strong>Guide</strong> Version 6.5, Service Pack 3 � � � 302


5 Click OK. The value is changed in the Results panel.<br />

11. Testing and Debugging Services<br />

6 To debug the rest of the service with the new pipeline value, use the Step, Step Into, or<br />

Trace to Here command. Keep in mind that the value is only changed for the current<br />

debugging session; it is not changed permanently.<br />

To drop values from the current pipeline<br />

1 Use the Step, Step Into, or Trace to Here command to load values into the pipeline for the<br />

current step.<br />

2 In the Results panel, select the name of the variable that you want to drop from the<br />

pipeline.<br />

3 Right-click and select Drop. The variable disappears from the Results panel.<br />

4 To debug the rest of the service with the dropped pipeline value, use the Step, Step Into,<br />

or Trace to Here command. Keep in mind that the value is only dropped for the current<br />

debugging session; it is not dropped permanently.<br />

Saving and Restoring the Pipeline<br />

Because the pipeline contains the data that a service operates against, the ability to save<br />

and restore the pipeline when you are debugging a service is something you may<br />

frequently want to do. For example, if a service is failing intermittently at run time, you<br />

may want to insert steps to save the pipeline at various points in the service so you can<br />

capture and examine the data that it was running against after a failure.<br />

Saving the Results<br />

You can save the pipeline to a file, which you can use to restore the pipeline to its current<br />

state at a later point in time. This is useful when you want to test another service against<br />

the current set of pipeline values or if you want to restore the pipeline to this exact state<br />

later in the debugging process. There are two ways to save the contents of the pipeline:<br />

� You can manually save the contents of the Results panel when you run or debug a<br />

service using <strong>Developer</strong>.<br />

� You can programmatically save the pipeline at run time by invoking<br />

pub.flow:savePipelineToFile at the point where you want to capture the pipeline.<br />

When you save a pipeline, it is saved in a file in XML format. The file you create can be<br />

used to:<br />

� Manually load the pipeline into <strong>Developer</strong>’s Results panel.<br />

� Dynamically load the pipeline at run time using the pub.flow:restorePipelineFromFile<br />

service.<br />

<strong>webMethods</strong> <strong>Developer</strong> User’s <strong>Guide</strong> Version 6.5, Service Pack 3 � � � 303


11. Testing and Debugging Services<br />

� Load a set of input values into the Input dialog box when testing a service with<br />

<strong>Developer</strong>.<br />

You can view a pipeline file with an ordinary text editor. When saving the pipeline, keep<br />

the following points in mind:<br />

� Only XML-codable variables are saved. This includes, Strings, String lists, String<br />

tables, documents, and document lists. Variables that are not XML codable are not<br />

saved.<br />

� Empty variables and null variables are saved.<br />

Saving the Contents of the Results Panel<br />

Use the following procedure to save the contents of the Results panel to a pipeline file.<br />

To save the contents of the Results panel<br />

1 Display the Results panel and click anywhere within it.<br />

2 Right-click and select one of the following commands:<br />

To… Select this command…<br />

Save the file to your local file system.<br />

Note: If you intend to use the pipeline file to dynamically<br />

restore the pipeline using pub.flow:restorePipelineFromFile, use<br />

Save Pipeline to Server to save the file to the server (see<br />

below).<br />

Save the file to the pipeline directory on <strong>webMethods</strong><br />

Integration Server.<br />

Select this command if you want to use the file to<br />

dynamically restore the pipeline at run time using the<br />

pub.flow:restorePipelineFromFile service.<br />

Save Pipeline Locally<br />

Save Pipeline to Server<br />

<strong>webMethods</strong> <strong>Developer</strong> User’s <strong>Guide</strong> Version 6.5, Service Pack 3 � � � 304


11. Testing and Debugging Services<br />

3 Depending on your action in the previous step, do one of the following:<br />

If you selected… Do this to specify the file name…<br />

Save Pipeline Locally Select the directory in which you want the file saved and<br />

assign a name to the file.<br />

Save Pipeline to Server Specify the name of the file in which you want the pipeline<br />

saved. By default, <strong>Developer</strong> saves the file to<br />

<strong>webMethods</strong>6\IntegrationServer\pipeline, which is<br />

where the restorePipelineFromFile service expects pipeline<br />

files. If you specify a relative path in the file name, the<br />

path is understood to be relative to the pipeline directory.<br />

Saving the Pipeline at Run Time<br />

Use the following general steps to save the pipeline programmatically. You can use this<br />

technique to capture the pipeline from a flow service or within a Java service.<br />

1 Open the service.<br />

2 Invoke pub.flow:savePipelineToFile at the point where you want to save a copy of the<br />

pipeline.<br />

3 Set the following parameter:<br />

Key Description<br />

filename A string that specifies the name of the file to which you want<br />

the file saved. If you do not specify a fully qualified path, the<br />

file is saved relative to<br />

<strong>webMethods</strong>6\IntegrationServer\pipeline.<br />

4 Save the service. (If you are using your own IDE, you will need to recompile the<br />

service, reregister it on the Integration Server, and reload its package.)<br />

5 Execute the service.<br />

For additional information about pub.flow:savePipelineToFile, see the <strong>webMethods</strong> Integration<br />

Server Built-In Services Reference.<br />

<strong>webMethods</strong> <strong>Developer</strong> User’s <strong>Guide</strong> Version 6.5, Service Pack 3 � � � 305


Restoring the Pipeline<br />

11. Testing and Debugging Services<br />

Pipeline values that you have saved to a file in the following ways can be used to restore<br />

the pipeline:<br />

� From the <strong>Developer</strong>’s Results panel with the Save Pipeline commands.<br />

� With the pub.flow:savePipelineToFile service at run time.<br />

� From the Input dialog box when you are testing a service with <strong>Developer</strong>.<br />

Restoring a pipeline is useful when you simply want to inspect the values in a particular<br />

pipeline file (perhaps one that contains the pipeline from a failed service). Additionally, it<br />

is useful in many testing situations. For example, you can use it to replace the existing<br />

pipeline with a different set of values when stepping though a flow service with the<br />

debugging tools.<br />

There are two ways to restore the contents of the pipeline:<br />

� You can manually load the saved pipeline into the Results panel in <strong>Developer</strong>.<br />

� You can programmatically load a saved pipeline at run time by invoking<br />

pub.flow:restorePipelineFromFile at the point where you want to modify the pipeline.<br />

Loading a Saved Pipeline into the Results Panel<br />

Use the following procedure to load a pipeline file into the Results panel.<br />

When you load a pipeline file into the Results panel, the contents of the pipeline file<br />

completely replaces the current pipeline. If you want to merge the contents of the file with<br />

the existing pipeline, use the pub.flow:restorePipelineFromFile service instead and set its merge<br />

parameter to “true.” For procedures, see “Loading a Saved Pipeline at Run Time” on<br />

page 307.<br />

To load a pipeline file into the Results panel<br />

1 Display the Results panel. (If you simply want to inspect a saved pipeline, create a<br />

new, empty flow service and display its Results panel.)<br />

2 Right-click and select one of the following commands:<br />

To... Select...<br />

Load a pipeline file from your local file system Restore pipeline locally<br />

Load a file that resides in the default pipeline directory<br />

on <strong>webMethods</strong> Integration Server<br />

Restore pipeline from<br />

Server<br />

<strong>webMethods</strong> <strong>Developer</strong> User’s <strong>Guide</strong> Version 6.5, Service Pack 3 � � � 306


11. Testing and Debugging Services<br />

3 Depending on your action in the previous step, do one of the following:<br />

If you selected... Do this to specify the file name...<br />

Restore Pipeline Locally Select the file that you want to load.<br />

Restore pipeline from<br />

Server<br />

Loading a Saved Pipeline at Run Time<br />

Use the following general steps to load a pipeline file programmatically. You can use this<br />

technique from a flow service or from a Java service.<br />

1 Open the service.<br />

2 Invoke pub.flow:restorePipelineFromFile at the point where you want to load the pipeline<br />

file.<br />

3 Set the following parameters:<br />

Key Description<br />

4 Save the service. (If you are using your own IDE, you will need to recompile the<br />

service, reregister it on <strong>webMethods</strong> Integration Server, and reload its package.)<br />

5 Execute the service.<br />

Specify the name of the file that you want to load.<br />

<strong>Developer</strong> retrieves the file from<br />

<strong>webMethods</strong>6\IntegrationServer\pipeline.<br />

filename A String that specifies the name of the pipeline file. If you do<br />

not specify a fully qualified path, the file is assumed to be<br />

relative to <strong>webMethods</strong>6\IntegrationServer\pipeline. For<br />

example, if you set filename to “badPipeline.xml”,<br />

restorePipelineFromFile expects to find that file in<br />

<strong>webMethods</strong>6\IntegrationServer\pipeline\badPipeline.xml.<br />

merge A String that specifies whether you want the contents of the<br />

file to replace or be merged with the existing pipeline.<br />

Set merge to... To...<br />

false Replace the existing pipeline with the one<br />

from the file.<br />

true Merge the contents of the file into the existing<br />

pipeline.<br />

For additional information about pub.flow:restorePipelineFromFile, see the <strong>webMethods</strong><br />

Integration Server Built-In Services Reference.<br />

<strong>webMethods</strong> <strong>Developer</strong> User’s <strong>Guide</strong> Version 6.5, Service Pack 3 � � � 307


Other Debugging Techniques<br />

11. Testing and Debugging Services<br />

This section describes additional tools and techniques you can use to obtain run-time<br />

information that is useful for debugging a service.<br />

Using the Server’s Debug Facility<br />

<strong>webMethods</strong> Integration Server maintains a log file in which it records information about<br />

activity on the server. This log file resides in:<br />

<strong>webMethods</strong>6\IntegrationServer\logs\serveryyyymmdd.log<br />

The log contains information about actions that the server executes, such as loading<br />

packages and executing services. The Integration Server creates one server log per day.<br />

The following example shows the series of messages that are posted to server log when<br />

the server is started. Note that error messages are posted for services that the server<br />

cannot load.<br />

Section of server log from the start-up process<br />

2002-05-24 15:46:58 EDT [ISS.0025.0001C] Integration Server 6.0<br />

2002-05-24 15:46:58 EDT [ISS.0025.0006C] License Manager started<br />

2002-05-24 15:47:00 EDT [ISS.0025.0017C] Repository Manager started<br />

2002-05-24 15:47:03 EDT [ISS.0025.0024C] JDBC Connection Manager started<br />

2002-05-24 15:47:10 EDT [ISS.0025.0023C] Audit Log Manager started<br />

2002-05-24 15:47:10 EDT [ISS.0025.0021C] ACL Manager started<br />

2002-05-24 15:47:11 EDT [ISS.0025.0008C] State Manager started<br />

2002-05-24 15:47:14 EDT [ISS.0025.0010C] Service Manager started<br />

2002-05-24 15:47:14 EDT [ISS.0025.0020C] Validation Processor started<br />

2002-05-24 15:47:14 EDT [ISS.0025.0022C] Statistics Processor started<br />

2002-05-24 15:47:14 EDT [ISS.0025.0018C] Invoke Manager started<br />

2002-05-24 15:47:15 EDT [ISS.0025.0012C] Cache Manager started<br />

2002-05-24 15:47:18 EDT [ISS.0098.0026D] Transient Store DefaultStore initialized<br />

2002-05-24 15:47:20 EDT [ISS.0098.0026D] Transient Store TriggerStore initialized<br />

2002-05-24 15:47:20 EDT [ISS.0098.0021D] Trigger Dispatcher started<br />

2002-05-24 15:47:21 EDT [ISS.0106.0003D] Join Message Cache initialized<br />

2002-05-24 15:47:21 EDT [ISS.0106.0005D] Join Timeout Thread initialized<br />

2002-05-24 15:47:21 EDT [ISS.0106.0001D] Join Manager initialized<br />

2002-05-24 15:47:21 EDT [ISS.0025.0032C] Dispatcher initialized<br />

2002-05-24 15:47:22 EDT [ISS.0100.0001C] Web Container started<br />

2002-05-24 15:47:22 EDT [ISS.0025.0004C] Flow Service Manager started<br />

2002-05-24 15:47:22 EDT [ISS.0025.0002C] Package Manager started<br />

2002-05-24 15:47:22 EDT [ISS.0025.0011C] Package Replicator Manager started<br />

2002-05-24 15:47:22 EDT [ISS.0028.0001C] Loading packages<br />

2002-05-24 15:47:26 EDT [ISS.0028.0005C] Loading WmRoot package<br />

2002-05-24 15:48:07 EDT [ISS.0028.0005C] Loading WmPublic package<br />

2002-05-24 15:49:12 EDT [ISS.0028.0005C] Loading SGXOrders package<br />

2002-05-24 15:49:14 EDT [ISS.0028.0005C] Loading WmAdminResource package<br />

2002-05-24 15:49:15 EDT [ISS.0028.0005C] Loading WmAdmin package<br />

2002-05-24 15:49:30 EDT [ISS.0028.0005C] Loading WmPKI package<br />

2002-05-24 15:49:35 EDT [ISS.0028.0005C] Loading Purchasing package<br />

2002-05-24 15:49:36 EDT [ISS.0028.0005C] Loading Default package<br />

<strong>webMethods</strong> <strong>Developer</strong> User’s <strong>Guide</strong> Version 6.5, Service Pack 3 � � � 308


The Contents of the Server Log<br />

11. Testing and Debugging Services<br />

The server log file receives operational and error information from the server’s major<br />

subsystems. For example, the package subsystem logs information into server log when it<br />

loads and unloads packages; the flow manager records information in the log when it<br />

processes a flow service; the HTTP port records requests that it receives, and so forth.<br />

Be aware that the server does not log exceptions thrown by individual services. However,<br />

you can code your service to write information to the server log, which can be useful for<br />

debugging. For information about writing information to the log file, see “Writing<br />

Information to the Server Log” on page 310.<br />

Server Debug Levels<br />

The amount and type of information that is logged by the server is determined by the<br />

debug level under which the server is operating. The debug level is a value from 1 to 11 that<br />

you specify when you start the server. The higher the debug level, the more detail the<br />

server keeps in its log.<br />

The following example shows the startup command you would use to start the server at<br />

debug level 7.<br />

bin\server.bat –debug 7<br />

bin/server.sh –debug 7<br />

(under Windows)<br />

(under UNIX)<br />

If you do not explicitly set the debug switch when you start the server, the default value<br />

specified in the watt.debug.level parameter is used. <strong>webMethods</strong> ships the server with<br />

watt.debug.level set at 4.<br />

Once you start the server, the debug level is set. When the server is running, you can<br />

change the debug level using the Integration Server Administrator. If you do not know<br />

the debug level under which your <strong>webMethods</strong> Integration Server operates, see your<br />

<strong>webMethods</strong> Integration Server administrator.<br />

Important! Debug levels above 5 produce lots of detail and can quickly generate an<br />

extremely large log file. You should not run your server at this level except for brief<br />

periods when you are attempting to troubleshoot a particular issue. You may also<br />

optionally redirect server log messages to the console instead of a file using the –log none<br />

startup switch. For more information about this switch and debug levels, see “Starting the<br />

<strong>webMethods</strong> Integration Server” in the <strong>webMethods</strong> Integration Server Administrator’s<br />

<strong>Guide</strong>.<br />

<strong>webMethods</strong> <strong>Developer</strong> User’s <strong>Guide</strong> Version 6.5, Service Pack 3 � � � 309


Writing Information to the Server Log<br />

11. Testing and Debugging Services<br />

<strong>webMethods</strong> provides built-in services that allow you to write information to the server<br />

log at run time. These can be useful during debugging because you can use them to build<br />

signals that indicate whether certain segments of code were executed. You can also use<br />

them to record the run-time value of a specific variable.<br />

There are two ways to write information to the server log at run time. You can:<br />

� Write an arbitrary message to the log using pub.flow:debugLog.<br />

� Dump the contents of the entire pipeline to the log using pub.flow:tracePipeline.<br />

Writing an Arbitrary Message to the Log<br />

To write an arbitrary message to the server log, you invoke the built-in service<br />

pub.flow:debugLog. You can invoke pub.flow:debugLog from a flow service or a coded service<br />

(such as a Java service). When this service executes, it inserts a text string that you specify<br />

into the server log. You might use it to post progress messages at certain points in a<br />

service (to indicate whether certain segments of code were executed) or to record the<br />

value of a particular variable in the log file so you can examine it after the service executes.<br />

The following example shows two progress messages (highlighted) that were posted to<br />

the server log using pub.flow:debugLog.<br />

Example of messages posted to server log with pub.flow:debugLog<br />

2002-05-28 16:56:12 EDT [ISS.0028.0005C] Loading LogDemo package<br />

2002-05-28 16:56:53 EDT [ISC.0081.0001E] New LogDemo:demoService<br />

2002-05-28 16:57:56 EDT [ISP.0090.0003C] begin database update<br />

2002-05-28 16:57:56 EDT [ISP.0090.0003C] database update completed<br />

To use pub.flow:debugLog, take the following general steps:<br />

1 Invoke pub.flow:debugLog at the point where you want the service to write a message to<br />

the server log.<br />

2 Set the following parameters:<br />

Key Description<br />

message A String that specifies the message that you want written to server<br />

log. This can be a literal string that you assign to message, however, for<br />

debugging purposes, it is often useful to link this parameter to a<br />

pipeline variable whose run-time value you want to capture.<br />

<strong>webMethods</strong> <strong>Developer</strong> User’s <strong>Guide</strong> Version 6.5, Service Pack 3 � � � 310


Key Description<br />

11. Testing and Debugging Services<br />

function Optional. A String that identifies your service. The String you specify<br />

will appear in the second column of the message that debugLog writes<br />

to server log. The purpose of this label is to identify which component<br />

posted the message to the log.<br />

If you do not assign a value to function, debugLog omits the label.<br />

However, keep in mind that assigning a value to function will make it<br />

easier for you to locate your service’s message when you examine the<br />

log file. Although you can assign a text string of any length to<br />

function, only the first 6 characters appear in the log.<br />

level Optional. A String containing a value from 1 to 11, specifying the<br />

debug levels under which this message is to be posted to the log. If<br />

the server is running at a debug level lower than the value set in level,<br />

the message is not put into the log file.<br />

3 Save the service. (If you are using your own IDE, you will need to recompile the<br />

service, reregister it on <strong>webMethods</strong> Integration Server, and reload its package.)<br />

4 Execute the service.<br />

For additional information about pub.flow:debugLog, see the <strong>webMethods</strong> Integration Server<br />

Built-In Services Reference.<br />

Dumping the Pipeline to the Log<br />

If you do not specify level, 1 is assumed, which means that the<br />

message is posted to the log file regardless of which debug level the<br />

server is running at. For more information about debug level, see<br />

“Server Debug Levels” on page 309.<br />

Sometimes when you are debugging a service, it is useful to obtain a snapshot of the<br />

entire pipeline at a certain point in the flow. You can do this by invoking<br />

pub.flow:tracePipeline, which puts a copy of the current pipeline in server log. You may<br />

invoke pub.flow:tracePipeline from a flow service or a coded service (such as a Java service).<br />

The following example shows the start and end pipeline that was written to the server log<br />

with pub.flow:tracePipeline.<br />

<strong>webMethods</strong> <strong>Developer</strong> User’s <strong>Guide</strong> Version 6.5, Service Pack 3 � � � 311


Example of pipeline written to server log with pub.flow:tracePipeline<br />

11. Testing and Debugging Services<br />

2002-05-28 17:37:10 EDT [ISP.0090.0001C] --- START tracePipeline [5/28/02 5:37 PM]<br />

--<br />

2002-05-28 17:37:10 EDT [ISP.0090.0008C] 0 filename = D:\Program<br />

Files\<strong>webMethods</strong>6\IntegrationServer\packages\Examples\pub\goes\catalogue.xml<br />

2002-05-28 17:37:10 EDT [ISP.0090.0008C] 0 Buyer = Caroline Wielman<br />

2002-05-28 17:37:10 EDT [ISP.0090.0008C] 0 Address =><br />

2002-05-28 17:37:10 EDT [ISP.0090.0008C] 1 Street1 = 15788 Cedar Avenue<br />

2002-05-28 17:37:10 EDT [ISP.0090.0008C] 1 City = Apple Valley<br />

2002-05-28 17:37:10 EDT [ISP.0090.0008C] 1 State = MN<br />

2002-05-28 17:37:10 EDT [ISP.0090.0008C] 1 postalCode = 55124<br />

2002-05-28 17:37:10 EDT [ISP.0090.0008C] 0 Order =><br />

2002-05-28 17:37:10 EDT [ISP.0090.0008C] 1 Date = 5/25/2002<br />

2002-05-28 17:37:10 EDT [ISP.0090.0008C] 1 Items[0] =><br />

2002-05-28 17:37:10 EDT [ISP.0090.0008C] 2 Code = 965003<br />

2002-05-28 17:37:10 EDT [ISP.0090.0008C] 2 Description = MaxGear D LtWt D Carabiner<br />

2002-05-28 17:37:10 EDT [ISP.0090.0008C] 2 Qty = 300<br />

2002-05-28 17:37:10 EDT [ISP.0090.0008C] 2 Price = 8.50<br />

2002-05-28 17:37:10 EDT [ISP.0090.0008C] 2 Total = 2800<br />

2002-05-28 17:37:10 EDT [ISP.0090.0008C] 1 Items[1] =><br />

2002-05-28 17:37:10 EDT [ISP.0090.0008C] 2 Code = 896301<br />

2002-05-28 17:37:10 EDT [ISP.0090.0008C] 2 Description = Hikes 10.5x50 Standard Rop<br />

2002-05-28 17:37:10 EDT [ISP.0090.0008C] 2 Qty = 50<br />

2002-05-28 17:37:10 EDT [ISP.0090.0008C] 2 Price = 175<br />

2002-05-28 17:37:10 EDT [ISP.0090.0008C] 2 Total = 8750<br />

2002-05-28 17:37:10 EDT [ISP.0090.0008C] 1 Items[2] =><br />

2002-05-28 17:37:10 EDT [ISP.0090.0008C] 2 Code = 965007<br />

2002-05-28 17:37:10 EDT [ISP.0090.0008C] 2 Description = MaxGear D Quick Lock<br />

To use pub.flow:tracePipeline, take the following general steps:<br />

1 Invoke pub.flow:tracePipeline at the point where you want the service to dump a copy of<br />

the pipeline to the server log.<br />

2 Set the following parameters:<br />

Key Description<br />

level Optional. A String containing a value from 1 to 11, specifying the debug<br />

levels under which the pipeline will be posted to the log. If the server is<br />

running at a debug level lower than the value set in level, the pipeline is<br />

not written to the log file.<br />

If you do not specify level, 4 is assumed, which means that the pipeline<br />

will not be dumped to the log file unless the server is running at debug<br />

level 4 or higher. For more information about debug level, see “Server<br />

Debug Levels” on page 309.<br />

<strong>webMethods</strong> <strong>Developer</strong> User’s <strong>Guide</strong> Version 6.5, Service Pack 3 � � � 312


11. Testing and Debugging Services<br />

3 Save the service. (If you are using your own IDE, you will need to recompile the<br />

service, reregister it on <strong>webMethods</strong> Integration Server, and reload its package.)<br />

4 Execute the service.<br />

For additional information about pub.flow:tracePipeline, see the <strong>webMethods</strong> Integration Server<br />

Built-In Services Reference.<br />

<strong>webMethods</strong> <strong>Developer</strong> User’s <strong>Guide</strong> Version 6.5, Service Pack 3 � � � 313


11. Testing and Debugging Services<br />

<strong>webMethods</strong> <strong>Developer</strong> User’s <strong>Guide</strong> Version 6.5, Service Pack 3 � � � 314


Chapter 12. Building Coded Services<br />

� Basic Concepts . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 316<br />

� Building Services Using Java . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 318<br />

� How Java Services Are Organized on the Server . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 318<br />

� Building Java Services with <strong>Developer</strong> . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 319<br />

� Building Java Services with Your Own IDE . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 327<br />

� Building Services Using C/C++ . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 332<br />

� Building Services Using COM . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 336<br />

� Invoking Methods from Existing COM and DCOM Objects . . . . . . . . . . . . . . . . . . . . . . . . . . . . 337<br />

� Writing and Invoking a Visual Basic Service . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 339<br />

<strong>webMethods</strong> <strong>Developer</strong> User’s <strong>Guide</strong> Version 6.5, Service Pack 3 � � � 315


Basic Concepts<br />

12. Building Coded Services<br />

In addition to using the built-in services that <strong>webMethods</strong> provides, you can create<br />

customized services in a variety of program languages. This allows you to create a library<br />

of custom code that can be accessed and executed from a flow service or from a client<br />

application.<br />

This chapter describes how to create your own services using Java, C/C++, and Visual<br />

Basic.<br />

Important! Java is the native language for services. When you create services in other<br />

languages, you must wrap them to appear as a Java class to <strong>webMethods</strong> Integration<br />

Server.<br />

The IData Object<br />

The IData object is the universal container that services use to receive input from and<br />

deliver output to other programs. It contains an ordered collection of key/value pairs on<br />

which a service operates. An IData object can contain any number of key/values pairs<br />

(elements). The keys in an IData object must be Strings. The values can be any Java objects<br />

(including IData objects).<br />

Services Take IData Objects as Input and Return IData as Output<br />

Services take one, and only one, input variable: an IData object. For example:<br />

public final static void myservice (IData pipeline)<br />

throws ServiceException<br />

{<br />

return;<br />

}<br />

When a service is invoked, <strong>webMethods</strong> Integration Server passes the IData object to it.<br />

The service extracts the actual input values it needs from the elements within the IData<br />

object. For example:<br />

public final static void myservice (IData pipeline)<br />

throws ServiceException<br />

{<br />

IDataCursor myCursor = pipeline.getCursor();<br />

if (myCursor.first( "inputValue1" )) {<br />

String myVariable = (String) myCursor.getValue();<br />

.<br />

.<br />

}<br />

myCursor.destroy();<br />

.<br />

.<br />

return;<br />

}<br />

<strong>webMethods</strong> <strong>Developer</strong> User’s <strong>Guide</strong> Version 6.5, Service Pack 3 � � � 316


12. Building Coded Services<br />

A service returns output by inserting it into an IData object. Any information that is<br />

produced by the service and must be returned to the calling program must be written to<br />

the IData object. For example:<br />

public final static void myservice (IData pipeline)<br />

throws ServiceException<br />

{<br />

IDataCursor myCursor = pipeline.getCursor();<br />

if (myCursor.first( "inputValue1" )) {<br />

String myVariable = (String) myCursor.getValue();<br />

.<br />

.<br />

}<br />

myCursor.last();<br />

myCursor.insertAfter( "outputValue1", myOutputVariable );<br />

myCursor.destroy();<br />

return;<br />

}<br />

Getting and Setting Elements in an IData Object<br />

Getting data from and putting data into IData elements takes two steps. First, you must<br />

position the cursor at the IData element. Next, you get or set the data in that element. The<br />

class that you can use to position a cursor in an IData object is IDataCursor. The<br />

IDataCursor class contains methods for performing basic cursor operations such as<br />

placing the cursor at the first, last, or next element in the object.<br />

After you position the cursor on the element with which you want to work, you can use<br />

the getValue or setValue methods to read or write the value of that element, respectively.<br />

This class also provides methods for inserting new elements, getting key names, and<br />

deleting elements.<br />

For more information about using the cursor classes, see the data package in the<br />

<strong>webMethods</strong> Integration Server Java API Reference at<br />

<strong>webMethods</strong>6\<strong>Developer</strong>\doc\api\Java\index.html.<br />

Creating IData Objects<br />

You use the IDataFactory class to create IData objects. For example:<br />

static IData myIDataObject;<br />

static<br />

{<br />

myObject = IDataFactory.create();<br />

IDataCursor myCursor = myObject.getCursor();<br />

myCursor.insertAfter("VA", new Double("0.045"));<br />

myCursor.insertAfter("MD", new Double("0.05"));<br />

myCursor.insertAfter("DE", new Double("0.0"));<br />

}<br />

For more information about using the IDataFactory class, see the data package in the<br />

<strong>webMethods</strong> Integration Server Java API Reference at:<br />

<strong>webMethods</strong>6\<strong>Developer</strong>\doc\api\Java\index.html.<br />

<strong>webMethods</strong> <strong>Developer</strong> User’s <strong>Guide</strong> Version 6.5, Service Pack 3 � � � 317


Building Services Using Java<br />

12. Building Coded Services<br />

Since Java is the native language of services, it is the easiest language in which to build a<br />

service.<br />

<strong>webMethods</strong> <strong>Developer</strong> provides an Integrated Development Environment (IDE) that you<br />

can use to create, compile, and publish Java services. The IDE automatically generates an<br />

appropriately structured source file that you simply “fill in” using the built-in editor.<br />

When you save the source file, the IDE automatically compiles it and registers it on the<br />

server.<br />

Although <strong>Developer</strong>’s IDE is useful for creating small, simple services, you may want to<br />

use your own Java IDE to build large services. When you use your own IDE, you must<br />

create all of the code yourself, and manually copy and register the class file on the server.<br />

<strong>webMethods</strong> Integration Server provides utilities to publish services you write in your<br />

own IDE. For more information about creating Java services without using <strong>Developer</strong>, see<br />

“Building Java Services with Your Own IDE” on page 327.<br />

How Java Services Are Organized on the Server<br />

A Java service is a public static method in a Java class file on <strong>webMethods</strong> Integration<br />

Server. Java services follow a simple naming scheme:<br />

� The service name represents the Java method name.<br />

� The interface name represents the fully qualified Java class name.<br />

Since Java class names cannot contain the “.” character, services that reside in nested<br />

folders are implemented in a class that is scoped within a Java package. For example, a<br />

service named recording.accounts:createAccount is made up of a Java method called<br />

createAccount in a Java class called accounts within the recording package.<br />

All Java services that reside in the same folder are methods of the same class.<br />

When you build a Java service with <strong>Developer</strong>, it automatically combines your service<br />

into the class file associated with the folder in which you created it. However, if you build<br />

a Java service in your own IDE, you will need to add the class file to the server yourself.<br />

And, if you want that service to be recognized by <strong>Developer</strong>, you must insert special<br />

comment code in your source code.<br />

<strong>webMethods</strong> <strong>Developer</strong> User’s <strong>Guide</strong> Version 6.5, Service Pack 3 � � � 318


Building Java Services with <strong>Developer</strong><br />

12. Building Coded Services<br />

The following describes the basic stages involved in creating a Java service with<br />

<strong>Developer</strong>.<br />

Stage 1<br />

Stage 2<br />

Stage 3<br />

Specify the inputs and outputs of the service. This stage is optional, but<br />

recommended. During this stage, you define the service’s inputs and<br />

outputs (if you know these) in <strong>Developer</strong>’s IDE. For information about<br />

this stage, see “Generating Java Code from Service Input and Output<br />

Parameters” on page 325.<br />

Create the Java service using <strong>Developer</strong>. During this stage, you write your<br />

program in <strong>Developer</strong>’s IDE. For information about this stage, see<br />

“Creating a Java Service with <strong>Developer</strong>’s IDE” on page 323.<br />

Specify the service’s run-time parameters. During this stage, you assign<br />

parameters that configure the run-time environment for this service. For<br />

information about this stage, see “Setting Run-Time Options for a Java<br />

Service” on page 326.<br />

Before you create a Java service, you must:<br />

� Make sure the package in which you want to create the service already exists. If the package<br />

does not already exist, use <strong>Developer</strong> or the Integration Server Administrator to<br />

create it. For details, see “Creating a Package” on page 76.<br />

� Make sure the folder in which you want to create the service already exists. If the folder does<br />

not already exist, use <strong>Developer</strong> to create it. For details, see “Creating New Elements”<br />

on page 45.<br />

� Make sure that all Java and C services are unlocked or locked by you in the folder in which you<br />

want to create the new service. For details, see “Locking Java and C/C++ Services” on<br />

page 97.<br />

Important! All Java services that belong to the same folder reside in the same Java class file.<br />

This class has the same name as the folder.<br />

<strong>webMethods</strong> <strong>Developer</strong> User’s <strong>Guide</strong> Version 6.5, Service Pack 3 � � � 319


<strong>Developer</strong><br />

automatically<br />

generates required<br />

code for you.<br />

Using the <strong>Developer</strong> IDE<br />

12. Building Coded Services<br />

In the <strong>Developer</strong> IDE, you use the Java service editor and its Shared tab to create your<br />

source code.<br />

The Java Service Editor<br />

You use the Java service editor to build the body of your program. It is like a template you<br />

“fill in” with custom Java code. Standard blocks of required code appear in the shaded<br />

areas at the top and bottom of the tab. You cannot alter the code in these areas.<br />

The Java service editor is like a template for building a service<br />

The required code at the top of the Java service editor defines a static and final method<br />

with a single input parameter: an IData object. The block of required code at the bottom<br />

returns the pipeline to the caller.<br />

When you build a Java service, you type (or paste) your code in the text box in the Java<br />

service editor. The following example shows a service that gets two values from the<br />

pipeline and uses them to compute a sales tax. It puts the computed tax into the pipeline.<br />

<strong>webMethods</strong> <strong>Developer</strong> User’s <strong>Guide</strong> Version 6.5, Service Pack 3 � � � 320


Type your code<br />

in here.<br />

You use the Java service editor to write the body of your service<br />

12. Building Coded Services<br />

<strong>webMethods</strong> <strong>Developer</strong> User’s <strong>Guide</strong> Version 6.5, Service Pack 3 � � � 321


The Shared Tab<br />

12. Building Coded Services<br />

You use the Shared tab to the specify common (that is, shared) attributes of this class. This<br />

includes the superclass and interface declarations, required imports, and member<br />

variables that are shared but not exposed as services. The code on this tab is shared by all<br />

services in this folder.<br />

You use the Shared tab to specify the common attributes of the class<br />

The Extends field allows you to specify a super class for the implementation. You are not<br />

required to specify a super class.<br />

Note: It is useful, but not necessary, to extend the class com.wm.app.b2b.server.Service.<br />

This class includes static methods for various common tasks, like retrieving the current<br />

session ID and formatting error messages.<br />

The Implements field specifies the names of Java interfaces that you want to implement in<br />

the extended class.<br />

The Imports field specifies the names of additional Java packages whose classes are<br />

available to the current class. When you create a Java service with <strong>Developer</strong>, several Java<br />

packages are automatically added to the import list.<br />

The Source field allows you to define global variables and methods that are shared by all<br />

services in the current folder. This is useful for building shared data structures and<br />

supporting functions that are not intended to be exposed as services. For example, you<br />

<strong>webMethods</strong> <strong>Developer</strong> User’s <strong>Guide</strong> Version 6.5, Service Pack 3 � � � 322


12. Building Coded Services<br />

might use the Source field to define an account table and the methods to used to access it<br />

for a set of services that create, get, and delete account information.<br />

Note: Because services are implemented as static methods, most shared code is usually<br />

static as well.<br />

Creating a Java Service with <strong>Developer</strong>’s IDE<br />

The following procedure describes how to create the source code for a Java service using<br />

<strong>Developer</strong>’s IDE.<br />

To create a Java service with <strong>Developer</strong><br />

1 On the File menu, click New.<br />

2 Click Java Service and click Next.<br />

3 In the New Java Service dialog box, next to Folder, select the folder into which you<br />

want to save this service.<br />

4 In the Name field, type a name for the service.<br />

5 Click Finish.<br />

6 If you know the set of inputs and outputs your program uses, specify these using the<br />

Input/Output tab.<br />

Note: You can use <strong>Developer</strong> to automatically generate Java code that gets and puts<br />

those input and output values in the pipeline. For more information about<br />

automatically generating Java code, see “Generating Java Code from Service Input<br />

and Output Parameters” on page 325.<br />

7 Type the code for your service at the top of the Java service editor. For information<br />

about Java classes provided by <strong>webMethods</strong>, see the <strong>webMethods</strong> Integration Server Java<br />

API Reference in <strong>webMethods</strong>6\<strong>Developer</strong>\doc\api\Java\index.html.<br />

8 If you want to make additional methods and/or structures available to the service,<br />

complete the following fields on the Shared tab.<br />

Use this field... To specify...<br />

Extends The name of the superclass (if any) of which this class is an<br />

extension. If you specify a superclass, type its Java class name<br />

(fully qualified if necessary).<br />

<strong>webMethods</strong> <strong>Developer</strong> User’s <strong>Guide</strong> Version 6.5, Service Pack 3 � � � 323


Use this field... To specify...<br />

12. Building Coded Services<br />

Implements The names of interfaces within the superclass that this class<br />

implements. Take the following steps to specify each interface that<br />

you want to implement:<br />

� Click to add a new row to the list.<br />

� Type the name of a valid Java class name (fully qualified if<br />

necessary). You do not need to type the “implements”<br />

keyword.<br />

Imports The names of Java packages that this class imports. Take the<br />

following steps to specify each package that you want to import:<br />

� Click to add a new row to the list.<br />

� Type the name of a valid Java class name (for example,<br />

com.wm.util.Table) or a package import specification (for<br />

example, java.util.*). You do not need to type the “import”<br />

keyword.<br />

Source Data structures, methods, and other Java code that you want to<br />

make available to all services in this folder.<br />

9 When you finish specifying your code in the Java service editor and on the Shared tab,<br />

click on the toolbar to save and compile the service.<br />

10 If <strong>Developer</strong> cannot compile the service because the Integration Server to which you<br />

are connected cannot find a Java compiler, <strong>Developer</strong> displays an error message. Do<br />

the following to ensure the Integration Server can locate the Java compiler:<br />

a Ensure that a Java compiler is installed on the same machine as the Integration<br />

Server.<br />

b Add the location of the Java compiler to the system path of the machine where the<br />

Integration Server is installed.<br />

c Restart the Integration Server.<br />

<strong>webMethods</strong> <strong>Developer</strong> User’s <strong>Guide</strong> Version 6.5, Service Pack 3 � � � 324


Generating Java Code from Service Input and Output Parameters<br />

12. Building Coded Services<br />

If, before you start writing your service, you know the set of inputs and outputs that it will<br />

use, you can declare the service’s input/output parameters first and generate Java code<br />

from it. This code gets the specified input values from the pipeline and assigns them to<br />

variables in your program. It also puts the output values into the pipeline.<br />

For example, if the Input/Output tab for the service defines the following variables as input<br />

and output:<br />

Input Variable Name Type<br />

State String<br />

Amount String<br />

Output Variable Name Type<br />

Tax String<br />

<strong>Developer</strong> will generate the following Java code for your service:<br />

// pipeline<br />

IDataCursor pipelineCursor = pipeline.getCursor();<br />

StringState = IDataUtil.getString( pipelineCursor, "State" );<br />

StringAmount = IDataUtil.getString( pipelineCursor, "Amount" );<br />

pipelineCursor.destroy();<br />

// pipeline<br />

IDataCursor pipelineCursor_1 = pipeline.getCursor();<br />

IDataUtil.put( pipelineCursor_1, "Tax", "Tax" );<br />

pipelineCursor_1.destroy();<br />

When <strong>Developer</strong> generates code from the service input/output parameters, it puts the<br />

code on the Clipboard. From there, you can paste it into your program (at the top of the<br />

Java service editor or in your own IDE) and modify it as necessary.<br />

Note: <strong>webMethods</strong> Integration Server returns everything that your service puts into the<br />

pipeline, regardless of what is declared as its input/output parameters. Declaring a<br />

service's input and output parameters does not filter what variables the service actually<br />

receives or returns at run time. It simply provides a formal description of what the service<br />

requires as input and produces as output.<br />

<strong>webMethods</strong> <strong>Developer</strong> User’s <strong>Guide</strong> Version 6.5, Service Pack 3 � � � 325


To generate Java code from the service input/output parameters<br />

12. Building Coded Services<br />

1 Open the Java service for which you want to generate code (if you are creating the<br />

Java service in your own IDE, use <strong>Developer</strong> to create a new, empty Java service that<br />

you will use only for the purpose of declaring a set of input/output parameters).<br />

2 Click the Input/Output tab and define the inputs and outputs for this service if they are<br />

not already specified. For more information about defining inputs and outputs for a<br />

service, see “To declare input and output parameters for a service” on page 133.<br />

3 If you want to generate code for a subset of the variables on the Input/Output tab, select<br />

those variables.<br />

4 On the Tools menu, click Generate Code.<br />

5 On the Code Generation dialog box, select For implementing this service and click Next.<br />

6 Specify the following options.<br />

Under this... Specify...<br />

Specification Whether you want to generate code for the input variables, the<br />

output variables, or both.<br />

Which fields? Whether you want to generate code for all variables in the<br />

Input/Output tab or just the selected variables.<br />

7 Click Finish. <strong>Developer</strong> generates code and places it on the Clipboard.<br />

8 Paste the contents of the Clipboard into your source code.<br />

Setting Run-Time Options for a Java Service<br />

When you create a Java service with <strong>Developer</strong>, you can set options to specify the<br />

run-time behavior of the service. These options determine whether:<br />

� The service runs in stateless mode.<br />

� The results of the service are maintained in cache.<br />

� An output template is applied to the service when it is invoked by a browser.<br />

You specify these options in the Properties panel. For information about using these<br />

options, see “Specifying Run-Time Parameters” on page 137 and “Assigning an Output<br />

Template to a Service” on page 134.<br />

<strong>webMethods</strong> <strong>Developer</strong> User’s <strong>Guide</strong> Version 6.5, Service Pack 3 � � � 326


Building Java Services with Your Own IDE<br />

12. Building Coded Services<br />

There may be times when you want to use your own IDE instead of <strong>Developer</strong> to build a<br />

Java service.<br />

The Namespace Directory<br />

To successfully publish (install) a Java service that you have created with your own IDE,<br />

you need to understand exactly how Java services are stored on <strong>webMethods</strong> Integration<br />

Server.<br />

Each package on <strong>webMethods</strong> Integration Server has a namespace directory, called “ns.”<br />

For example, a package called “purch” would have the following directory structure:<br />

<strong>webMethods</strong>6\IntegrationServer\packages\purch\ns<br />

The ns directory contains information about the services in that package. An “entry” in<br />

the namespace directory corresponds to a service or a folder. The contents of each entry<br />

depend on what kind of entry it is.<br />

� Service entries contain information about properties of the service (for example,<br />

statelessness), the input and output parameters of the service (if they have been<br />

defined), and Java or XML source if the source is available for that service.<br />

� Folder entries contain information about the folder. This information is usually limited<br />

to Java source for the services in that folder, if available.<br />

For Java services, information about the service is stored in the namespace directory.<br />

However, the compiled code for that service (that is, the class file) is stored in the code<br />

subdirectory. The following shows the directory path to the class files in the purch<br />

package.<br />

<strong>webMethods</strong>6\IntegrationServer\packages\purch\code\classes\recording\<br />

accounts.class<br />

When you use <strong>Developer</strong> to build a Java service, it automatically updates and maintains<br />

the folder and service information in the namespace. However, if you build a Java service<br />

in your own IDE, you must use a utility called jcode to compile your service and generate<br />

the necessary files in the namespace.<br />

Important! Although you may want to examine the contents of the namespace directories<br />

on your <strong>webMethods</strong> Integration Server, do not modify this information by hand. Only<br />

modify this information using the appropriate <strong>webMethods</strong> tools or utilities.<br />

Inappropriate changes, especially to the ns directory of the WmRoot package, can disable<br />

your server.<br />

<strong>webMethods</strong> <strong>Developer</strong> User’s <strong>Guide</strong> Version 6.5, Service Pack 3 � � � 327


The Source Code Directory<br />

12. Building Coded Services<br />

Each package on the server has a source subdirectory that holds the Java source code for<br />

that package, if it is available.<br />

When you finish coding your Java service, save its source file in this directory (subject to<br />

the normal Java constraints based on package declarations). You must name the files and<br />

intermediate directories according to the name of the service you are installing. For<br />

example, the source file for the recording accounts services shown in Appendix E, “jcode<br />

tags” would have the following path:<br />

<strong>webMethods</strong>6\IntegrationServer\packages\purch\code\source\recording\<br />

accounts.java<br />

Writing the Source Code for a Service<br />

Your service must be written as a method that takes an IData object as input.<br />

A Java service is a method that is public and static. It takes a single instance of<br />

com.wm.data.IData as input and returns output in the pipeline. The following code shows<br />

the basic framework for a Java service:<br />

public final static void myservice(IData pipeline)<br />

throws ServiceException<br />

{<br />

return;<br />

}<br />

Note: Services can throw ServiceException. Do not call Service.throwError.<br />

Additionally,<br />

� Your Java class must import the following Java packages.<br />

com.wm.data.*;<br />

com.wm.app.b2b.server.ServiceException;<br />

com.wm.app.b2b.server.Service;<br />

� Your Java class must be public.<br />

� For performance reasons, it is also recommended that you make your class final.<br />

Using the <strong>webMethods</strong> API<br />

<strong>webMethods</strong> provides classes that you can use with Java services that you build. See the<br />

<strong>webMethods</strong> Integration Server Java API Reference in:<br />

<strong>webMethods</strong>6\<strong>Developer</strong>\doc\api\Java\index.html<br />

for a description of these classes.<br />

<strong>webMethods</strong> <strong>Developer</strong> User’s <strong>Guide</strong> Version 6.5, Service Pack 3 � � � 328


The Basic Stages<br />

12. Building Coded Services<br />

The following describes the basic stages involved in creating a Java service with your own<br />

IDE.<br />

Stage 1<br />

Stage 2<br />

Stage 3<br />

Stage 4<br />

Stage 5<br />

Commenting Code for the <strong>webMethods</strong> Integration Server<br />

To install your finished service on the <strong>webMethods</strong> Integration Server, you use the jcode<br />

utility. To use this utility successfully, you must annotate your source code with jcode tags<br />

(specially formatted Java comments) to “mark” the following segments of code:<br />

� Imports<br />

Create an empty Java service using <strong>webMethods</strong> <strong>Developer</strong> (optional). During<br />

this stage, use <strong>Developer</strong> to create an empty Java template that you can<br />

use a guideline for coding your own service (see “Creating a Java Service<br />

with <strong>Developer</strong>’s IDE” on page 323).<br />

Specify the input and output parameters (signature) of the service. During this<br />

stage, you define the service’s inputs and outputs (if you know these).<br />

You can use <strong>Developer</strong> to generate the input and output code that you<br />

can paste into your program (see “Generating Java Code from Service<br />

Input and Output Parameters” on page 325).<br />

Create the Java service using your IDE. During this stage, you write and<br />

compile your program in your IDE. For more information about this<br />

stage, see “Writing the Source Code for a Service” on page 328.<br />

Saving and compiling your code using jcode (optional). During this stage, you<br />

can make your source code available for editing by <strong>Developer</strong> by using<br />

the jcode utility. For information, see “Commenting Code for the<br />

<strong>webMethods</strong> Integration Server” on page 329.<br />

Publish the service to the <strong>webMethods</strong> Integration Server. During this stage,<br />

you register your service on the Integration Server using the jcode utility.<br />

For information, see “Using the jcode Utility” on page 330.<br />

� Shared code within the class<br />

� Service definitions and service inputs and outputs<br />

<strong>webMethods</strong> <strong>Developer</strong> User’s <strong>Guide</strong> Version 6.5, Service Pack 3 � � � 329


12. Building Coded Services<br />

The following code fragment shows the tags used to mark the beginning and end of the<br />

import section.<br />

.<br />

.<br />

.<br />

// --- --import<br />

com.wm.data.*;<br />

import java.util.*;<br />

// --- ---<br />

.<br />

.<br />

.<br />

You use similar tags to mark the beginning and end of other components in your source<br />

code. For a complete example, see “jcode Example” in Appendix E, “jcode tags”. For<br />

additional information about the jcode utility, see the next section “Using the jcode<br />

Utility”.<br />

Using the jcode Utility<br />

When you finish creating and annotating your source code, you use the jcode utility to<br />

compile it and store its service information in the ns directory.<br />

Jcode operates in three basic modes:<br />

� Make Mode (for compiling Java source code).<br />

� Fragment Mode (for pulling apart source code and storing fragments and signatures in<br />

the namespace).<br />

� Composite Mode (for rebuilding the source files from fragments in the namespace).<br />

You must use the make and fragment modes to run your services on <strong>webMethods</strong><br />

Integration Server and edit the source code from <strong>Developer</strong>.<br />

Important! Before you can compile a service using jcode, you must set the environment<br />

variable IS_DIR to point to the directory in which <strong>webMethods</strong> Integration Server is<br />

installed.<br />

Make Mode<br />

You use this mode to examine source files for one or more folders in a package and<br />

compile those that have been modified since they were last compiled. The jcode utility<br />

will report which files were compiled, as well as any errors that were encountered during<br />

the process.<br />

To make all the code in a package, type the following on the command line:<br />

jcode makeall Package<br />

<strong>webMethods</strong> <strong>Developer</strong> User’s <strong>Guide</strong> Version 6.5, Service Pack 3 � � � 330


12. Building Coded Services<br />

To compile source files, the jcode utility invokes the JDK Java compiler, javac using the<br />

following command:<br />

javac –classpath pathName –d classDir fileList<br />

Where pathName is the classpath to use for the compile, classDir is the destination<br />

directory for the compiled classes, and fileList is a list of the names of source files to<br />

compile.<br />

If you do not have the JDK installed, or you want to use another compiler, you can set<br />

<strong>webMethods</strong> Integration Server’s watt.server.compile property to a new command line (using<br />

the arguments described above). For instance, to use IBM’s jikes, you would set this<br />

property to:<br />

jikes +E –nowarn –classpath pathName –d classDir fileList<br />

Fragment Mode<br />

You use this mode to update the Java code fragments and service signatures (input and<br />

output parameters) in the namespace based on the jcode tags in the source code file. The<br />

original source file is not modified, but namespace information is updated and the source<br />

code for the service becomes available through <strong>Developer</strong>.<br />

To fragment all the code in a package, type the following on the command line:<br />

jcode fragall Package<br />

To fragment only the code for a single folder (that is, a single Java source file), type the<br />

following on the command line:<br />

jcode frag Package Folder<br />

Composite Mode<br />

Composite mode is the opposite of fragment mode. You use this mode to build a source<br />

file based on the code fragments currently defined in the namespace.<br />

Important! The existing source file, if there is one, is overwritten by the source file produced<br />

by jcode. User locks in <strong>Developer</strong> will not prevent this, since the jcode utility operates<br />

independently of locking functionality.<br />

To construct a source file based on the current information in the namespace, type the<br />

following on the command line:<br />

jcode comp Package Folder<br />

Important! If your Java source code contains any non-ASCII characters, set the property<br />

watt.server.java.source=Unicode | UnicodeBig | UnicodeLittle. The default<br />

value is file.encoding. When Unicode is set, the compile command line specified in the<br />

property watt.server.compile.unicode is used. The default value of this property is<br />

“javac -encoding Unicode -classpath {0} -d {1} {2}”.<br />

<strong>webMethods</strong> <strong>Developer</strong> User’s <strong>Guide</strong> Version 6.5, Service Pack 3 � � � 331


Other jcode Commands<br />

12. Building Coded Services<br />

Because the two-step process of making and fragmenting source code is so common, there<br />

are several shortcuts built in to jcode.<br />

The “update” mode makes and fragments only source files which have changed. To<br />

update (make and frag) all the folders within a package which have changed, type the<br />

following at the command line:<br />

jcode update Package<br />

To update (make and frag) all the code in all packages on <strong>webMethods</strong> Integration Server,<br />

type the following at the command line:<br />

jcode upall<br />

To force a make and frag on all packages on <strong>webMethods</strong> Integration Server, type:<br />

jcode hailmary<br />

Building Services Using C/C++<br />

You can use <strong>Developer</strong> to build a set of starter files you can use to create a C/C++ service.<br />

These files include:<br />

� A Java service that calls your C program.<br />

� A C/C++ source-code “template” that you use to create your C program.<br />

� A make file you use to compile the finished program and place it on the server.<br />

Before you create a C/C++ service, you must:<br />

� Make sure you have a C compiler installed on <strong>webMethods</strong> Integration Server that you<br />

will use to develop and test the service.<br />

� Make sure the package in which you want to create the service already exists. If the package<br />

does not already exist, create it using <strong>webMethods</strong> <strong>Developer</strong>. For more information<br />

about creating a package, see “Creating a Package” on page 76. (If you do not have<br />

<strong>Developer</strong> or Administrator privileges, ask your server administrator to do this.)<br />

� Make sure the directory for this package contains a “code/libs” directory. When you compile<br />

your C/C++ service, the make file places the compiled service (a DLL) in this directory.<br />

If the package does not already have a code/libs directory, create one before you begin<br />

building the service.<br />

� Make sure the folder in which you want to create the service already exists. If the folder does<br />

not exist, use <strong>Developer</strong> to create it. For details, see “Creating New Elements” on<br />

page 45.<br />

� Declare the input and output parameters for your service in a specification. When <strong>Developer</strong><br />

generates the starter code for your service, it creates code that extracts the specified<br />

<strong>webMethods</strong> <strong>Developer</strong> User’s <strong>Guide</strong> Version 6.5, Service Pack 3 � � � 332


12. Building Coded Services<br />

input values from the pipeline and assigns them to variables in your program. It also<br />

inserts your service’s output variables into the pipeline. To do this, <strong>Developer</strong> must<br />

know the input and output requirements of your service. You supply this information<br />

in a specification. For information about creating a specification, see Chapter 9,<br />

“Creating IS Schemas, IS Document Types, and Specifications”.<br />

Note: If you are running the Integration Server as an NT service, you must complete<br />

one of the following:<br />

Generating Files for a C/C++ Service<br />

If you have satisfied the prerequisites identified above, you can use the following<br />

procedure to generate the files that you need to build a C/C++ service.<br />

1 On the File menu, click New.<br />

2 Click C Service and click Next.<br />

3 In the New C Service dialog box, in the list next to Folder, select the folder into which<br />

you want to save this service.<br />

4 In the Name field, type a name for the service and click Next.<br />

5 Select the platform that describes the machine on which your <strong>webMethods</strong><br />

Integration Server is running (<strong>Developer</strong> needs to know this in order to build the right<br />

make file). Click Next.<br />

6 Select the specification for this service.<br />

7 Click Finish.<br />

• Set the Windows system environment variable PATH to include<br />

IntegrationServer\lib<br />

-OR-<br />

• Copy the wmJNI.dll and wmJNIc.dll files located in IntegrationServer\lib<br />

to the IntegrationServer directory<br />

where IntegrationServer is the directory in which you installed the<br />

Integration Server.<br />

To generate C/C++ project files<br />

<strong>webMethods</strong> <strong>Developer</strong> User’s <strong>Guide</strong> Version 6.5, Service Pack 3 � � � 333


The Java Code for a C Service<br />

12. Building Coded Services<br />

When you build a C/C++ service, <strong>Developer</strong> builds a Java service that calls a DLL, which<br />

you create by writing a C program. The Java service is the means by which your C<br />

program is exposed to clients (IS clients invoke this Java service, not the C program<br />

directly). The Java service also supplies the input/output parameters for the program,<br />

which makes it possible to include it in a flow service and link its inputs and output on the<br />

Pipeline tab.<br />

<strong>Developer</strong> generates all the Java code needed to successfully call your C program. You<br />

may add your own custom code to the C service editor or its Shared tab if you want to<br />

execute any special procedures before or after the C program is called, but other than that,<br />

this service contains everything you need.<br />

The C service editor contains code that calls the Java wrapper for the C program<br />

The Shared tab contains code that loads the library containing the C program<br />

<strong>webMethods</strong> <strong>Developer</strong> User’s <strong>Guide</strong> Version 6.5, Service Pack 3 � � � 334


The Input/Output tab declares the input/output parameters for the service<br />

Building the C/C++ Source Code<br />

12. Building Coded Services<br />

<strong>Developer</strong> also generates a source code file and a make file for you. It places these files in<br />

the following directory:<br />

<strong>webMethods</strong>6\IntegrationServer\packages\packageName\code\source<br />

The names of the files will match the service name you specified in <strong>Developer</strong>.<br />

To build the C/C++ source code<br />

1 Locate the source code and make files.<br />

2 Copy the source code file to a new file (in the same directory) with the following file<br />

name:<br />

serviceNameImpl.c<br />

For example, if your service name is PostPO, you would copy PostPO.c to PostPOImpl.c.<br />

You create the program in the serviceNameImpl.c file, not the original file. This is the<br />

file in which the make file expects to find your source code. (This step is taken to<br />

maintain a copy of the original source file to which you can refer, or revert back to,<br />

during your development.)<br />

3 Edit the serviceNameImpl.c file as necessary to build your service.<br />

This file will contain instructive comments that will guide your development. You can<br />

also refer to <strong>webMethods</strong> C API for information about how to use the <strong>webMethods</strong><br />

C/C++ API to make the data in your service available to other services. This file is<br />

located in <strong>webMethods</strong>6\<strong>Developer</strong>\doc\api\c\index.html.<br />

<strong>webMethods</strong> <strong>Developer</strong> User’s <strong>Guide</strong> Version 6.5, Service Pack 3 � � � 335


12. Building Coded Services<br />

4 Edit the make file to customize it for your development environment. Set the<br />

following path settings:<br />

Set... To...<br />

JDKDIR To the directory that contains the Java Development Kit.<br />

SEVRDIR The directory in which <strong>webMethods</strong> Integration Server is<br />

installed (for example, c:\<strong>webMethods</strong>6\IntegrationServer).<br />

Important! The source code file serviceName.c contains code based on the specification<br />

you selected for the service. If you edit the specification, you need to regenerate the<br />

source code file. <strong>Developer</strong> does not update the serviceName.c file automatically. For<br />

more information about generating source code files for a C/C++ service, see<br />

“Generating Files for a C/C++ Service” on page 333.<br />

5 After you finish coding your service, run your make file to compile it. Following is a<br />

typical make command:<br />

make –f SalesTax.mak<br />

The make file compiles your program and puts the finished DLL in the code\libs<br />

directory in the package in which the service resides (if this directory does not exist<br />

when you run the make file, your program will not compile successfully).<br />

6 Once your program compiles successfully, restart <strong>webMethods</strong> Integration Server to<br />

reload the code\libs directory. This makes the service available for execution and<br />

allows you to test it with <strong>Developer</strong>. For details on testing, see Chapter 11, “Testing<br />

and Debugging Services”.<br />

Building Services Using COM<br />

There are two ways in which you can use COM objects with <strong>webMethods</strong> Integration<br />

Server. You can:<br />

� Invoke methods/properties on existing COM or DCOM objects. <strong>webMethods</strong> Integration<br />

Server includes built-in services for instantiating any COM or DCOM object<br />

registered on your system and invoking its methods and properties. This allows you<br />

to use existing COM APIs written in Visual Basic or Visual C++ without writing<br />

low-level bridging code. For details, see “Invoking Methods from Existing COM and<br />

DCOM Objects” on page 337.<br />

� Create services using COM. <strong>webMethods</strong> Integration Server includes libraries for use in<br />

your own Visual Basic or Visual C++ code. They allow you to create COM objects that<br />

perform work on <strong>webMethods</strong> data structures. These objects (compiled into ActiveX<br />

DLLs or EXEs) can then be registered as native services, indistinguishable from their<br />

Java counterparts.<br />

<strong>webMethods</strong> <strong>Developer</strong> User’s <strong>Guide</strong> Version 6.5, Service Pack 3 � � � 336


Requirements<br />

12. Building Coded Services<br />

To use <strong>webMethods</strong> Integration Server with COM or DCOM, your <strong>webMethods</strong><br />

Integration Server must be running Java Virtual Machine 1.2 or later.<br />

Important! If you modify Visual Basic code intended for use with <strong>webMethods</strong> Integration<br />

Server libraries, do not use the debug mode in the Visual Basic development environment<br />

to test your code. (The debugger does not maintain references to <strong>webMethods</strong> Integration<br />

Server libraries.) Instead, use a logging feature in your development environment to test<br />

the code.<br />

Invoking Methods from Existing COM and DCOM Objects<br />

You can use <strong>webMethods</strong> Integration Server to access methods in existing COM and<br />

DCOM libraries that do not use <strong>webMethods</strong> IData objects. For example, you may have a<br />

COM object that performs a validation routine on a String and returns an encrypted String<br />

in response. It may not be sensible or desirable to wrap this object with a service if the<br />

component is simple enough and/or part of an existing, unmodifiable application. In these<br />

cases, the dispatch services can help.<br />

Creating the Object<br />

The win32.COM.dispatch:createObject service (located in the WmWin32 package) will create an<br />

object given a Program ID or the Globally Unique Identifier (GUID) for that object. You<br />

need to provide this service with the following inputs:<br />

Name Description<br />

progid<br />

–OR–<br />

The program ID of the object that you want to invoke.<br />

guid The Globally Unique Identifier (GUID) of the object that you want to<br />

invoke.<br />

context The context for the object, which is INPROC (DLL), LOCAL_SERVER<br />

(EXE), or REMOTE_SERVER (EXE).<br />

server DCOM only. The TCP/IP domain name of the machine where the DCOM<br />

object is located. For example, doc.rubicon.com or 128.111.222.001.<br />

user Optional. DCOM only. The name of the user in which to launch the<br />

remote COM object.<br />

password Optional. DCOM only. The password associated with user.<br />

domain Optional. DCOM only. The Windows domain associated with user.<br />

<strong>webMethods</strong> <strong>Developer</strong> User’s <strong>Guide</strong> Version 6.5, Service Pack 3 � � � 337


12. Building Coded Services<br />

The service will return a reference to the object called pDispatch or throw an error if the<br />

object cannot be created.<br />

Tip! The WmWin32 package is installed with the Integration Server on Microsoft Windows<br />

platforms but, by default, is not enabled. To view the package and access its services<br />

within <strong>Developer</strong>, first enable it using the Integration Server Administrator.<br />

Invoking the Object<br />

To invoke methods or properties on this object once you have created it, use<br />

win32.COM.dispatch:invoke. You need to supply this service with the following inputs:<br />

Name Description<br />

pDispatch An object reference previously obtained by the call to createObject or<br />

obtained in the result value of a previous call to invoke.<br />

dispName The name of the COM method or property that you want to invoke.<br />

accessType Optional. The type of operation (METHOD, GET, PUT, PUTREF) to be<br />

performed on dispName. If you are invoking a DCOM object, always<br />

set accessType to GET. Incorrect setting of this parameter will cause the<br />

invoke to fail.<br />

If you are unsure whether a dispName is a method or property,<br />

examine the component’s type library using OLEVIEW or a Microsoft<br />

development environment.<br />

params Optional. An object array of parameters. This is exposed in <strong>Developer</strong><br />

as an array of Strings for usability (because Objects cannot be<br />

manipulated in <strong>Developer</strong>), but is in reality an Object array. If you need<br />

to pass complex or native types, you may have to create this value<br />

within your own service.<br />

If the invocation is successful, the return value is contained in “result.” If the result is an<br />

object variable, it can then be the target of subsequent calls to invoke by linking the result<br />

to pDispatch in the next invoke.<br />

<strong>webMethods</strong> <strong>Developer</strong> User’s <strong>Guide</strong> Version 6.5, Service Pack 3 � � � 338


Writing and Invoking a Visual Basic Service<br />

12. Building Coded Services<br />

Writing services in Visual Basic is easy. To get started quickly, we suggest you examine the<br />

sample project file, wmVBDemo.vbp, using Visual Basic 6.0. It resides in<br />

WmSamples\code\source. You can find the WmSamples package in the certified samples<br />

area of the Knowledge Base on the Advantage Web Site.<br />

When you open the project, look at the Services class. It contains one method—a simple<br />

“HelloWorld” example. It returns “Hello” added to a name that you pass to the service.<br />

Note: For a complete list of all the methods contained within Values and other objects in<br />

the <strong>webMethods</strong> COM library, click Object Browser on the View menu in Visual Basic and<br />

select the <strong>webMethods</strong> library. The DLL (<strong>webMethods</strong>.dll) is registered and copied into<br />

your system directory during installation of <strong>Developer</strong> and <strong>webMethods</strong> Integration<br />

Server.<br />

Compiling a Visual Basic Service<br />

To make a Visual Basic class available to <strong>webMethods</strong> Integration Server, you must<br />

compile it. To compile the wmVBDemo.vbp example, open the project in Visual Basic and<br />

on the File menu, click Make wmVBDemo.dll. You can save the DLL in any directory. (If you<br />

are not sure where to put it,<br />

<strong>webMethods</strong>6\IntegrationServer\packages\WmWin32\code\libs will work.)<br />

Invoking a Visual Basic Service<br />

To execute a service that you have written in Visual Basic, you invoke it using one of<br />

<strong>webMethods</strong> Integration Server’s COM services. There are two services you can use: the<br />

late-binding service (win32.COM:invokeLate) and early-binding service (win32.COM:invoke).<br />

Invoking a VB Service Using Late Binding<br />

Use the following procedure to create a flow service that uses the late-binding service<br />

(win32.COM:invokeLate) to invoke a method from a compiled Visual Basic program.<br />

To invoke a VB method using late binding<br />

1 Open the flow service in which you want to invoke the VB method (if the service does<br />

not already exist, use the File�New command to create it).<br />

2 Click on the editor toolbar, click Browse, and then select<br />

win32.COM:invokeLate from the WmWin32 package.<br />

<strong>webMethods</strong> <strong>Developer</strong> User’s <strong>Guide</strong> Version 6.5, Service Pack 3 � � � 339


12. Building Coded Services<br />

3 Click the Pipeline tab and use the pipeline modifier to assign values to the<br />

following variables in Service In:<br />

Set... To specify...<br />

$progid The name of the library and class (a standard Microsoft COM<br />

convention) containing the method you want to invoke. Specify<br />

the names using libraryName.className notation.<br />

The following example shows the value you would use for the<br />

“Hello World” example:<br />

Example wmVBDemo.Services<br />

Important! Make sure you use the exact combination of uppercase<br />

and lowercase letters. Library and class names are case sensitive.<br />

$methodName The name of the method you want to invoke.<br />

The following example shows the value you would use for the<br />

“Hello World” example:<br />

Example helloWorld<br />

$context One of the following values, specifying whether your COM object<br />

is a DLL or an EXE.<br />

Set this value... If...<br />

INPROC The component was compiled as an<br />

ActiveX DLL. This option tells the<br />

server to instantiate the object in the<br />

same process as the server.<br />

If you are invoking the “Hello World”<br />

example, select this option because the<br />

example was compiled as a DLL.<br />

LOCAL_SERVER The component was compiled as an<br />

ActiveX EXE. This option tells the<br />

server to instantiate the object as its own<br />

process.<br />

REMOTE_SERVER The object that you want to invoke is a<br />

DCOM object on a remote machine.<br />

This option tells the server to instantiate<br />

the object as its own process.<br />

<strong>webMethods</strong> <strong>Developer</strong> User’s <strong>Guide</strong> Version 6.5, Service Pack 3 � � � 340


12. Building Coded Services<br />

4 On the Input/Output tab, declare the input and output parameters for your service.<br />

If you are invoking the “Hello World” example, declare a String input parameter<br />

name and a String output parameter message. For more information about declaring<br />

input and output parameters, see “To declare input and output parameters for a<br />

service” on page 133.<br />

5 On the File menu, click Save to save the flow service.<br />

6 On the Test menu, click Run to test the service.<br />

<strong>Developer</strong> prompts you for input values and then displays the results of the service in<br />

the Results panel.<br />

Invoking a VB Service Using Early Binding<br />

Creating a flow service that uses early binding is very much like creating one that uses<br />

late binding. The only difference is that, with early binding, you use win32.COM:invoke to<br />

invoke the Visual Basic method instead of using win32.COM:invokeLate.<br />

Using win32.COM:invoke provides better performance. However, it can only be used to call<br />

Visual Basic methods that have the following signature:<br />

Public Sub Sub1(inp as <strong>webMethods</strong>.Values)<br />

Note: If you created early-binding services with earlier versions of <strong>webMethods</strong><br />

Integration Server (prior to Version 4.0), you will need to update those services and<br />

re-specify the input parameters for the win32.COM:invoke service as described in step 3 of the<br />

following procedure.<br />

To invoke a VB method using early binding<br />

1 Open the flow service in which you want to invoke the VB method (if the service does<br />

not already exist, use the File�New command to create it).<br />

2 Click on the editor toolbar, select Browse, and then select win32.COM:invoke<br />

from the WmWin32 package.<br />

<strong>webMethods</strong> <strong>Developer</strong> User’s <strong>Guide</strong> Version 6.5, Service Pack 3 � � � 341


12. Building Coded Services<br />

3 On the Pipeline tab, use the pipeline modifier to assign values to the following<br />

variables in Service In:<br />

Set... To Specify...<br />

$progid The name of the library and class (a standard Microsoft COM<br />

convention) containing the method you want to invoke. Specify<br />

the names using libraryName.className notation.<br />

The following example shows the value you would use for the<br />

“Hello World” example:<br />

Example wmVBDemo.Services<br />

Important! Make sure you use the exact combination of uppercase<br />

and lowercase letters. Library and class names are case sensitive.<br />

$methodName The name of the method you want to invoke.<br />

The following example shows the value you would use for the<br />

“Hello World” example:<br />

Example helloWorld<br />

$context One of the following values, specifying whether your COM object<br />

is a DLL or an EXE.<br />

Set this value… If…<br />

INPROC The component was compiled as an<br />

ActiveX DLL. This option tells the server<br />

to instantiate the object in the same<br />

process as the server.<br />

If you are invoking the “Hello World”<br />

example, select this option because the<br />

example was compiled as a DLL.<br />

LOCAL_SERVER The component was compiled as an<br />

ActiveX EXE. This option tells the server<br />

to instantiate the object as its own process.<br />

REMOTE_SERVER The object that you want to invoke is a<br />

DCOM object on a remote machine. This<br />

option tells the server to instantiate the<br />

object as its own process.<br />

<strong>webMethods</strong> <strong>Developer</strong> User’s <strong>Guide</strong> Version 6.5, Service Pack 3 � � � 342


12. Building Coded Services<br />

4 On the Input/Output tab, declare the input and output parameters for your service.<br />

If you are invoking the “Hello World” example, declare a String input parameter<br />

name and a String output parameter message. For more information about declaring<br />

input and output parameters, see “To declare input and output parameters for a<br />

service” on page 133.<br />

5 On the File menu, click Save to save the flow service.<br />

6 On the Test menu, click Run to test the service.<br />

<strong>Developer</strong> prompts you for input values, executes the service, and then displays the<br />

results of the service in the Results panel.<br />

<strong>webMethods</strong> <strong>Developer</strong> User’s <strong>Guide</strong> Version 6.5, Service Pack 3 � � � 343


12. Building Coded Services<br />

<strong>webMethods</strong> <strong>Developer</strong> User’s <strong>Guide</strong> Version 6.5, Service Pack 3 � � � 344


Chapter 13. Creating Client Code<br />

� Basic Concepts . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 346<br />

� Building a Java Client . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 346<br />

� Building a C/C++ Client . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 350<br />

� Building a Visual Basic Client . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 352<br />

� Building an Excel Client . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 355<br />

� Building a Browser-Based Client . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 356<br />

<strong>webMethods</strong> <strong>Developer</strong> User’s <strong>Guide</strong> Version 6.5, Service Pack 3 � � � 345


Basic Concepts<br />

13. Creating Client Code<br />

<strong>webMethods</strong> <strong>Developer</strong> enables you to automatically generate client code in a variety of<br />

languages and for several environments. Client code is application code that invokes a<br />

service on a <strong>webMethods</strong> Integration Server. It typically performs the following basic<br />

tasks:<br />

� Prompts the user for input values (if your service takes input)<br />

� Places the inputs into an input document (if your service takes input)<br />

� Opens a session on <strong>webMethods</strong> Integration Server<br />

� Invokes a service<br />

Building a Java Client<br />

� Receives output from the service<br />

� Closes a session on <strong>webMethods</strong> Integration Server<br />

� Displays the output to the user<br />

The client code that <strong>Developer</strong> generates can serve as a good starting point for your own<br />

development.<br />

You can use <strong>Developer</strong> to generate Java client code that invokes a service.<br />

Assumptions<br />

� <strong>webMethods</strong> Integration Server is running.<br />

� A fully functional JDK is installed. If you are using the JVM that was installed with the<br />

Integration Server, no further action is needed. If you are using a different JVM, do the<br />

following to obtain the files the Integration Server needs to support signed libraries:<br />

<strong>webMethods</strong> <strong>Developer</strong> User’s <strong>Guide</strong> Version 6.5, Service Pack 3 � � � 346


If your run-time<br />

JDK is... Do the following...<br />

JDK 1.2.* or<br />

JDK 1.3.*<br />

13. Creating Client Code<br />

Ensure that the Sun JCE 1.2.2 is installed as part of your JVM<br />

installation.<br />

� If you are running the Sun JVM, look for the files jce1_2_2.jar,<br />

local_policy.jar, sunjce_provider.jar, and<br />

US_export_policy.jar.<br />

� If you are running the IBM JVM, look for the files<br />

IBMJCEfw.jar, IBMJCEProvider.jar, local_policy.jar, and<br />

US_export_policy.jar.<br />

If these files are not installed, download the Sun JCE 1.2.2 from<br />

http://java.sun.com/products/jce/index-122.html.<br />

JDK 1.4.* Ensure that the unlimited strength jurisdiction policy files<br />

(local_policy.jar and US_export_policy.jar) are installed as part of<br />

your JVM installation.<br />

If these files are not installed, download them as follows:<br />

� If you are running the Sun JDK 1.4.*, download the files from<br />

http://java.sun.com/j2se/1.4.1/download.html/.<br />

� If you are running the IBM JDK 1.4.*, download the files from<br />

http://www-106.ibm.com/developerworks/java/jdk/security/.<br />

JDK 1.5.* Ensure that the unlimited strength jurisdiction policy files<br />

(local_policy.jar and US_export_policy.jar) are installed as part of<br />

your JVM installation.<br />

If these files are not installed, download them as follows:<br />

� If you are running the Sun JDK 1.5.*, download the files from<br />

http://java.sun.com/javase/downloads/index.jsp.<br />

If you are running the IBM JDK 1.5.*, download the files from<br />

http://www-106.ibm.com/developerworks/java/jdk/security/.<br />

� You are using one of the cryptographic service providers (CSPs) that <strong>webMethods</strong><br />

provides (Sun, IBM, Entrust, or IAIK). If you are using a different provider, the<br />

libraries supplied by that provider must be digitally signed.<br />

� Your classpath consists of at least the following:<br />

<strong>webMethods</strong>6\<strong>Developer</strong>\lib\client.jar<br />

Note: The client.jar file refers to the files in <strong>webMethods</strong>6\<strong>Developer</strong>\lib\entrust.<br />

Therefore, the \entrust directory must remain in the same relative path as client.jar.<br />

<strong>webMethods</strong> <strong>Developer</strong> User’s <strong>Guide</strong> Version 6.5, Service Pack 3 � � � 347


Third-Party Libraries<br />

13. Creating Client Code<br />

The following table describes the third-party libraries that <strong>webMethods</strong> includes in<br />

<strong>webMethods</strong>6\<strong>Developer</strong>\lib\client.jar and in <strong>webMethods</strong>6\<strong>Developer</strong>\lib\entrust.<br />

Libraries Source<br />

<strong>webMethods</strong>6\<strong>Developer</strong>\lib\entrust<br />

Entrust Authority Security Toolkit for<br />

Java 7.2<br />

<strong>webMethods</strong>6\<strong>Developer</strong>\lib\client.jar<br />

Limitations<br />

Entrust Inc.<br />

http://www.entrust.com<br />

Jakarta ORO Source Version 2.0.5 Apache <strong>Software</strong> Foundation<br />

JavaBeans Activation Framework 1.01<br />

Java API for XML Parsing (JAXP) 1.2.2<br />

International Components for Unicode for<br />

Java Download ICU4J version 2.6<br />

http://jakarta.apache.org/oro/index.html<br />

� When <strong>Developer</strong> generates client code, it ignores input or output variables that are of<br />

type Object or Object list. Client code is not generated for these variables.<br />

� When <strong>Developer</strong> generates client code, <strong>Developer</strong> replaces any space in a variable<br />

name with an underscore.<br />

� The client code that <strong>Developer</strong> generates does not support multiple input or output<br />

variables with the same name.<br />

If you want to override these limitations, you will need to modify the client code that<br />

<strong>Developer</strong> generates.<br />

<strong>webMethods</strong> <strong>Developer</strong> User’s <strong>Guide</strong> Version 6.5, Service Pack 3 � � � 348<br />

Sun<br />

http://java.sun.com<br />

IBM<br />

http://oss.software.ibm.com/icu4j/downl<br />

oad/2.6/<br />

Xerces Java Parser 2.6.2 Apache <strong>Software</strong> Foundation<br />

http://xml.apche.org/xerces2-j/


Procedure<br />

13. Creating Client Code<br />

Use the following procedure to generate Java client code that invokes a service:<br />

To generate Java client code that invokes a service<br />

1 Open the service for which you want to generate client code.<br />

2 On the Tools menu, click Generate Code.<br />

3 In the Code Generation dialog box, select For calling this service from a client, and then<br />

click Next.<br />

4 In the Language field, select Java, and then click Next.<br />

5 Specify the directory where you want <strong>Developer</strong> to place the generated client code.<br />

Either select an existing directory or type the path for a new directory. If you type the<br />

path for a new directory, <strong>Developer</strong> creates the directory.<br />

6 Click Finish.<br />

<strong>Developer</strong> generates the file that contains the Java client code (ServiceName.java) and<br />

a Readme.txt file. The Java client code is written to the hard disk in ISO8859_1, the<br />

character set in which the file is encoded.<br />

Modify the generated client code to meet your site’s needs. You can update the client<br />

code to invoke built-in services and to use the provided Java API. For information<br />

about the built-in services that are available, see the <strong>webMethods</strong> Integration Server<br />

Built-In Services Reference. <strong>Documentation</strong> for the Java API can be found at<br />

<strong>webMethods</strong>6\<strong>Developer</strong>\doc\api\Java\index.html.<br />

To complete your client application, refer to the Readme.txt file located in the same<br />

directory as your client code.<br />

Files that Are Generated<br />

This section describes the files that <strong>Developer</strong> generates for a Java client application.<br />

File Name Description<br />

Readme.txt A file that contains information and instructions for the Java client<br />

code. Refer to this file for information about compiling and<br />

running the Java client application.<br />

ServiceName.java An example file, encoded in ISO8859_1, that contains the<br />

application code for the Java client. The application code includes<br />

a rudimentary user interface that uses the classes in the FolderName<br />

directory. It is not intended for use “as is” in custom applications.<br />

<strong>webMethods</strong> <strong>Developer</strong> User’s <strong>Guide</strong> Version 6.5, Service Pack 3 � � � 349


Building a C/C++ Client<br />

You can use <strong>Developer</strong> to generate C/C++ client code that invokes a service.<br />

Assumptions<br />

� <strong>webMethods</strong> Integration Server is running.<br />

13. Creating Client Code<br />

� A platform that has the C/C++ compiler (for example, GCC) is installed. <strong>webMethods</strong><br />

generates code for the following platforms: Windows, Solaris, HP-UX, Linux, AIX.<br />

� The client.jar file is in the classpath for <strong>Developer</strong>. The client.jar file is a <strong>webMethods</strong><br />

file that is located in the <strong>webMethods</strong>6\<strong>Developer</strong>\lib directory.<br />

� The Make facility is installed.<br />

� JDK 1.1.x is installed (if you intend to use the C libraries provided with Integration<br />

Server and <strong>Developer</strong>).<br />

Important! The provided C libraries are built using JDK 1.1.7. If you want to use a different<br />

version of the JDK to compile C/C++ services, you need to rebuild the C/C++ libraries with<br />

that JDK and then replace the old library files with the rebuilt ones. For more information<br />

about rebuilding the C libraries, see the README installed with the C/C++ SDK.<br />

To rebuild the C libraries, you need use the C/C++ SDK. The C/C++ SDK is not installed by<br />

default. To install the C/C++ SDK, select it from the list of installable components during<br />

installation.<br />

Limitations<br />

� The client code that <strong>Developer</strong> generates does not support multiple input or output<br />

variables with the same name.<br />

� When <strong>Developer</strong> generates client code, <strong>Developer</strong> replaces any space in a variable<br />

name with an underscore.<br />

If you want to override these limitations, you will need to modify the client code that<br />

<strong>Developer</strong> generates.<br />

<strong>webMethods</strong> <strong>Developer</strong> User’s <strong>Guide</strong> Version 6.5, Service Pack 3 � � � 350


Procedure<br />

13. Creating Client Code<br />

Use the following procedure to have <strong>Developer</strong> generate C/C++ client code that invokes a<br />

service:<br />

To generate C/C++ client code that invokes a service<br />

1 Open the service for which you want to generate client code.<br />

2 On the Tools menu, click Generate Code.<br />

3 In the Code Generation dialog box, select For calling this service from a client; then click<br />

Next.<br />

4 In the Language field, select the C/C++ platform for which you are creating client code.<br />

Click Next.<br />

5 Identify the directory where you want <strong>Developer</strong> to place the generated client code.<br />

Either select an existing directory or type the path for a new directory. If you type the<br />

path for a new directory, <strong>Developer</strong> creates the directory.<br />

6 Click Finish.<br />

<strong>Developer</strong> generates the file that contains the C client code (ServiceName.c), a file that<br />

contains compiling settings (ServiceName.mak), and a CReadme.txt file.<br />

Modify the generated client code to meet your site’s needs. You can update the client<br />

code to invoke built-in services and to use the <strong>webMethods</strong> provided C API. For<br />

information about the built-in services that are available, see the <strong>webMethods</strong><br />

Integration Server Built-In Services Reference. For documentation about the C API, see<br />

<strong>webMethods</strong>6\<strong>Developer</strong>\doc\api\C\index.html.<br />

To complete your client application, refer to the CReadme.txt file located in the same<br />

directory as your client code.<br />

Files that Are Generated<br />

This section describes the files that <strong>Developer</strong> generates for a C/C++ client application.<br />

File Name Description<br />

CReadme.txt A file that contains information and instructions for the C client<br />

code. Refer to this file for information about compiling, running,<br />

and deploying your C/C++ client application.<br />

ServiceName.mak A file that contains compiling settings for the C/C++ client. Be sure<br />

to update this file with the correct settings for your environment.<br />

ServiceName.c An example file that contains the C/C++ client code. It is not<br />

intended for use “as is” in custom applications.<br />

<strong>webMethods</strong> <strong>Developer</strong> User’s <strong>Guide</strong> Version 6.5, Service Pack 3 � � � 351


Building a Visual Basic Client<br />

13. Creating Client Code<br />

You can use <strong>Developer</strong> to generate Visual Basic client code that invokes a service.<br />

<strong>Developer</strong> creates files that contain the layout and the code for your application.<br />

Assumptions<br />

� <strong>webMethods</strong> Integration Server is running.<br />

� Visual Basic Version 6 is installed.<br />

� <strong>webMethods</strong> 6 Type Library is installed.<br />

Note: The <strong>webMethods</strong> 6 Type Library is a COM object that Visual Basic uses to interact<br />

with <strong>webMethods</strong> Integration Server. The <strong>webMethods</strong> 6 Type Library is automatically<br />

installed when you install <strong>Developer</strong>.<br />

Environment Setup<br />

Your system PATH environment variable must include the following directory:<br />

<strong>webMethods</strong>6\jvm\win142\jre\bin\client<br />

Limitations<br />

� The client code that <strong>Developer</strong> generates supports only input values and output<br />

values of type String, String list, and String table.<br />

� The client code that <strong>Developer</strong> generates does not support multiple input or output<br />

variables with the same name.<br />

� When <strong>Developer</strong> generates client code, <strong>Developer</strong> replaces any space in a variable<br />

name with an underscore.<br />

If you want to override these limitations, you will need to modify the client code that<br />

<strong>Developer</strong> generates.<br />

<strong>webMethods</strong> <strong>Developer</strong> User’s <strong>Guide</strong> Version 6.5, Service Pack 3 � � � 352


Procedure<br />

13. Creating Client Code<br />

Use the following procedure to have <strong>Developer</strong> generate Visual Basic client code that<br />

invokes a service.<br />

To generate Visual Basic client code that invokes a service<br />

1 Open the service for which you want to generate client code.<br />

2 On the Tools menu, click Generate Code.<br />

3 In the Code Generation dialog box, select For calling this service from a client, and click<br />

Next.<br />

4 In the Language field, select Visual Basic 5/6, and click Next.<br />

5 Identify the directory where you want <strong>Developer</strong> to place the generated client code.<br />

Either select an existing directory or type the path for a new directory. If you type the<br />

path for a new directory, <strong>Developer</strong> creates the directory.<br />

6 Click Finish.<br />

<strong>Developer</strong> generates several files, including the serviceNameReadMe.txt file. This file<br />

contains detailed information about all the generated files. Refer to it to complete your<br />

client application and for information about deploying your client application.<br />

Files that Are Generated<br />

This section describes the files that <strong>Developer</strong> generates for a Visual Basic client<br />

application.<br />

General Files<br />

File Name Description<br />

ServiceName.vbp The Visual Basic project file.<br />

ServiceNameReadme.txt The file that contains information and instructions for the<br />

Visual Basic client code. Refer to this file for information<br />

about deploying your Visual Basic client application.<br />

<strong>webMethods</strong> <strong>Developer</strong> User’s <strong>Guide</strong> Version 6.5, Service Pack 3 � � � 353


Files for the User Interface<br />

File Name Description<br />

Files Containing the Code that Invokes the Service<br />

13. Creating Client Code<br />

frmArrayInput.frm Contains layout and code that is used if any of the input<br />

values for the service are of type String list.<br />

frmOutput.frm Contains layout and code that is used when the service<br />

returns output. It also contains the Setup, Invoke, and Exit<br />

buttons.<br />

frmSetup.frm Contains layout and code that prompts for the server<br />

properties for the <strong>webMethods</strong> Integration Server on which<br />

the service to execute resides.<br />

frmStringInput.frm Contains layout and code that is used if any of the input<br />

values for the service are of type String.<br />

frmTableInput.frm Contains layout and code that is used if any of the input<br />

values for the service are of type String table.<br />

wmSampleLib.bas Contains code that is specific to the sample template that<br />

<strong>Developer</strong> generates.<br />

File Name Description<br />

ServiceName.bas An example file that illustrates how to use the service class<br />

in an application. This module is dependent on objects in the<br />

project template that <strong>webMethods</strong> provides. It is not<br />

intended for use “as is” in custom applications.<br />

ServiceName.cls The service object. You include this object in your own<br />

project.<br />

File Containing the Code that Interacts with <strong>webMethods</strong> Integration Server<br />

File Name Description<br />

wmVBConnection.bas Code used as a layer of abstraction to interact with<br />

<strong>webMethods</strong> Integration Server.<br />

<strong>webMethods</strong> <strong>Developer</strong> User’s <strong>Guide</strong> Version 6.5, Service Pack 3 � � � 354


Building an Excel Client<br />

13. Creating Client Code<br />

You can use <strong>Developer</strong> to generate client code that executes a service from a MS Excel<br />

spreadsheet.<br />

Assumptions<br />

� <strong>webMethods</strong> Integration Server is running.<br />

� Excel 97 or Excel 2000 is installed.<br />

� <strong>webMethods</strong> 6 Type Library is installed.<br />

Note: The <strong>webMethods</strong> 6 Type Library is a COM object that Visual Basic uses to interact<br />

with <strong>webMethods</strong> Integration Server. The <strong>webMethods</strong> 6 Type Library is automatically<br />

installed when you install <strong>Developer</strong>.<br />

Limitations<br />

� The client code that <strong>Developer</strong> generates only supports input values of type String<br />

and output values of type String, String list, and String table.<br />

� The client code that <strong>Developer</strong> generates does not support multiple input or output<br />

variables with the same name.<br />

� When <strong>Developer</strong> generates client code, <strong>Developer</strong> replaces any space in a variable<br />

name with an underscore.<br />

If you want to override these limitations, you will need to modify the client code that<br />

<strong>Developer</strong> generates.<br />

Procedure<br />

Use the following procedure to have <strong>Developer</strong> generate Excel client code that invokes a<br />

service.<br />

To generate Excel client code that invokes a service<br />

1 Open the service for which you want to generate client code.<br />

2 On the Tools menu, click Generate Code.<br />

3 In the Code Generation dialog box, select For calling this service from a client, and click<br />

Next.<br />

4 In the Language field, select Excel 97/2000, and click Next.<br />

<strong>webMethods</strong> <strong>Developer</strong> User’s <strong>Guide</strong> Version 6.5, Service Pack 3 � � � 355


13. Creating Client Code<br />

5 Identify the directory where you want <strong>Developer</strong> to place the generated client code.<br />

Either select an existing directory or type the path for a new directory. If you type the<br />

path for a new directory, <strong>Developer</strong> creates the directory.<br />

6 Click Finish.<br />

<strong>Developer</strong> generates several files, including the serviceNameReadMe.txt file. This file<br />

contains detailed information about all generated files.<br />

7 Copy the wmXLTemplate.xls file, which <strong>webMethods</strong> provides, to the directory that<br />

contains the client code that <strong>Developer</strong> generated. The wmXLTemplate.xls file is<br />

located in the <strong>webMethods</strong>6\<strong>Developer</strong>\support\Excel directory.<br />

8 Open the wmXLTemplate.xls file. When prompted to indicate whether you want to<br />

enable macros, select Enable Macros.<br />

9 Follow the instructions in the wmXLTemplate.xls file to complete your client<br />

application. See the ServiceNameReadMe.txt file for information about deploying your<br />

client application.<br />

Files that Are Generated<br />

This section describes the files that <strong>Developer</strong> generates for an Excel client application.<br />

File Name Description<br />

ServiceNameReadMe.txt A file that contains information and instructions for the<br />

Visual Basic client code. Refer to this file for information<br />

about deploying your Visual Basic client application.<br />

ServiceName.bas An example file that illustrates how to use the service class<br />

in a spreadsheet. This module is dependent on objects in the<br />

project template that <strong>webMethods</strong> provides. It is not<br />

intended for use “as is” in custom applications.<br />

ServiceName.cls The service object. You include this object into your own<br />

project.<br />

Building a Browser-Based Client<br />

You can invoke a service with a URL. This means that you can invoke a service by entering<br />

the URL into your Web browser or by embedding the URL in Web pages.<br />

To build a browser-based client, create one or more Web pages that invoke URLs for one<br />

or more services. When <strong>webMethods</strong> Integration Server receives the first URL from a Web<br />

browser, it creates a session for the client on <strong>webMethods</strong> Integration Server. The session<br />

information is stored in a cookie in the browser. As the user of the browser-based<br />

application clicks on links to URLs that invoke services, <strong>webMethods</strong> Integration Server<br />

<strong>webMethods</strong> <strong>Developer</strong> User’s <strong>Guide</strong> Version 6.5, Service Pack 3 � � � 356


13. Creating Client Code<br />

uses the cookies to find session information for the client. <strong>webMethods</strong> Integration Server<br />

keeps the session information for the client until the session expires. Sessions expire based<br />

on the configured session time-out value. For more information about setting the session<br />

time-out limit, refer to the <strong>webMethods</strong> Integration Server Administrator’s <strong>Guide</strong>.<br />

Note: You cannot use <strong>Developer</strong> to generate browser-based clients.<br />

Assumptions<br />

� <strong>webMethods</strong> Integration Server is running.<br />

� The input values for the services you want to invoke are determined. You will need to<br />

include the input values in the URL that you use to invoke a service.<br />

Limitations<br />

When you test a service using the Run in Browser command, only input values of the type<br />

String and String list will be passed to the service. Input values of the type document,<br />

document list, Object, and Object list will not be displayed when the Web page is served.<br />

Invoking Services with a URL<br />

First, build your Web pages using any tool you choose. To invoke the URL, use either the<br />

HTTP GET or the POST method. In either case, use a URL similar to the following:<br />

Item Description<br />

1<br />

2<br />

3<br />

1 2 3 4 5<br />

http://IS_server:5555/invoke/sample.webPageDemo/getProductCost?sku=A1&quantity=1<br />

Identifies the <strong>webMethods</strong> Integration Server on which the service you want<br />

to invoke resides.<br />

Specifies the required keyword “invoke”, which tells <strong>webMethods</strong><br />

Integration Server that the URL identifies a service that is to be invoked.<br />

Identifies the folder in which the service to invoke resides. Separate<br />

subfolders with periods. This field is case sensitive. Be sure to use the same<br />

combination of upper and lower case letters as specified in the folder name<br />

on <strong>webMethods</strong> Integration Server.<br />

<strong>webMethods</strong> <strong>Developer</strong> User’s <strong>Guide</strong> Version 6.5, Service Pack 3 � � � 357


Using the HTTP GET Method<br />

13. Creating Client Code<br />

Item Description<br />

4 Identifies the service that you want to invoke. This field is case sensitive. Be<br />

sure to use the same combination of upper and lower case letters as specified<br />

in the service name on <strong>webMethods</strong> Integration Server.<br />

5<br />

Specifies the input values for the service. Specify a question mark (?) before<br />

the input values. The question mark signals the beginning of input values.<br />

Each input value is represented as variable=value. The variable portion is case<br />

sensitive. Be sure to use the same combination of upper and lower case<br />

letters as specified in your service. If your service requires more than one<br />

input value, separate each variable=value with an ampersand (&).<br />

Note: Only specify this part of the URL when using the HTTP GET method.<br />

Note: If you are serving the Web pages that invoke services from a <strong>webMethods</strong><br />

Integration Server, you can use a relative URL to invoke the service. By doing so, you can<br />

serve the exact Web page from several servers without having to update the URLs.<br />

To use the GET method, embed a URL that includes all the input values for the service in<br />

the query string portion of the URL. When the server receives the URL, it translates the<br />

input values into an IData object. For more information about how the server creates the<br />

IData object that it sends to the service, refer to “Input to the Service” on page 359.<br />

Using the HTTP POST Method<br />

To use the POST method, create an HTML form in your Web page. Create fields in the<br />

HTML form in which a user will supply the input information. The values you specify for<br />

the NAME attributes of the HTML form fields should match the names of input values<br />

that the service expects. Be sure to use the exact combination of upper and lower case<br />

letters as specified in your service. For example, if your service requires the input values<br />

sku and quantity, you might create an HTML form with the following fields:<br />

<br />

A1<br />

B2<br />

C3<br />

<br />

<br />

<strong>webMethods</strong> <strong>Developer</strong> User’s <strong>Guide</strong> Version 6.5, Service Pack 3 � � � 358


13. Creating Client Code<br />

Specify the URL for the service in the ACTION attribute and “POST” in the METHOD<br />

attribute. For example:<br />

<br />

After the user fills in the form and submits it, the Web browser creates a document that<br />

contains the information the user supplied in the HTML form (performs an HTTP POST).<br />

The browser invokes the URL identified in the ACTION attribute, which invokes the<br />

service on <strong>webMethods</strong> Integration Server, and the browser posts the document that<br />

contains the user’s input information to <strong>webMethods</strong> Integration Server. For more<br />

information about how the server creates the IData object that it sends to the service, see<br />

“Input to the Service” on page 359.<br />

Input to the Service<br />

Regardless of whether <strong>webMethods</strong> Integration Server receives a URL that uses the HTTP<br />

GET or POST method, it creates an IData object from the input information. It then passes<br />

the IData object to the specified service. This becomes the pipeline upon which the service<br />

operates.<br />

To create the pipeline object, <strong>webMethods</strong> Integration Server creates two key/value pairs<br />

for each input value: one of type String and one of type String list. For example, if the<br />

input values contain the variable sku with value A1 and quantity with value 1, the service is<br />

passed the following IData object:<br />

Key Value Data Type<br />

sku A1 String<br />

skuList A1 String list<br />

quantity 1 String<br />

quantityList 1 String list<br />

Note: Avoid using input variable names that end in “List.” Although the Integration Server<br />

will accept variable names ending in “List,” the resulting IData may not be structured in<br />

the way you need. For example, if you were to pass in a variable called “skuList,” the<br />

resulting IData will contain a String called “skuList” and a String list called “skuListList.”<br />

Moreover, if you were to pass in variables named “sku” and “skuList,” subsequent “sku”<br />

and “skuList” variables in the query string may not be placed in the IData fields as<br />

expected.<br />

If you must use “List” at the end of your variable name, consider using “list” (lowercase)<br />

or appending one or more characters at the end of the name (for example, abcListXX).<br />

<strong>webMethods</strong> <strong>Developer</strong> User’s <strong>Guide</strong> Version 6.5, Service Pack 3 � � � 359


13. Creating Client Code<br />

When the server receives multiple input values that are associated with the same variable<br />

name, the String variable in the IData object contains only the value of the first variable;<br />

the String list variable contains all values. For example, the following shows a URL that<br />

contains two values for the variable year and the resulting IData object that the server<br />

creates:<br />

/invoke/sample.webPageDemo/checkYears?year=1998&year=1999<br />

Key Value Data Type<br />

year 1998 String<br />

yearList 1998<br />

1999<br />

String list<br />

Similarly, if the HTML form contains two fields with the same name and a user supplies<br />

values for more than one, the String variable in the IData object contains only the value of<br />

the first variable; the String list variable contains all values. For example, the following<br />

shows sample HTML code that renders check boxes:<br />

Blue<br />

Green<br />

Red<br />

If the browser user selects all check boxes, the document that is posted to <strong>webMethods</strong><br />

Integration Server will contain three values for the variable named Color. The following<br />

shows the IData object that the server passes to the service:<br />

Key Value Data Type<br />

Color blue String<br />

ColorList blue<br />

green<br />

red<br />

String list<br />

Output from the Service<br />

By default, <strong>webMethods</strong> Integration Server displays the output from a service in a HTML<br />

Web page, using a table to render the output values. However, you can format the output<br />

using output templates. You can use an output template that formats the output from one<br />

service and includes a URL that invokes another service. For more information about<br />

output templates, see “Assigning an Output Template to a Service” on page 134.<br />

<strong>webMethods</strong> <strong>Developer</strong> User’s <strong>Guide</strong> Version 6.5, Service Pack 3 � � � 360


Chapter 14. Subscribing to Events<br />

� The Event Manager . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 362<br />

� Managing Event Subscriptions . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 364<br />

� Building an Event Handler . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 370<br />

� Working with Alarm Events . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 372<br />

� Working with Audit Events . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 374<br />

� Working with Exception Events . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 376<br />

� Working with Guaranteed Delivery Events . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 377<br />

� Working with Port Status Events . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 380<br />

� Working with Replication Events . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 381<br />

� Working with Session Events . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 382<br />

� Working with Stat Events . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 384<br />

� Working with Transaction Events . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 386<br />

<strong>webMethods</strong> <strong>Developer</strong> User’s <strong>Guide</strong> Version 6.5, Service Pack 3 � � � 361


The Event Manager<br />

14. Subscribing to Events<br />

The Event Manager monitors the server for events and invokes event handlers when those<br />

events occur. An event is a specific action that the Event Manager recognizes and an event<br />

handler can react to. An event handler is a service that you write to perform some action<br />

when a particular event occurs.<br />

Currently, the Event Manager recognizes the following types of events:<br />

� Alarm events occur when the Integration Server throws an exception regarding the<br />

status or health of the server. The server generates alarm events when a user cannot<br />

log on to the server, a port cannot be started, a user is denied access to a port, an error<br />

occurs in Cluster Manager, or a service cannot execute because of errors. Subscribe to<br />

alarm events to invoke event handlers that perform specific actions such as notifying<br />

administrators about port access exceptions and service failures, or sending<br />

information to a console when a port cannot be started.<br />

� Audit events occur when a service generates audit data. Subscribe to audit events to<br />

invoke specific actions when a particular service or class of service executes.<br />

� Exception events occur every time a service throws an exception. Subscribe to exception<br />

events to invoke specific event handlers when a particular service or class of service<br />

fails.<br />

� Guaranteed Delivery events occur when a client uses guaranteed delivery to invoke a<br />

service on a Integration Server and when the server returns the service results to the<br />

requesting client. There are two types of guaranteed delivery events: GD Start and GD<br />

End. Subscribe to GD Start and GD End events to invoke event handlers that perform<br />

actions such as logging guaranteed delivery transactions to a file or sending<br />

notification.<br />

� Port Status events occur each time the Integration Server updates the server statistics.<br />

The port status event provides information about the status of all the ports configured<br />

on Integration Server. Subscribe to port status events to invoke event handlers that<br />

perform actions such as sending port status data to a network monitoring system or<br />

writing port status data to a log file.<br />

� Replication events occur when the pub.replicator:generateReplicationEvent service executes.<br />

Subscribe to replication events to invoke event handlers that perform actions such as<br />

notifying package subscribers when a package is published and maintaining a log of<br />

pulled or distributed packages.<br />

� Session events occur when a client starts or ends a session on the Integration Server or<br />

when the Integration Server terminates an inactive session. There are three types of<br />

session events: session start, session end, and session expire. Subscribe to session<br />

events to invoke event handlers that perform actions such as maintaining your own<br />

log files.<br />

<strong>webMethods</strong> <strong>Developer</strong> User’s <strong>Guide</strong> Version 6.5, Service Pack 3 � � � 362


14. Subscribing to Events<br />

� Stat events occur each time the Integration Server updates the statistics log (stats.log).<br />

Subscribe to stat events to invoke event handlers that perform actions such as<br />

maintaining your own log file or sending server statistics to a network monitoring<br />

system.<br />

� Transaction events occur when an Integration Server begins and finishes processing a<br />

guaranteed delivery transaction. There are two types of transaction events: Tx Start<br />

and Tx End. Subscribe to transaction events to invoke event handlers that perform<br />

specific actions (such as sending notification or logging information) when a<br />

particular guaranteed delivery transaction begins or finishes processing.<br />

What Are Event Handlers?<br />

An event handler is a service that you write to perform some action when a particular event<br />

occurs. (An event handler can be any type of service, such as a flow service or a Java<br />

service.) Event handlers subscribe to the events that they want to be notified of. For<br />

example, if you wanted an event handler to execute when a particular service throws an<br />

exception, you subscribe the event handler to the exception event for that service.<br />

What Happens When an Event Occurs?<br />

When an event occurs, the Event Manager automatically invokes all event handlers that<br />

subscribe to the event. The event handlers receive an input object containing run-time<br />

information. The exact content of this input object varies depending on the type of event<br />

that occurred and, for audit events, the run-time properties set on both Integration Server<br />

and the service that generated the event.<br />

Once an event handler is invoked, its execution is completely asynchronous of the event<br />

that invoked it. If the execution of a service invokes an event handler (as with audit and<br />

exception events), the execution path of the invoking service is not blocked or altered in<br />

any way (in fact, it is never even aware that it invoked an event handler).<br />

Other points to keep in mind about events and event handlers:<br />

� An event can have more than one subscriber, which means that a single event might<br />

invoke several event handlers.<br />

� If an event invokes more than one event handler, all the event handlers execute<br />

simultaneously. They do not execute serially and they are not invoked in any<br />

particular order. (If you have a series of actions that must execute in a specific<br />

sequence, you should encapsulate the entire sequence within a single event handler.)<br />

� An event handler can subscribe to more than one event.<br />

� When event handlers run, they do not generate audit events.<br />

� If an event handler throws an exception, it generates an exception event. This is true<br />

for all event handlers but exception event handlers. When an exception event handler<br />

throws an exception, it does not generate an exception event.<br />

<strong>webMethods</strong> <strong>Developer</strong> User’s <strong>Guide</strong> Version 6.5, Service Pack 3 � � � 363


Managing Event Subscriptions<br />

To subscribe to an event,<br />

specify the type of event<br />

that you want to react to...<br />

...a filter to select the<br />

specific events you want<br />

to react to...<br />

...and the name of the<br />

event handler that is to<br />

be executed when this<br />

event occurs.<br />

14. Subscribing to Events<br />

You can use the Event Manager in <strong>Developer</strong> to manage all of your event subscriptions.<br />

The Event Manager can perform the following tasks:<br />

� Subscribe event handlers to events.<br />

� View or edit event subscriptions.<br />

� Suspend event subscriptions.<br />

� Delete event subscriptions.<br />

The following sections contain more information about each of these tasks.<br />

Note: You can also use built-in services to add, modify, and delete event subscriptions.<br />

These services are located in the pub.event folder. For more information about built-in<br />

services, see the <strong>webMethods</strong> Integration Server Built-In Services Reference.<br />

Subscribing to an Event<br />

You can use the Event Manager in <strong>Developer</strong> to subscribe to an event on the current<br />

server. This action registers the event handler with the Event Manager and specifies which<br />

events will invoke it. To access the Event Manager, use the Tools�Event Manager command.<br />

Use the Event Manager in <strong>Developer</strong> to subscribe to events<br />

Use the following procedure to subscribe to an event on the current server. To perform<br />

this procedure, you must have already:<br />

� Identified the event type you want to subscribe to<br />

� Identified the service or services that generate an event you want to subscribe to (if<br />

you want to subscribe to an audit event, exception event, or GD Start event)<br />

� Written the event handler that will execute when the identified event occurs<br />

<strong>webMethods</strong> <strong>Developer</strong> User’s <strong>Guide</strong> Version 6.5, Service Pack 3 � � � 364


To subscribe to an event on the current server<br />

1 On the Tools menu, click Event Manager.<br />

14. Subscribing to Events<br />

2 In the Event Manager dialog box, in the View event subscribers for list, select the event<br />

type to which you want to subscribe.<br />

3 Click to add a new subscriber.<br />

4 In the Enter Input Values dialog box, complete the following fields:<br />

In this field... Specify...<br />

Service The fully qualified name of the event handler that will subscribe to the<br />

event (that is, the service that will execute when the event occurs). You<br />

can either type the name in the Service field or click to locate and<br />

select the service from a list.<br />

Example: sgxorders.Authorization:LogAuthTrans<br />

Filter A pattern string to further limit the events this event handler<br />

subscribes to. Filters vary depending on the event type you are<br />

subscribing to.<br />

For example, if you are subscribing to an audit or exception event,<br />

create a filter to specify the names of services whose events this event<br />

handler subscribes to (that is, the services that, when executed, will<br />

invoke the event handler specified in Service).<br />

You can use the * character as a wildcard (this is the only wildcard<br />

character recognized by this pattern string). The pattern string is case<br />

sensitive.<br />

For more information about creating event filters, see “Creating Event<br />

Filters” on page 366.<br />

Comment An optional descriptive comment about this subscription.<br />

Enabled Whether the subscription is active or inactive. Set to true to activate the<br />

subscription. Set to false to deactivate the subscription. (This allows<br />

you to temporarily suspend a subscription without deleting it.)<br />

5 Click OK. Subscriptions take effect immediately.<br />

Note: The Integration Server saves information for event types and event subscriptions in<br />

the eventcfg.bin file. This file is generated the first time you start the Integration Server<br />

and is located in the following directory: <strong>webMethods</strong>6\IntegrationServer\config. Copy<br />

this file from one Integration Server to another to duplicate event subscriptions across<br />

servers.<br />

<strong>webMethods</strong> <strong>Developer</strong> User’s <strong>Guide</strong> Version 6.5, Service Pack 3 � � � 365


Creating Event Filters<br />

14. Subscribing to Events<br />

Event filters allow you to be very selective about which events you subscribe to. Event<br />

filters limit the events for an event type that invoke an event handler. By using event<br />

filters, you can subscribe an event handler to only those events generated by a particular<br />

service, package, user, or port. For example, you might want an event handler to be<br />

invoked only when a specific service generates an audit event. Or, you might want an<br />

event handler to be invoked only when a specific user logs on to the Integration Server.<br />

The following table identifies the information that you can filter on for each event type.<br />

Notice that you cannot create a filter for some event types. For these event types, every<br />

generated event invokes the event handlers subscribed to it.<br />

Important! The asterisk (*) is the only wildcard character allowed in an event filter. All other<br />

characters in the pattern string are treated as literals. Pattern strings are case sensitive.<br />

For this event type... You create a filter for...<br />

Alarm Event The message generated by the alarm event. Create a filter that<br />

specifies some of the text of the message. The event handler with<br />

this filter will process all alarm events containing the specified<br />

text.<br />

The following filter specifies that any alarm events that generate<br />

a message containing the word “port” will invoke the event<br />

handler:<br />

*port*<br />

Audit Event The fully qualified name of the service that generates the audit<br />

event. Create a filter to specify the services whose audit events<br />

you want to invoke the event handler.<br />

The following filter specifies that the service<br />

sgxorders.Authorization:creditAuth will invoke the event handler:<br />

sgxorders.Authorization:creditAuth<br />

Exception Event The fully qualified name of the service that generates the<br />

exception event. Create a filter to specify the services whose<br />

exception events you want to invoke the event handler.<br />

The following filter specifies that all services that start with the<br />

word “credit” and belong to any folder will invoke the event<br />

handler:<br />

*:credit*<br />

<strong>webMethods</strong> <strong>Developer</strong> User’s <strong>Guide</strong> Version 6.5, Service Pack 3 � � � 366


For this event type... You create a filter for...<br />

GD End Event N/A<br />

14. Subscribing to Events<br />

The filter for all GD End events is the following:<br />

*<br />

GD Start Event The fully qualified name of the service that is being invoked<br />

using guaranteed delivery. Create a filter to specify the services<br />

that, when invoked using guaranteed delivery, will invoke the<br />

event handler.<br />

Port Status Event N/A<br />

The following pattern string specifies that all services that start<br />

with the word “sendPO” and belong to any folder will invoke the<br />

event handler:<br />

*:sendPO*<br />

The filter for all port status events is the following:<br />

*<br />

Replication Event The name of the package being replicated. Create a filter to<br />

specify the packages that, when replicated, will invoke the event<br />

handler.<br />

Session End Event N/A<br />

The following filter specifies that a replication event involving<br />

the package named “AcmePartnerPkg” will invoke the event<br />

handler:<br />

AcmePartnerPkg<br />

The filter for all session end events is the following:<br />

*<br />

Session Expire Event N/A<br />

The filter for all session expire events is the following:<br />

*<br />

Session Start Event The user name for the user starting the session on the Integration<br />

Server or the groups to which the user belongs. Create a filter to<br />

specify which users or which user groups invoke an event<br />

handler when they start a session on the server.<br />

The following filter specifies that a session start event generated<br />

by a user in the “Administrators” group will invoke the event<br />

handler.<br />

*Administrators*<br />

<strong>webMethods</strong> <strong>Developer</strong> User’s <strong>Guide</strong> Version 6.5, Service Pack 3 � � � 367


For this event type... You create a filter for...<br />

Stat Event N/A<br />

The filter for all stat events is the following:<br />

*<br />

Tx End Event N/A<br />

The filter for all Tx End events is the following:<br />

*<br />

Tx Start Event N/A<br />

Creating Event Filters for Services<br />

The filter for all Tx Start events is the following:<br />

*<br />

14. Subscribing to Events<br />

When you create a filter for a service name, you can be very selective about which<br />

service’s events you subscribe to. You can use regular expressions to create event filters for<br />

service names. The following examples show ways you can use regular expressions as<br />

event filters to specify an event that a particular service generates.<br />

This filter... Will select events generated by...<br />

sgxorders.Auth:creditAuth The service sgxorders.Auth:creditAuth.<br />

sgxorders.Auth:credit* All services in the sgxorders.Auth folder, starting with<br />

the characters “credit.”<br />

sgxorders.Auth:* All services in the sgxorders.Auth folder.<br />

sgxorders.* All services in the sgxorders folder and its subfolders.<br />

*.Auth*:credit* All services starting with the characters “credit” that<br />

reside in any subfolder whose name starts the<br />

characters “Auth.”<br />

*:credit* All services starting with the characters “credit” in<br />

any folder.<br />

* All services.<br />

<strong>webMethods</strong> <strong>Developer</strong> User’s <strong>Guide</strong> Version 6.5, Service Pack 3 � � � 368


Viewing and Editing Event Subscriptions<br />

To view or edit an event subscription on the current server<br />

1 On the Tools menu, click Event Manager.<br />

14. Subscribing to Events<br />

2 In the View event subscribers for list, select the event type for which you want to view<br />

subscriptions.<br />

3 Click the subscription you want to edit, and then click .<br />

4 Modify the fields in the Enter Input Values dialog box as needed and then click OK.<br />

5 Repeat steps 2–4 for each subscription you want to view or edit.<br />

6 Click OK when you finish viewing or editing event subscriptions. Your changes take<br />

effect immediately.<br />

Suspending Event Subscriptions<br />

You can suspend an event subscription. By suspending an event subscription, you<br />

temporarily stop the execution of the event handler without deleting or removing the<br />

event handler. While the event subscription is suspended, the Event Manager does not<br />

invoke the associated event handler when the server generates the event to which it is<br />

subscribed. You can resume an event subscription at any time.<br />

To suspend an event subscription<br />

1 On the Tools menu, click Event Manager.<br />

2 In the Event Manager dialog box, in the View event subscribers for list, select the event<br />

type for which you want to suspend a subscription.<br />

3 Click the subscription you want to edit, and then click .<br />

4 In the Enter Input Values dialog box, in the Enabled list, select false.<br />

5 Repeat steps 2–4 for each event subscription you want to suspend.<br />

6 Click OK when you finish suspending event subscriptions. Your changes take effect<br />

immediately.<br />

<strong>webMethods</strong> <strong>Developer</strong> User’s <strong>Guide</strong> Version 6.5, Service Pack 3 � � � 369


Deleting an Event Subscription<br />

To delete an event subscription<br />

1 On the Tools menu, click Event Manager.<br />

14. Subscribing to Events<br />

2 In the Event Manager dialog box, in the View event subscribers for list, select the event<br />

type for which you want to delete a subscription.<br />

3 Click the subscription you want to delete, and then click .<br />

4 Repeat steps 2 and 3 for each subscription you want to delete.<br />

5 Click OK when you finish deleting events. Your changes take effect immediately.<br />

Building an Event Handler<br />

Building an event handler involves the following basic stages:<br />

Stage 1<br />

Stage 2<br />

Stage 3<br />

Stage 4<br />

Stage 5<br />

Creating an empty service. During this stage, you create the empty service that<br />

you want to use as an event handler.<br />

Declaring the input and output. During this stage, you declare the input and<br />

output parameters for the event handler by selecting the specification or IS<br />

document type for the event type in pub.event. The specification and IS<br />

document type indicate the run-time data that will be contained in the IData<br />

object passed to the event handler.<br />

Inserting logic, code, or services. During this stage, you insert the logic, code,<br />

or services to perform the action you want the event handler to take when<br />

the event occurs. If you are building a flow service, make sure to link data<br />

between services and the pipeline.<br />

Testing and debugging the service. During this stage, you use the testing and<br />

debugging tools available in <strong>Developer</strong> to make sure the event handler<br />

works properly.<br />

Subscribing to the event. During this stage, you use the Event Manager to<br />

subscribe the event handler to the event. This action registers the event<br />

handler with the Event Manager and specifies which events will invoke it.<br />

You can create filters to be more selective about which events you subscribe<br />

to.<br />

<strong>webMethods</strong> <strong>Developer</strong> User’s <strong>Guide</strong> Version 6.5, Service Pack 3 � � � 370


Sample Event Handler<br />

14. Subscribing to Events<br />

Following are instructions for building an event handler named processLogon. The<br />

processLogon event handler sends a notification to a specified email address (such as the<br />

Server Administrator) when anyone in the Administrators group logs in to the Integration<br />

Server.<br />

Stage 1 To create the event handler<br />

� Create an empty flow service and name it processLogon.<br />

Stage 2 To assign input and output parameters to the event handler<br />

1 On the Input/Output tab, next to the Specification Reference field, click .<br />

2 In the Select dialog box, navigate to and select the pub.event:sessionStart specification.<br />

3 Click OK.<br />

Stage 3 To insert services into the event handler<br />

1 On the editor toolbar, click and select Browse.<br />

2 In the Browse dialog box, navigate to and select the pub.client:smtp service. Click OK.<br />

3 On the Pipeline tab, use the Set Value modifier to assign values to the following<br />

variables in Service In:<br />

For this field… Specify…<br />

to The email address for the person to send event notification to.<br />

subject<br />

%userid% logged in<br />

The subject of the email message will contain the user ID of the<br />

person who logged on to the Integration Server as a member of the<br />

Administrators group.<br />

mailhost The network name of your mailhost (for example,<br />

mail@mycompany.com).<br />

body<br />

Administrators user %userid% logged into session<br />

%sessionName% with session ID %ssnid%<br />

The body of the email message will contain the user name, session<br />

name, and session ID for the person who logged on to the<br />

Integration Server as an Administrator.<br />

4 On the File menu, click Save to save the service.<br />

<strong>webMethods</strong> <strong>Developer</strong> User’s <strong>Guide</strong> Version 6.5, Service Pack 3 � � � 371


Stage 4 To test and debug the event handler<br />

14. Subscribing to Events<br />

� Use the testing and debugging tools in <strong>Developer</strong> (such as Test�Run) to test and<br />

debug the service. For more information about these tools, see Chapter 11, “Testing<br />

and Debugging Services”.<br />

Stage 5 To subscribe the event handler to the event<br />

1 On the Tools menu, click Event Manager.<br />

2 In the Event Manager dialog box, in the View event subscribers for list, select Session Start<br />

Event.<br />

3 Click to add a new event subscription.<br />

4 In the Enter Input Values dialog box, complete the following fields:<br />

In this field… Do this…<br />

5 Click OK. Subscriptions take effect immediately.<br />

Working with Alarm Events<br />

Service Click and use the Select dialog box to navigate to and select the<br />

Filter<br />

processLogon service.<br />

Type: *Administrators*<br />

This pattern string specifies that the processLogon event handler will<br />

execute only when a user belonging to a user group containing the<br />

string “Administrators” logs on to the server.<br />

For more information, see “Building Handlers for Session Start<br />

Events” on page 383.<br />

Comment Specify a descriptive comment about this subscription.<br />

Enabled Select true to activate the subscription.<br />

An alarm event occurs when the Integration Server generates a message related to the<br />

status of the server. An alarm event can be generated for the following reasons:<br />

� A client experiences a logon failure or is denied access to the Integration Server. A<br />

client cannot log on because of “invalid credentials.”<br />

� Errors occur in the Cluster Manager. The inability to add a port to a cluster can cause<br />

errors in Cluster Manager.<br />

<strong>webMethods</strong> <strong>Developer</strong> User’s <strong>Guide</strong> Version 6.5, Service Pack 3 � � � 372


14. Subscribing to Events<br />

� A user tries to access a port and is denied access to the port. (This can happen when a<br />

user tries to execute a service not allowed on the port.) This type of alarm event is<br />

sometimes called a port access exception.<br />

� A port cannot be started. The most common reason a port cannot start is that the port<br />

is being accessed by another application.<br />

� A service cannot be loaded or executed due to setup errors. For a flow service, a<br />

possible error is a missing XML metafile. For a Java service, possible errors include a<br />

missing class file or method.<br />

You can use alarm events to invoke event handlers that execute when the server generates<br />

messages related to the status of the server. For example, you might want to create an<br />

event handler that notifies the administrator when a user is denied access to the server or<br />

to a port, when a service fails to load or execute, or when a port does not start. You can<br />

also create event handlers to send data to a network monitoring system.<br />

Building Handlers for Alarm Events<br />

When the Event Manager invokes an event handler for an alarm event, the event handler<br />

receives an IData object containing the following run-time data. (A specification and IS<br />

document type for these parameters are provided in the pub.event folder.)<br />

Key Description<br />

time A String containing the date and time that the alarm event occurred, in<br />

the format yyyy/MM/dd HH:mm:ss.SS<br />

service A String containing the fully qualified name of the service that generated<br />

the event. A service can generate an alarm event when a client invokes a<br />

service that accesses information or a service on a remote server. If the<br />

client is not a member of an allowed group for the port on the remote<br />

server, the service will generate an alarm event.<br />

sessionID A String containing the identification number for the session during<br />

which the alarm event was generated. Some alarm events are not<br />

generated during sessions. In these cases, the sessionID variable will not<br />

contain a value.<br />

msg A String containing the error message from the alarm event.<br />

Tip! When you subscribe an event handler to an alarm event, you can create a filter for the<br />

msg field to be more selective about the alarm events that invoke the event handler.<br />

<strong>webMethods</strong> <strong>Developer</strong> User’s <strong>Guide</strong> Version 6.5, Service Pack 3 � � � 373


Working with Audit Events<br />

14. Subscribing to Events<br />

An audit event occurs when a service generates audit data. You can use the options in a<br />

service’s Audit properties to specify when a service generates audit data. A service can<br />

generate audit data once, twice, or zero times during execution. You can use audit events<br />

to invoke other services when a particular service executes. For example, you might want<br />

an audit event generated for a critical service to invoke a logging service or a notification<br />

service. For more information about specifying when a service generates audit data, see<br />

“Configuring Service Auditing” on page 148.<br />

Building Handlers for Audit Events<br />

When the Event Manager invokes an event handler for an audit event, the event handler<br />

receives an IData object that contains the following run-time data. (A specification and an<br />

IS document type for the input data are provided in the pub.event folder.)<br />

Key Description<br />

time A String containing the date and time the event occurred. By default, the<br />

format is yyyy-MM-dd HH:mm:ss z. You can set the format by specifying<br />

the watt.server.dateStampFmt property. For instructions about how to<br />

specify server property settings, see the <strong>webMethods</strong> Integration Server<br />

Administrator’s <strong>Guide</strong>.<br />

threadID A String containing the hash identifying the server thread that generated<br />

the audit event.<br />

service A String containing the fully qualified name of the service that generated<br />

the event.<br />

ssnid A String containing the identification number for the session of the service<br />

that generated the event.<br />

result A String indicating the audit point. Will be one of the following:<br />

String Description<br />

Started This event marks the beginning of a service.<br />

Ended This event marks the end of a service that executed<br />

successfully.<br />

<strong>webMethods</strong> <strong>Developer</strong> User’s <strong>Guide</strong> Version 6.5, Service Pack 3 � � � 374


Key Description<br />

14. Subscribing to Events<br />

Failed This event marks the end of a service that executed<br />

unsuccessfully (that is, threw an exception) and is not<br />

configured to retry or has exhausted all retries.<br />

Note: To capture details about any exception that is thrown<br />

when a service fails, you must subscribe to Exception Events.<br />

For information about Exception Events, see the following<br />

section.<br />

Retried A retried event will be created each time a service is retried.<br />

Events are only created for a service if auditing for that type<br />

of event is enabled for the service (for example, start events<br />

will not be created unless auditing for service start is enabled<br />

for that service).<br />

pipeline A copy of the state of the pipeline at the point where the event occurred.<br />

Note that this element is only included in the input object if the Include<br />

pipeline property is set to Always or On errors only or if the watt.server.auditLog<br />

server property is set to verbose. For more information about the Include<br />

pipeline property in the Audit category of the Properties panel, see<br />

“Including the Pipeline in the Audit Log” on page 151.<br />

user A String containing the user name that invoked the service that generated<br />

the event.<br />

The audit event handlers that you build can make use of these inputs as they need to.<br />

Keep in mind that when the service’s Log on option is set to Error, success, and start an audit<br />

event handler is called twice each time a service runs: once when the service starts and<br />

again when it ends. Your event handler can check the value of the result parameter to<br />

determine whether it is processing an audit event from before or after the service<br />

executed. For more information about the Log on property in the Audit category of the<br />

Properties panel, see “Specifying When Audit Data Is Generated” on page 149.<br />

Also, if your event handler needs data from the invoking service’s pipeline, make sure that<br />

service’s Include pipeline option is set to Always or On errors only. Otherwise, the pipeline<br />

element won’t be included in the input object that is passed to your event handler.<br />

Tip! When you subscribe an event handler to an audit event, you can create a filter for the<br />

service field to specify the services whose audit events you want to subscribe to. That is,<br />

you can specify which services’ audit events invoke the event handler.<br />

<strong>webMethods</strong> <strong>Developer</strong> User’s <strong>Guide</strong> Version 6.5, Service Pack 3 � � � 375


Working with Exception Events<br />

14. Subscribing to Events<br />

An exception event occurs when a service throws an exception (including when a flow<br />

service “exits on failure”). You can use exception events to invoke some prescribed action,<br />

such as notifying an administrator, when a particular service fails.<br />

Note: Keep in mind that event handlers are processed independently of the services that<br />

invoke them. They are completely separate, asynchronous processes. Event handlers are<br />

not designed to replace the error handling and/or error recovery procedures that you<br />

would normally include in your service.<br />

If a nested service throws an exception, an exception event is generated by each service in<br />

the call stack. For example, if service A1 calls service B1, and B1 throws an exception, both<br />

B1 and A1 generate exception events (in that order).<br />

Building Handlers for Exception Events<br />

When the Event Manager invokes an event handler for an exception event, the event<br />

handler receives an IData object containing the following run-time data. (A specification<br />

and an IS document type for this signature reside in the pub.event folder.)<br />

Key Description<br />

time A String containing the date and time the event occurred. By default, the<br />

format is yyyy-MM-dd HH:mm:ss z. You can set the format by<br />

specifying the watt.server.dateStampFmt property. For instructions<br />

about how to specify server property settings, see the <strong>webMethods</strong><br />

Integration Server Administrator’s <strong>Guide</strong>.<br />

error A String containing the error message from the exception.<br />

localizedError A String containing the error message text in the language that<br />

corresponds to your locale.<br />

errorType A String containing the exception type that was thrown.<br />

errorDump A String containing more detailed information about the exception (if<br />

the exception object contains dump information).<br />

service A String containing the fully qualified name of the service that<br />

generated the event.<br />

user A String containing the user that requested the service that generated<br />

this event.<br />

callStack A document (IData object) containing the items in the call stack. See the<br />

pub.event:callStackItem IS document type for the definition of the<br />

documents in callStack.<br />

<strong>webMethods</strong> <strong>Developer</strong> User’s <strong>Guide</strong> Version 6.5, Service Pack 3 � � � 376


Key Description<br />

Working with Guaranteed Delivery Events<br />

14. Subscribing to Events<br />

pipeline A copy of the state of the pipeline at the point when the exception<br />

occurred.<br />

threadID A String identifying the thread that invoked the service.<br />

ssnid A String containing the identification number of the session during<br />

which the exception occurred.<br />

errorMsgID A String containing the identification number for the error message.<br />

errorDetails A document (IData object) containing additional exception information<br />

provided by the author of the Java service. For more information about<br />

constructing exceptions to return additional information, see the<br />

<strong>webMethods</strong> Integration Server Java API Reference for the<br />

com.wm.util.LocalizedException class.<br />

nestedErrorInfo A document (IData object) containing any nested errors and exceptions.<br />

See the pub.event:exceptionInfo IS document type for the definition of the<br />

items in nestedErrorInfo.<br />

Tip! When you subscribe an event handler to an exception event, you can create a filter for<br />

the service field to specify the services whose exception events you want to subscribe to.<br />

That is, you can specify which services’ exception events invoke the event handler.<br />

A guaranteed delivery event occurs when a client uses guaranteed delivery to invoke a<br />

service on a remote Integration Server, and when the server returns the service results to<br />

the requesting client. There are two types of guaranteed delivery events:<br />

� GD Start events occur when a client uses guaranteed delivery to invoke a service on a<br />

remote the Integration Server. In a flow service, executing the pub.remote.gd:start service<br />

generates a GD Start event.<br />

� GD End events occur when a client receives the results of the service it requested using<br />

guaranteed delivery. In a flow service, executing the pub.remote.gd:end service generates<br />

a GD End event.<br />

Each guaranteed delivery transaction generates a GD Start event and a GD End event. You<br />

can subscribe to GD Start and GD End events to invoke event handlers that log<br />

guaranteed delivery transactions to a file or database. You might also want to use<br />

guaranteed delivery events to invoke event handlers that send notification. For example,<br />

if you use guaranteed delivery to invoke a service that processes purchase orders, you<br />

might want to send notification to a business account manager about purchase orders<br />

<strong>webMethods</strong> <strong>Developer</strong> User’s <strong>Guide</strong> Version 6.5, Service Pack 3 � � � 377


14. Subscribing to Events<br />

from a particular client, or when the value of a purchase order is greater than a certain<br />

amount.<br />

Guaranteed Delivery Events and Transaction Events<br />

Guaranteed delivery events are related to transaction events (Tx Start and Tx End).<br />

Guaranteed delivery events begin when a client requests a guaranteed delivery<br />

transaction (GD Start) and when the client receives the results of the guaranteed delivery<br />

transaction (GD End). Transaction events occur when a service invoked using guaranteed<br />

delivery begins executing (Tx Start event) and when the service finishes executing (Tx End<br />

event).<br />

The following diagram illustrates when guaranteed delivery events and transaction<br />

events occur during a guaranteed delivery transaction. In the following scenario, a local<br />

Integration Server uses guaranteed delivery to invoke a service on a remote server.<br />

A Guaranteed Delivery Transaction generates Guaranteed Delivery Events and Transaction Events<br />

Stage Description<br />

1<br />

2<br />

3<br />

<strong>webMethods</strong> Integration<br />

Server (local)<br />

Service A<br />

1 2<br />

5 4 3<br />

<strong>webMethods</strong> Integration<br />

Server (remote)<br />

Service B<br />

Service A uses guaranteed delivery to invoke Service B on the remote<br />

Integration Server. When the local server requests Service B, the local server<br />

generates a GD Start event. By default, the GD Start event is logged to the<br />

txoutyyyymmdd.log file.<br />

The remote Integration Server receives the request and begins executing<br />

Service B. When the remote server begins executing Service B, the remote<br />

server generates a Tx Start event. By default, the Tx Start event is logged to the<br />

txinyyyymmdd.log file.<br />

The remote Integration Server finishes executing Service B and generates a Tx<br />

End event. By default, the Tx End event is logged to the txinyyyymmdd.log file.<br />

<strong>webMethods</strong> <strong>Developer</strong> User’s <strong>Guide</strong> Version 6.5, Service Pack 3 � � � 378


Stage Description<br />

4<br />

5<br />

14. Subscribing to Events<br />

The remote Integration Server sends the results of Service B to the requesting<br />

client (here, the local Integration Server).<br />

The local Integration Server receives the results of Service B and generates a<br />

GD End event. By default, the GD End event is logged to the<br />

txoutyyyymmdd.log file.<br />

For more information about guaranteed delivery, see the Guaranteed Delivery <strong>Developer</strong>’s<br />

<strong>Guide</strong>.<br />

Building Handlers for Guaranteed Delivery Start Events<br />

When the Event Manager invokes an event handler for a GD Start event, the event handler<br />

receives an IData object containing the following run-time data. (A specification and an IS<br />

document type for these parameters reside in the pub.event folder.)<br />

Key Description<br />

time A String containing the date and time that the event occurred, in the<br />

format yyyy/MM/dd HH:mm:ss.SS.<br />

TID A String containing the transaction identification number of the service<br />

that generated the GD Start event.<br />

svcname A String containing the name of the service invoked using guaranteed<br />

delivery.<br />

result A String containing the status of the guaranteed delivery transaction, such<br />

as NEW.<br />

Tip! When you subscribe an event handler to a GD Start event, you can create a filter for<br />

the svcname field to specify the services in a guaranteed delivery transaction that you want<br />

to subscribe to. That is, you can specify the services that when invoked using guaranteed<br />

delivery will invoke the event handler.<br />

<strong>webMethods</strong> <strong>Developer</strong> User’s <strong>Guide</strong> Version 6.5, Service Pack 3 � � � 379


14. Subscribing to Events<br />

Building Handlers for Guaranteed Delivery End Events<br />

When the Event Manager invokes an event handler for an GD End event, the event<br />

handler receives an IData object containing the following run-time data. (A specification<br />

and an IS document type for these parameters reside in the pub.event folder.)<br />

Key Description<br />

time A String containing the date and time that the event occurred, in the format<br />

yyyy/MM/dd HH:mm:ss.SS.<br />

TID A String containing the transaction identification number of the service that<br />

generated the GD End event.<br />

result A String containing the status of the guaranteed delivery transaction, such<br />

as DONE.<br />

Working with Port Status Events<br />

A port status event occurs each time the Integration Server updates the server statistics.<br />

The port status event provides current status information about all of the configured ports<br />

on the Integration Server.<br />

You can use port status events to invoke services that send port status data to a network<br />

monitoring system. You can also use port status events to invoke services that write port<br />

status data to a log file.<br />

Note: The watt.server.stats.pollTime property determines the frequency with which the<br />

Integration Server updates server statistics. The default frequency is 60 seconds. If you<br />

change this value, you must restart the Integration Server for the change to take effect. For<br />

more information about this property, see the <strong>webMethods</strong> Integration Server Administrator’s<br />

<strong>Guide</strong>.<br />

<strong>webMethods</strong> <strong>Developer</strong> User’s <strong>Guide</strong> Version 6.5, Service Pack 3 � � � 380


Building Handlers for Port Status Events<br />

14. Subscribing to Events<br />

When the Event Manager invokes an event handler for a port status event, the event<br />

handler receives an IData object that contains the following run-time data.<br />

(A specification and an IS document type with these parameters are provided in the<br />

pub.event folder.)<br />

Key Description<br />

portStatusInfo A document reference list containing status information for each<br />

configured port on the Integration Server.<br />

String Description<br />

Working with Replication Events<br />

time A String containing the date and time that the event<br />

occurred, in the format yyyy/MM/dd HH:mm:ss.SS.<br />

port A String containing the number for the port.<br />

status A String indicating the status of the port.<br />

protocol A String indicating the type of port (for example, http,<br />

https, ftp, or e-mail).<br />

primary A String indicating the primary port. By default, the<br />

Integration Server designates an HTTP port at port 5555<br />

as the primary port.<br />

enabled A String indicating whether or not the port is enabled.<br />

The value will be one of the following:<br />

A replication event occurs when the pub.replicator:generateReplicationEvent service executes.<br />

You might want to generate and subscribe to replication events to invoke event handlers<br />

that automate the completion of the package replication and distribution processes. For<br />

example, you could create replication event handlers that do the following:<br />

� Notify package subscribers when a package is published.<br />

� Maintain a log of replicated packages.<br />

String Description<br />

true The port is enabled.<br />

false The port is disabled.<br />

� Maintain a log of the packages distributed or “pushed” to your subscribers.<br />

� Maintain a log of the packages your partners pulled from you.<br />

<strong>webMethods</strong> <strong>Developer</strong> User’s <strong>Guide</strong> Version 6.5, Service Pack 3 � � � 381


14. Subscribing to Events<br />

For more information about the pub.replicator:generateReplicationEvent service, see the<br />

<strong>webMethods</strong> Integration Server Built-In Services Reference.<br />

Building Handlers for Replication Events<br />

When the Event Manager invokes an event handler for a replication event, the event<br />

handler receives an IData object that contains the following run-time data. (A specification<br />

and an IS document type for these parameters are provided in the pub.event folder.)<br />

Key Description<br />

time A String containing the date and time that the event occurred, in the<br />

format yyyy/MM/dd HH:mm:ss.SS.<br />

action A user-defined String describing the action (such as create or push) for<br />

the replication event. You can use the value of the action variable to<br />

maintain separate logs for each action type.<br />

package A String containing the name of the released or pushed package.<br />

service A String containing the name of the flow service that invoked the<br />

pub.replicator:generateReplicationEvent service.<br />

Tip! When you subscribe an event handler to a replication event, you can create a filter to<br />

specify the package that, when replicated, will invoke the event handler.<br />

Working with Session Events<br />

A session event occurs when a client starts or ends a session on the Integration Server or<br />

when the Integration Server terminates an inactive session. You can subscribe to any of the<br />

following types of session events:<br />

� Session Start events occur when a developer uses <strong>Developer</strong> to open a session on the<br />

Integration Server or when an IS client opens a session on the server to execute<br />

services.<br />

� Session End events occur when a developer or IS client specifically issues a disconnect<br />

instruction to the Integration Server.<br />

� Session Expire events occur when the Integration Server terminates an inactive session.<br />

You can subscribe to session events to invoke event handlers that maintain your own log<br />

files or to invoke event handlers that send notification about users opening sessions on the<br />

server.<br />

<strong>webMethods</strong> <strong>Developer</strong> User’s <strong>Guide</strong> Version 6.5, Service Pack 3 � � � 382


Building Handlers for Session Start Events<br />

14. Subscribing to Events<br />

When the Event Manager invokes an event handler for a session start event, the event<br />

handler receives an IData object containing the following run-time data. (A specification<br />

and an IS document type for these parameters reside in the pub.event folder.)<br />

Key Description<br />

time A String containing the date and time the event occurred, in the<br />

format yyyy/MM/dd HH:mm:ss.SS.<br />

sessionID A String containing the identification number of the session.<br />

userid A String containing the user ID that the IS client or developer used to<br />

log on to the Integration Server.<br />

sessionName A String containing the name of the new session.<br />

Tip! When you subscribe an event handler to a Session Start event, you can create a filter so<br />

that only session start events generated by a specific user or by a member of a specific<br />

group invoke the event handler.<br />

Building Handlers for Session End Events<br />

When the Event Manager invokes an event handler for a session end event, the event<br />

handler receives an IData object containing the following run-time data. (A specification<br />

and an IS document type for these parameters reside in the pub.event folder.)<br />

Key Description<br />

time A String containing the date and time that the event occurred, in the<br />

format yyyy/MM/dd HH:mm:ss.SS.<br />

sessionID A String containing the identification number of the session.<br />

rpcs A String containing the number of service calls performed during the<br />

session.<br />

age A String identifying how long the session existed (in milliseconds)<br />

before it ended.<br />

<strong>webMethods</strong> <strong>Developer</strong> User’s <strong>Guide</strong> Version 6.5, Service Pack 3 � � � 383


Building Handlers for Session Expire Events<br />

14. Subscribing to Events<br />

When the Event Manager invokes an event handler for a session expire event, the event<br />

handler receives an IData object containing the following run-time data. (A specification<br />

and an IS document type for these parameters reside in the pub.event folder.)<br />

Key Description<br />

time A String containing the date and time the event occurred, in the<br />

format yyyy/MM/dd HH:mm:ss.SS.<br />

sessionID A String containing the identification number of the session.<br />

rpcs A String containing the number of service calls performed during the<br />

session.<br />

age A String identifying how long the session existed (in milliseconds)<br />

before it expired.<br />

Working with Stat Events<br />

A stat event occurs each time the Integration Server updates the statistics log (stats.log).<br />

The statistics log maintains statistical information about the consumption of system<br />

resources. The watt.server.stats.pollTime property determines the frequency with which the<br />

Integration Server updates statistics. The default frequency is 10 seconds.<br />

You can use stat events to invoke event handlers that maintain your own log file or to<br />

invoke event handlers that send server statistics to a network monitoring system.<br />

Note: The Integration Server provides an agent that you can configure for use with a<br />

network monitoring system. For information about implementing this agent, see the<br />

readme file in the agentInstall.jar file located in the <strong>webMethods</strong>6\IntegrationServer\lib<br />

directory.<br />

<strong>webMethods</strong> <strong>Developer</strong> User’s <strong>Guide</strong> Version 6.5, Service Pack 3 � � � 384


Building Handlers for Stat Events<br />

14. Subscribing to Events<br />

When the Event Manager invokes an event handler for a stat event, the event handler<br />

receives an IData object containing the following run-time data. (A specification and an IS<br />

document type for these parameters reside in the pub.event folder.)<br />

Key Description<br />

startTime A String containing the date and time that the event occurred, in the<br />

format yyyy/MM/dd HH:mm:ss.SS.<br />

uptime A String identifying the length of time the server has been running, in<br />

the format yyyy/MM/dd HH:mm:ss.SS.<br />

totalMem A String identifying the total amount of used and unused storage<br />

space available (in kilobytes) to the Integration Server.<br />

freeMem A String identifying the amount of unused storage space available (in<br />

kilobytes) to the Integration Server.<br />

usedMem A String identifying the amount of storage used (in kilobytes) by the<br />

Integration Server.<br />

freeMemPer A String identifying the percentage of free memory.<br />

usedMemPer A String identifying the percentage of used memory.<br />

svrT A String identifying the number of executing services.<br />

svrTMax A String identifying the maximum number of services that executed<br />

concurrently during the previous poll cycle.<br />

sysT A String identifying the number of threads in use.<br />

sysTMax A String identifying the maximum number of threads that executed<br />

concurrently during the previous poll cycle.<br />

conn A String identifying the number of current sessions on the Integration<br />

Server.<br />

connMax A String identifying the maximum number of connections that ran<br />

concurrently during the previous poll cycle.<br />

reqTotal A String identifying the total number of requests during the poll<br />

cycle.<br />

reqAvg A String identifying the average processing duration for a service<br />

during the previous poll cycle.<br />

newReqPM A String identifying the new requests per minute at the beginning of<br />

the poll cycle.<br />

endReqPM A String identifying the new requests per minute at the end of the<br />

poll cycle.<br />

<strong>webMethods</strong> <strong>Developer</strong> User’s <strong>Guide</strong> Version 6.5, Service Pack 3 � � � 385


Key Description<br />

Working with Transaction Events<br />

14. Subscribing to Events<br />

errSvc A String identifying the number of services that completed with<br />

errors since the Integration Server started.<br />

svcRate A String identifying the number of service starts and ends per second<br />

during the last poll cycle.<br />

ssnUsed Number of licensed sessions currently active.<br />

ssnPeak Greatest number of licensed sessions that have run concurrently on<br />

the server.<br />

ssnMax Maximum number of sessions for which the server is licensed.<br />

errSys A String identifying the number of errors that were not caused by<br />

services in the previous poll cycle.<br />

A transaction event occurs when an Integration Server begins and finishes executing a<br />

guaranteed delivery transaction. There are two types of transaction events:<br />

� Tx Start events occur when an Integration Server begins executing a service invoked<br />

with guaranteed delivery.<br />

� Tx End events occur when an Integration Server finishes executing a service invoked<br />

with guaranteed delivery.<br />

Transaction events result from guaranteed delivery transactions. Each guaranteed<br />

delivery transaction generates a Tx Start event and a Tx End event. In fact, the transaction<br />

events occur between the guaranteed delivery events. A Tx Start event occurs<br />

immediately after a GD Start event and a Tx End event occurs immediately before a GD<br />

End event. For more information about how transaction events relate to guaranteed<br />

delivery events, see “Guaranteed Delivery Events and Transaction Events” on page 378.<br />

You can subscribe to Tx Start and Tx End events to invoke event handlers that log<br />

guaranteed delivery transactions to a file or database. You might also want to use<br />

transaction events to invoke event handlers that send notification.<br />

<strong>webMethods</strong> <strong>Developer</strong> User’s <strong>Guide</strong> Version 6.5, Service Pack 3 � � � 386


Building Handlers for Transaction Start Events<br />

14. Subscribing to Events<br />

When the Event Manager invokes an event handler for a Tx Start event, the event handler<br />

receives an IData object containing the following run-time data. (A specification and an IS<br />

document type for these parameters reside in the pub.event folder.)<br />

Key Description<br />

time A String containing the date and time that the event occurred, in the<br />

format yyyy/MM/dd HH:mm:ss.SS.<br />

TID A String containing the transaction ID for the guaranteed delivery<br />

transaction that generated the event.<br />

result A String containing the status of the guaranteed delivery transaction, such<br />

as NEW.<br />

Building Handlers for Transaction End Events<br />

When the Event Manager invokes an event handler for a Tx End event, the event handler<br />

receives an IData object containing the following run-time data. (A specification and an IS<br />

document type for these parameters reside in the pub.event folder.)<br />

Key Description<br />

time A String containing the date and time that the event occurred, in the format<br />

yyyy/MM/dd HH:mm:ss.SS.<br />

TID A String containing the transaction ID of the guaranteed delivery<br />

transaction that generated the event.<br />

result A String containing the status of the guaranteed delivery transaction, such<br />

as DONE.<br />

<strong>webMethods</strong> <strong>Developer</strong> User’s <strong>Guide</strong> Version 6.5, Service Pack 3 � � � 387


14. Subscribing to Events<br />

<strong>webMethods</strong> <strong>Developer</strong> User’s <strong>Guide</strong> Version 6.5, Service Pack 3 � � � 388


Chapter 15. Building Services that Retry<br />

� Overview . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 390<br />

� Requirements for Retrying . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 390<br />

� Building a Service that Throws an Exception for Retry . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 391<br />

<strong>webMethods</strong> <strong>Developer</strong> User’s <strong>Guide</strong> Version 6.5, Service Pack 3 � � � 389


Overview<br />

15. Building Services that Retry<br />

When creating a service, you can construct and configure the service to retry<br />

automatically if a transient error occurs during service execution. A transient error is an<br />

error that arises from a temporary condition that might be resolved or restored, such as<br />

the unavailability of a resource due to network issues or failure to connect to a database.<br />

The service might execute successfully if the Integration Server waits a short interval of<br />

time and then retries the service.<br />

To signal the Integration Server to re-execute the service, you can build the service to<br />

throw an ISRuntimeException when a transient error occurs. Then, if a service ends<br />

because of an ISRuntimeException and you set retry properties for the service (or the<br />

trigger calling the service), the Integration Server will re-execute the service using the<br />

original service input.<br />

This appendix provides guidance for building flow services that retry if a transient error<br />

occurs during service execution.<br />

Requirements for Retrying<br />

If you want a service to catch a transient error, re-throw it as an ISRuntimeException, and<br />

then re-execute, the following criteria must be met:<br />

� You must configure the Retry on ISRuntimeException properties for the top-level service.<br />

For more information about configuring service retry and how the Integration Server<br />

retries services, see “Configuring Service Retry” on page 143.<br />

� If the service functions as a trigger service (the service is invoked by a trigger), you<br />

must configure the Retries on error properties for the trigger. For more information<br />

about configuring trigger retries and how the Integration Server retries trigger<br />

services, see the Publish-Subscribe <strong>Developer</strong>’s <strong>Guide</strong>.<br />

� If the service is a flow service, the service must invoke pub.flow:throwExceptionForRetry.<br />

� If the service is written in Java, the service can use<br />

com.wm.app.b2b.server.ISRuntimeException().<br />

Adapter Services and Retry Behavior<br />

Adapter services built on Integration Server 6.0 or later, and based on the ART<br />

framework, detect and propagate exceptions that signal a retry if a transient error is<br />

detected on their back-end resource. At run time, adapter services detect if their back-end<br />

server is down or the network connection is broken. The adapter service propagates an<br />

exception that is based on ISRuntimeException. This behavior allows for the automatic<br />

retry when the service is invoked by a trigger or invoked within a flow that is configured<br />

to retry when an ISRuntimeException occurs.<br />

<strong>webMethods</strong> <strong>Developer</strong> User’s <strong>Guide</strong> Version 6.5, Service Pack 3 � � � 390


15. Building Services that Retry<br />

Note: If you invoke an adapter service within a flow service that uses the try-catch<br />

structure, and the try contains an adapter service, make sure that the catch structure can<br />

interpret the adapter service exception that signals a retry. You must ensure that the error<br />

evaluating logic in the catch structure can account for the adapter service exception that<br />

signals a retry. If it does not, the Integration Server will not retry the flow service. For<br />

details about building a flow service that throws an ISRuntimeException, see “Building a<br />

Service that Throws an Exception for Retry”, below.<br />

For more information about adapter services, see the relevant adapter guides.<br />

Building a Service that Throws an Exception for Retry<br />

A flow service that will be retried if a transient error occurs during service execution<br />

consists of the following basic sections of logic:<br />

� A try sequence that executes the work that you want the service to perform.<br />

� A catch sequence that handles any exception that occurs during the try sequence,<br />

determines if a transient error caused the exception, and indicates whether the<br />

Integration Servers should retry the service.<br />

� An outer sequence that exits successfully if either the try sequence or catch sequence<br />

succeeds.<br />

� A throw exception for retry block that executes only if the catch block indicated that<br />

the service should be retried.<br />

Note: This section describes one possible way to build a service that throws an exception<br />

for retry.<br />

How to Build a Service that Throws an Exception for Retry<br />

The following describes the general steps that you take to build a service that will retry if<br />

a transient error occurs during service execution.<br />

1 Insert a SEQUENCE step. This SEQUENCE step will act as the outer sequence for the try<br />

sequence and the catch sequence.<br />

Set this outer SEQUENCE to exit on SUCCESS. This indicates that the sequence will<br />

exit when any child step in the sequence succeeds. If the inner try sequence (the first<br />

child of this parent SEQUENCE) succeeds, then the inner catch sequence will be<br />

skipped, an ISRuntimeException will not be thrown, and the entire service will have<br />

executed successfully.<br />

<strong>webMethods</strong> <strong>Developer</strong> User’s <strong>Guide</strong> Version 6.5, Service Pack 3 � � � 391


15. Building Services that Retry<br />

2 Insert an inner SEQUENCE step for the try sequence. This sequence will contain the logic<br />

that you want the service to perform.<br />

Set this inner try sequence to exit on FAILURE. This indicates that the try sequence<br />

will exit when a step in the SEQUENCE fails. The Integration Server will then execute<br />

the next step in the flow service, which is the catch sequence.<br />

Make sure that the try sequence is a child of the outer sequence that you inserted in<br />

step 1.<br />

3 Insert the logic that you want the service to perform. These steps contain the work that you<br />

want the service to do.<br />

Make sure to indent the steps below/under the try SEQUENCE step.<br />

4 Insert a SEQUENCE step for the catch sequence. This sequence contains the steps needed<br />

to catch the exception, determine its cause, and then determine whether the service<br />

can be retried.<br />

Set the catch sequence to exit when DONE. This indicates that the Integration Server<br />

executes every step in the catch sequence, even if one of the steps fails.<br />

Make sure that the catch sequence is a child of the outer sequence that you inserted in<br />

step 1.<br />

5 Invoke pub.flow:getLastError in the catch sequence to retrieve error information. This service<br />

retrieves information about the last exception that occurred in the flow service. In this<br />

case, the pub.flow:getLastError service retrieves information about the error that caused<br />

the try sequence to fail.<br />

Make sure to indent the pub.flow:getLastError invoke step below the catch SEQUENCE<br />

step.<br />

Using pub.flow:getLastError to catch the error information is optional.<br />

Important! The pub.flow:getLastError service must be the first service invoked within the<br />

catch sequence. If it is not the first service invoked, and a preceding service in the<br />

catch sequence fails, the error thrown in the try sequence will be overwritten with the<br />

new error.<br />

6 Insert error evaluation logic. This logic should do the following:<br />

� Determine whether the last error is a transient error that can be retried.<br />

Note: If the flow service includes an adapter service, and a transient error occurs<br />

during adapter service execution, the adapter service throws an exception that<br />

extends the ISRuntimeException.<br />

<strong>webMethods</strong> <strong>Developer</strong> User’s <strong>Guide</strong> Version 6.5, Service Pack 3 � � � 392


15. Building Services that Retry<br />

� If the service can be retried, set a flag to indicate this. For example, you might set<br />

a variable named isTransientError to “true”. A subsequent BRANCH step will use<br />

the flag to determine whether to execute the pub.flow:throwExceptionForRetryService.<br />

Keep in mind that you might need to use more than one service to handle the error,<br />

determine if it was caused by a transient error, and set the transient error flag.<br />

Make sure to insert the exception evaluation logic within the catch sequence, but after<br />

the pub.flow:getLastError service.<br />

7 Insert a BRANCH step that branches on the value of the transient error flag. This BRANCH<br />

step will determine if an ISRuntimeException should be thrown. You can branch on a<br />

switch value or branch on an expression. Do one of the following:<br />

.<br />

� If you are branching on a switch value, in the Switch property, specify the name of<br />

the pipeline variable whose value will act as the switch. For example, if you use<br />

the isTransientError variable as the flag to indicate that a transient error occurred,<br />

you would use isTransientError as the switch.<br />

� If you are branching on an expression, set the Evaluate labels property to True.<br />

Important! You must position the BRANCH step so that it is outside of the try and catch<br />

sequences and is a sibling of the outer sequence. This is because exceptions thrown<br />

within a sequence are ignored and the BRANCH step will contain the<br />

pub.flow:throwExceptionForRetry service.<br />

8 Invoke the pub.flow:throwExceptionForRetry service. This service wraps an exception and<br />

rethrows it as an ISRuntimeException.<br />

Assign this service a label that indicates that this step should execute when the<br />

transient error flag is true. For example, if you built the BRANCH step to use<br />

isTransientError is set to true when a transient error occurred and you want the<br />

Integration Server to retry the service, set the Label property to: true.<br />

Make sure that this step is a child of the BRANCH step.<br />

<strong>webMethods</strong> <strong>Developer</strong> User’s <strong>Guide</strong> Version 6.5, Service Pack 3 � � � 393


You can also provide the following optional parameters to the<br />

pub.flow:throwExceptionForRetry service.<br />

Name Description<br />

15. Building Services that Retry<br />

wrappedException An Object containing any exception that you want to include<br />

as part of this ISRuntimeException. This might be the<br />

exception that causes the pub.flow:throwExceptionForRetry service<br />

to execute. For example, if the service attempts to connect to a<br />

database and the connection attempt fails, you might map the<br />

exception generated by the database connection failure to the<br />

wrappedException parameter.<br />

message A string containing a message to be logged as part of this<br />

exception.<br />

Note: If you want to insert retry logic into a service that makes database calls or involves<br />

transactions, your service needs to include logic for starting, committing, and rolling back<br />

the transaction. Specifically, the rollback call should be made in the catch sequence.<br />

Example—Building a Service that Throws an Exception for<br />

Retry<br />

The following flow service executes a nested service, catches any exception that occurs,<br />

determines if a transient error caused the exception, and, if necessary, throws an<br />

ISRuntimeException so that the entire service can be retried.<br />

Trying a service, catching an error, and throwing an exception for retry<br />

<strong>webMethods</strong> <strong>Developer</strong> User’s <strong>Guide</strong> Version 6.5, Service Pack 3 � � � 394


# Description<br />

15. Building Services that Retry<br />

Step 1 Create outer SEQUENCE that exits on SUCCESS. This step creates a sequence that<br />

wraps the try sequence and the catch sequence. The sequence is set to exit on<br />

success so that the outer sequence will exit when a child step executes<br />

successfully. That is, setting the outer sequence to exit on success allows the<br />

outer sequence to exit without executing the catch sequence when the try<br />

sequence succeeds.<br />

Step Description<br />

1.1 Create try SEQUENCE that exits on FAILURE. This step creates the try<br />

sequence that contains all of the logic you want the service to execute.<br />

This step is set to exit on failure so that the Integration Server will<br />

execute the next step (the catch sequence) within the outer sequence.<br />

Step Description<br />

1.1.1 Insert service logic. This step represents the logic that you want<br />

the service to perform. In many services, the service logic<br />

might consist of multiple services or flow steps.<br />

If the try sequence executes successfully, the entire outer<br />

sequence exits. The Integration Server skips the catch<br />

sequence because the outer sequence exits upon the success of<br />

any child step (in this case, the try sequence). The Integration<br />

Server then executes the next step in the flow service (the<br />

BRANCH on ‘/isTransientError’ step).<br />

If an error occurs while executing this step, the try sequence<br />

exits (it is set to exit on FAILURE), and the Integration Server<br />

executes the catch sequence.<br />

1.2 Create catch SEQUENCE that exits on DONE. This step creates the catch<br />

sequence that contains the logic that should be performed when an<br />

error occurs during the try sequence. This step contains logic that<br />

evaluates the error to determine whether the entire service can be<br />

retried.<br />

The catch sequence is set to exit on DONE. This means that the<br />

Integration Server executes all the steps in the catch sequence. The<br />

Integration Server considers the catch sequence to be successful after<br />

all the child steps execute. Because the catch sequence is successful, the<br />

outer sequence exits (it is set to exit on SUCCESS), and the Integration<br />

Server executes the next step in the flow service.<br />

To determine whether a transient error occurred, this step contains the<br />

following steps.<br />

<strong>webMethods</strong> <strong>Developer</strong> User’s <strong>Guide</strong> Version 6.5, Service Pack 3 � � � 395


# Description<br />

Step Description<br />

15. Building Services that Retry<br />

1.2.1 Catch the last error. This step invokes the pub.flow:getLastError<br />

service to catch the error that caused the try sequence to fail.<br />

1.2.2 Determine if error was a transient error. This step evaluates the<br />

contents of the lastError document returned by the<br />

pub.flow:getLastError service to determine whether the try<br />

sequence failed because of a transient error. In many services,<br />

you might use multiple services or flow steps to determine<br />

whether a transient error occurred.<br />

1.2.3 Set flag to indicate whether service should retry. This step sets the<br />

transient error flag to indicate if a try sequence failed because<br />

of a transient error. In this case, if a transient error occurred,<br />

the transient error flag (the variable isTransientError) is set to<br />

“true”.<br />

After this step executes, the Integration Server exits the catch<br />

sequence, exits the outer sequence, and then executes the next<br />

step in the flow service (the BRANCH on ‘/isTransientError’<br />

step).<br />

Step 2 Check transient error flag. This step specifies that the value of the isTransientError<br />

variable should be used to determine whether the service should throw an<br />

ISRuntimeException.<br />

If the try sequence executed successfully, the Integration Server falls through<br />

to the end of the service because the value of the switch variable does not<br />

match any of the target steps (if the try sequence succeeded, isTransientError is<br />

null). In this case, the Integration Server considers the execution of the flow<br />

service to be successful.<br />

Step Description<br />

2.1 Throws ISRuntimeException. This step executes the<br />

pub.flow:throwExceptionForRetry service if the value of isTransientError is<br />

“true”. This service wraps the exception generated by the transient<br />

error in the try sequence and rethrows it as an ISRuntimeException.<br />

The Integration Server will retry the service.<br />

<strong>webMethods</strong> <strong>Developer</strong> User’s <strong>Guide</strong> Version 6.5, Service Pack 3 � � � 396


Appendix A. <strong>webMethods</strong> Flow Steps<br />

� BRANCH . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 398<br />

� EXIT . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 401<br />

� INVOKE . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 402<br />

� LOOP . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 403<br />

� MAP . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 405<br />

� REPEAT . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 406<br />

� SEQUENCE . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 408<br />

<strong>webMethods</strong> <strong>Developer</strong> User’s <strong>Guide</strong> Version 6.5, Service Pack 3 � � � 397


BRANCH<br />

A. <strong>webMethods</strong> Flow Steps<br />

The BRANCH step selects and executes a child step based on the value of one or more<br />

variables in the pipeline. You indicate the variables you want to branch on by specifying a<br />

switch value or by writing an expression that includes the variables.<br />

Branching on a Switch Value<br />

When you branch on a switch value, you specify the switch variable in the Switch property<br />

of the BRANCH step. In the Label property for each child step, you specify the value of the<br />

switch variable that will cause that child step to execute. At run time, the BRANCH flow<br />

step executes the child step that has the same label as the value of the Switch property.<br />

If you want to execute a child step when the value of the Switch property is an empty<br />

string, leave the Label property of the child step blank. If you want to execute a child step<br />

when the Switch property is a null or unmatched string, set the Label of the child step to<br />

$null or $default.<br />

BRANCH flow step using a switch<br />

Name of the<br />

switch field is<br />

choice<br />

if the value of choice is ‘Name1’<br />

if the value of choice is ‘Name2’<br />

if the value of choice is ‘NameN’<br />

if choice does not exist or has a<br />

value of ‘$null’<br />

if the value of choice is an empty<br />

string “ “<br />

Otherwise<br />

<strong>webMethods</strong> <strong>Developer</strong> User’s <strong>Guide</strong> Version 6.5, Service Pack 3 � � � 398<br />

Name1<br />

Name2<br />

NameN<br />

$null<br />

no label<br />

$default


Branching on Expressions<br />

A. <strong>webMethods</strong> Flow Steps<br />

When you branch on expressions, you set the Evaluate labels property of the BRANCH step<br />

to true. In the Label property for each child step, you write an expression that includes one<br />

or more variables. At run time, the BRANCH step executes the first child step with an<br />

expression that evaluates to true.<br />

If you want to specify a child step to execute when none of the expressions are true, set the<br />

label of the child step to $default.<br />

BRANCH step using expressions<br />

Evaluate labels<br />

is set to true<br />

if the expression of first child is true<br />

if the expression of second child is true<br />

if the expression of n th child is true<br />

Otherwise<br />

The BRANCH step in the following illustration evaluates expressions to determine which<br />

child steps execute. The run-time value of BuyerAccount, PromotionalCode, or<br />

shippingMethod determines the shipping charges added to an order.<br />

Simple BRANCH step using expressions<br />

<strong>webMethods</strong> <strong>Developer</strong> User’s <strong>Guide</strong> Version 6.5, Service Pack 3 � � � 399<br />

Child1<br />

Child2<br />

ChildN<br />

$default


Properties<br />

The BRANCH step has the following properties.<br />

Property Description<br />

Conditions that Will Cause a BRANCH Step to Fail<br />

A. <strong>webMethods</strong> Flow Steps<br />

Comments Optional. Specifies a descriptive comment for the step.<br />

Scope Optional. Specifies the name of a document (IData object) in the<br />

pipeline to which you want to restrict this step. If you want this step to<br />

have access to the entire pipeline, leave this property blank.<br />

Timeout Optional. Specifies the maximum number of seconds that this step<br />

should run. If this time elapses before the step completes, the server<br />

waits for the step to complete and then raises an exception.<br />

If you want to use the value of a pipeline variable for this property,<br />

type the variable name between % symbols. For example,<br />

%expiration%.<br />

If you do not need to specify a time-out period, leave Timeout blank.<br />

Label Optional. (Required if you are using this BRANCH step as a target for<br />

another BRANCH or EXIT step.) Specifies a name for this instance of<br />

the BRANCH step, or a null, unmatched, or empty string ($null,<br />

$default, blank).<br />

Switch Specifies the String field that the BRANCH step uses to determine<br />

which child flow step to execute. The BRANCH step executes the child<br />

flow step whose label matches the value of the field specified in the<br />

Switch property. Do not specify a value if you set the Evaluate labels<br />

property to True.<br />

Evaluate labels Specifies whether or not you want the server to evaluate labels of child<br />

steps as conditional expressions. When you branch on expressions,<br />

you enter expressions in the Label property for the children of the<br />

BRANCH step. At run time, the server executes the first child step<br />

whose label evaluates to True. To branch on expressions, select True. To<br />

branch on the Switch value, select False.<br />

� The switch field is not in the pipeline and the BRANCH step does not contain a<br />

default child step or a child step to handle null values.<br />

� The matching child step fails.<br />

� The BRANCH step does not complete before the time-out period expires.<br />

<strong>webMethods</strong> <strong>Developer</strong> User’s <strong>Guide</strong> Version 6.5, Service Pack 3 � � � 400


EXIT<br />

A. <strong>webMethods</strong> Flow Steps<br />

The EXIT step exits the entire flow service or a single flow step. Specifically, it may exit<br />

from the nearest ancestor loop step, a specified ancestor step, the parent step, or the entire<br />

flow service.<br />

The EXIT step can throw an exception if the exit is considered a failure. When an<br />

exception is thrown, user-specified error message text is displayed by typing it directly or<br />

by assigning it to a variable in the pipeline.<br />

Properties<br />

The EXIT step has the following properties.<br />

Property Description<br />

Comments Optional. Specifies a descriptive comment for the step.<br />

Label Optional. (Required if you are using this EXIT step as a target for a<br />

BRANCH step.) Specifies a name for this specific step, or a null,<br />

unmatched, or empty string ($null, $default, blank).<br />

Exit from Required. Specifies the flow step or service from which you want to<br />

exit.<br />

Specify this value… To exit the…<br />

$parent Parent flow step, regardless of the type of step.<br />

$loop Nearest parent LOOP or REPEAT step.<br />

$flow Entire flow.<br />

label Nearest ancestor step that has a label that<br />

matches this value.<br />

Note: If the label you specify does not match the<br />

label of an ancestor flow step, the flow will exit<br />

with an exception.<br />

<strong>webMethods</strong> <strong>Developer</strong> User’s <strong>Guide</strong> Version 6.5, Service Pack 3 � � � 401


INVOKE<br />

Property Description<br />

Examples of When to Use<br />

� Exit an entire flow service from within a series of deeply nested steps.<br />

A. <strong>webMethods</strong> Flow Steps<br />

Signal Required. Specifies whether the exit is considered a success or a<br />

failure. A SUCCESS condition exits the flow service or step. A<br />

FAILURE condition exits the flow service or step and throws an<br />

exception. The text of the exception message is contained in the<br />

Failure message property.<br />

Failure message Optional. Specifies the text of the exception message that is<br />

displayed when Signal is set to FAILURE. If you want to use the value<br />

of a pipeline variable for this property, type the variable name<br />

between % symbols. For example, %mymessage%.<br />

� Throw an exception when you exit a flow service or a flow step without having to<br />

write a Java service to call Service.throwError( ).<br />

� Exit a LOOP or REPEAT flow step without throwing an exception.<br />

The INVOKE flow step invokes another service. You can use it to invoke any type of<br />

service, including another flow service.<br />

Properties<br />

The INVOKE step has the following properties.<br />

Property Description<br />

Comments Optional. Specifies a descriptive comment for the step.<br />

Scope Optional. Specifies the name of a document (IData object) in the pipeline<br />

to which you want to restrict this step. If you want this step to have<br />

access to the entire pipeline, leave this property blank.<br />

Timeout Optional. Specifies the maximum number of seconds that this step<br />

should run. If this time elapses before the step completes, the server<br />

waits for the step to complete and then raises an exception.<br />

If you want to use the value of a pipeline variable for this property, type<br />

the variable name between % symbols. For example, %expiration%.<br />

If you do not need to specify a time-out period, leave Timeout blank.<br />

<strong>webMethods</strong> <strong>Developer</strong> User’s <strong>Guide</strong> Version 6.5, Service Pack 3 � � � 402


LOOP<br />

Property Description<br />

Conditions that Will Cause an INVOKE Step to Fail<br />

� The service that is invoked fails.<br />

� The specified service does not exist.<br />

� The specified service is disabled.<br />

A. <strong>webMethods</strong> Flow Steps<br />

Label Optional. (Required if you are using this step as a target for a BRANCH<br />

or EXIT step.) Specifies a name for this specific step, or a null,<br />

unmatched, or empty string ($null, $default, blank).<br />

Service Required. Specifies the fully qualified name of the service to invoke.<br />

Validate<br />

input<br />

Validate<br />

output<br />

Optional. Specifies whether the server validates the input to the service<br />

against the service input signature. If you want the input to be validated,<br />

select True. If you do not want the input to be validated, select False.<br />

Optional. Specifies whether the server validates the output of the service<br />

against the service output signature. If you want the output to be<br />

validated, select True. If you do not want the output to be validated, select<br />

False.<br />

The LOOP step takes as input an array variable that is in the pipeline. It loops over the<br />

members of an input array, executing its child steps each time through the loop. For<br />

example, if you have a service that takes a string as input and a string list in the pipeline,<br />

use the LOOP step to invoke the service one time for each string in the string list.<br />

You identify a single array variable to use as input when you set the properties for the<br />

LOOP step. You can also designate a single variable for output. The LOOP step collects an<br />

output value each time it runs through the loop and creates an output array that contains<br />

the collected output values. If you want to collect more than one variable, specify a<br />

document that contains the fields you want to collect for the output variable.<br />

<strong>webMethods</strong> <strong>Developer</strong> User’s <strong>Guide</strong> Version 6.5, Service Pack 3 � � � 403


The LOOP step<br />

input is<br />

an array<br />

Properties<br />

The LOOP step has the following properties.<br />

Property Description<br />

A. <strong>webMethods</strong> Flow Steps<br />

Comments Optional. Specifies a descriptive comment for the step.<br />

Scope Optional. Specifies the name of a document (IData object) in the pipeline to<br />

which you want to restrict this step. If you want this step to have access to<br />

the entire pipeline, leave this property blank.<br />

Timeout Optional. Specifies the maximum number of seconds that this step should<br />

run. If this time elapses before the step completes, the server waits for the<br />

step to complete and then raises an exception.<br />

If you want to use the value of a pipeline variable for this property, type<br />

the variable name between % symbols. For example, %expiration%.<br />

If you do not need to specify a time-out period, leave Timeout blank.<br />

Label Optional. (Required if you are using this step as a target for a BRANCH or<br />

EXIT step.) Specifies a name for this specific step, or a null, unmatched, or<br />

empty string ($null, $default, blank).<br />

Input array Required. Specifies the input array over which to loop. You must specify a<br />

variable in the pipeline that is an array data type (that is, String list, String<br />

table, document list, or Object list).<br />

Output<br />

array<br />

No<br />

more input<br />

array<br />

members?<br />

Yes<br />

get next<br />

member of<br />

input array<br />

child child child<br />

Optional. Specifies the name of the field in which the server places output<br />

data for an iteration of the loop. The server collects the output from the<br />

iterations into an array field with the same name. You do not need to<br />

specify this property if the loop does not produce output values.<br />

<strong>webMethods</strong> <strong>Developer</strong> User’s <strong>Guide</strong> Version 6.5, Service Pack 3 � � � 404


MAP<br />

Conditions that Will Cause a LOOP Step to Fail<br />

� The pipeline does not contain the input array.<br />

� The input field is not an array field.<br />

� A child step of the LOOP step fails during any iteration of the loop.<br />

� The LOOP step does not complete before the time-out period expires.<br />

A. <strong>webMethods</strong> Flow Steps<br />

The MAP step adjusts the pipeline at any point in a flow. It makes pipeline modifications<br />

that are independent of an INVOKE step.<br />

Within the MAP step, you can:<br />

� Link (copy) the value of a pipeline input field to a new or existing pipeline output<br />

field.<br />

� Drop an existing pipeline input field. (Keep in mind that once you drop a field from<br />

the pipeline, it is no longer available to subsequent services in the flow.)<br />

� Assign a value to a pipeline output field.<br />

� Perform document-to-document mapping in a single view by inserting transformers.<br />

Properties<br />

The MAP step has the following properties.<br />

Property Description<br />

Comments Optional. Specifies a descriptive comment for this step.<br />

Scope Optional. Specifies the name of a document (IData) in the pipeline to<br />

which you want to restrict this step. If you want this step to have access to<br />

the entire pipeline, leave this property blank.<br />

Timeout Optional. Specifies the maximum number of seconds that this step should<br />

run. If this time elapses before the step completes, the server waits for the<br />

step to complete and then raises an exception.<br />

If you want to use the value of a pipeline variable for this property, type<br />

the variable name between % symbols. For example, %expiration%.<br />

If you do not need to specify a time-out period, leave Timeout blank.<br />

<strong>webMethods</strong> <strong>Developer</strong> User’s <strong>Guide</strong> Version 6.5, Service Pack 3 � � � 405


REPEAT<br />

Property Description<br />

Example of When to Use<br />

A. <strong>webMethods</strong> Flow Steps<br />

Label Optional. (Required if you are using this step as a target for a BRANCH or<br />

EXIT step.) Specifies a name for this specific step, or a null, unmatched, or<br />

empty string ($null, $default, blank).<br />

� You want to assign an initial set of input values in a flow service (that is, to initialize<br />

variables). You insert the MAP step at the beginning of the flow, and then use the Set<br />

Value modifier to assign values to the appropriate variables in Pipeline Out.<br />

� You want to map a document from one format to another (for example, cXML to<br />

XML). Insert transformers into the MAP step to perform the needed data<br />

transformations. For more information about transformers, see “What Are<br />

Transformers?” on page 222.<br />

The REPEAT step repeatedly executes its child steps up to a maximum number of times<br />

that you specify. It determines whether to re-execute the child steps based on a Repeat on<br />

condition. You can set the repeat condition to one of the following:<br />

� Repeat if any one of the child steps fails.<br />

� Repeat if all of the elements succeed.<br />

You can also specify a time period that you want the REPEAT flow step to wait before it<br />

re-executes its child steps.<br />

The REPEAT step<br />

reps=0<br />

wait for<br />

repeat<br />

interval<br />

child<br />

reps = reps + 1<br />

Yes<br />

child<br />

reps < Count ?<br />

Exit<br />

No<br />

<strong>webMethods</strong> <strong>Developer</strong> User’s <strong>Guide</strong> Version 6.5, Service Pack 3 � � � 406<br />

Yes<br />

child<br />

Repeat<br />

condition<br />

met?<br />

No<br />

Exit


Properties<br />

The REPEAT step has the following properties.<br />

Property Description<br />

A. <strong>webMethods</strong> Flow Steps<br />

Comments Optional. Specifies a descriptive comment for this step.<br />

Scope Optional. Specifies the name of a document (IData object) in the pipeline to<br />

which you want to restrict this step. If you want this step to have access to<br />

the entire pipeline, leave this property blank.<br />

Timeout Optional. Specifies the maximum number of seconds that this step should<br />

run. If this time elapses before the step completes, the server waits for the<br />

step to complete and then raises an exception.<br />

If you want to use the value of a pipeline variable for this property, type<br />

the variable name between % symbols. For example, %expiration%.<br />

If you do not need to specify a time-out period, leave Timeout blank.<br />

Label Optional. (Required if you are using this step as a target for a BRANCH or<br />

EXIT step.) Specifies a name for this specific step, or a null, unmatched, or<br />

empty string ($null, $default, blank).<br />

Count Required. Specifies the maximum number of times the server re-executes<br />

the child steps in the REPEAT step. Set Count to 0 (zero) to instruct the<br />

server that the child steps should not be re-executed. Set Count to a value<br />

greater than zero to instruct the server to re-execute the child steps up to a<br />

specified number of times. Set Count to -1 to instruct the server to reexecute<br />

the child steps as long as the specified Repeat on condition is true.<br />

Repeat<br />

interval<br />

If you want to use the value of a pipeline variable for this property, type<br />

the variable name between % symbols. For example, %servicecount%.<br />

Optional. Specifies the number of seconds the server waits before reexecuting<br />

the child steps. Specify 0 (zero) to re-execute the child steps<br />

without a delay.<br />

If you want to use the value of a pipeline variable for this property, type<br />

the variable name between % symbols. For example, %waittime%.<br />

Repeat on Required. Specifies when the server re-executes the REPEAT child steps.<br />

Select SUCCESS to re-execute the child steps when the all the child steps<br />

complete successfully. Select FAILURE to re-execute the child steps when<br />

any one of the child steps fails.<br />

<strong>webMethods</strong> <strong>Developer</strong> User’s <strong>Guide</strong> Version 6.5, Service Pack 3 � � � 407


SEQUENCE<br />

When Does REPEAT Fail?<br />

The following conditions cause the REPEAT step to fail:<br />

If “Repeat on” is set to… The REPEAT step fails if…<br />

SUCCESS A child within the REPEAT block fails.<br />

A. <strong>webMethods</strong> Flow Steps<br />

FAILURE The Count limit is reached before its children execute<br />

successfully.<br />

If the REPEAT step is a child of another step, the failure is propagated to its parent.<br />

Examples of When to Use<br />

� “Repeat on” property is set to FAILURE. Use when a service accesses a remote server and<br />

you want the service to retry if the server is busy. Make the service that accesses the<br />

remote server a child element of a REPEAT flow step, and then set the Repeat on<br />

property to FAILURE. If the service attempts to access the Web site and it fails, the<br />

REPEAT flow step attempts to retry the service again. You also set a Repeat interval that<br />

causes the REPEAT flow condition to wait a period of time before invoking the service<br />

again.<br />

� “Repeat on” property is set to SUCCESS. Use in a Web-automation service when you want<br />

to repeat a load and query step and a “Next Page” button exists in the current<br />

document, indicating that there are additional pages to be processed. End the<br />

REPEAT flow step when the query step fails to retrieve a “Next Page” button in the<br />

current document.<br />

The SEQUENCE step forms a collection of child steps that execute sequentially. This is<br />

useful when you want to group a set of steps as a target for a BRANCH step.<br />

You can set an exit condition that indicates whether the sequence should exit prematurely<br />

and, if so, under what condition. Specify one of the following exit conditions:<br />

� Exit the sequence when a child step fails. Use this condition when you want to ensure that<br />

all child steps are completed successfully. If any child step fails, the sequence ends<br />

prematurely and the sequence fails.<br />

� Exit the sequence when a child step succeeds. Use this condition when you want to define<br />

a set of alternative services, so that if one fails, another is attempted. If a child step<br />

succeeds, the sequence ends prematurely and the sequence succeeds.<br />

<strong>webMethods</strong> <strong>Developer</strong> User’s <strong>Guide</strong> Version 6.5, Service Pack 3 � � � 408


A. <strong>webMethods</strong> Flow Steps<br />

� Exit the sequence after executing all child steps. Use this condition when you want to<br />

execute all of the child steps regardless of their outcome. The sequence does not end<br />

prematurely.<br />

The SEQUENCE step<br />

First...<br />

Properties<br />

If exit condition<br />

is not met...<br />

child child child<br />

The SEQUENCE step has the following properties.<br />

Property Description<br />

Comments Optional. Specifies a descriptive comment for this step.<br />

Scope Optional. Specifies the name of a document (IData object) in the pipeline to<br />

which you want to restrict this step. If you want this step to have access to<br />

the entire pipeline, leave this property blank.<br />

Timeout Optional. Specifies the maximum number of seconds that this step should<br />

run. If this time elapses before the step completes, the server waits for the<br />

step to complete and then raises an exception.<br />

If you want to use the value of a pipeline variable for this property, type the<br />

variable name between % symbols. For example, %expiration%.<br />

If you do not need to specify a time-out period, leave Timeout blank.<br />

Label Optional. (Required if you are using this step as a target for a BRANCH or<br />

EXIT step.) Specifies a name for this specific step, or a null, unmatched, or<br />

empty string ($null, $default, blank).<br />

Exit on Required. Specifies when to exit the SEQUENCE step.<br />

Specify this value... To...<br />

If exit condition<br />

is not met...<br />

<strong>webMethods</strong> <strong>Developer</strong> User’s <strong>Guide</strong> Version 6.5, Service Pack 3 � � � 409


Property Description<br />

A. <strong>webMethods</strong> Flow Steps<br />

FAILURE Exit the sequence when a child step fails. (Execution<br />

continues with the next flow step in the flow service.)<br />

Conditions that Will Cause the SEQUENCE Step to Fail<br />

This section describes the conditions that cause failure based on the exit condition for the<br />

sequence.<br />

If Exit on is set to FAILURE, conditions that will cause a failure include:<br />

� One of the child steps fails.<br />

� The SEQUENCE step does not complete before the time-out period expires.<br />

If Exit on is set to SUCCESS, conditions that will cause a failure include:<br />

� All the child steps fail.<br />

The SEQUENCE step executes its child steps until<br />

either one fails or until it executes all its child steps.<br />

This is the default.<br />

Note: When a SEQUENCE step exits on failure, the<br />

Integration Server rolls back the pipeline contents. That<br />

is, the Integration Server returns the pipeline to the<br />

state it was in before the SEQUENCE step executed.<br />

SUCCESS Exit the sequence when a child step executes<br />

successfully or after all child steps fail. (Execution<br />

continues with the next flow step in the flow service.)<br />

DONE Exit the sequence after all child steps execute.<br />

The SEQUENCE step executes all of its child steps<br />

regardless of whether they succeed or fail.<br />

� The SEQUENCE step does not complete before the time-out period expires.<br />

If Exit on is set to DONE, conditions that will cause a failure include:<br />

� The SEQUENCE step does not complete before the time-out period expires.<br />

<strong>webMethods</strong> <strong>Developer</strong> User’s <strong>Guide</strong> Version 6.5, Service Pack 3 � � � 410


Appendix B. Regular Expressions<br />

� What Is a Regular Expression? . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 412<br />

� Using a Regular Expression in a Mask . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 412<br />

� Regular Expression Operators . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 413<br />

<strong>webMethods</strong> <strong>Developer</strong> User’s <strong>Guide</strong> Version 6.5, Service Pack 3 � � � 411


What Is a Regular Expression?<br />

B. Regular Expressions<br />

A regular expression is a pattern-matching technique used extensively in UNIX<br />

environments. <strong>webMethods</strong> <strong>Developer</strong> lets you use regular expressions to specify<br />

pattern-matching strings for some of its functions. For example, you can use a regular<br />

expression to specify an index, a property, or a mask in a <strong>webMethods</strong> Query Language<br />

(WQL) statement. You can also use a regular expression to specify the switch value for a<br />

BRANCH step.<br />

To specify a regular expression, you must enclose the expression between / symbols.<br />

When the server encounters this symbol, it knows to interpret the characters between<br />

these symbols as a pattern-matching string (that is, a regular expression).<br />

A simple pattern-matching string such as /string/ matches any element that contains<br />

string. So, for example, the regular expression /<strong>webMethods</strong>/ would match all of the<br />

following strings:<br />

“<strong>webMethods</strong>”<br />

“You use <strong>webMethods</strong> Integration Server to execute services”<br />

“Exchanging data with XML is easy using <strong>webMethods</strong>”<br />

“<strong>webMethods</strong> Integration Server”<br />

Important! Characters in regular expressions are case sensitive.<br />

Using a Regular Expression in a Mask<br />

When you use a regular expression as a mask, you use parenthesis to specify which<br />

characters you want to collect. For example, the object reference:<br />

doc.p[].text[/(.{30}).*/]<br />

retains the first 30 characters in each matching element and discards the rest.<br />

<strong>webMethods</strong> <strong>Developer</strong> User’s <strong>Guide</strong> Version 6.5, Service Pack 3 � � � 412


Regular Expression Operators<br />

B. Regular Expressions<br />

Following are the operators supported in the <strong>webMethods</strong> implementation of regular<br />

expressions.<br />

Use this<br />

symbol… To…<br />

. Match any single character except a new line.<br />

Example doc.p[/web.ethods/].text<br />

This example would return any paragraph containing the string ‘web’<br />

followed by any single character and the string ‘ethods’. It would match<br />

both ‘<strong>webMethods</strong>’ and ‘webmethods’.<br />

^ Match the beginning of the string or line.<br />

Example doc.p[/^<strong>webMethods</strong>/].text<br />

This example would return any paragraph containing the string<br />

‘<strong>webMethods</strong>’ at the beginning of the element or at the beginning of any<br />

line within that element.<br />

$ Match the end of the string or line.<br />

Example doc.p[/<strong>webMethods</strong>$/].text<br />

This example would return any paragraph containing the string<br />

‘<strong>webMethods</strong>’ at the end of the paragraph element or at the end of any<br />

line within that element.<br />

* Match the preceding item zero or more times.<br />

Example doc.p[/part *555-A/].text<br />

This example would return any paragraph containing the string ‘part’<br />

followed by zero or more spaces and then the characters ‘555-A’.<br />

+ Match the preceding item 1 or more times.<br />

Example doc.p[/part +555-A/].text<br />

This example would return any paragraph containing the string ‘part’<br />

followed by one or more spaces and then the characters ‘555-A’.<br />

? Match the preceding item 0 or 1 times.<br />

Example doc.p[/part ?555-A/].text<br />

This example would return any paragraph containing the string ‘part’<br />

followed by zero or one space and then the characters ‘555-A’.<br />

<strong>webMethods</strong> <strong>Developer</strong> User’s <strong>Guide</strong> Version 6.5, Service Pack 3 � � � 413


Use this<br />

symbol… To…<br />

B. Regular Expressions<br />

( ) When used in an index, these characters group an item within the regular<br />

expression.<br />

Example doc.p[/part(,0)+May/].text<br />

This example would return any paragraph containing the string ‘part’<br />

followed by one or more occurrences of the characters ‘,0’ and then the<br />

characters ‘May”.<br />

When used in a mask, they specify characters that you want to retain.<br />

Example doc.p[].text[(^.{25}).*]<br />

This example would keep the first 25 characters within each paragraph<br />

and discard the rest.<br />

{n } Match the preceding item exactly n times.<br />

Example doc.p[/^.{24}webmethods/].text<br />

This example would return any paragraph in which the word<br />

‘webmethods’ started in the 25th character position of the paragraph.<br />

{n ,} Match the preceding item n or more times.<br />

Example doc.p[/^.{10,}webmethods/].text<br />

This example would return any paragraph in which the word<br />

‘webmethods’ appeared anywhere after the 10th character position of the<br />

paragraph. That is, this example would return a paragraph in which the<br />

word ‘webmethods’ started in the 11th or later character position of the<br />

paragraph.<br />

{0,m } Match the preceding item none or at most m times.<br />

Example doc.p[/^.{0,4}webmethods/].text<br />

This example would return any paragraph in which the word<br />

‘webmethods’ started in any of the first 5 character positions of the<br />

paragraph.<br />

{n ,m } Match the preceding item at least n times, but not more than m times.<br />

Example doc.p[/^.{1,4}webmethods/].text<br />

This example would return any paragraph in which the word<br />

‘webmethods’ started in character position 2 through 5 of the paragraph.<br />

<strong>webMethods</strong> <strong>Developer</strong> User’s <strong>Guide</strong> Version 6.5, Service Pack 3 � � � 414


Use this<br />

symbol… To…<br />

| Match the expression that precedes or follows this character.<br />

Example doc.p[/webmethods|<strong>webMethods</strong>/].text<br />

B. Regular Expressions<br />

This example would return any paragraph that contained either<br />

‘webmethods’ or ‘<strong>webMethods</strong>’.<br />

\b Match a word boundary.<br />

Example doc.p[/\bport\b/].text<br />

This example would return any paragraph that contained the word ‘port’,<br />

but not paragraphs that contained these characters as part of a larger<br />

word, such as ‘import’, ‘support’, ‘ports’ or ‘ported’.<br />

\B Match a boundary that is not a word boundary.<br />

Example doc.p[/\B555-A/].text<br />

This example would return any paragraph that contained the characters<br />

‘555-A’ as part of a larger word such as AZ555-A, or Dept555-A, but not<br />

‘555-A’ alone.<br />

\A Match only at the beginning of a string (equivalent to ^).<br />

Example doc.p[/\A<strong>webMethods</strong>/].text<br />

This example would return any paragraph containing the string<br />

‘<strong>webMethods</strong>’ at the beginning of the element or at the beginning of any<br />

line within that element.<br />

\Z Match only at the end of a string (or before a new line at the end).<br />

Example doc.p[/<strong>webMethods</strong>\Z/].text<br />

This example would return any paragraph containing the string<br />

‘<strong>webMethods</strong>’ at the end of the paragraph element or at the end of any<br />

line within that element.<br />

\n Match a new line.<br />

Example doc.p[/<strong>webMethods</strong>\n/].text<br />

This example would return any paragraph containing the string<br />

‘<strong>webMethods</strong>’ followed by the new line character.<br />

\r Match a carriage return.<br />

Example doc.p[/<strong>webMethods</strong>\r/].text<br />

This example would return any paragraph containing the string<br />

‘<strong>webMethods</strong>’ followed by a carriage return.<br />

<strong>webMethods</strong> <strong>Developer</strong> User’s <strong>Guide</strong> Version 6.5, Service Pack 3 � � � 415


Use this<br />

symbol… To…<br />

\t Match a tab character.<br />

Example doc.p[/\t<strong>webMethods</strong>/].text<br />

B. Regular Expressions<br />

This example would return any paragraph containing the string<br />

‘<strong>webMethods</strong>’ preceded by a tab character.<br />

\f Match a form feed character.<br />

Example doc.p[/<strong>webMethods</strong>\f/].text<br />

This example would return any paragraph containing the string<br />

‘<strong>webMethods</strong>’ followed by a form feed character.<br />

\d Match any digit. Same as [0-9].<br />

Example doc.p[/part \d555-A/].text<br />

This example would return any paragraph containing a part number that<br />

starts with any digit 0 through 9, and is followed by the characters 555-A.<br />

Therefore, it would match ‘part 1555-A’ but not ‘part A555-A’ or ‘part<br />

#555-A’.<br />

\D Match any non-digit. Same as [^0-9].<br />

Example doc.p[/part \D555-A/].text<br />

This example would return any paragraph containing a part number that<br />

starts with any character other than 0 through 9, and is followed by the<br />

characters 555-A. Therefore, it would match ‘part A555-A’ and ‘part #555-<br />

A’, but not ‘part 1555-A’.<br />

\w Match any word character. Same as [0-9a-z_A-Z].<br />

Example doc.p[/part \w4555-A/].text<br />

This example would return any paragraph containing a part number that<br />

starts with a letter or digit and is followed by the characters 555-A.<br />

Therefore, it would match ‘part A555-A’ and ‘part 1555-A’, but not ‘part<br />

#555-A’.<br />

\W Match any nonword character. Same as [^0-9a-z_A-Z].<br />

Example doc.p[/part \W4555-A/].text<br />

This example would return any paragraph containing a part number that<br />

starts with a character other than a letter or digit, and is followed by the<br />

characters 555-A. Therefore, it would match ‘part #555-A’ and ‘part -555-<br />

A’, but not ‘part 1555-A’ or ‘part A555-A’.<br />

<strong>webMethods</strong> <strong>Developer</strong> User’s <strong>Guide</strong> Version 6.5, Service Pack 3 � � � 416


Use this<br />

symbol… To…<br />

\s Match any white-space character. Same as [\t\n\r\f].<br />

Example doc.p[/\s<strong>webMethods</strong>/].text<br />

B. Regular Expressions<br />

This example would return any paragraph containing the string<br />

‘<strong>webMethods</strong>’ if it is preceded by a tab character, a new line character, a<br />

carriage return, or a form-feed character.<br />

\S Match any nonwhite-space character. Same as [^\t\n\r\f].<br />

Example doc.p[/\S<strong>webMethods</strong>/].text<br />

This example would return any paragraph containing the string<br />

‘<strong>webMethods</strong>’, if that string is not preceded by a tab character, a new line<br />

character, a carriage return, or a form-feed character.<br />

\0 Match a null string.<br />

Example doc.p[/[^\0]/].text<br />

This example would return any paragraph that is not empty (null).<br />

\xnn Match any character with the hexadecimal value nn.<br />

Example doc.p[/\x1F<strong>webMethods</strong>/].text<br />

This example would return any paragraph containing the ASCII unitseparator<br />

character (1F) followed by the characters ‘<strong>webMethods</strong>’.<br />

[ ] Match any character within the brackets.<br />

Example doc.p[/part [023]555-A/].text<br />

This example would return any paragraph containing a part number that<br />

starts with the numbers 0, 2, or 3 and is followed by the characters 555-A.<br />

Therefore, it would match ‘part 0555-A’ and ‘part 2555-A’, but not ‘part<br />

4555-A’.<br />

The following characters have special meaning when used within<br />

brackets:<br />

Use this char… To…<br />

^ Exclude characters from the pattern.<br />

Example doc.p[/part [^023]555-A/].text<br />

This example would return any paragraph containing a<br />

part number that does not start with the numbers 0, 2,<br />

or 3, but is followed by the characters 555-A. Therefore,<br />

it would match ‘part 4555-A’ and ‘part A555-A’, but not<br />

‘part 0555-A’.<br />

<strong>webMethods</strong> <strong>Developer</strong> User’s <strong>Guide</strong> Version 6.5, Service Pack 3 � � � 417


Use this<br />

symbol… To…<br />

- Specify a range of allowed characters.<br />

Example doc.p[/part [A-M]555-A/].text<br />

B. Regular Expressions<br />

This example would return any paragraph containing a<br />

part number that starts with any letter A through M<br />

and is followed by the characters 555-A. Therefore, it<br />

would match ‘part A555-A’ and ‘part J555-A’, but not<br />

‘part N555-A’.<br />

<strong>webMethods</strong> <strong>Developer</strong> User’s <strong>Guide</strong> Version 6.5, Service Pack 3 � � � 418


Appendix C. Supported Data Types<br />

� Data Types . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 420<br />

� Default Pipeline Rules for Linking to and from Array Variables . . . . . . . . . . . . . . . . . . . . . . . . . 424<br />

<strong>webMethods</strong> <strong>Developer</strong> User’s <strong>Guide</strong> Version 6.5, Service Pack 3 � � � 419


Data Types<br />

C. Supported Data Types<br />

Data is passed in and out of a service through an IData object. An IData object is the<br />

collection of name/value pairs on which a service operates. An IData object can contain<br />

any number of elements of any valid Java objects, including additional IData objects and<br />

IDataCodable objects.<br />

Each element stored in an IData object corresponds to a data type. The following table<br />

identifies the data types supported by <strong>Developer</strong>.<br />

Data Type Icon Description Java Type<br />

String String of characters. java.lang.String<br />

String list A one-dimensional String<br />

array.<br />

String table A two-dimensional String<br />

array.<br />

Document A data structure that is a<br />

container for other variables.<br />

Documents can contain<br />

variables of any other data<br />

type. The contents of a<br />

document (IData object) are<br />

stored as key/value pairs<br />

where the variable name is<br />

the key.<br />

Document list A one-dimensional array of IS<br />

document types (IData [ ]or<br />

Values [ ]).<br />

Document<br />

reference<br />

Document<br />

reference list<br />

A document whose structure<br />

is defined by an IS document<br />

type.<br />

A document list whose<br />

structure is defined by an IS<br />

document type.<br />

java.lang.String[ ]<br />

java.lang.String[ ][ ]<br />

com.wm.data.IData<br />

com.wm.util.Values<br />

For more information, see<br />

the <strong>webMethods</strong> Integration<br />

Server Java API Reference.<br />

com.wm.data.IData [ ]<br />

com.wm.util.Values [ ]<br />

com.wm.util.Table<br />

Reference to an existing<br />

object which implements<br />

the com.wm.data.IData<br />

interface or a reference to<br />

an existing<br />

com.wm.util.Values object.<br />

Reference to an existing<br />

object which implements<br />

the com.wm.data.IData<br />

interface or a reference to<br />

an existing<br />

com.wm.util.Values object.<br />

<strong>webMethods</strong> <strong>Developer</strong> User’s <strong>Guide</strong> Version 6.5, Service Pack 3 � � � 420


Data Type Icon Description Java Type<br />

Object A data type that does not fall<br />

into any of the data types<br />

described in the above rows,<br />

and is not declared to be one<br />

of the basic Java classes<br />

supported natively by<br />

Integration Server. This icon<br />

is used for Objects of<br />

unknown type.<br />

Object list An array of Objects of<br />

unknown type.<br />

Java Classes for Objects<br />

C. Supported Data Types<br />

Any subclass of<br />

java.lang.Object.<br />

You can further describe the contents of an Object or Object list variable by applying a<br />

Java class to the variable. When you apply a supported Java class to an Object or Object<br />

list variable, <strong>Developer</strong> changes the icon for the variable. Applying Java classes to Objects<br />

and Object lists can provide the following benefits:<br />

� Other developers can easily see the types your service expects as inputs and produces<br />

as output.<br />

� Other developers can easily see the types contained in an IS document type.<br />

� You can input values for the variable when testing and debugging.<br />

Example<br />

java.util.InputStream<br />

An array of any subclass of<br />

java.lang.Object.<br />

Example<br />

java.util.InputStream[ ]<br />

Note: You can view the actual data types represented by Object or Object list icons in<br />

built-in services by looking up the service in the <strong>webMethods</strong> Integration Server Built-In<br />

Services Reference.<br />

Note: <strong>Developer</strong> displays small symbols next to a variable icon to indicate validation<br />

constraints. <strong>Developer</strong> uses to indicate an optional variable. <strong>Developer</strong> uses the ‡<br />

symbol to denote a variable with a content constraint. For information about applying<br />

constraints to variables, see “Applying Constraints to Variables” on page 261.<br />

� You can assign values to variables in the pipeline using the Set Value modifier.<br />

<strong>webMethods</strong> <strong>Developer</strong> User’s <strong>Guide</strong> Version 6.5, Service Pack 3 � � � 421


C. Supported Data Types<br />

Note: When you input values for a constrained Object during testing or when assigning a<br />

value in the pipeline, <strong>Developer</strong> validates the data to make sure it is of the correct type.<br />

The following table identifies the Java classes you can apply to Objects and Object list<br />

variables in <strong>Developer</strong>.<br />

Data Type Icon Description Java Class<br />

boolean True or false. java.lang.Boolean<br />

boolean list A one-dimensional boolean<br />

array.<br />

byte Signed integer. The value<br />

must be greater than or equal<br />

to –128 but less than or equal<br />

to 127.<br />

java.lang.Boolean[ ]<br />

java.lang.Byte<br />

byte [ ] A one-dimensional byte array. primitive type<br />

byte list A one-dimensional byte array. java.lang.Byte[ ]<br />

character A single unicode character. java.lang.Character<br />

character list A one-dimensional character<br />

array.<br />

java.lang.Character[ ]<br />

date Date and time. java.util.Date<br />

date list A one-dimensional date array. java.util.Date[ ]<br />

double Double-precision floating<br />

point number.<br />

double list A one-dimensional double<br />

array.<br />

float Standard-precision floating<br />

point number.<br />

java.lang.Double<br />

java.lang.Double[ ]<br />

java.lang.Float<br />

float list A one-dimensional float array. java.lang.Float[ ]<br />

integer Signed integer. The value<br />

must be greater than or equal<br />

to -2147483647 but less than<br />

or equal to 2147483647.<br />

java.lang.Integer<br />

<strong>webMethods</strong> <strong>Developer</strong> User’s <strong>Guide</strong> Version 6.5, Service Pack 3 � � � 422


Data Type Icon Description Java Class<br />

integer list A one-dimensional integer<br />

array.<br />

long Signed integer. The value<br />

must be greater than or equal<br />

to<br />

–9223372036854775808 but<br />

less than or equal to<br />

9223372036854775807.<br />

How <strong>webMethods</strong> <strong>Developer</strong> Supports Tables<br />

C. Supported Data Types<br />

java.lang.Integer[ ]<br />

java.lang.Long<br />

long list A one-dimensional long array. java.lang.Long[ ]<br />

short Signed integer. The value<br />

must be greater than or equal<br />

to -32768 but less than or<br />

equal to 32767.<br />

short list A one-dimensional short<br />

array.<br />

java.lang.Short<br />

java.lang.Short[ ]<br />

Note: Object and Object list variables constrained with a Java classes should be linked only<br />

to other Object and Object list variables of the same Java class or of unknown type.<br />

Although <strong>Developer</strong> permits a link between constrained Objects of different Java classes,<br />

the run-time behavior is undefined. For more information about specifying Java classes<br />

for Objects, see “Considerations for Object Constraints” on page 263.<br />

With the exception of String table, <strong>Developer</strong> does not provide a separate data type for<br />

tables. However, tables can appear as document lists or Objects. Tables that are instances<br />

of com.wm.util.Table appear as document lists in <strong>webMethods</strong> <strong>Developer</strong>. These tables<br />

can be used as document lists in flow services. Services in the WmDB package use tables<br />

that are instances of wm.com.util.Table.<br />

Tables can also be declared as Objects. Objects or user-defined table-like objects that do<br />

not implement the com.wm.util.pluggable.WMIDataList interface appear as Objects of<br />

unknown type in <strong>webMethods</strong> <strong>Developer</strong>.<br />

<strong>webMethods</strong> <strong>Developer</strong> User’s <strong>Guide</strong> Version 6.5, Service Pack 3 � � � 423


C. Supported Data Types<br />

Default Pipeline Rules for Linking to and from Array Variables<br />

When you create links between scalar and array variables, you can specify which element<br />

of the array variable you want to link to or from. Scalar variables are those that hold a<br />

single value, such as String, IS document type, and Object. Array variables are those that<br />

hold multiple values, such as String list, String table, document list, and Object list. For<br />

example, you can link a String to the second element of a String list.<br />

If you do not specify which element in the array variable that you want to link to or from,<br />

<strong>Developer</strong> uses the default rules on the Pipeline tab to determine the value of the target<br />

variable. The following table identifies the default pipeline rules for linking to and from<br />

array variables.<br />

If you link… To… Then…<br />

A scalar<br />

variable<br />

An array variable that is<br />

empty (the variable does not<br />

have a defined length)<br />

If you link… To… Then…<br />

A scalar<br />

variable<br />

value [empty] value<br />

value X<br />

Y<br />

Z<br />

An array variable with a<br />

defined length<br />

The link defines the length of the<br />

array variable; that is, it contains<br />

one element and has length of one.<br />

The first (and only) element in the<br />

array is assigned the value of the<br />

scalar variable.<br />

The length of the array is preserved<br />

and each element of the array is<br />

assigned the value of the scalar<br />

variable.<br />

value<br />

value<br />

value<br />

<strong>webMethods</strong> <strong>Developer</strong> User’s <strong>Guide</strong> Version 6.5, Service Pack 3 � � � 424


If you link… To… Then…<br />

An array<br />

variable<br />

X<br />

Y<br />

Z<br />

C. Supported Data Types<br />

A scalar variable The scalar variable is assigned the<br />

first element in the array.<br />

If you link… To… Then…<br />

An array<br />

variable<br />

X<br />

Y<br />

Z<br />

[empty] X<br />

An array variable that does<br />

not have a defined length<br />

[empty] X<br />

Y<br />

Z<br />

The link defines the length of the<br />

target array variable; that is, it will<br />

be the same length as the source<br />

array variable. The elements in the<br />

target array variable are assigned<br />

the values of the corresponding<br />

elements in the source array<br />

variable.<br />

<strong>webMethods</strong> <strong>Developer</strong> User’s <strong>Guide</strong> Version 6.5, Service Pack 3 � � � 425


If you link… To… Then…<br />

An array<br />

variable<br />

X<br />

Y<br />

Z<br />

V<br />

W<br />

X<br />

Y<br />

Z<br />

An array variable that has a<br />

defined length<br />

A<br />

B<br />

C<br />

A<br />

B<br />

C<br />

C. Supported Data Types<br />

The length of the source array<br />

variable must equal the length of the<br />

target array variable. If the lengths<br />

do not match, the link will not<br />

occur. If the lengths are equal, the<br />

elements in the target array variable<br />

are assigned the values of the<br />

corresponding elements in the<br />

source array variable.<br />

No link occurs.<br />

Note: A source variable that is the child of a document list is treated like an array because<br />

there is one value of the source variable for each document in the document list. For<br />

example:<br />

<strong>webMethods</strong> <strong>Developer</strong> User’s <strong>Guide</strong> Version 6.5, Service Pack 3 � � � 426<br />

X<br />

Y<br />

Z


If you link... To...<br />

DocumentList1<br />

String1<br />

Where the value of DocumentList1 is... Then the value of StringList1 is…<br />

DocumentList1<br />

DocumentList1 [0]<br />

String1<br />

a<br />

DocumentList1 [1]<br />

String1 b<br />

DocumentList1 [2]<br />

String1 c<br />

StringList1<br />

StringList1<br />

C. Supported Data Types<br />

<strong>webMethods</strong> <strong>Developer</strong> User’s <strong>Guide</strong> Version 6.5, Service Pack 3 � � � 427<br />

a<br />

b<br />

c


C. Supported Data Types<br />

<strong>webMethods</strong> <strong>Developer</strong> User’s <strong>Guide</strong> Version 6.5, Service Pack 3 � � � 428


Appendix D. Conditional Expressions<br />

� Overview . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 430<br />

� Syntax . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 431<br />

� Operators . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 434<br />

� Precedence . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 441<br />

� Addressing Variables . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 441<br />

� Rules for Use of Expression Syntax with the Broker . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 444<br />

<strong>webMethods</strong> <strong>Developer</strong> User’s <strong>Guide</strong> Version 6.5, Service Pack 3 � � � 429


Overview<br />

D. Conditional Expressions<br />

<strong>webMethods</strong> Integration Server provides syntax and operators that you can use to create<br />

expressions for use with the BRANCH step, pipeline mapping, and in trigger conditions.<br />

� In a BRANCH step, you can use an expression to determine the child step that<br />

<strong>webMethods</strong> Integration Server executes. At run time, the Integration Server executes<br />

the first child step whose conditional expression evaluates to “true”. For more<br />

information about the BRANCH step, see “The BRANCH Step” on page 168<br />

� In pipeline mapping, you can place a condition on the link between variables. At run<br />

time, <strong>webMethods</strong> Integration Server only executes the link if the assigned condition<br />

evaluates to “true.” For more information about applying conditions to links between<br />

variables, see “Applying Conditions to Links Between Variables” on page 214.<br />

� In triggers, you can further refine a subscription by creating filters for the publishable<br />

document types. A filter specifies criteria for the contents of a document. At run time,<br />

the Broker or Integration Server applies the filter to the document. The Broker or<br />

Integration Server will route or process the document only if the document meets the<br />

filter criteria. For more information, see the Publish-Subscribe <strong>Developer</strong>’s <strong>Guide</strong>.<br />

Important! If multiple conditions in the trigger specify the same publishable document<br />

type, the filter applied to the publishable document type must be the same in each<br />

condition.<br />

When you write expressions and filters, keep the following points in mind:<br />

� Operators, variable names, and strings are case sensitive.<br />

� White space between the tokens of an expression is ignored.<br />

� Some syntax that is valid on the Integration Server is not valid on the Broker. If the<br />

syntax is valid for a Broker, the Integration Server saves the filter with the<br />

subscription on the Broker. If the syntax is not valid, the Integration Server saves the<br />

subscription without the filter on the Broker. Subscriptions and filters are always<br />

saved on the Integration Server.<br />

For a list and an example of syntax that prevents a filter from being saved on the<br />

Broker, see “Rules for Use of Expression Syntax with the Broker” on page 444.<br />

<strong>webMethods</strong> <strong>Developer</strong> User’s <strong>Guide</strong> Version 6.5, Service Pack 3 � � � 430


Syntax<br />

D. Conditional Expressions<br />

When you create an expression, you need to determine which values to include in the<br />

expression. Values can be represented as variable names, regular expressions, numbers,<br />

and strings. The following table identifies the types of values you can use in an expression<br />

and the syntax for each value type.<br />

Value Type Syntax Description<br />

Regular<br />

Expression<br />

Variable variableName<br />

/regularExpression/ Pattern-matching string. Use the following syntax<br />

for pattern matching of variable values:<br />

–OR–<br />

%variableName%<br />

variableName = /regularExpression/<br />

For more information about regular expressions, see<br />

Appendix B, “Regular Expressions”.<br />

Example Explanation<br />

sku = /^WM[0-9]+/ Evaluates to true if the<br />

sku variable has a value<br />

that starts with “WM”<br />

and is followed by one<br />

or more digits (WM001,<br />

WM95157)<br />

Variable name. For information about how to use<br />

this syntax to address children of other variables or<br />

elements of array variables, see “Addressing<br />

Variables” on page 441.<br />

Example Explanation<br />

price Value of the price<br />

variable<br />

%address/postalCode% Value of the postalCode<br />

variable in the address<br />

document<br />

%poItems[0]% Value of the first element<br />

in the poItems array<br />

<strong>webMethods</strong> <strong>Developer</strong> User’s <strong>Guide</strong> Version 6.5, Service Pack 3 � � � 431


Value Type Syntax Description<br />

String "string"<br />

–OR–<br />

'string'<br />

D. Conditional Expressions<br />

Literal string. Use this value type to compare the<br />

value of a variable to a string.<br />

Example Explanation<br />

“Favorite Customer” Value is the literal string<br />

“Favorite Customer”<br />

‘Favorite Customer’ Value is the literal string<br />

“Favorite Customer”<br />

Note: Strings not enclosed in quotes (' or ") are<br />

interpreted as variable names.<br />

Number number Number. The following examples indicate the<br />

accepted number formats:<br />

Examples Explanation<br />

-10, 5, 100 Integers<br />

5.0, 6.02 Floating point number<br />

(java.lang.Double)<br />

6.345e+4 Scientific notation<br />

Null $null Variable is null or missing. Typically compared with<br />

a variable name to determine if the variable is null<br />

or missing from the input data.<br />

Example Explanation<br />

%quantity% = $null Evaluates to true if the<br />

quantity variable is<br />

missing from the input<br />

data or is null<br />

<strong>webMethods</strong> <strong>Developer</strong> User’s <strong>Guide</strong> Version 6.5, Service Pack 3 � � � 432


Comparing Java Objects to Constants<br />

D. Conditional Expressions<br />

If you want to create a conditional expression that compares a constrained Java Object to a<br />

constant value, you must use the following syntax to represent the constant value:<br />

If the object is<br />

constrained as type... Use this syntax...<br />

Boolean "true" or "false"<br />

Byte "xx"<br />

Example: %myBoolean%=="true"<br />

The string constant in the expression is case insensitive. For<br />

example, the expressions %myBoolean%=="true" and<br />

%myBoolean%=="tRUe" are equivalent.<br />

Example: "10" (for 0X0A)<br />

Character "a"<br />

Example: "C"<br />

Double xxxxxx.x or xxxxxx or -xxxxxx<br />

Example: 123456.0, 123456, -123456<br />

Float xxxx.x or -xxxx.x<br />

Example: 1234.1, -1234.1<br />

Integer xxxxx or -xxxxx<br />

Example: 12345, -12345<br />

Long xxxxxx or -xxxxxx<br />

Example: 123456 or -123456<br />

Short xxx or -xxx<br />

Example: 123 or -123<br />

Date "yyyy-MM-dd HH:mm:ss timezone"<br />

Example: "2002-06-25 00:00:00 EDT"<br />

<strong>webMethods</strong> <strong>Developer</strong> User’s <strong>Guide</strong> Version 6.5, Service Pack 3 � � � 433


Operators<br />

Checking for Variable Existence<br />

D. Conditional Expressions<br />

Sometimes you might want to create an expression that checks only for the existence of a<br />

variable or checks to see whether a variable is null. The following table describes the<br />

syntax used to check for variable existence.<br />

To see if… Use this syntax… Description<br />

Variable<br />

exists<br />

Variable does<br />

not exist<br />

Expressions can include relational and logical operators. Relational operators are used to<br />

compare values to each other. Logical operators are used to combine multiple expressions<br />

into a single condition.<br />

Relational Operators<br />

variableName Evaluates to true if the specified variable exists and<br />

has a non-null value.<br />

This example... Evaluates to true if...<br />

customerID The customerID variable exists<br />

and is not null.<br />

!variableName Evaluates to true if the specified variable does not<br />

exist or is null.<br />

This example... Evaluates to true if...<br />

!quantity The quantity variable does not<br />

exist or is null.<br />

!color & !size The color variable does not exist<br />

or is null and the size variable<br />

does not exist or is null.<br />

You can use relational operators to compare the value of two fields or you can compare<br />

the value of a field with a constant. The Integration Server provides two types of relational<br />

operators: standard and lexical.<br />

� Standard relational operators can be used in expressions and filters to compare the<br />

contents of fields (variables) with other variables or constants.<br />

� Lexical relational operators can be used to compare the contents of fields (variables)<br />

with string values in trigger filters.<br />

Relational operators are sometimes called comparison operators.<br />

<strong>webMethods</strong> <strong>Developer</strong> User’s <strong>Guide</strong> Version 6.5, Service Pack 3 � � � 434


D. Conditional Expressions<br />

Note: You can also use standard relational operators to compare string values. However,<br />

filters that use standard relational operators to compare string values will not be saved<br />

with the trigger subscription on the Broker. If the subscription filter resides only on the<br />

Integration Server, the Broker automatically places the document in the subscriber’s<br />

queue. The Broker does not evaluate the filter for the document. The Broker routes all of<br />

documents to the subscriber, creating greater network traffic between the Broker and the<br />

Integration Server and requiring more processing by the Integration Server.<br />

Standard Relational Operators<br />

You can use the standard relational operators to compare the contents of a variable with<br />

any type of value (numerical, string, Boolean, dates, etc.) or another variable.<br />

When comparing strings using the standard operators, the Integration Server uses a<br />

binary code point comparison algorithm. In this algorithm, the Integration Server<br />

compares each byte in the first string with each byte in the second string to determine<br />

which string is numerically greater. For example, “A” has a value of 65 and “a” has a value<br />

of 97, so “a” is greater than “A”.<br />

Keep the following points in mind when using standard relational operators to compare<br />

strings:<br />

� The Integration Server considers A to be the lowest letter and Z to be the highest (for<br />

example, A < B, A < Z, B > A, Z > A).<br />

� The Integration Server considers lowercase letters to be greater than the matching<br />

uppercase letter (for example, a > A, A < a, a < B, c > A).<br />

The following table identifies the standard relational operators you can use in expressions<br />

and filters.<br />

Operator Syntax Description<br />

= a = b Equal to.<br />

This example... Evaluates to true if...<br />

customerID =<br />

"<strong>webMethods</strong>"<br />

== a == b Equal to.<br />

The value of the customerId<br />

variable is “<strong>webMethods</strong>.”<br />

This example... Evaluates to true if..<br />

sku == "WM001" The value of the sku variable is<br />

“WM001.”<br />

<strong>webMethods</strong> <strong>Developer</strong> User’s <strong>Guide</strong> Version 6.5, Service Pack 3 � � � 435


Operator Syntax Description<br />

!= a != b Not equal to.<br />

This example... Evaluates to true if..<br />

D. Conditional Expressions<br />

quantity != 0 The value of the quantity variable<br />

does not equal 0 (zero).<br />

a b Not equal to.<br />

This example... Evaluates to true if..<br />

state 'ME' The value of the state variable does<br />

not equal ME (Maine).<br />

> a > b Greater than.<br />

This example... Evaluates to true if..<br />

price > 100 The value of the price variable is<br />

greater than 100.<br />

%companyID% > "Acme" The value of the companyID<br />

variable is greater than Acme.<br />

>= a >= b Greater than or equal to.<br />

This example... Evaluates to true if..<br />

%totalPrice% >= 100 The value of the totalPrice variable<br />

is greater than or equal to 100.<br />

companyID >= "Acme" The value of the companyID<br />

variable is greater than or equal to<br />

Acme.<br />

< a < b Less than.<br />

This example... Evaluates to true if..<br />

quantity < 5 The value of the quantity variable is<br />

less than 5.<br />

companyID < "Acme" The value of the companyID<br />

variable is less than Acme.<br />

<strong>webMethods</strong> <strong>Developer</strong> User’s <strong>Guide</strong> Version 6.5, Service Pack 3 � � � 436


Operator Syntax Description<br />


The following table describes the lexical operators that you can use in filters.<br />

Operator Description<br />

L_EQUALS Lexical equal to.<br />

This example... Evaluates to true if..<br />

%myString% L_EQUALS<br />

"abc"<br />

L_NOT_EQUALS Lexical not equal to.<br />

D. Conditional Expressions<br />

The value of the myString<br />

variable is abc.<br />

This example... Evaluates to true if..<br />

%myString% L_NOT_EQUALS<br />

"abc"<br />

L_LESS_THAN Lexical less than.<br />

The value of the myString<br />

variable is not abc.<br />

This example... Evaluates to true if..<br />

%myString% L_LESS_THAN<br />

"abc"<br />

L_LESS_OR_EQUAL Lexical less than or equal to.<br />

The value of the myString<br />

variable is less than abc.<br />

This example... Evaluates to true if..<br />

%myString%<br />

L_LESS_OR_EQUAL "abc"<br />

L_GREATER_THAN Lexical greater than.<br />

The value of the myString<br />

variable is less than or equal<br />

to abc.<br />

This example... Evaluates to true if..<br />

%myString%<br />

L_GREATER_THAN "abc"<br />

L_GREATER_OR_EQUAL Lexical greater than or equal to.<br />

The value of the myString<br />

variable is greater than abc.<br />

This example... Evaluates to true if..<br />

%myString%<br />

L_GREATER_OR_EQUAL "abc"<br />

The value of the myString<br />

variable is greater than or<br />

equal to abc.<br />

<strong>webMethods</strong> <strong>Developer</strong> User’s <strong>Guide</strong> Version 6.5, Service Pack 3 � � � 438


Logical Operators<br />

D. Conditional Expressions<br />

You can use the following logical operators in expressions to create conditions consisting<br />

of more than one expression:<br />

Operator Syntax Description<br />

! ! expr Negates the next expression.<br />

This example... Evaluates to true if..<br />

! (%sku% = "WM001") The value of the sku variable is<br />

not equal to WM001.<br />

not not expr Negates the next expression.<br />

This example... Evaluates to true if..<br />

not (color = "blue") The color variable is not equal to<br />

blue.<br />

| expr | expr Logical *OR. True if either of the expressions is true.<br />

|| expr ||<br />

expr<br />

or expr or<br />

expr<br />

This example... Evaluates to true if..<br />

%color% = "blue" |<br />

%color% = "red"<br />

The value of the color variable is<br />

blue or red.<br />

Logical OR. True if either of the expressions is true.<br />

This example... Evaluates to true if..<br />

totalPrice > 1000 ||<br />

customerID =<br />

'Favorite<br />

Customer'<br />

The value of the totalPrice<br />

variable is greater than 1000 or<br />

the value of the customerID<br />

variable equals Favorite<br />

Customer.<br />

Logical OR. True if either of the expressions is true.<br />

<strong>webMethods</strong> <strong>Developer</strong> User’s <strong>Guide</strong> Version 6.5, Service Pack 3 � � � 439


Operator Syntax Description<br />

This example... Evaluates to true if..<br />

creditCardNum = $null<br />

or<br />

cardExpireDate =<br />

$null<br />

or cardExpireDate = 20 &&<br />

totalPrice >= 100<br />

The value of the quantity<br />

variable is greater than or equal<br />

to 20 and the value of the<br />

totalPrice variable is greater<br />

than or equal to 100.<br />

Logical AND. Both expressions must evaluate to true for the<br />

entire condition to be true.<br />

This example... Evaluates to true if..<br />

!color and !size The color variable does not exist<br />

in the input or is null and the<br />

size variable does not exist in<br />

the input or is null.<br />

<strong>webMethods</strong> <strong>Developer</strong> User’s <strong>Guide</strong> Version 6.5, Service Pack 3 � � � 440


Precedence<br />

Addressing Variables<br />

D. Conditional Expressions<br />

<strong>webMethods</strong> Integration Server evaluates expressions in a condition according to the<br />

precedence level of the operators in the expressions.<br />

The following table identifies the precedence level of each operator you can use in an<br />

expression.<br />

Precedence Level Operators<br />

1 ( )<br />

2 not, !<br />

3 =, ==, !=, , >, >=,


Use this notation… To…<br />

Notes:<br />

D. Conditional Expressions<br />

arrayVariableName[index] Address an element in an array.<br />

Example: orderItems[0]<br />

Value of the first element in the<br />

orderItems array.<br />

arrayVariableName[rowIndex][columnIndex] Address an element in a<br />

two-dimensional array (String table).<br />

Example: dictionary[1][2]<br />

Value of the element located in the<br />

third column of the second row in the<br />

dictionary array.<br />

duplicateVariableName(index) Address an occurrence of a variable<br />

where there are multiple variables<br />

with the same name in the document<br />

or pipeline. The index is zero-based.<br />

Example: address(1)<br />

Value of the second variable named<br />

address.<br />

%"variableWithSpecialCharacters"% Address a variable whose name<br />

contains special characters. Variables<br />

that contain special characters must be<br />

enclosed in quotation marks.<br />

Example: %"address(work)"%<br />

Value of the variable named<br />

address(work).<br />

For more information, see<br />

“Addressing Variables that Contain<br />

Special Characters” below.<br />

� To view the path to a variable in the pipeline, rest the mouse pointer over the variable<br />

name. <strong>Developer</strong> displays the variable path in a tool tip.<br />

� To copy the path to a variable in a pipeline, select the variable, right-click, and select<br />

Copy.<br />

� You can enclose variable names in %, for example %buyerInfo/state%. If the variable<br />

name includes special characters, you must enclose the path to the variable in %<br />

<strong>webMethods</strong> <strong>Developer</strong> User’s <strong>Guide</strong> Version 6.5, Service Pack 3 � � � 442


D. Conditional Expressions<br />

(percent) symbols and enclose the variable name in " " (quotation marks). For more<br />

information about using variables as values in expressions, see “Syntax” on page 431.<br />

Addressing Variables that Contain Special Characters<br />

If a variable name contains any of the special characters listed in below, you need to use<br />

the following notation to address the variable:<br />

� Enclose the path to the variable and the variable name in % (percent symbols).<br />

� Enclose the variable name that contains special characters in " (quotation marks).<br />

Following are some examples of how to address variables that contain special characters.<br />

Type... To...<br />

%"Date/Time"% Address a variable named Date/Time.<br />

%purchaseOrder/"Date/Time"% Address a variable named Date/Time in the<br />

document variable purchaseOrder.<br />

Typing Special Characters in Expressions<br />

Note: If you did not enclose Date/Time in<br />

quotation marks, and instead had<br />

%purchaseOrder/Date/Time% or<br />

%"purchaseOrder/Date/Time"%, the<br />

expression would address a variable named<br />

Time in a document named Date that was<br />

contained in a document named<br />

purchaseOrder.<br />

%"address(work)"/"phone(cell)"% Address a variable named phone(cell) in the<br />

document variable address(work).<br />

%"Date\\Time"% Address a variable named Date\Time.<br />

You enter most of the special characters in an expression just as you would enter them<br />

when creating the variable name. However, for three of the special characters (the<br />

backslash, percent symbol, and quotation marks), you need to use a combination of keys.<br />

The following table identifies the special characters for variable names and any key<br />

sequences that you need to use to enter a variable name with that character in an<br />

expression.<br />

<strong>webMethods</strong> <strong>Developer</strong> User’s <strong>Guide</strong> Version 6.5, Service Pack 3 � � � 443


Character Character Name Special sequence<br />

\ backslash \\<br />

[ opening bracket<br />

] closing bracket<br />

( opening parenthesis<br />

) closing parenthesis<br />

% percent \%<br />

" quotation marks \"<br />

/ slash mark (forward)<br />

Rules for Use of Expression Syntax with the Broker<br />

D. Conditional Expressions<br />

Important! When you use variable names with special characters in expressions or filters,<br />

you must enclose the variable name in " " (quotation marks).<br />

When you create filters for documents in trigger conditions, keep in mind that some<br />

syntax that is valid on the Integration Server is not valid on the Broker. When you save a<br />

trigger, the Integration Server and the Broker evaluate the filter to make sure that it uses<br />

proper syntax. If the syntax is valid on the Broker, the Broker saves the subscription and<br />

the filter. If the syntax is invalid on the Broker, the Integration Server automatically<br />

removes the filter before the Broker saves the subscription. The filter will only be saved on<br />

the Integration Server.<br />

Note: The Broker saves as much of a filter as possible with the subscription. For example,<br />

suppose that a filter consists of more than one expression, and only one of the expressions<br />

contains syntax the Broker considers invalid. The Broker saves the expressions it considers<br />

valid but does not save the expression containing invalid syntax. (The Integration Server<br />

saves all the expressions.)<br />

Keep the following points in mind when writing filters for triggers:<br />

� Expressions that specify field names that contain syntax, characters, symbols, or<br />

words the Broker considers restricted or reserved will not be saved on the Broker.<br />

� All expressions must contain a relational (comparison) operator.<br />

� Use lexical relational operators (such as L_EQUALS, L_LESS_THAN) to compare fields of<br />

type String.<br />

<strong>webMethods</strong> <strong>Developer</strong> User’s <strong>Guide</strong> Version 6.5, Service Pack 3 � � � 444


D. Conditional Expressions<br />

� Use standard relational operators (such as =, ==, !=, , =) to compare fields<br />

that are not of type String.<br />

� Use the =, ==, , or != operators to compare a value with an Object constrained as a<br />

Boolean.<br />

The following table identifies syntax that the Broker considers invalid. Expressions with<br />

this syntax will be saved on the Integration Server but not on the Broker.<br />

Tip! You can use the Broker Administrator to view the filters (expressions) saved with a<br />

subscription. If the expression does not appear with the subscription on the Broker, then<br />

the expression contains invalid syntax.<br />

The Broker considers expressions invalid<br />

when they contain.... Examples<br />

Field names with syntax, characters,<br />

symbols, or words the Broker considers<br />

restricted or reserved<br />

No comparison operators "fieldName"<br />

"!fieldName"<br />

A standard relational operator to<br />

compare fields of type String<br />

A lexical relational operator to compare<br />

fields that are not of type String<br />

A field of type String compared with a<br />

numeric value<br />

Operators other than =, ==, !=, or to<br />

compare an Object constrained as a<br />

Boolean with a value<br />

An Object constrained as a Boolean<br />

compared with a field of type String<br />

eventtype L_EQUALS “addEmployee”<br />

tax% < 5<br />

Note: Although the Broker considers a<br />

field name that contains the % symbol to<br />

be invalid, you can use the % symbol to<br />

enclose field names in the expression.<br />

%myString% < "yourString"<br />

%price% L_LESS_THAN 50<br />

"stringName" > 12<br />

myBoolean


The Broker considers expressions invalid<br />

when they contain.... Examples<br />

A $null token %fieldName% = $null<br />

D. Conditional Expressions<br />

A reference to an array field stringList[1] L_EQUALS "a"<br />

Regular expressions that contain back<br />

references<br />

Regular expressions that use quantifiers<br />

other than +, ?, and *<br />

Regular expressions that use extended<br />

metacharacters<br />

fieldName = /^(a|b)\1$/<br />

<strong>webMethods</strong> <strong>Developer</strong> User’s <strong>Guide</strong> Version 6.5, Service Pack 3 � � � 446<br />

/a{1}/<br />

/a{1,5}/<br />

fieldName = /\w/


Appendix E. jcode tags<br />

� jcode Template . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 448<br />

� jcode Example . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 449<br />

<strong>webMethods</strong> <strong>Developer</strong> User’s <strong>Guide</strong> Version 6.5, Service Pack 3 � � � 447


jcode Template<br />

E. jcode tags<br />

The following code provides a template describing the tags (highlighted) that the jcode<br />

utility uses to identify code segments in a Java source file.<br />

package Interface1;<br />

/**<br />

* This is an example of an empty Java source code file,<br />

* properly annotated for use with the jcode utility.<br />

*/<br />

import com.wm.app.b2b.server.Service;<br />

import com.wm.app.b2b.server.ServiceException;<br />

import com.wm.data.IData;<br />

import com.wm.data.IDataCursor;<br />

// --- ---<br />

// --- --public<br />

class Interface0<br />

{<br />

public static void Service1 (IData pipeline)<br />

throws ServiceException<br />

{<br />

// --- ---<br />

// --- --return;<br />

}<br />

public static void Service2 (IData pipeline)<br />

throws ServiceException<br />

{<br />

// --- ---<br />

// --- --return;<br />

}<br />

// --- ---<br />

// --- ---<br />

}<br />

<strong>webMethods</strong> <strong>Developer</strong> User’s <strong>Guide</strong> Version 6.5, Service Pack 3 � � � 448


jcode Example<br />

The following is a complete example of properly commented Java source code.<br />

Sample Code—IData<br />

E. jcode tags<br />

The following is an example of a class whose services (methods) take IData objects as<br />

input.<br />

package recording;<br />

/**<br />

* This is an example of Java source code properly annotated<br />

* for use with the IS jcode utility. Note that, unless<br />

* noted otherwise, all comments will be stripped out of this<br />

* file during the process of fragmenting the code.<br />

*/<br />

/**<br />

* == IMPORTS ==<br />

* All your imports should be wrapped with the START-IMPORTS<br />

* and END-IMPORTS tags.<br />

*/<br />

// --- --import<br />

com.wm.app.b2b.server.Service;<br />

import com.wm.app.b2b.server.ServiceException;<br />

import com.wm.data.IData;<br />

import com.wm.data.IDataCursor;<br />

import com.wm.data.IDataUtil;<br />

import java.util.*;<br />

// --- ---<br />

/**<br />

* == CLASS NAMING ==<br />

* This class contains the definition of all the Java services<br />

* within the recording.accounts interface (note the recording<br />

* package declaration up top). Note that each service is<br />

* defined by a method with the same name.<br />

*/<br />

public class accounts<br />

{<br />

/**<br />

* == INDIVIDUAL SERVICES ==<br />

* The createAccount service. This service expects three<br />

* parameters -- a string ("name"), a string array ("references"),<br />

* and a document type. It returns two strings ("message" and "id").<br />

*<br />

* Note the special tags delimiting the start and end of the<br />

* service. The two lines immediately before start tag and after<br />

* the end tags are mandatory.<br />

*<br />

* Also note the use of comments to establish a signature for the<br />

* service. Each signature line has the following format:<br />

*<br />

* [direction] type:dimension:option name<br />

*<br />

* direction: "i" (input) or "o" (output)<br />

<strong>webMethods</strong> <strong>Developer</strong> User’s <strong>Guide</strong> Version 6.5, Service Pack 3 � � � 449


* type:<br />

* field (corresponds to instances of java.lang.String)<br />

* document type (corresponds to instances of com.wm.data.IData)<br />

* object (corresponds to instances of any other class)<br />

* option:<br />

* required (this parameter is mandatory)<br />

* optional (this parameter is optional)<br />

* name: the name of the parameter<br />

*<br />

* To indicate nesting, use a single "-" at the beginning of<br />

* each line for each level of nesting.<br />

*/<br />

public static void createAccount (IData pipeline)<br />

throws ServiceException<br />

{<br />

// --- ---<br />

// [i] field:0:required name<br />

// [i] field:1:required references<br />

// [i] record:0:required data<br />

// [i] - field:1:required address<br />

// [i] - field:1:required phone<br />

// [o] field:1:required message<br />

// [o] field:1:required id<br />

IDataCursor idc = pipeline.getCursor();<br />

String name = IDataUtil.getString(idc, "name");<br />

String [] refs = IDataUtil.getStringArray(idc, "references");<br />

IData data = IDataUtil.getIData(idc, "data");<br />

E. jcode tags<br />

// Do something with the information here. Note that this<br />

// comment inside the service body is the only one that won't<br />

// get discarded when fragmenting the service (i.e., it will<br />

// show up in <strong>Developer</strong>.)<br />

idc.last();<br />

idc.insertAfter ("message", "createAccount not fully implemented");<br />

idc.insertAfter ("id", "00000000");<br />

idc.destroy();<br />

// --- --return;<br />

}<br />

/**<br />

* == COMPLEX SIGNATURES ==<br />

* The getAccount service. This service takes a single string<br />

* "id", and returns a complex structure representing the<br />

* account information. Note the use of the helper functions<br />

* (defined below).<br />

*/<br />

public static void getAccount (IData pipeline)<br />

throws ServiceException<br />

{<br />

// --- ---<br />

// [i] field:0:required id<br />

// [o] record:1:required account<br />

// [o] - field:0:required name<br />

// [o] - field:1:required refs<br />

// [o] - record:0:required contact<br />

// [o] -- field:0:required address<br />

<strong>webMethods</strong> <strong>Developer</strong> User’s <strong>Guide</strong> Version 6.5, Service Pack 3 � � � 450


}<br />

E. jcode tags<br />

// [o] -- field:0:required phone<br />

IDataCursor idc = pipeline.getCursor();<br />

if(idc.first("id"))<br />

{<br />

try<br />

{<br />

String id = IDataUtil.getString(idc);<br />

IData data = getAccountInformation(id);<br />

idc.last();<br />

idc.insertAfter ("account", data);<br />

}<br />

catch (Exception e)<br />

{<br />

throw new ServiceException(e.toString());<br />

}<br />

}<br />

idc.destroy();<br />

// --- ---<br />

}<br />

/**<br />

* == SHARED SOURCE ==<br />

* This is where the shared code lives. This includes both<br />

* global data structures and non-public functions that aren't<br />

* exposed as Services. Note the tags delimiting the start<br />

* and end of the shared code section.<br />

*/<br />

// --- --private<br />

static Vector accounts = new Vector();<br />

private static IData getAccountInformation (String id) {<br />

throw new RuntimeException ("this service is not implemented yet");<br />

}<br />

// --- ---<br />

<strong>webMethods</strong> <strong>Developer</strong> User’s <strong>Guide</strong> Version 6.5, Service Pack 3 � � � 451


E. jcode tags<br />

<strong>webMethods</strong> <strong>Developer</strong> User’s <strong>Guide</strong> Version 6.5, Service Pack 3 � � � 452


Appendix F. Validation Content Constraints<br />

� Overview . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 454<br />

� Content Types . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 454<br />

� Constraining Facets . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 464<br />

<strong>webMethods</strong> <strong>Developer</strong> User’s <strong>Guide</strong> Version 6.5, Service Pack 3 � � � 453


Overview<br />

Content Types<br />

F. Validation Content Constraints<br />

You can apply content constraints to variables in the IS document types, specifications, or<br />

service signatures that you want to use as blueprints in data validation. Content<br />

constraints describe the data a variable can contain. At validation time, if the variable<br />

value does not conform to the content constraints applied to the variable, the validation<br />

engine considers the value to be invalid. For more information about validation, see<br />

Chapter 10, “Performing Data Validation”.<br />

When applying content constraints to variables, you can do the following:<br />

� Select a content type. A content type specifies the type of data for the variable value,<br />

such as string, integer, boolean, or date. A content type corresponds to a simple type<br />

definition in a schema.<br />

� Set constraining facets. Constraining facets restrict the content type, which in turn,<br />

restrict the value of the variable to which the content type is applied. Each content<br />

type has a set of constraining facets. For example, you can set a length restriction for a<br />

string content type, or a maximum value restriction for an integer content type.<br />

For example, for a String variable named itemQuantity, you might specify a content type<br />

that requires the variable value to be an integer. You could then set constraining facets that<br />

limit the content of itemQuantity to a value between 1 and 100.<br />

The content types and constraining facets described in this appendix correspond to the<br />

built-in data types and constraining facets in XML Schema. The World Wide Web<br />

Consortium (W3C) defines the built-in data types and constraining facets in the<br />

specification XML Schema Part 2: Datatypes (http://www.w3c.org/TR/xmlschema-2).<br />

The following table identifies the content types you can apply to String, String list, or<br />

String table variables. Each of these content types corresponds to a built-in simple type<br />

defined in the specification XML Schema Part 2: Datatypes.<br />

Note: For details about constraints for Objects and Object lists, see Appendix C,<br />

“Supported Data Types”.<br />

<strong>webMethods</strong> <strong>Developer</strong> User’s <strong>Guide</strong> Version 6.5, Service Pack 3 � � � 454


Content Types Description<br />

F. Validation Content Constraints<br />

anyURI A Uniform Resource Identifier Reference. The value of anyURI<br />

may be absolute or relative.<br />

Constraining Facets<br />

enumeration, length, maxLength, minLength, pattern<br />

Note: The anyURI type indicates that the variable value plays the<br />

role of a URI and is defined like a URI. <strong>webMethods</strong> Integration<br />

Server does not validate URI references because it is impractical<br />

for applications to check the validity of a URI reference.<br />

base64Binary Base64-encoded binary data.<br />

Constraining Facets<br />

enumeration, length, maxLength, minLength, pattern<br />

boolean True or false.<br />

Constraining Facets<br />

pattern<br />

Example<br />

true, 1, false, 0<br />

byte A whole number whose value is greater than or equal to –128<br />

but less than or equal to 127.<br />

Constraining Facets<br />

enumeration, fractionDigits, maxExclusive, maxInclusive,<br />

minExclusive, minInclusive, pattern, totalDigits<br />

Example<br />

-128, -26, 0, 15, 125<br />

date A calendar date from the Gregorian calendar. Values need to<br />

match the following pattern:<br />

CCYY-MM-DD<br />

Where CC represents the century, YY the year, MM the month,<br />

DD the day. The pattern can include a Z at the end to indicate<br />

Coordinated Universal Time or to indicate the difference<br />

between the time zone and coordinated universal time.<br />

Constraining Facets<br />

enumeration, maxExclusive, maxInclusive, minExclusive,<br />

minInclusive, pattern<br />

Example<br />

1997-08-09 (August 9, 1997)<br />

<strong>webMethods</strong> <strong>Developer</strong> User’s <strong>Guide</strong> Version 6.5, Service Pack 3 � � � 455


Content Types Description<br />

F. Validation Content Constraints<br />

dateTime A specific instant of time (a date and time of day). Values need to<br />

match the following pattern:<br />

CCYY-MM-DDThh:mm:ss.sss<br />

Where CC represents the century, YY the year, MM the month,<br />

DD the day, T the date/time separator, hh the hour, mm the<br />

minutes, and ss the seconds. The pattern can include a Z at the<br />

end to indicate Coordinated Universal Time or to indicate the<br />

difference between the time zone and coordinated universal<br />

time.<br />

Constraining Facets<br />

enumeration, maxExclusive, maxInclusive, minExclusive,<br />

minInclusive, pattern<br />

Example<br />

2000-06-29T17:30:00-05:00 represents 5:30 pm Eastern<br />

Standard time on June 29, 2000. (Eastern Standard Time is 5<br />

hours behind Coordinated Universal Time.)<br />

decimal A number with an optional decimal point.<br />

Constraining Facets<br />

enumeration, fractionDigits, maxExclusive, maxInclusive,<br />

minExclusive, minInclusive, pattern, totalDigits<br />

Example<br />

8.01, 290, -47.24<br />

double Double-precision 64-bit floating point type.<br />

Constraining Facets<br />

enumeration, maxExclusive, maxInclusive, minExclusive,<br />

minInclusive, pattern<br />

Example<br />

6.02E23, 3.14, -26, 1.25e-2<br />

<strong>webMethods</strong> <strong>Developer</strong> User’s <strong>Guide</strong> Version 6.5, Service Pack 3 � � � 456


Content Types Description<br />

F. Validation Content Constraints<br />

duration A length of time. Values need to match the following pattern:<br />

PnYnMnDTnHnMnS<br />

Where nY represents the number of years, nM the number of<br />

months, nD the number of days, T separates the date and time,<br />

nH the number of hours, nM the number of minutes and nS the<br />

number of seconds. Precede the duration with a minus (-) sign to<br />

indicate a negative duration.<br />

Constraining Facets<br />

enumeration, maxExclusive, maxInclusive, minExclusive,<br />

minInclusive, pattern<br />

Example<br />

P2Y10M20DT5H50M represents a duration of 2 years, 10 months,<br />

20 days, 5 hours, and 50 minutes<br />

ENTITIES Sequence of whitespace-separated ENTITY values declared in<br />

the DTD. Represents the ENTITIES attribute type from the XML<br />

1.0 Recommendation.<br />

Constraining Facets<br />

enumeration, length, maxLength, minLength<br />

ENTITY Name associated with an unparsed entity of the DTD.<br />

Represents the ENTITY attribute type from the XML 1.0<br />

Recommendation.<br />

Constraining Facets<br />

enumeration, length, maxLength, minLength, pattern,<br />

whiteSpace<br />

float A number with a fractional part.<br />

Constraining Facets<br />

enumeration, maxExclusive, maxInclusive, minExclusive,<br />

minInclusive, pattern<br />

Example<br />

8.01, 25, 6.02E23, -5.5<br />

<strong>webMethods</strong> <strong>Developer</strong> User’s <strong>Guide</strong> Version 6.5, Service Pack 3 � � � 457


Content Types Description<br />

F. Validation Content Constraints<br />

gDay A specific day that recurs every month. Values must match the<br />

following pattern:<br />

---DD<br />

Where DD represents the day. The pattern can include a Z at the<br />

end to indicate Coordinated Universal Time or to indicate the<br />

difference between the time zone and coordinated universal<br />

time.<br />

Constraining Facets<br />

enumeration, maxExclusive, maxInclusive, minExclusive,<br />

minInclusive, pattern<br />

Example<br />

---24 indicates the 24 th of each month<br />

gMonth A Gregorian month that occurs every year. Values must match<br />

the following pattern:<br />

--MM<br />

Where MM represents the month. The pattern can include a Z at<br />

the end to indicate Coordinated Universal Time or to indicate<br />

the difference between the time zone and coordinated universal<br />

time.<br />

Constraining Facets<br />

enumeration, maxExclusive, maxInclusive, minExclusive,<br />

minInclusive, pattern<br />

Example<br />

--11 represents November<br />

gMonthDay A specific day and month that recurs every year in the Gregorian<br />

calendar. Values must match the following pattern:<br />

--MM-DD<br />

Where MM represents the month and DD represents the day.<br />

The pattern can include a Z at the end to indicate Coordinated<br />

Universal Time or to indicate the difference between the time<br />

zone and coordinated universal time.<br />

Constraining Facets<br />

enumeration, maxExclusive, maxInclusive, minExclusive,<br />

minInclusive, pattern<br />

Example<br />

--09-24 represents September 24 th<br />

<strong>webMethods</strong> <strong>Developer</strong> User’s <strong>Guide</strong> Version 6.5, Service Pack 3 � � � 458


Content Types Description<br />

F. Validation Content Constraints<br />

gYear A specific year in the Gregorian calendar. Values must match the<br />

following pattern:<br />

CCYY<br />

Where CC represents the century, and YY the year. The pattern<br />

can include a Z at the end to indicate Coordinated Universal<br />

Time or to indicate the difference between the time zone and<br />

coordinated universal time.<br />

Constraining Facets<br />

enumeration, maxExclusive, maxInclusive, minExclusive,<br />

minInclusive, pattern<br />

Example<br />

2001 indicates 2001<br />

gYearMonth A specific month and year in the Gregorian calendar. Values<br />

must match the following pattern:<br />

CCYY-MM<br />

Where CC represents the century, YY the year, and MM the<br />

month. The pattern can include a Z at the end to indicate<br />

Coordinated Universal Time or to indicate the difference<br />

between the time zone and coordinated universal time.<br />

Constraining Facets<br />

enumeration, maxExclusive, maxInclusive, minExclusive,<br />

minInclusive, pattern<br />

Example<br />

2001-04 indicates April 2001<br />

hexBinary Hex-encoded binary data.<br />

Constraining Facets<br />

enumeration, length, maxLength, minLength, pattern<br />

ID A name that uniquely identifies an individual element in an<br />

instance document. The value for ID needs to be a valid XML<br />

name. The ID datatype represents the ID attribute type from the<br />

XML 1.0 Recommendation.<br />

Constraining Facets<br />

enumeration, length, maxLength, minLength, pattern,<br />

whiteSpace<br />

<strong>webMethods</strong> <strong>Developer</strong> User’s <strong>Guide</strong> Version 6.5, Service Pack 3 � � � 459


Content Types Description<br />

F. Validation Content Constraints<br />

IDREF A reference to an element with a unique ID. The value of IDREF<br />

is the same as the ID value. The IDREF datatype represents the<br />

IDREF attribute type from the XML 1.0 Recommendation.<br />

Constraining Facets<br />

enumeration, length, maxLength, minLength, pattern,<br />

whiteSpace<br />

IDREFS Sequence of white space separated IDREFs used in an XML<br />

document. The IDREFS datatype represents the IDREFS<br />

attribute type from the XML 1.0 Recommendation.<br />

Constraining Facets<br />

enumeration, length, maxLength, minLength<br />

int A whole number with a value greater than or equal to<br />

-2147483647 but less than or equal to 2147483647.<br />

Constraining Facets<br />

enumeration, fractionDigits, maxExclusive, maxInclusive,<br />

minExclusive, minInclusive, pattern, totalDigits<br />

Example<br />

-21474836, -55500, 0, 33123, 4271974<br />

integer A positive or negative whole number.<br />

Constraining Facets<br />

enumeration, fractionDigits, maxExclusive, maxInclusive,<br />

minExclusive, minInclusive, pattern, totalDigits<br />

Example<br />

-2500, -5, 0, 15, 365<br />

language Language identifiers used to indicate the language in which the<br />

content is written. Natural language identifiers are defined in<br />

IETF RFC 1766.<br />

Constraining Facets<br />

enumeration, length, maxLength, minLength, pattern,<br />

whiteSpace<br />

long A whole number with a value greater than or equal to<br />

–9223372036854775808 but less than or equal to<br />

9223372036854775807.<br />

Constraining Facets<br />

enumeration, fractionDigits, maxExclusive, maxInclusive,<br />

minExclusive, minInclusive, pattern, totalDigits<br />

Example -55600, -23, 0, 256, 3211569432<br />

<strong>webMethods</strong> <strong>Developer</strong> User’s <strong>Guide</strong> Version 6.5, Service Pack 3 � � � 460


Content Types Description<br />

F. Validation Content Constraints<br />

Name XML names that match the Name production of XML 1.0<br />

(Second Edition).<br />

Constraining Facets<br />

enumeration, length, maxLength, minLength, pattern,<br />

whiteSpace<br />

NCName Non-colonized XML names. Set of all strings that match the<br />

NCName production of Namespaces in XML.<br />

Constraining Facets<br />

enumeration, length, maxLength, minLength, pattern,<br />

whiteSpace<br />

negativeInteger An integer with a value less than or equal to –1.<br />

Constraining Facets<br />

enumeration, fractionDigits, maxExclusive, maxInclusive,<br />

minExclusive, minInclusive, pattern, totalDigits<br />

Example<br />

-255556, -354, -3, -1<br />

NMTOKEN Any mixture of name characters. Represents the NMTOKEN<br />

attribute type from the XML 1.0 Recommendation.<br />

Constraining Facets<br />

enumeration, length, maxLength, minLength, pattern,<br />

whiteSpace<br />

NMTOKENS Sequences of NMTOKENS. Represents the NMTOKENS<br />

attribute type from the XML 1.0 Recommendation.<br />

Constraining Facets<br />

enumeration, length, maxLength, minLength<br />

nonNegativeInteger An integer with a value greater than or equal to 0.<br />

Constraining Facets<br />

enumeration, fractionDigits, maxExclusive, maxInclusive,<br />

minExclusive, minInclusive, pattern, totalDigits<br />

Example<br />

0, 15, 32123<br />

<strong>webMethods</strong> <strong>Developer</strong> User’s <strong>Guide</strong> Version 6.5, Service Pack 3 � � � 461


Content Types Description<br />

nonPositiveInteger An integer with a value less than or equal to 0.<br />

F. Validation Content Constraints<br />

Constraining Facets<br />

enumeration, fractionDigits, maxExclusive, maxInclusive,<br />

minExclusive, minInclusive, pattern, totalDigits, whiteSpace<br />

Example<br />

-256453, -357, -1, 0<br />

normalizedString Represents white space normalized strings. Set of strings<br />

(sequence of UCS characters) that do not contain the carriage<br />

return (#xD), line feed (#xA), or tab (#x9) characters.<br />

Constraining Facets<br />

enumeration, length, maxLength, minLength, pattern,<br />

whiteSpace<br />

Example<br />

MAB-0907<br />

positiveInteger An integer with a value greater than or equal to 1.<br />

Constraining Facets<br />

enumeration, fractionDigits, maxExclusive, maxInclusive,<br />

minExclusive, minInclusive, pattern, totalDigits<br />

Example<br />

1, 1500, 23000<br />

short A whole number with a value greater than or equal to -32768 but<br />

less than or equal to 32767.<br />

Constraining Facets<br />

enumeration, fractionDigits, maxExclusive, maxInclusive,<br />

minExclusive, minInclusive, pattern, totalDigits<br />

Example<br />

-32000, -543, 0, 456, 3265<br />

string Character strings in XML. A sequence of UCS characters (ISO<br />

10646 and Unicode). By default, all white space is preserved for<br />

variables with a string content constraint.<br />

Constraining Facets<br />

enumeration, length, maxLength, minLength, pattern,<br />

whiteSpace<br />

Example<br />

MAB-0907<br />

<strong>webMethods</strong> <strong>Developer</strong> User’s <strong>Guide</strong> Version 6.5, Service Pack 3 � � � 462


Content Types Description<br />

F. Validation Content Constraints<br />

time An instant of time that occurs every day. Values must match the<br />

following pattern:<br />

hh:mm:ss.sss<br />

Where hh indicates the hour, mm the minutes, and ss the<br />

seconds. The pattern can include a Z at the end to indicate<br />

Coordinated Universal Time or to indicate the difference<br />

between the time zone and coordinated universal time.<br />

Constraining Facets<br />

enumeration, maxExclusive, maxInclusive, minExclusive,<br />

minInclusive, pattern<br />

Example<br />

18:10:00-05:00 (6:10 pm, Eastern Standard Time) Eastern<br />

Standard Time is 5 hours behind Coordinated Universal Time.<br />

token Represents tokenized strings. Set of strings that do not contain<br />

the carriage return (#xD), line feed (#xA), or tab (#x9) characters,<br />

leading or trailing spaces (#x20), or sequences of two or more<br />

spaces.<br />

Constraining Facets<br />

enumeration, length, maxLength, minLength, pattern,<br />

whiteSpace<br />

unsignedByte A whole number greater than or equal to 0, but less than or equal<br />

to 255.<br />

Constraining Facets<br />

enumeration, fractionDigits, maxExclusive, maxInclusive,<br />

minExclusive, minInclusive, pattern, totalDigits<br />

Example<br />

0, 112, 200<br />

unsignedInt A whole number greater than or equal to 0, but less than or equal<br />

to 4294967295.<br />

Constraining Facets<br />

enumeration, fractionDigits, maxExclusive, maxInclusive,<br />

minExclusive, minInclusive, pattern, totalDigits<br />

Example<br />

0, 22335, 123223333<br />

<strong>webMethods</strong> <strong>Developer</strong> User’s <strong>Guide</strong> Version 6.5, Service Pack 3 � � � 463


Constraining Facets<br />

Content Types Description<br />

F. Validation Content Constraints<br />

unsignedLong A whole number greater than or equal to 0, but less than or equal<br />

to 18446744073709551615.<br />

Constraining Facets<br />

enumeration, fractionDigits, maxExclusive, maxInclusive,<br />

minExclusive, minInclusive, pattern, totalDigits<br />

Example<br />

0, 2001, 3363124<br />

unsignedShort A whole number greater then or equal to 0, but less than or equal<br />

to 65535.<br />

Constraining Facets<br />

enumeration, fractionDigits, maxExclusive, maxInclusive,<br />

minExclusive, minInclusive, pattern, totalDigits<br />

Example<br />

0, 1000, 65000<br />

When you apply a content type to a variable, you can also set constraining facets for the<br />

content type. Constraining facets are properties that further define the content type. For<br />

example, you can set a minimum value or precision value for a decimal content type. Each<br />

content type has a set of constraining facets. The constraining facets described in the<br />

following table correspond to constraining facets defined in the specification XML Schema<br />

Part 2: Datatypes.<br />

Constraining Facet Description Usage Notes<br />

enumeration The possible values for the variable<br />

at run time.<br />

fractionDigits The maximum number of digits to<br />

the right of the decimal point. For<br />

example, the fractionDigits of the<br />

value 999.99 is 2.<br />

If you also entered possible<br />

values using the Pick list<br />

choices property in the General<br />

category of the Properties<br />

panel, those values will be<br />

displayed at run time.<br />

However, the enumeration<br />

values will be used for<br />

validation.<br />

fractionDigits must be less than<br />

or equal to totalDigits.<br />

<strong>webMethods</strong> <strong>Developer</strong> User’s <strong>Guide</strong> Version 6.5, Service Pack 3 � � � 464


Constraining Facet Description Usage Notes<br />

length The precise units of length<br />

required for the variable value.<br />

maxExclusive The upper bound of a range of<br />

possible values. The range<br />

excludes the value you specify. The<br />

variable can have a value less than<br />

but not equal to maxExclusive.<br />

maxInclusive The upper bound of a range of<br />

possible values. The range<br />

includes the value you specify. The<br />

variable can have a value less than<br />

or equal to maxInclusive.<br />

maxLength The maximum units of length<br />

permitted for the variable value.<br />

minExclusive The lower bound of a range of<br />

possible values. The range does<br />

not include the value you specify.<br />

The variable can have a value<br />

greater than but not equal to<br />

minExclusive.<br />

minInclusive The lower bound of a range of<br />

possible values. The range<br />

includes the value you specify. The<br />

variable can have a value greater<br />

than or equal to minInclusive.<br />

minLength The minimum units of length<br />

permitted for the variable value.<br />

pattern A pattern (regular expression) that<br />

the value of the variable must<br />

match. For example, you can use a<br />

regular expression to specify that a<br />

variable that is a string content<br />

constraint match a Social Security<br />

number format.<br />

F. Validation Content Constraints<br />

If you specify length, you<br />

cannot specify either<br />

minLength or maxLength.<br />

maxExclusive must be greater<br />

than or equal to minExclusive.<br />

You cannot specify<br />

maxInclusive and maxExclusive<br />

for the same content type.<br />

maxInclusive must be greater<br />

than or equal to minInclusive.<br />

You cannot specify<br />

maxInclusive and maxExclusive<br />

for the same content type.<br />

maxLength must be greater<br />

than or equal to minLength.<br />

minExclusive must be less than<br />

or equal to maxExclusive.<br />

You cannot specify<br />

minInclusive and minExclusive<br />

for the same content type.<br />

minInclusive must be less than<br />

or equal to maxInclusive.<br />

You cannot specify<br />

minInclusive and minExclusive<br />

for the same content type.<br />

minLength must be less than or<br />

equal to maxLength.<br />

<strong>webMethods</strong> <strong>Developer</strong> User’s <strong>Guide</strong> Version 6.5, Service Pack 3 � � � 465


Constraining Facet Description Usage Notes<br />

totalDigits The maximum number of decimal<br />

digits allowed in a value. For<br />

example, the totalDigits of the value<br />

999.99 is 5.<br />

whiteSpace The white space normalization<br />

performed on the variable value.<br />

The value of whiteSpace can be one<br />

of the following:<br />

preserve: No white space<br />

normalization is performed.<br />

replace: Carriage returns (#xD),<br />

line feeds (#xA), and tabs (#x9) are<br />

replaced with a single space (#x20).<br />

collapse: After the white space<br />

normalization specified by replace<br />

is performed, sequences of spaces<br />

(#x20) and leading and trailing<br />

spaces (#x20) are removed.<br />

F. Validation Content Constraints<br />

totalDigits must be greater<br />

than or equal to fractionDigits.<br />

Note: Previous versions of XML Schema contained the constraining facets duration,<br />

encoding, period, precision, and scale. However, these constraining facets are not included in<br />

the recommendation of XML Schema Part 2: Datatypes. The constraining facets duration,<br />

encoding, and period were removed. precision was renamed totalDigits. scale was renamed<br />

fractionDigits. If you view a content type from an IS schema created from an XML Schema<br />

Definition that used pre-Recommendation version of XML Schema (before May 2001) the<br />

Content Type dialog box will display the constraining facets that were available in the<br />

pre-Recommendation version of XML Schema.<br />

Note: The word “fixed” appears next to the name of a constraining facet whose value is<br />

fixed and cannot be changed. When a facet has a fixed value, the facet is called a fixed<br />

facet.<br />

<strong>webMethods</strong> <strong>Developer</strong> User’s <strong>Guide</strong> Version 6.5, Service Pack 3 � � � 466


Appendix G. Validation Errors and Exceptions<br />

� Overview . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 468<br />

� Validation Errors . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 468<br />

� Validation Exceptions . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 482<br />

� IS Schema Generation Errors and Warnings . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 486<br />

<strong>webMethods</strong> <strong>Developer</strong> User’s <strong>Guide</strong> Version 6.5, Service Pack 3 � � � 467


Overview<br />

Validation Errors<br />

G. Validation Errors and Exceptions<br />

This appendix describes error messages that can occur during data validation, IS schema<br />

generation, or IS document type generation.<br />

When the validation engine in the <strong>webMethods</strong> Integration Server validates an object (an<br />

XML node, the pipeline, or documents) and the object does not conform to the blueprint<br />

or model, the server generates errors and/or exceptions. You might also receive errors and<br />

exceptions when creating an IS schema. The following sections describe the errors and<br />

exceptions you can receive when performing validation and when creating an IS schema.<br />

When you perform validation using a built-in service, <strong>webMethods</strong> Integration Server<br />

returns validation errors in the errors output variable if the object is invalid. When you<br />

perform input/output validation, <strong>webMethods</strong> Integration Server throws an exception if<br />

the inputs or outputs are invalid. Error messages are contained in the exception.<br />

Each validation error contains a code and a default message. Error code prefixes indicate<br />

the validation error type:<br />

� DT indicates a data type validation error. Data type validation errors pertain to the<br />

content type constraints applied to the variables.<br />

� NV indicates a node validation error. Node validation errors pertain to the validation<br />

of an XML node.<br />

� VV indicates a document validation error. Document validation errors pertain to the<br />

structure of the data values (for example, an invalid document structure).<br />

The following table describes the validation errors you can receive when performing<br />

XML, pipeline, or document validation.<br />

Error Code Message and Description<br />

DT-001<br />

DT-002<br />

[ISC.0082.9447] Value does not conform to datatype.<br />

Cause: The value does not match the specified content<br />

type.<br />

[ISC.0082.9460] No matching enumeration value.<br />

Cause: The value is not an item listed in the enumeration<br />

field.<br />

<strong>webMethods</strong> <strong>Developer</strong> User’s <strong>Guide</strong> Version 6.5, Service Pack 3 � � � 468


Error Code Message and Description<br />

DT-003<br />

DT-004<br />

DT-005<br />

DT-006<br />

DT-007<br />

DT-008<br />

DT-009<br />

DT-010<br />

G. Validation Errors and Exceptions<br />

[ISC.0082.9463] Length of value is not equal to specified length.<br />

Cause: The size of the value does not equal the number<br />

specified in the length field.<br />

[ISC.0082.9464] Value is shorter than minimum length.<br />

Cause: The size of the value is less than the number<br />

specified in the minLength field.<br />

[ISC.0082.9465] Value is longer than maximum length.<br />

Cause: The size of the value is greater than the number<br />

specified in the maxLength field.<br />

[ISC.0082.9489] Number of digits is greater than totalDigits.<br />

Cause: The number of digits in the value is greater than<br />

the number specified in the totalDigits field.<br />

[ISC.0082.9490] Number of fraction digits is greater than<br />

fractionDigits.<br />

Cause: The number of digits to the right of the decimal<br />

point is greater than the number specified in the<br />

fractionDigits field.<br />

[ISC.0082.9491] Value is less than minInclusive.<br />

Cause: The value is less than the value specified in the<br />

minInclusive field.<br />

[ISC.0082.9492] Value is less than or equal to minExclusive.<br />

Cause: The value is less than or equal to the value<br />

specified in the minExclusive field.<br />

[ISC.0082.9493] Value is greater than maxInclusive.<br />

Cause: The value is greater than the value specified in the<br />

maxInclusive field.<br />

<strong>webMethods</strong> <strong>Developer</strong> User’s <strong>Guide</strong> Version 6.5, Service Pack 3 � � � 469


Error Code Message and Description<br />

DT-011<br />

DT-012<br />

DT-013<br />

DT-Binary001<br />

DT-Binary002<br />

DT-Binary003<br />

DT-Binary004<br />

DT-Boolean001<br />

DT-Decimal001<br />

G. Validation Errors and Exceptions<br />

[ISC.0082.9494] Value is greater than or equal to maxExclusive.<br />

Cause: The value is greater than or equal to the value<br />

specified in the maxExclusive field.<br />

[ISC.0082.9448] Value does not match pattern.<br />

Cause: The value does not match the pattern specified in<br />

the pattern field.<br />

[ISC.0082.9474] The input has invalid characters.<br />

Cause: The specified whiteSpace value is invalid. The<br />

value of the whiteSpace field can be preserve, replace, or<br />

collapse.<br />

[ISC.0082.9293] No matching choice value<br />

Cause: The binary value is not an element listed in the<br />

choices field.<br />

[ISC.0082.9297] Value is shorter than minimum length<br />

Cause: Size of the binary value, in octets, is less than the<br />

value specified in the minimum length field.<br />

[ISC.0082.9298] Value is longer than maximum length<br />

Cause: Size of the binary value, in octets, is greater than<br />

the value specified in the maximum length field.<br />

[ISC.0082.9296] Length of value is not equal to specified length<br />

Cause: Size of the binary value, in octets, is not equal to the<br />

value specified in the length field.<br />

[ISC.0082.9246] Value does not conform to datatype<br />

Cause: The value is not a Boolean.<br />

[ISC.0082.9293] No matching choice value<br />

Cause: The decimal value is not an element listed in the<br />

choices field.<br />

<strong>webMethods</strong> <strong>Developer</strong> User’s <strong>Guide</strong> Version 6.5, Service Pack 3 � � � 470


Error Code Message and Description<br />

DT-Decimal002<br />

DT-Decimal003<br />

DT-Decimal004<br />

DT-Decimal005<br />

DT-Decimal006<br />

DT-Double001<br />

DT-Double002<br />

DT-Double003<br />

DT-Double004<br />

G. Validation Errors and Exceptions<br />

[ISC.0082.9246] Value does not conform to datatype<br />

Cause: The value is not a parsable decimal.<br />

[ISC.0082.9294] Value is less than minimum<br />

Cause: The decimal value is less than the value specified in<br />

the minimum exclusive or minimum inclusive field.<br />

[ISC.0082.9295] Value is greater than maximum<br />

Cause: The decimal value is greater than the value<br />

specified in the maximum exclusive or maximum inclusive<br />

field.<br />

[ISC.0082.9300] Value exceeds precision<br />

Cause: The total number of digits in the decimal value is<br />

greater than the value specified in the precision field.<br />

[ISC.0082.9301] Value exceeds scale<br />

Cause: The total number of digits to the right of the<br />

decimal point is greater than the value specified in the<br />

scale field.<br />

[ISC.0082.9293] No matching choice value<br />

Cause: The double value is not an element listed in the<br />

choices field.<br />

[ISC.0082.9294] Value is less than minimum<br />

Cause: The double value is less than the value specified in<br />

the minimum exclusive or minimum inclusive field.<br />

[ISC.0082.9295] Value is greater than maximum<br />

Cause: The double value is greater than the value specified<br />

in the maximum exclusive or maximum inclusive field.<br />

[ISC.0082.9246] Value does not conform to datatype<br />

Cause: The value is not a parsable double.<br />

<strong>webMethods</strong> <strong>Developer</strong> User’s <strong>Guide</strong> Version 6.5, Service Pack 3 � � � 471


Error Code Message and Description<br />

DT-Float001<br />

DT-Float002<br />

DT-Float003<br />

DT-Float004<br />

DT-Int001<br />

DT-Int002<br />

DT-Int003<br />

DT-Int004<br />

DT-INTEGER001<br />

[ISC.0082.9293] No matching choice value<br />

G. Validation Errors and Exceptions<br />

Cause: The float value is not an element listed in the<br />

choices field.<br />

[ISC.0082.9294] Value is less than minimum<br />

Cause: The float value is less than the value specified in<br />

the minimum exclusive or minimum inclusive field.<br />

[ISC.0082.9295] Value is greater than maximum<br />

Cause: The float value is greater than the value specified in<br />

the maximum exclusive or maximum inclusive field.<br />

[ISC.0082.9246] Value does not conform to datatype<br />

Cause: The value is not a parsable float.<br />

[ISC.0082.9293] No matching choice value<br />

Cause: The integer value is not an element listed in the<br />

choices field.<br />

[ISC.0082.9294] Value is less than minimum<br />

Cause: The integer value is less than the value specified in<br />

the minimum exclusive or minimum inclusive field.<br />

[ISC.0082.9295] Value is greater than maximum<br />

Cause: The integer value is greater than the value specified<br />

in the maximum exclusive or maximum inclusive field.<br />

[ISC.0082.9246] Value does not conform to datatype<br />

Cause: The value is not a parsable integer.<br />

[ISC.0082.9293] No matching choice value<br />

Cause: The integer value is not an element listed in the<br />

choices field.<br />

<strong>webMethods</strong> <strong>Developer</strong> User’s <strong>Guide</strong> Version 6.5, Service Pack 3 � � � 472


Error Code Message and Description<br />

DT-INTEGER002<br />

DT-INTEGER003<br />

DT-INTEGER004<br />

DT-Long001<br />

DT-Long002<br />

DT-Long003<br />

DT-Long004<br />

DT-List001<br />

DT-List002<br />

G. Validation Errors and Exceptions<br />

[ISC.0082.9246] Value does not conform to datatype<br />

Cause: The value is not a parsable integer.<br />

[ISC.0082.9294] Value is less than minimum<br />

Cause: The integer value is less than the value specified in<br />

the minimum exclusive or minimum inclusive field.<br />

[ISC.0082.9295] Value is greater than maximum<br />

Cause: The integer value is greater than the value specified<br />

in the maximum exclusive or maximum inclusive field.<br />

[ISC.0082.9293] No matching choice value<br />

Cause: The long value is not an element listed in the<br />

choices field.<br />

[ISC.0082.9294] Value is less than minimum<br />

Cause: The long value is less than the value specified in the<br />

minimum exclusive or minimum inclusive field.<br />

[ISC.0082.9295] Value is greater than maximum<br />

Cause: The long value is greater than the value specified in<br />

the maximum exclusive or maximum inclusive field.<br />

[ISC.0082.9246] Value does not conform to datatype<br />

Cause: The value is not a parsable long.<br />

[ISC.0082.9293] No matching choice value<br />

Cause: The sequence of values in the list is not an element<br />

in the choices field.<br />

[ISC.0082.9297] Value is shorter than minimum length<br />

Cause: Size of the list is less than the value specified in the<br />

minimum length field.<br />

<strong>webMethods</strong> <strong>Developer</strong> User’s <strong>Guide</strong> Version 6.5, Service Pack 3 � � � 473


Error Code Message and Description<br />

DT-List003<br />

DT-List004<br />

DT-RecurringDuration001<br />

DT-RecurringDuration002<br />

DT-RecurringDuration003<br />

DT-RecurringDuration004<br />

DT-STR001<br />

DT-STR002<br />

G. Validation Errors and Exceptions<br />

[ISC.0082.9298] Value is longer than maximum length<br />

Cause: Size of the list is greater than the value specified in<br />

the maximum length field.<br />

[ISC.0082.9299] Datatype definition is missing<br />

Cause: Datatype or simple type definition is not found. It<br />

is possible that a dependent IS schema that contains this<br />

datatype definition was removed from the IS Namespace.<br />

[ISC.0082.9293] No matching choice value<br />

Cause: The recurring duration value is not an element<br />

listed in the choices field.<br />

[ISC.0082.9294] Value is less than minimum<br />

Cause: The recurring duration value is less than the value<br />

specified in the minimum exclusive or minimum inclusive<br />

field.<br />

[ISC.0082.9295] Value is greater than maximum<br />

Cause: The recurring duration value is greater than the<br />

value specified in the maximum exclusive or maximum<br />

inclusive field.<br />

[ISC.0082.9246] Value does not conform to datatype<br />

Cause: The recurring duration value does not match the<br />

pattern specified in the pattern field.<br />

[ISC.0082.9293] No matching choice value<br />

Cause: The string value is not an element listed in the<br />

choices field.<br />

[ISC.0082.9297] Value is shorter than minimum length<br />

Cause: The size of the string, in characters, is less than the<br />

value specified in the minimum length field.<br />

<strong>webMethods</strong> <strong>Developer</strong> User’s <strong>Guide</strong> Version 6.5, Service Pack 3 � � � 474


Error Code Message and Description<br />

DT-STR003<br />

DT-STR004<br />

DT-Time001<br />

DT-Time002<br />

DT-Time003<br />

DT-Time004<br />

DT-TimeDuration001<br />

DT-TimeDuration002<br />

G. Validation Errors and Exceptions<br />

[ISC.0082.9298] Value is longer than maximum length<br />

Cause: The size of the string, in characters, is greater than<br />

the value specified in the maximum length field.<br />

[ISC.0082.9307] Does not match pattern(s)<br />

Cause: The string value does not match the pattern<br />

specified in the pattern field.<br />

[ISC.0082.9293] No matching choice value<br />

Cause: The time value is not an element listed in the<br />

choices field.<br />

[ISC.0082.9294] Value is less than minimum<br />

Cause: The time value is less than the value specified in the<br />

minimum exclusive or minimum inclusive field.<br />

[ISC.0082.9295] Value is greater than maximum<br />

Cause: The time value is greater than the value specified in<br />

the maximum exclusive or maximum inclusive field.<br />

[ISC.0082.9246] Value does not conform to datatype<br />

Cause: The time value does not match the pattern<br />

specified in the pattern field.<br />

[ISC.0082.9293] No matching choice value<br />

Cause: The time duration value is not an element listed in<br />

the choices field.<br />

[ISC.0082.9294] Value is less than minimum<br />

Cause: The time duration value is less than the value<br />

specified in the minimum exclusive or minimum inclusive<br />

field.<br />

<strong>webMethods</strong> <strong>Developer</strong> User’s <strong>Guide</strong> Version 6.5, Service Pack 3 � � � 475


Error Code Message and Description<br />

DT-TimeDuration003<br />

DT-TimeDuration004<br />

DT-TimePeriod001<br />

DT-TimePeriod002<br />

DT-TimePeriod003<br />

DT-TimePeriod004<br />

NV-001<br />

NV-002<br />

[ISC.0082.9295] Value is greater than maximum<br />

G. Validation Errors and Exceptions<br />

Cause: The time duration value is greater than the value<br />

specified in the maximum exclusive or maximum inclusive<br />

field.<br />

[ISC.0082.9246] Value does not conform to datatype<br />

Cause: The time duration value does not match the pattern<br />

specified in the pattern field.<br />

[ISC.0082.9246] Values does not conform to data type<br />

Cause: The time period value does not match data type<br />

specified in the IS schema.<br />

[ISC.0082.9293] No matching choice value<br />

Cause: The time period value is not an element listed in<br />

the choices field.<br />

[ISC.0082.9294] Value is less than minimum<br />

Cause: The time duration value is less than the value<br />

specified in the minimum exclusive or minimum inclusive<br />

field.<br />

[ISC.0082.9295] Value is greater than maximum<br />

Cause: The time duration value is greater than the value<br />

specified in the maximum exclusive or maximum inclusive<br />

field.<br />

[ISC.0082.9001] Error while parsing<br />

Cause: The XML document cannot be parsed. It is possible<br />

that the XML document being validated is not well<br />

formed.<br />

[ISC.0082.9002] Unable to retrieve root element<br />

Cause: XML document is empty.<br />

Response: Check that the document is being submitted<br />

properly.<br />

<strong>webMethods</strong> <strong>Developer</strong> User’s <strong>Guide</strong> Version 6.5, Service Pack 3 � � � 476


Error Code Message and Description<br />

NV-003<br />

NV-004<br />

NV-005<br />

NV-006<br />

NV-007<br />

G. Validation Errors and Exceptions<br />

[ISC.0082.9003] Unable to locate a matching element declaration<br />

Cause: An undeclared element node is found in the<br />

instance document.<br />

Response: Check to make sure that the document uses<br />

only declared elements.<br />

[ISC.0082.9004] [attributes] property must be empty<br />

Cause: This element carries attributes that are not<br />

expected.<br />

Response: Check to make sure that the document only<br />

uses element attributes that are declared in the schema.<br />

[ISC.0082.9005] Element information items are not allowed in<br />

[children] property<br />

Cause: This element contains child elements; however, the<br />

element declaration in the IS schema indicates that the<br />

element does not contain any child elements.<br />

Response: Check to make sure that the document properly<br />

conforms to the schema.<br />

[ISC.0082.9006] Unable to locate a matching attribute declaration<br />

Cause: This element carries an attribute that is not<br />

declared in the element declaration in the IS schema.<br />

Response: Check to make sure that the document only<br />

uses element attributes that are declared in the schema.<br />

[ISC.0082.9007] Missing Attribute Information Item<br />

Cause: A required attribute is not found in this element<br />

node.<br />

Response: Check to make sure that the document<br />

conforms to the schema.<br />

<strong>webMethods</strong> <strong>Developer</strong> User’s <strong>Guide</strong> Version 6.5, Service Pack 3 � � � 477


Error Code Message and Description<br />

NV-008<br />

NV-009<br />

NV-010<br />

G. Validation Errors and Exceptions<br />

[ISC.0082.9008] Invalid value - does not match fixed value<br />

Cause: The instance document contains an invalid element<br />

body or attribute value. Specifically, the element body or<br />

attribute value does not match a fixed value found in the<br />

declaration.<br />

Response: Check to make sure that the document<br />

conforms to the schema.<br />

[ISC.0082.9009] Child element elementName at position location<br />

is unexpected.<br />

Cause: The element is not a valid child element or the<br />

sequence of child elements does not satisfy the order<br />

specified in the corresponding element declaration or<br />

complex type definition.<br />

Response: Check to make sure that the document<br />

conforms to the schema.<br />

[ISC.0082.9010] Incomplete content–one or more child elements<br />

are expected.<br />

Cause: The element is not a valid child element or the<br />

sequence of child elements does not satisfy the order<br />

specified in the definition.<br />

Response: Check to make sure that the document<br />

conforms to the schema.<br />

[ISC.0082.9011] Unable to locate attribute declaration<br />

Cause: An attribute declaration is not found. It is possible<br />

that a dependent IS schema that contains this attribute<br />

declaration was removed from the IS Namespace. For<br />

example, IS schema pub.schema.w3c:datatypes references an<br />

attribute declaration (xml:lang) in pub.schema.w3c:xml . If<br />

you receive this error, it is possible that pub.schema.w3c:xml<br />

was removed.<br />

Response: Check to make sure that all of the attribute<br />

declarations referenced by the schema are present.<br />

<strong>webMethods</strong> <strong>Developer</strong> User’s <strong>Guide</strong> Version 6.5, Service Pack 3 � � � 478


Error Code Message and Description<br />

NV-011<br />

NV-012<br />

NV-013<br />

NV-014<br />

[ISC.0082.9012] Unable to locate type definition<br />

G. Validation Errors and Exceptions<br />

Cause: A simple or complex type definition is not found. It<br />

is possible that a dependent IS schema that contains this<br />

type definition was removed from the IS Namespace. For<br />

example, IS schema pub.schema.w3c:structures references a<br />

type definition in pub.schema.w3c:datatypes. If you receive<br />

this error, it is possible that pub.schema.w3c:datatypes was<br />

removed.<br />

Response: Check to make sure that all of the type<br />

definitions referenced by the schema are present.<br />

[ISC.0082.9014] Unable to locate element declaration<br />

Cause: An element declaration is not found. It is possible<br />

that a dependent IS schema that contains the element<br />

declaration was removed from the IS Namespace.<br />

Response: Check to make sure that all the element<br />

declarations referenced by the schema are present.<br />

[ISC.0082.9016] Unable to resolve QName: localName:{uri}<br />

Cause: The schema processor uses the namespaces<br />

declared in the instance document to resolve a QName to:<br />

{Namespace URI} Local Name<br />

However, the schema processor is unable to resolve the<br />

QName using the namespace declarations in the instance<br />

document.<br />

Response: Check to make sure that the document<br />

conforms to the schema.<br />

[ISC.0082.9017] typeName is not validly derived from<br />

declaredTypeName<br />

Cause: This error occurs when the first type is used in a<br />

context where the second type is expected, and either the<br />

first type is not the same as the second type or the first<br />

type is not validly derived from the second type.<br />

Response: Check to make sure that the correct types are<br />

specified in the schema and that the correct<br />

corresponding types are used in the document.<br />

<strong>webMethods</strong> <strong>Developer</strong> User’s <strong>Guide</strong> Version 6.5, Service Pack 3 � � � 479


Error Code Message and Description<br />

NV-015<br />

NV-016<br />

NV-017<br />

NV-018<br />

G. Validation Errors and Exceptions<br />

[ISC.0082.9018] typeName is an abstract type and cannot be used<br />

directly to validate content<br />

Cause: The specified type is an abstract type that has been<br />

either declared or nominated. Abstract types cannot be<br />

used to validate element content.<br />

Response: Make sure to use only concrete types when<br />

validating element content.<br />

[ISC.0082.9019] elementName is an abstract element and cannot<br />

appear in an instance<br />

Cause: The element declaration identifies the element as<br />

an abstract element. Abstract elements cannot appear in<br />

instance documents.<br />

Response: Make sure to only use concrete elements in<br />

instance documents.<br />

[ISC.0082.9020] QName - xsi:type is used incorrectly (declared<br />

type is anonymous)<br />

Cause: A type is nominated using xsi:type for an element<br />

whose declaration contains an anonymous type. A new<br />

type cannot be derived from an anonymous type because<br />

new types can be derived only from named types.<br />

Response: Be sure to use only named types when<br />

declaring new types.<br />

[ISC.0082.9021] Contains invalid text<br />

Cause: The schema processor encountered an invalid piece<br />

of text. It is possible that the instance document contains a<br />

simple type where element declarations are interspersed<br />

with text. Simple types cannot contain element<br />

declarations.<br />

Response: Check to make sure that the document<br />

conforms to the schema.<br />

<strong>webMethods</strong> <strong>Developer</strong> User’s <strong>Guide</strong> Version 6.5, Service Pack 3 � � � 480


Error Code Message and Description<br />

VV-001<br />

[ISC.0082.9025] Missing Object<br />

G. Validation Errors and Exceptions<br />

Cause: A required document (IData object) or variable is<br />

missing from the input.<br />

Response: Be sure that the arguments are being passed<br />

properly to the validator.<br />

VV-002 [ISC.0082.9026] Undefined Object found<br />

VV-003<br />

Cause: A document (IData object) contains an orphan<br />

variable. (This message only appears if the Allow<br />

unspecified fields property in the Constraints category of the<br />

Properties panel is False.)<br />

Response: Make sure that all variables are defined, or<br />

check the box to allow unspecified fields on the<br />

constraints tab of the Variable Properties dialog box.<br />

[ISC.0082.9027] Dimension mismatch, List expected<br />

Cause: The value being validated is a scalar value or a<br />

multi-dimensional array (String table), however the<br />

variable it is being validated against is a list (onedimensional<br />

array).<br />

Response: Check to make sure that the document<br />

conforms to the schema.<br />

[ISC.0082.9028] Dimension mismatch, Single item expected<br />

Cause: The value being validated is an array value (a list or<br />

a table). The variable it is being validated against is scalar.<br />

Response: Check to make sure that the document<br />

conforms to the schema.<br />

[ISC.0082.9029] Dimension mismatch, Table expected<br />

Cause: The value being validated is a scalar value or a onedimensional<br />

array (list). The variable it is being validated<br />

against is a two-dimensional array (table).<br />

Response: Check to make sure that the document<br />

conforms to the schema.<br />

<strong>webMethods</strong> <strong>Developer</strong> User’s <strong>Guide</strong> Version 6.5, Service Pack 3 � � � 481


Validation Exceptions<br />

Error Code Message and Description<br />

VV-004<br />

[ISC.0082.9030] Type mismatch, String expected<br />

G. Validation Errors and Exceptions<br />

Cause: The value is being validated against a String<br />

variable, but the IS data type of the value is not a String.<br />

Response: Check to make sure that the document<br />

conforms to the schema.<br />

[ISC.0082.9031] Type mismatch, Document expected<br />

Cause: The value is being validated against an IS<br />

document type variable, but the IS data type of the value<br />

is not an IS document type.<br />

Response: Check to make sure that the document<br />

conforms to the schema.<br />

[ISC.0082.9032] Type mismatch, Object expected<br />

Cause: The value is being validated against an Object<br />

variable, but the IS data type of the value is not an Object.<br />

Response: Check to make sure that the document<br />

conforms to the schema.<br />

At run time, the service performing validation either succeeds or fails. If the service fails,<br />

<strong>webMethods</strong> Integration Server throws a validation exception. A validation exception is<br />

generated if one of the following is true:<br />

� Errors are detected in the object (XML node, pipeline, or document (IData object)) that<br />

is passed (for example, null value).<br />

� The basic validation contract is violated (for example, a binary tree is passed instead<br />

of a document (IData object) as expected).<br />

� You specify that the service should fail if the object to be validated (XML node,<br />

pipeline, or document (IData object)) did not conform to the IS schema or IS<br />

document type (for example, failIfInvalid = true). If this is the reason for the exception,<br />

<strong>webMethods</strong> Integration Server inserts the validation errors into the exception<br />

message.<br />

<strong>webMethods</strong> <strong>Developer</strong> User’s <strong>Guide</strong> Version 6.5, Service Pack 3 � � � 482


G. Validation Errors and Exceptions<br />

The following table identifies and describes the validation exceptions that can be<br />

generated.<br />

Default Exception Message When is it thrown? Description<br />

[ISS.0062.9021] object is null<br />

[ISS.0062.9022] %NSName% -<br />

object does not exists<br />

[ISS.0062.9024] <strong>webMethods</strong><br />

Integration Server does not<br />

support this type of validation<br />

(may or may not support in<br />

the future)<br />

[ISS.0062.9202] Invalid:<br />

minLength<br />

[ISS.0062.9203] Invalid:<br />

maxLength<br />

[ISS.0062.9211] Invalid<br />

Regular Expression:<br />

Expression<br />

Real time and<br />

design time<br />

Real time and<br />

design time<br />

Real time and<br />

design time<br />

Cause: The object to be validated does<br />

not exist in the pipeline.<br />

Response: Link an XML node or<br />

document variable to the object<br />

variable in Service In.<br />

Cause: The IS document type or IS<br />

schema specified for the conformsTo<br />

variable does not exist in the IS<br />

Namespace.<br />

Response: Change the value of<br />

conformsTo to be an IS document type<br />

or IS schema that exists in the IS<br />

namespace.<br />

Cause: The object to be validated is not<br />

one of the types supported by<br />

validation.<br />

Response: Currently, only XML,<br />

pipeline, and document (IData object)<br />

validation is supported.<br />

Design time Cause: The min length is either not a<br />

parsable number or conflicts with max<br />

length.<br />

Response: Change the min length value<br />

and make sure that it is within the<br />

allowed range for the content type.<br />

Design time Cause: The max length is either not a<br />

parsable number or conflicts with<br />

minimum length.<br />

Response: Change the max length value<br />

and make sure that it is within the<br />

allowed range for the content type.<br />

Design time Cause: The pattern is an invalid Perl<br />

regular expression.<br />

Response: Modify the pattern and<br />

make sure that it is Perl regular<br />

expression.<br />

<strong>webMethods</strong> <strong>Developer</strong> User’s <strong>Guide</strong> Version 6.5, Service Pack 3 � � � 483


Default Exception Message When is it thrown? Description<br />

[ISS.0062.9212] Invalid:<br />

minInclusive<br />

[ISS.0062.9213] Invalid:<br />

minExclusive<br />

[ISS.0062.9214] Invalid:<br />

maxInclusive<br />

[ISS.0062.9215] Invalid:<br />

maxExclusive<br />

[ISS.0062.9230] Invalid scale<br />

G. Validation Errors and Exceptions<br />

Design time Cause: The specified minInclusive value<br />

is invalid. For example, the<br />

minInclusive value for a variable with<br />

content type constraint of short must<br />

also be a short.<br />

Response: Make sure the minInclusive is<br />

a valid number for the specified<br />

content type.<br />

Design time Cause: The specified minExclusive<br />

value is invalid. For example, the<br />

minExclusive value for a variable with<br />

content type constraint of short must<br />

also be a short.<br />

Response: Make sure the minExclusive<br />

is a valid number for the specified<br />

content type.<br />

Design time Cause: The specified maxInclusive value<br />

is invalid. For example, the<br />

maxInclusive value for a variable with<br />

content type constraint of short must<br />

also be a short.<br />

Response: Make sure the maxInclusive<br />

is a valid number for the specified<br />

content type.<br />

Design time Cause: The specified maxExclusive<br />

value is invalid. For example, the<br />

maxExclusive value for a variable with<br />

content type constraint of short must<br />

also be a short.<br />

Response: Make sure the maxExclusive<br />

is a valid number for the specified<br />

content type.<br />

Design time Cause: The value of a constraining<br />

facet has an invalid scale.<br />

Response: Examine the constraining<br />

facet values to make sure the values<br />

do not conflict.<br />

<strong>webMethods</strong> <strong>Developer</strong> User’s <strong>Guide</strong> Version 6.5, Service Pack 3 � � � 484


Default Exception Message When is it thrown? Description<br />

[ISS.0062.9231] Exceeds<br />

precision: minInclusive<br />

[ISS.0062.9232] Exceeds<br />

precision: minExclusive<br />

[ISS.0062.9233] Exceeds<br />

precision: maxInclusive<br />

[ISS.0062.9234] Exceeds<br />

precision: maxExclusive<br />

[ISS.0062.9235] Invalid<br />

enumerated item<br />

G. Validation Errors and Exceptions<br />

Design time Cause: The value of the minInclusive<br />

constraining facet exceeds the value<br />

specified for totalDigits.<br />

Response: Change the value of<br />

minInclusive or totalDigits to make sure<br />

the values do not conflict.<br />

Design time Cause: The value of the minExclusive<br />

constraining facet exceeds the value<br />

specified for totalDigits.<br />

Response: Change the value of<br />

minExclusive or totalDigits to make sure<br />

the values do not conflict.<br />

Design time Cause: The value of the maxInclusive<br />

constraining facet exceeds the value<br />

specified for totalDigits.<br />

Response: Change the value of<br />

maxInclusive or totalDigits to make sure<br />

the values do not conflict.<br />

Design time Cause: The value of the maxExclusive<br />

constraining facet exceeds the value<br />

specified for totalDigits.<br />

Response: Change the value of<br />

maxExclusive or totalDigits to make sure<br />

the values do not conflict.<br />

Design time Cause: A content type constraint is<br />

defined in terms of the collective set<br />

of constraining facet values. Together,<br />

these values determine the allowed<br />

values and properties of the content<br />

type. The constraining facet value you<br />

just specified may conflict with other<br />

constraining facet values. For<br />

example, if you specify length for the<br />

string content type, you cannot<br />

specify min length or max length.<br />

Response: Examine the constraining<br />

facet values to make sure the values<br />

do not conflict with each other.<br />

<strong>webMethods</strong> <strong>Developer</strong> User’s <strong>Guide</strong> Version 6.5, Service Pack 3 � � � 485


Default Exception Message When is it thrown? Description<br />

[ISS.0062.9302] Maximum is<br />

less than minimum<br />

[ISS.0062.9303] Minimum is<br />

out of range (Valid range is<br />

from lowerBound to<br />

upperBound)<br />

[ISS.0062.9304] Maximum is<br />

out of range (Valid range is<br />

from lowerBound to<br />

upperBound)<br />

IS Schema Generation Errors and Warnings<br />

G. Validation Errors and Exceptions<br />

Design time Cause: Invalid condition. The<br />

maximum value is less than the<br />

minimum value.<br />

(maximum < minimum)<br />

Response: Change the maximum or<br />

minimum value to eliminate the<br />

conflict.<br />

Design time Cause: The minimum value is out of<br />

the valid range for the content type.<br />

Response: Change the minimum value<br />

(min exclusive, min inclusive, or min<br />

length) and make sure that it is within<br />

the allowed range for the content<br />

type.<br />

Design time Cause: The specified maximum value<br />

is out of the valid range for the<br />

content type.<br />

Response: Change the maximum<br />

value (max exclusive, max inclusive or<br />

max length) and make sure that it is<br />

within the allowed range for the<br />

content type.<br />

When you create an IS schema from a DTD or an XML Schema definition, you may receive<br />

errors or warnings. The following table identifies and describes the errors you might<br />

receive when creating an IS schema. Error or warning codes that begin with DTDC are<br />

errors that occur when you generate an IS schema from a DTD (or from an XML<br />

document that references an existing DTD). Error or warning codes that begin with XSDC<br />

are errors that occur when you generate an IS schema from an XML Schema definition.<br />

Note: You might also receive these errors and warnings when you generate an IS document<br />

type or flow service from an XML Schema definition, DTD, or XML document that<br />

references a DTD. For more information about creating an IS document type, see<br />

“Creating an IS Document Type” on page 244. For more information about creating a flow<br />

service, see “Creating a New Flow Service” on page 127.<br />

<strong>webMethods</strong> <strong>Developer</strong> User’s <strong>Guide</strong> Version 6.5, Service Pack 3 � � � 486


Code Message and Description<br />

CONV-001<br />

DTDC-001<br />

DTDC-002<br />

DTDC-003<br />

DTDC-005<br />

XSDC-001<br />

XSDC-002<br />

[ISC.0082.9101] Document type generation error: errorNumber.<br />

G. Validation Errors and Exceptions<br />

Cause: The schema processor encountered an error in the XML Schema<br />

definition used to create an IS document type.<br />

Response: Contact <strong>webMethods</strong> Technical Services.<br />

[ISC.0082.9501] DTD is empty<br />

Cause: The DTD does not contain any information.<br />

Response: Make sure that the DTD is valid.<br />

[ISC.0082.9502] NS Declaration is missing for prefix 'prefixName'<br />

Cause: Warns that an XML Namespace prefix is used without declaring<br />

it.<br />

Response: Declare the XML Namespace prefix before using it.<br />

[ISC.0082.9503] Error while parsing'<br />

Cause: Warns that a DTD cannot be parsed. It is possible the DTD does<br />

not satisfy XML 1.0.<br />

[ISC.0082.9505] Name collision detailedWarningMessage<br />

Cause: Warns that an element type declaration is found in another<br />

schema with the same XML Namespace.<br />

Response: Use a different XML Namespace.<br />

[ISC.0082.9703] Duplicate declaration found in this schema definition<br />

Cause: A duplicate attribute or element declaration is found in the XML<br />

Schema definition.<br />

Response: Make sure the XML Schema definition is valid.<br />

[ISC.0082.9704] Duplicate definition found in this schema definition<br />

Cause: A duplicate simple type or complex type definition is found in<br />

the XML Schema definition.<br />

Response: Make sure the XML Schema definition is valid.<br />

<strong>webMethods</strong> <strong>Developer</strong> User’s <strong>Guide</strong> Version 6.5, Service Pack 3 � � � 487


Code Message and Description<br />

XSDC-003<br />

XSDC-004<br />

XSDC-005<br />

XSDC-006<br />

[ISC.0082.9705] Definition not found<br />

G. Validation Errors and Exceptions<br />

Cause: A simple type or complex type definition is missing from the<br />

XML Schema definition.<br />

Response: Make sure the datatype definition is present in the XML<br />

Schema definition.<br />

[ISC.0082.9706] Declaration not found<br />

Cause: An error. An element declaration or attribute declaration is<br />

missing from the XML Schema definition.<br />

[ISC.0082.9707] Base type definition not found<br />

Cause: A base type definition that is used to derive either a simple type<br />

or complex type is missing from the XML Schema definition.<br />

Response: Make sure the base type definition is present in the XML<br />

Schema definition.<br />

[ISC.0082.9708] Type derivation not OK<br />

Cause: An error. As per the spec (s) from the W3C, the “type derivation is<br />

not OK.”<br />

[ISC.0082.9709] Type derivation not OK: attribute declaration to be restricted is<br />

not found in the base type definition<br />

Cause: In a complex type derivation, an attribute declaration restricts the<br />

use of an attribute. However, this attribute declaration is not found in<br />

the base type definition.<br />

Response: Make sure that the attribute declaration is present in the base<br />

type definition.<br />

[ISC.0082.9710] Type derivation not OK: attribute declaration to be prohibited is<br />

not found in the base type definition<br />

Cause: In a complex type derivation, an attribute declaration prohibits<br />

the use of an attribute. However, this attribute declaration is not found<br />

in the base type definition.<br />

Response: Make sure that the attribute declaration is present in the base<br />

type definition.<br />

<strong>webMethods</strong> <strong>Developer</strong> User’s <strong>Guide</strong> Version 6.5, Service Pack 3 � � � 488


Code Message and Description<br />

XSDC-008<br />

XSDC-009<br />

XSDC-080<br />

XSDC-081<br />

G. Validation Errors and Exceptions<br />

[ISC.0082.9712] Incorrect facet (s) specified: typeName throws errorMessage.<br />

Cause: Constraining facets applied to the data type are incorrect or<br />

cannot be used with the data type.<br />

Response: Use the error messages to determine which constraining facets<br />

to remove from the type definition.<br />

[ISC.0082.9713] Unable to resolve QName<br />

Cause: Incorrect QName.<br />

Response: Check the value of the QName.<br />

[ISC.0082.9701] Duplicate declaration found in this schema<br />

folderName:schemaNamewith the same target namespace<br />

Cause: Warns that an identical attribute declaration or element<br />

declaration is found in the specified schema with the same target<br />

namespace. The schema processor creates the schema but does not<br />

include the duplicate declaration. Instead, the schema contains a pointer<br />

to the first (original) declaration.<br />

Response: None required.<br />

[ISC.0082.9702] Duplicate definition found in this schema<br />

folderName:schemaName with the same target namespace<br />

Cause: Warns that an identical simple type or complex type definition is<br />

found in the specified schema with the same target namespace. The<br />

schema processor creates the schema but does not include the duplicate<br />

type definition. Instead, the schema contains a pointer to the first<br />

(original) type definition.<br />

Response: None required.<br />

[ISC.0082.9106] Complex type TypeName is recursive. <strong>webMethods</strong> Integration<br />

Server does not support creating a document type from an XSD with a recursive<br />

complex type.<br />

Cause: The XML Schema contains a recursive complex type definition.<br />

The Integration Server does not support generating a document type<br />

from an IS schema containing a recursive complex type. This error only<br />

occurs when you generate an IS document type from an XML Schema.<br />

Response: Do not try to generate a document type from a schema<br />

containing a recursive complex type.<br />

<strong>webMethods</strong> <strong>Developer</strong> User’s <strong>Guide</strong> Version 6.5, Service Pack 3 � � � 489


G. Validation Errors and Exceptions<br />

<strong>webMethods</strong> <strong>Developer</strong> User’s <strong>Guide</strong> Version 6.5, Service Pack 3 � � � 490


Index<br />

Symbols<br />

! 439<br />

!= 436<br />

" 444<br />

% 444<br />

& 440<br />

&& 440<br />

( 444<br />

) 444<br />

/ 444<br />

< 436<br />

436<br />

>= 436<br />

\ 444<br />

_env field 251<br />

| 439<br />

|| 439<br />

‡ 265<br />

A<br />

access control 110<br />

ACLs<br />

assigning to elements 110, 113<br />

assigning to packages and folders 113<br />

checking for services 111<br />

defined 110<br />

element creation, view, and deletion implications 118<br />

inheritance 115<br />

locking implications 117<br />

requirements for using <strong>Developer</strong> 20<br />

testing and debugging implications 118<br />

viewing on a server 116<br />

actions, performing on IS elements 34<br />

adapter notifications<br />

described 252<br />

guidelines for moving and copying 53<br />

adapter services, retry behavior 390<br />

adding<br />

folders 127<br />

packages 76<br />

transformers 224<br />

variables to pipeline link 221<br />

addressing<br />

variables in expressions and filters 441<br />

variables with special characters 443<br />

alarm events<br />

building handlers for 373<br />

definition of 362, 372<br />

reasons generated 372<br />

uses of 373<br />

all content model 237<br />

Allow unspecified fields option 262<br />

and operator 440<br />

annotating source code for jcode 329<br />

anonymous type definitions 237<br />

any attribute declaration 236<br />

any element declaration 236<br />

anyURI content constraint 455<br />

API for Java services 323, 328<br />

applying<br />

conditions to links 214<br />

constraints to variables 261, 454<br />

areas of <strong>Developer</strong> window<br />

behavior and operation 33<br />

editor 30<br />

focus 33<br />

general layout 23<br />

Navigation panel 24<br />

Properties panel 31<br />

Recent Elements tab 29<br />

resizing 35<br />

Results panel 33<br />

Servicenet tab 28<br />

switching perspectives 36<br />

<strong>webMethods</strong> <strong>Developer</strong> User’s <strong>Guide</strong> Version 6.5, Service Pack 3 � � � 491<br />

Index


zooming 35<br />

arithmetic services 224<br />

array variables<br />

default behavior for linking 424<br />

definition of 424<br />

guidelines for linking 213<br />

linking to or from array variables 211, 424<br />

linking to or from scalar variables 211, 424<br />

linking to transformers 228<br />

using in filters 446<br />

assigning<br />

default value to a variable 217<br />

replication services 90<br />

shutdown services 90<br />

startup services 90<br />

universal names to services 145<br />

values to pipeline variables 216, 217<br />

variable values to a variable 218<br />

version numbers to packages 83<br />

attribute<br />

declaration 236<br />

reference 236<br />

audit data, when generated 149<br />

audit events<br />

building handlers for 374<br />

definition of 362, 374<br />

when generated 150<br />

Audit level property 156<br />

audit log<br />

configuring 148<br />

described 149<br />

auditing<br />

configuring 148<br />

failed and successful services 150, 154<br />

failed services 150<br />

for errors 153<br />

for recovery, described 155<br />

for resubmission purposes 153<br />

long-running services 155<br />

service retry 143<br />

services 148<br />

use cases 153<br />

auditing options<br />

overwritten by server property 156<br />

setting for a service 155<br />

auditLog server property 156<br />

<strong>webMethods</strong> <strong>Developer</strong> User’s <strong>Guide</strong> Version 6.5, Service Pack 3 � � � 492<br />

B<br />

base64Binary content constraint 455<br />

binding options for COM objects 339<br />

blank labels in BRANCH steps 173<br />

blue links, in the Pipeline tab 212<br />

booleans<br />

content constraint 455<br />

in filters, Broker restrictions 445<br />

BRANCH step<br />

branching on empty values 172<br />

branching on expressions 171<br />

branching on null values 172<br />

branching on switch value 169<br />

creating 177<br />

creating a multi-step child for 175<br />

definition of 124, 398<br />

Evaluate labels property 171<br />

specifying default step 174<br />

specifying label value 170<br />

specifying switch variable 170<br />

switch value 169<br />

using conditional expressions 171<br />

using in a flow 168<br />

using SEQUENCE as a target of 175<br />

using with regular expressions 170<br />

breakpoints<br />

and the Trace Into command 296<br />

clearing from flow steps 296<br />

clearing from transformers 297<br />

listing all 298<br />

locating in flow services 298<br />

overview 295<br />

point when processing halts 296, 297<br />

removing 298<br />

setting in flow services 296<br />

setting on a flow step 296<br />

setting on a transformer 297<br />

Index


Broker<br />

filter collation locale 437<br />

filter rules 444<br />

Broker document type, creating publishable document type from<br />

248<br />

browser clients<br />

creating 356<br />

invoking services from 357, 359<br />

testing from 286<br />

building<br />

event handler sample 371<br />

event handlers 370<br />

flow services 122<br />

built-in services<br />

for arithmetic operations 224<br />

for date/time transformations 224<br />

for document (IData object) validation 269<br />

for pipeline validation 270<br />

for remote services 166<br />

for string manipulation 224<br />

for XML validation 271<br />

invoking 166<br />

throwExceptionForRetry 144<br />

byte content constraint 455<br />

C<br />

C/C++ clients<br />

creating 350, 351<br />

creating a make file 351<br />

C/C++ services<br />

compiling with a make file 332<br />

creating 332, 333<br />

caching<br />

definition of 138<br />

elements to improve <strong>Developer</strong> performance 70<br />

services not suited for 139<br />

services suited for 139<br />

setting 141<br />

using prefetch 140<br />

call stack 285<br />

catch sequence, in service retry 391<br />

changing<br />

level of a step 162<br />

passwords 39<br />

position of a step 162<br />

child flows<br />

described 162<br />

stepping in/out of child flows 294<br />

tracing 292<br />

choice content model 237<br />

circular dependencies, between packages 87<br />

class files<br />

location of 327<br />

clearing<br />

breakpoints on flow steps 296<br />

breakpoints on transformers 297<br />

client applications<br />

creating browser-based 356<br />

creating C/C++ 350<br />

creating Excel 355<br />

creating Java 346<br />

creating Visual Basic 352<br />

closed documents, described 262<br />

closing a session on <strong>webMethods</strong> Integration Server 37<br />

coded services, about 316<br />

collapsing<br />

transformers 230<br />

white space 466<br />

COM objects<br />

binding options 339<br />

invoking as services 337<br />

using with <strong>webMethods</strong> components 336<br />

COM services<br />

creating 336<br />

invoking 339, 341<br />

com.wm.app.b2b.server.ISRuntimeException class 144<br />

combining Trace and Step commands 289<br />

commands<br />

Disable Step 298, 299<br />

Enable Step 298, 299<br />

Load Pipeline Locally 306<br />

Reset 290<br />

Restore Pipeline from Server 306<br />

Restore Pipeline Locally 306<br />

Save Pipeline from Server 306<br />

Save Pipeline Locally 304<br />

<strong>webMethods</strong> <strong>Developer</strong> User’s <strong>Guide</strong> Version 6.5, Service Pack 3 � � � 493<br />

Index


Save Pipeline to Server 304<br />

Set Breakpoint 296<br />

Step 288, 292, 293<br />

Step Into 288, 292, 294<br />

Step Out 292, 294<br />

Trace 288, 290, 291<br />

Trace Into 288, 290, 292<br />

Trace to Here 288, 290, 291<br />

comments for jcode 329<br />

Comments property, definition 164, 402<br />

compiling<br />

C/C++ services 336<br />

error in Java compiler location 324<br />

Java services 324, 330<br />

services with <strong>Developer</strong> 324<br />

services with jcode 330, 332<br />

specifying the Java compiler 324<br />

Visual Basic services 339<br />

complex type definition<br />

all content model 237<br />

anonymous 237<br />

choice content model 237<br />

described 237<br />

empty content 237<br />

mixed content 237<br />

sequence content model 237<br />

composite mode (jcode) 331<br />

conditional expressions<br />

addressing variables 441<br />

addressing variables with special characters 443<br />

lexical operators 437<br />

logical operators 439<br />

operator precedence 441<br />

standard relational operators 435<br />

syntax 431<br />

using with pipeline links 214<br />

using with the BRANCH step 171<br />

conditional links<br />

creating 216<br />

described 214<br />

disabling 301<br />

conditions<br />

applying to links 214<br />

disabling on links 301<br />

connecting to <strong>webMethods</strong> Integration Server 22, 37<br />

constraining facets<br />

applying 265<br />

described 261, 464<br />

for pipeline validation 454<br />

constraints<br />

content 234, 454<br />

definition of 261<br />

for IS schemas 234<br />

for XML validation 234<br />

structural 234<br />

viewing for variables 265<br />

content constraints<br />

applying to variables 261<br />

constraining facets 261, 464<br />

editing for simple types 242<br />

for String variables, definition of 454<br />

for validation 454<br />

for variables, definition of 261<br />

for XML validation 234<br />

in IS schemas 234<br />

in IS schemas, definition of 234<br />

content models<br />

all 237<br />

choice 237<br />

empty 237<br />

mixed 237<br />

sequence 237<br />

content types<br />

applying to variables 262<br />

constraint symbol 265<br />

customizing 264<br />

specifiying constraining facet values 265<br />

context-sensitive menus 34<br />

Control steps<br />

BRANCH 124, 168<br />

definition of 123<br />

EXIT 124, 190<br />

LOOP 124, 186<br />

REPEAT 124, 179<br />

<strong>webMethods</strong> <strong>Developer</strong> User’s <strong>Guide</strong> Version 6.5, Service Pack 3 � � � 494<br />

Index


SEQUENCE 124, 185<br />

conventions used in this document 17<br />

converting string lists to document (IData object) lists 210<br />

copying<br />

by reference, definition of 206<br />

by value, definition of 206<br />

elements from the Results panel 283<br />

IS elements 51<br />

pipeline values 219<br />

set values 219<br />

transformers 230<br />

creating<br />

code for Java services 325<br />

event filters 366<br />

event filters for services 368<br />

event handler sample 371<br />

event handlers 370<br />

flow services 126, 127<br />

folders 127, 332<br />

IS elements 45<br />

IS schemas 239<br />

Java services with an IDE 329<br />

Java services with C/C++ 332<br />

Java services with <strong>Developer</strong> 319, 323<br />

Java services with Visual Basic 336, 339<br />

Java services with your own IDE 327<br />

links to array variables 424<br />

links to document (IData object) variables 208<br />

packages 76<br />

specifications for C/C++ services 332<br />

version numbers for packages 83<br />

cursors 317<br />

customizing content types 264<br />

D<br />

dagger symbol, next to variable icon 265<br />

data transformations, definition of 196<br />

data types<br />

icons to represent 129<br />

linking with Pipeline tab 209<br />

supported by <strong>webMethods</strong> Integration Server 420<br />

tables 423<br />

data validation<br />

allowing undeclared variables 262<br />

applying constraints 261<br />

benefits of 260<br />

blueprints for 260<br />

closed variables 262<br />

content constraints 261<br />

definition of 260<br />

document (IData object) validation 269<br />

errors 468<br />

exceptions 273, 482<br />

input/output validation<br />

definition of 266<br />

performing via Input/Output tab 267<br />

performing via INVOKE step properties 268<br />

open variables 262<br />

pipeline validation 270<br />

requiring variable existence 262<br />

structural constraints 261<br />

types of 260<br />

XML validation 271<br />

date content constraint 455<br />

date conversion services 224<br />

dateTime content constraint 456<br />

DCOM objects<br />

invoking as services 337<br />

using with <strong>webMethods</strong> Integration Server 336<br />

debug level, setting on server 309<br />

debugging flow services<br />

breakpoints 295<br />

combining trace and step 289<br />

disabling a single flow step 298<br />

disabling a transformer 299<br />

disabling conditions on links 301<br />

dumping the pipeline to serveryyyymmdd.log 311<br />

enabling a single flow step 298<br />

enabling a transformer 299<br />

modifying the pipeline 302<br />

overview 276, 288<br />

posting messages to serveryyyymmdd.log 310<br />

resetting debug mode 290<br />

stepping into a child flow 294<br />

stepping into a transformer 294<br />

<strong>webMethods</strong> <strong>Developer</strong> User’s <strong>Guide</strong> Version 6.5, Service Pack 3 � � � 495<br />

Index


stepping through a flow 288, 292<br />

tracing a flow 288, 290<br />

tracing into a child flow 292<br />

using server debug facility 308, 309<br />

debugLog service 310<br />

decimal content constraint 456<br />

declaring<br />

input and output parameters 129<br />

input for a service 130<br />

output for a service 131<br />

default value, assigning to a pipeline variable 217<br />

defining packages 76<br />

deleting<br />

breakpoints on transformers 297<br />

event subscriptions 370<br />

IS elements 57<br />

links between variables 214<br />

packages 81<br />

dependencies, package<br />

identifying 85<br />

removing 87<br />

dependents<br />

checking when renaming IS elements 47<br />

confirming before deleting elements 48<br />

finding service and document (IData object) 63<br />

safeguards for updating 48<br />

details perspective 36<br />

<strong>Developer</strong> window, toolbar 28<br />

<strong>Developer</strong>. See <strong>webMethods</strong> <strong>Developer</strong><br />

dimensionality, definition of 228<br />

directories<br />

Java services 327<br />

Disable Step command 298, 299<br />

disabling<br />

a condition placed on a link 301<br />

a flow step 298<br />

a transformer 299<br />

dispatch services<br />

for COM 337<br />

for DCOM 337<br />

document (IData object) validation<br />

definition of 269<br />

errors 468<br />

exceptions 482<br />

performing 269<br />

document data type 420<br />

document list data type<br />

converting from String list 210<br />

definition of 420<br />

document reference data type<br />

creating 254<br />

definition of 420<br />

document reference list data type<br />

creating 254<br />

definition of 420<br />

Document Type Definitions. See DTDs<br />

document types. See IS document types<br />

documentation<br />

accessing for packages 80<br />

additional 18<br />

conventions used 17<br />

creating for packages 80<br />

feedback 18<br />

using effectively 17<br />

documents (IData objects)<br />

applying content constraints 454<br />

assigning to a document or document list 244, 254<br />

assigning to a specification 244<br />

benefits of 244<br />

creating 244<br />

errors when creating from DTD or XML Schema 486<br />

finding dependents 47<br />

linking 208<br />

open and closed 262<br />

pipeline validation 270<br />

printing 253<br />

using as service parameters 244, 253<br />

viewing in browser 253<br />

double content constraint 456<br />

DROP modifier 200, 220<br />

dropping values from the pipeline 220<br />

<strong>webMethods</strong> <strong>Developer</strong> User’s <strong>Guide</strong> Version 6.5, Service Pack 3 � � � 496<br />

Index


DTDs<br />

creating documents (IData objects) from 244<br />

creating IS document types from 246<br />

creating IS schemas from 239<br />

IS schema generation warnings 486<br />

duration content constraint 457<br />

E<br />

early binding, for a Visual Basic service 339, 341<br />

edit perspective 36<br />

editing<br />

elements. See editor<br />

event subscriptions 369<br />

flow services 122<br />

properties 32<br />

Service property 165<br />

simple types in IS schema 242<br />

editor<br />

described 30<br />

help about 41<br />

hiding and showing 35<br />

inserting flow steps into 161<br />

resizing 35<br />

supported data types 129<br />

tabs 30<br />

viewing and editing elements in 30<br />

element declaration 236<br />

element lock<br />

copying, moving, and deleting 100<br />

removing. See unlocking elements<br />

system lock 94<br />

user lock 94<br />

element reference 236<br />

elements (IS)<br />

See also editor 47<br />

assigning ACLs 113<br />

caching to improve <strong>Developer</strong> performance 70<br />

copying 51<br />

creating 45<br />

cutting 51<br />

definition of 44<br />

deleting 57<br />

displayed in editor 30<br />

<strong>webMethods</strong> <strong>Developer</strong> User’s <strong>Guide</strong> Version 6.5, Service Pack 3 � � � 497<br />

Index<br />

displayed in Navigation panel 25<br />

displayed in Recent Elements tab 29<br />

displayed in Servicenet tab 28<br />

double-clicking to open 49<br />

editing 47<br />

exporting 82<br />

finding dependents 47<br />

finding in Navigation panel 59<br />

finding unresolved references 65<br />

fully-qualified names 45<br />

guidelines<br />

copying 51<br />

creating 45<br />

deleting 57<br />

general actions 48<br />

moving 51<br />

opening and closing 49<br />

renaming 55<br />

help for properties 41<br />

locating in Navigation panel 31<br />

locking 47<br />

moving 51<br />

naming guidelines 46<br />

overwriting when creating publishable document types 249<br />

pasting 51<br />

performing actions 48<br />

performing actions on 34<br />

permissions 110<br />

references 65<br />

renaming 55<br />

saving 57<br />

single-clicking does not open 49<br />

unlocking 47<br />

viewing as HTML 47<br />

empty<br />

content 237<br />

strings in filters 437<br />

values, branching on 172<br />

Enable service audtiting options, described 149<br />

Enable Step command 298, 299


enabling<br />

flow steps 298<br />

service auditing 149<br />

transformers 299<br />

end-to-end linking 223<br />

entering input for a service 278<br />

ENTITIES content constraint 457<br />

ENTITY content constraint 457<br />

enumeration constraining facet 464<br />

envelope field<br />

in publishable document types 251<br />

usage restrictions 251<br />

error auditing, described 153<br />

error handling, in flow services 185<br />

errors<br />

data validation 468<br />

document (IData object) generation 486<br />

flow service generation 486<br />

IS schema generation 486<br />

pipeline validation 468<br />

Evaluate labels property 178<br />

event filters<br />

creating 366<br />

creating for services 368<br />

event handlers<br />

creating 370<br />

creating sample 371<br />

definition of 363<br />

for alarm events 373<br />

for audit events 374<br />

for exception events 376<br />

for GD End events 380<br />

for GD Start events 379<br />

for port status events 381<br />

for replication events 382<br />

for session end events 383<br />

for session expire events 384<br />

for session start events 383<br />

for stat events 385<br />

for Tx End events 387<br />

for Tx Start events 387<br />

stages of creating 370<br />

Event Manager<br />

alarm events<br />

building handlers 373<br />

definition of 362, 372<br />

uses 373<br />

audit events<br />

building handlers 374<br />

definition of 362, 374<br />

definition of 362<br />

event behavior 363<br />

event handlers 363<br />

Event Manager command 364<br />

exception events 362, 376<br />

building handlers 376<br />

filters 366<br />

GD End events 377<br />

building handlers 380<br />

uses 377<br />

GD Start events 377<br />

building handlers 379<br />

uses 377<br />

guaranteed delivery events 362<br />

pattern strings 366<br />

port status events 362, 380<br />

building handlers 381<br />

uses 380<br />

replication events 362, 381<br />

building handlers 382<br />

uses 381<br />

run-time behavior 363<br />

session end events 382<br />

building handlers 383<br />

session events 362, 382<br />

uses 382<br />

session expire events 382<br />

building handlers 384<br />

session start events 382<br />

building handlers 383<br />

stat events 363, 384<br />

building handlers 385<br />

uses 384<br />

subscriptions<br />

creating 364<br />

<strong>webMethods</strong> <strong>Developer</strong> User’s <strong>Guide</strong> Version 6.5, Service Pack 3 � � � 498<br />

Index


creating filters for 366<br />

deleting 370<br />

editing 369<br />

managing 364<br />

suspending 369<br />

viewing 369<br />

transaction events 363, 386<br />

Tx End events 386<br />

building handlers 387<br />

uses 386<br />

Tx Start events 386<br />

building handlers 387<br />

uses 386<br />

viewing subscriptions 369<br />

events<br />

See also event handlers, Event Manager<br />

creating filters 366<br />

creating filters for services 368<br />

deleting subscriptions to 370<br />

editing subscriptions to 369<br />

guaranteed delivery 377<br />

subscribing to 364<br />

suspending subscriptions to 369<br />

types of 362<br />

viewing subscriptions to 369<br />

Excel clients, creating 355<br />

exception events<br />

building handlers for 376<br />

definition of 362, 376<br />

exceptions<br />

data validation 273, 482<br />

during a test 284<br />

executing services from <strong>Developer</strong> 277<br />

execution locale 141<br />

Exit on property 185<br />

EXIT step<br />

creating 191<br />

definition of 124, 401<br />

using in a flow 190<br />

expanding transformers 230<br />

explicit linking, definition of 202<br />

explicit universal names 146<br />

exporting elements and packages 82<br />

expressions<br />

addressing variables 441<br />

addressing variables with special characters 443<br />

branching on 171<br />

operator precedence 441<br />

operators for 434<br />

syntax for 431<br />

using for pipeline linking 214<br />

extending the Java class 322<br />

extends (Java keyword) 322<br />

<strong>webMethods</strong> <strong>Developer</strong> User’s <strong>Guide</strong> Version 6.5, Service Pack 3 � � � 499<br />

F<br />

facets, See constraining facets<br />

failIfInvalid property 482<br />

failure<br />

of a flow step 185<br />

of a REPEAT step 180<br />

fields<br />

content type constraint symbol 265<br />

dagger symbol 265<br />

green squares 265<br />

optional symbol 265<br />

filter collation locale 437<br />

filtering events 366<br />

filters<br />

addressing variables 441<br />

addressing variables with special characters 443<br />

allowed quantifiers 446<br />

arrays 446<br />

back references 446<br />

booleans in 445<br />

braces {} in 446<br />

checking for variable existence 445<br />

collation locale, specifying 437<br />

comparing strings and numeric values 445<br />

comparison operators, missing 445<br />

constrained Objects in 445<br />

effect of locale 437<br />

extended metacharacters 446<br />

lexical relational operators 437<br />

lists 446<br />

logical operators 439<br />

$null 446<br />

Index


operators for 434<br />

server performance 435<br />

standard relational operators 435<br />

syntax 431<br />

syntax restrictions 444<br />

variables with special characters 443<br />

finding<br />

elements in Navigation panel 59<br />

invoked services 63<br />

service and document (IData object) dependents 63<br />

unresolved pipeline references 66<br />

unresolved references 65<br />

float content constraint 457<br />

flow services<br />

See also services, debugging flow services<br />

breakpoints 295, 296<br />

caching to improve <strong>Developer</strong> performance 70<br />

creating 127<br />

debugging 288<br />

definition of 122<br />

disabling a single step 298<br />

disabling a transformer 299<br />

disabling conditions placed links 301<br />

editing 122<br />

enabling a single step 298<br />

enabling a transformer 299<br />

errors creating from DTD or XML Schema 486<br />

inserting steps in a service 161<br />

maximum retry period 143<br />

printing 157<br />

response to failure 185<br />

retrying 143, 144<br />

stages of creating 126<br />

stepping in/out of child flows 294<br />

stepping in/out of transformers 294<br />

stepping through 292<br />

tracing 290<br />

viewing in browser 157<br />

flow steps<br />

BRANCH 124, 168<br />

changing the level of 162<br />

changing the position of 162<br />

definition of 123<br />

disabling 298<br />

enabling 298<br />

EXIT 124, 190<br />

failure of 185<br />

grouping 185<br />

hierarchical order of 162<br />

inserting into a flow service 160<br />

INVOKE 123, 165<br />

LOOP 124, 186<br />

MAP 124, 192<br />

moving in a flow service 162<br />

parent/child relationships 162<br />

properties 163<br />

re-enabling 298<br />

REPEAT 124, 179<br />

SEQUENCE 124, 185<br />

setting breakpoints on 296<br />

folders, creating 127<br />

frag mode (jcode) 331<br />

<strong>webMethods</strong> <strong>Developer</strong> User’s <strong>Guide</strong> Version 6.5, Service Pack 3 � � � 500<br />

G<br />

GD End events<br />

building handlers for 380<br />

definition of 377<br />

pub.remote.gd:end 377<br />

uses of 377<br />

when generated 378<br />

GD Start events<br />

building handlers for 379<br />

definition of 377<br />

pub.remote.gd:start 377<br />

uses of 377<br />

when generated 378<br />

gDay content constraint 458<br />

Generate Code command 349, 351, 353<br />

global declarations, in XML Schemas and DTDS 236<br />

gMonth content constraint 458<br />

gMonthDay content constraint 458<br />

Go To Breakpoint command 298<br />

Go To command (for services) 63<br />

gray links, in the Pipeline tab 202<br />

green square, next to variable icon 265<br />

grouping flow steps 185<br />

Index


guaranteed delivery events<br />

See also GD End events, GD Start events<br />

compared to transaction events 378<br />

definition of 362, 377<br />

generating guaranteed delivery (GD) events 378<br />

generating transaction (Tx) events 378<br />

overview 378<br />

when generated 378<br />

guidelines<br />

for assigning startup, shutdown, and replication services 89<br />

for elements<br />

creating 45<br />

deleting 57<br />

moving and copying 51<br />

opening and closing 49<br />

renaming 55<br />

working with 48<br />

for linking array variables 213<br />

for linking document (IData object) variables 208<br />

for linking variables 204<br />

for linking variables of different data types 209<br />

for naming packages 76<br />

gYear content constraint 459<br />

gYearMonth content constraint 459<br />

H<br />

hailmary mode (jcode) 332<br />

hard-coding input variables 216<br />

help, obtaining 41<br />

hexBinary content constraint 459<br />

hiding and showing panels 35<br />

HTML, viewing elements in 47<br />

I<br />

ID content constraint 459<br />

IData objects<br />

creating 317<br />

definition of 316<br />

getting data from 317<br />

positioning cursors 317<br />

putting data in 317<br />

using in a Java service 328<br />

IDE<br />

assigning a super class with 322<br />

creating source code in 320<br />

defining private methods with 322<br />

implementing interfaces with 322<br />

importing Java packages 322<br />

in <strong>Developer</strong> 318, 320<br />

using other IDEs 327<br />

using the Java service editor 320<br />

using the Shared tab 322<br />

identifying<br />

package dependencies 85<br />

replication services 90<br />

shutdown services 90<br />

startup services 90<br />

IDREF content constraint 460<br />

IDREFS content constraint 460<br />

implementing interface in Java services 322<br />

implements (Java keyword) 322<br />

implicit linking<br />

described 202<br />

for MAP steps 223<br />

implicit universal names 146<br />

import (Java keyword) 322, 328<br />

import mechanism, in XML Schemas 241<br />

importing Java packages 322, 328<br />

include mechamism, in XML Schemas 241<br />

index, array variables 212<br />

Indexing tab. See linking array variables<br />

Input array property 187<br />

input variables<br />

declaring for a service 129, 130<br />

declaring in a document (IData object) 244<br />

entering test values for 278<br />

hard-coding 216<br />

linking considerations 204<br />

linking in the pipeline 202<br />

loading values from a file 280<br />

saving values to a file 280<br />

input/output parameters<br />

declaring for a service 129<br />

generating Java code from 325<br />

Input/Output tab 131<br />

<strong>webMethods</strong> <strong>Developer</strong> User’s <strong>Guide</strong> Version 6.5, Service Pack 3 � � � 501<br />

Index


input/output validation<br />

definition of 266<br />

performing via Input/Output tab 267<br />

performing via INVOKE step 268<br />

inserting<br />

INVOKE step 167<br />

steps into flow services 161<br />

transformers 224<br />

installing Java services 327<br />

int content constraint 460<br />

integer content constraint 460<br />

Integrated Development Environment. See IDE<br />

Integration Server Administrator, unlocking elements 101<br />

Integration Server. See <strong>webMethods</strong> Integration Server<br />

interfaces<br />

implementing in Java service 322<br />

INVOKE step<br />

Comments property 402<br />

creating 167<br />

definition of 123, 402<br />

finding 63<br />

invoking built-in services 166<br />

invoking services on another server 166<br />

Label property 403<br />

peforming validation via step properties 268<br />

Pipeline tab 197<br />

Scope property 402<br />

Service property 165, 403<br />

Timeout property 402<br />

using in a flow 165<br />

Validate input property 403<br />

Validate output property 403<br />

invoking<br />

built-in services 166<br />

remote services 166<br />

services 167<br />

services from a browser 357, 359<br />

services on another server 166<br />

Visual Basic services 339<br />

IS document types<br />

See also documents (IData objects)<br />

creating empty document types 245<br />

creating from Broker document type 248<br />

creating from DTD 246<br />

creating from XML document 246<br />

creating from XML Schema 246<br />

described 244<br />

editing 252<br />

IS elements. See elements (IS)<br />

IS schemas<br />

appearance 234<br />

constraints 234<br />

content constraints 234<br />

creating 239<br />

definition of 234<br />

editing simple types 242<br />

errors from generating 486<br />

generating multiple 241<br />

import element 241<br />

include element 241<br />

structural constraints 234<br />

using to validate an XML document 271<br />

warnings from generating 486<br />

ISRuntimeExceptions<br />

description of 143<br />

throwing in services 390<br />

<strong>webMethods</strong> <strong>Developer</strong> User’s <strong>Guide</strong> Version 6.5, Service Pack 3 � � � 502<br />

J<br />

Java classes for object and object list variables 421<br />

Java clients, creating 346, 349<br />

Java keywords<br />

extends 322<br />

implements 322<br />

import 322, 328<br />

Java service editor 320<br />

Java services<br />

adding private methods to 322<br />

compiler location 324<br />

compiling with <strong>Developer</strong> 324<br />

compiling with jcode 330<br />

creating 323, 325<br />

creating with an IDE 327, 329<br />

creating with <strong>Developer</strong> 319<br />

extending the class of 322<br />

implementing interface in 322<br />

importing packages into 322, 328<br />

Index


installing manually 327<br />

jcode requirements 329<br />

location of class files 327<br />

location of source files 328<br />

publishing to the server 327<br />

required code 328<br />

setting run-time options 326<br />

stages of development 319<br />

structure of 318<br />

using with <strong>webMethods</strong> components 318<br />

validating from 271<br />

jcode utility<br />

composite mode 331<br />

frag mode 331<br />

hailmary mode 332<br />

make mode 330<br />

purpose of 327<br />

source code samples 448<br />

source code tags 329<br />

update mode 332<br />

K<br />

keyboard shortcuts 34<br />

L<br />

L_EQUALS 438<br />

L_GREATER_OR_EQUAL 438<br />

L_GREATER_THAN 438<br />

L_LESS_OR_EQUAL 438<br />

L_LESS_THAN 438<br />

L_NOT_EQUALS 438<br />

Label property<br />

definition 403<br />

for evaluating expressions 171<br />

for general use 164<br />

for specifying the default BRANCH step 174<br />

for targeting BRANCH steps 170<br />

language content constraint 460<br />

late binding, for a Visual Basic service 339<br />

length constraining facet 465<br />

lexical relational operators<br />

conditional expressions 437<br />

definition of 437<br />

empty string 437<br />

locale 437<br />

non-string variables 437<br />

libs directory 332, 336, 339<br />

link indices 212<br />

linking<br />

array variables 211<br />

default rules 424<br />

guidelines for 213<br />

to array variables 424<br />

to scalar variables 424<br />

to transformers 228<br />

between document formats 223<br />

conditional links 214<br />

considerations 204<br />

copying by reference 206<br />

copying by value 206<br />

default behavior for arrays 213<br />

deleting links between variables 214<br />

different data types 209<br />

disabling conditions on links 301<br />

document (IData object) variables 208<br />

in a single view 223<br />

input variables 202<br />

output variables 203<br />

pipeline variables to service variables 201<br />

scalar variables to array variables 424<br />

the pipeline 205<br />

transformers 226<br />

variables conditionally 214<br />

variables explicitly 202<br />

variables implicitly 202<br />

links<br />

blue colored 212<br />

deleting 214<br />

disabling conditions 301<br />

executing at run time 206<br />

gray colored 202<br />

in Pipeline tab 201<br />

list variables in filters 446<br />

Load Pipeline Locally command 306<br />

<strong>webMethods</strong> <strong>Developer</strong> User’s <strong>Guide</strong> Version 6.5, Service Pack 3 � � � 503<br />

Index


loading<br />

input values from a file 280<br />

pipeline values from a file<br />

into Results panel 306<br />

overview 306<br />

with restorePipelineFromFile service 307<br />

locating a breakpoint 298<br />

locking elements<br />

corresponding server files 103<br />

description 94<br />

Java and C/C++ 97<br />

single element 96<br />

system locking 98<br />

template service 98<br />

unlocking. See unlocking elements<br />

VCS check in/check out 94<br />

viewing lock status 95, 99<br />

log files, audit log 149<br />

logging on to <strong>webMethods</strong> Integration Server 22, 37<br />

logical operators, definition of 434<br />

long content constraint 460<br />

LOOP step<br />

creating 189<br />

creating nested loops 187<br />

definition of 124, 403<br />

setting Input array 187<br />

setting Output array 188<br />

using in a flow 186<br />

M<br />

make file<br />

creating 332<br />

using to compile C/C++ services 336<br />

make mode (jcode) 330<br />

MAP modifier<br />

definition of 200<br />

executing at run time 206<br />

linking different data types 209<br />

linking from service output 203<br />

linking to service input 202<br />

MAP step<br />

debugging 294<br />

definition of 124, 405<br />

disabling transformers 299<br />

enabling transformers 299<br />

inserting transformers 224<br />

Pipeline tab 199<br />

transformers 223<br />

using in a flow 192<br />

using to initialize variables in a flow 193, 218<br />

mapping. See linking<br />

Max attempts property 145<br />

maxExclusive constraining facet 465<br />

maximum retry period, definition of 143<br />

maximum retry period, description of 143<br />

maxInclusive constraining facet 465<br />

maxLength constraining facet 465<br />

maxOccurs threshold value, for validation 274<br />

memory<br />

reducing usage 70<br />

running out of during validation 274<br />

menu bar, using to perform actions 34<br />

metacharacters, in filters 446<br />

methods, adding to a Java service 322<br />

minExclusive constraining facet 465<br />

minInclusive constraining facet 465<br />

minLength constraining facet 465<br />

mixed content 237<br />

modifying the pipeline 200<br />

moving<br />

IS elements 51<br />

steps in a flow service 162<br />

steps within a flow 162<br />

<strong>webMethods</strong> <strong>Developer</strong> User’s <strong>Guide</strong> Version 6.5, Service Pack 3 � � � 504<br />

N<br />

Name content constraint 461<br />

name transformations, definition of 196<br />

namespace information (for services)<br />

creating source file from 331, 332<br />

location of 327<br />

updating with jcode 331<br />

namespaces<br />

usage in universal names 145<br />

XML namespace property 255<br />

naming services 45<br />

Navigation panel<br />

Index


described 24<br />

help about 41<br />

hiding and showing 35<br />

icons 25, 94<br />

refreshing contents of 27<br />

resizing 35<br />

toolbar 28<br />

NCName content constraint 461<br />

negativeInteger content constraint 461<br />

NMTOKEN content constraint 461<br />

NMTOKENS content constraint 461<br />

nonNegativeInteger content constraint 461<br />

nonPositiveInteger content constraint 462<br />

not operator 439<br />

notification, of server shutdown 39<br />

ns directory 327<br />

$null<br />

in filters 446<br />

in labels for BRANCH steps 173<br />

null, branching on 172<br />

O<br />

Object data type<br />

definition of 421<br />

in filters 445<br />

Object list data type, definition of 421<br />

object list variables, Java classes 421<br />

object variables, Java classes 421<br />

online help, obtaining 41<br />

open and closed documents 262<br />

open documents, described 262<br />

opening a session on <strong>webMethods</strong> Integration Server 37<br />

operations, performing on IS elements 34<br />

operators<br />

conditional expressions and filters 434<br />

lexical relational operators 437<br />

logical 439<br />

precedence in expressions 441<br />

relational 434<br />

standard relational operators 435<br />

optional variables for validation 262<br />

or operator 439<br />

out of sync publishable document types 253<br />

Output array property 188<br />

output templates<br />

assigning to a service 134<br />

definition of 134<br />

output variables<br />

declaring 131<br />

declaring for a service 129<br />

declaring in a document (IData object) 244<br />

linking considerations 204<br />

linking in the pipeline 203<br />

Overwrite Pipeline Value option 217<br />

<strong>webMethods</strong> <strong>Developer</strong> User’s <strong>Guide</strong> Version 6.5, Service Pack 3 � � � 505<br />

P<br />

packages<br />

adding 76<br />

assigning version numbers 83<br />

copying 78<br />

creating 76<br />

creating circular dependencies 87<br />

cutting 78<br />

definition of 74<br />

deleting 81<br />

dependencies, using with startup services 88<br />

documenting 80<br />

exporting 82<br />

identifying dependencies 85<br />

importing into Java services 322, 328<br />

moving 78<br />

naming guidelines 76<br />

pasting 78<br />

reloading 81<br />

reloading vs refreshing 81<br />

removing dependencies 87<br />

required by Java services 328<br />

viewing details 77<br />

viewing patch history 83<br />

Index


panels<br />

editor 30<br />

Navigation 24<br />

Properties 31<br />

Recent Elements 29<br />

Results 33<br />

Servicenet 28<br />

switching perspectives 36<br />

parameters<br />

applying constraints 261<br />

benefits of declaring 129<br />

declaring 129, 133<br />

declaring for a service 130, 131<br />

parent/child relationships in a flow 162<br />

passwords<br />

changing 39<br />

requirements 39<br />

patch history<br />

removal by Integration Server 84<br />

viewing for a package 83<br />

pattern constraining facet 465<br />

pattern matching, in event subscriptions 366<br />

Perform Variable Substitution option 218<br />

Performance 152<br />

performance impact, service auditing 152<br />

permission<br />

See also ACLs<br />

assigning to elements 110<br />

Permissions property 114<br />

perspectives of views 36<br />

pipeline<br />

adding variables to 221<br />

addressing variables 441<br />

adjusting 200<br />

assigning values to 216<br />

changing values 302<br />

checking for variables 434<br />

conditional linking 214<br />

copying values 219<br />

definition of 124<br />

DROP modifier 220<br />

dropping values 302<br />

dropping variables from 220<br />

inspecting modifiers 66<br />

linking 205<br />

array variables 211<br />

default rules 424<br />

guidelines for 213<br />

input variables 202<br />

output variables 203<br />

scalar variables, default rules 424<br />

transformers 226<br />

variables of different data types 209<br />

MAP step 192<br />

modifying 302<br />

Overwrite Pipeline Value option 217<br />

Perform Variable Substitution option 218<br />

Pipeline In 197<br />

Pipeline Out 198<br />

restoring from a file 306<br />

saving 303<br />

saving from Results panel 304<br />

saving with savePipelineToFile service 305<br />

Service In 197<br />

Service Out 198<br />

SET VALUE modifier 216<br />

stages of 197<br />

validating 270<br />

validating via built-in services 270<br />

validating via Java service 271<br />

viewing after run-time exception 286<br />

viewing with <strong>Developer</strong> 281<br />

Pipeline Editor. See Pipeline tab<br />

Pipeline In 197, 199<br />

pipeline modifiers<br />

definition of 200<br />

DROP 200<br />

MAP 200<br />

SET VALUE 200<br />

Pipeline Out 198, 199<br />

pipeline references<br />

definition of 66<br />

finding 66<br />

Pipeline tab 196<br />

blue links (conditional link) 212<br />

copying by reference 206<br />

<strong>webMethods</strong> <strong>Developer</strong> User’s <strong>Guide</strong> Version 6.5, Service Pack 3 � � � 506<br />

Index


copying by value 206<br />

default behavior for arrays 213<br />

default linking rules 424<br />

deleting links between variables 214<br />

editing a MAP step 199<br />

editing INVOKE step 197<br />

gray links (implicit link) 202<br />

inserting transformers 224<br />

linking<br />

array variables 211<br />

default rules 424<br />

guidelines for 213<br />

document (IData object) variables 208<br />

scalar variables, default rules 424<br />

transformers 226<br />

variables 201<br />

overview 196<br />

printing 200<br />

transformer movement 227<br />

viewing in browser 200<br />

pipeline validation<br />

definition of 270<br />

errors 468<br />

exceptions 482<br />

performing via built-in services 270<br />

performing via Java service 271<br />

port status events<br />

building handlers for 381<br />

definition of 362, 380<br />

uses of 380<br />

positiveInteger content constraint 462<br />

precision constraining facet 466<br />

prefetch 140<br />

preserve white space 466<br />

printing<br />

documents (IData objects) 253<br />

flow services 157<br />

Pipeline tab contents 200<br />

private methods, defining in Java service 322<br />

program code conventions in this document 17<br />

programming languages<br />

creating services with 316<br />

supported 316<br />

properties<br />

Audit level 156<br />

auditLog server 156<br />

Comments 164, 402<br />

definition of 163<br />

editing 32<br />

Evaluate labels 178<br />

Exit on 185<br />

for transformers 225<br />

Input array 187<br />

Label 164, 403<br />

Label (for BRANCH steps) 170, 174<br />

Output array 188<br />

Permissions 114<br />

Repeat on 180, 181, 408<br />

Scope 177, 402<br />

Service 165, 167, 225, 403<br />

setting for variables 255<br />

Switch 170, 178<br />

Timeout 167, 177, 181, 182, 189, 402<br />

Validate input 167, 225, 403<br />

Validate output 168, 225, 403<br />

XML Namespace 255<br />

Properties panel<br />

auditing a service 148<br />

described 31<br />

flow step properties 163<br />

help about 41<br />

hiding and showing 35<br />

patch history for packages 84<br />

resizing 35<br />

run-time parameters 137<br />

pub.flow:getRetryCount service 145<br />

pub.flow:throwExceptionForRetry service 144<br />

invoking 393<br />

pub.publish:envelope document type 251<br />

pub.remote.gd:end service 377<br />

pub.remote.gd:start service 377<br />

pub.remote:invoke service 166<br />

pub.schema:validate service 269<br />

pub.schema:validatePipeline service 270<br />

<strong>webMethods</strong> <strong>Developer</strong> User’s <strong>Guide</strong> Version 6.5, Service Pack 3 � � � 507<br />

Index


publishable document types<br />

adapter notifications 252<br />

creating from Broker document type 248<br />

defined 249<br />

editing 253<br />

envelope field 251<br />

overwriting elements 249<br />

synchronizing 253<br />

publishing services to the server 327<br />

R<br />

Recent Elements tab<br />

described 28, 29<br />

help about 41<br />

hiding and showing 35<br />

resizing 35<br />

Record data type. See document data type<br />

Record list data type. See document list data type<br />

Record Reference data type. See document reference data type<br />

Record Reference List data type. See document reference list<br />

data type<br />

records. See document (IData object), IS document types<br />

redefine mechanism, in XML Schemas 241<br />

re-enabling<br />

flow steps 298<br />

transformers 299<br />

referenced elements, importing during synchronization 249<br />

references<br />

finding 65<br />

inspecting pipeline 66<br />

refresh<br />

difference from restoring a session 39<br />

Navigation panel contents 27<br />

Recent Elements tab contents 29<br />

regular expressions<br />

creating event filters with 368<br />

definition of 412<br />

operators 413<br />

using as a BRANCH label 170<br />

using in a mask 412<br />

reinvoking services 153<br />

relational operators<br />

definition of 434<br />

lexical 437<br />

standard 435<br />

types of 434<br />

reloading packages 81<br />

remote servers, invoking services on 166<br />

remote services, invoking 166<br />

removing<br />

breakpoints 298<br />

breakpoints from transformers 297<br />

package dependencies 87<br />

packages 81<br />

replication services 91<br />

shutdown services 91<br />

startup services 91<br />

variables from the pipeline 220<br />

renaming<br />

IS elements 55<br />

transformers 231<br />

Repeat on property 180, 181, 408<br />

REPEAT step<br />

creating (on failure) 181<br />

creating (on success) 183<br />

definition of 124, 406<br />

failure 180<br />

specifying the repeat condition 180, 408<br />

using in a flow 179<br />

using to retry a failed step 181<br />

using to retry a successful step 183<br />

replace white space 466<br />

replication events<br />

building handlers for 382<br />

definition of 362, 381<br />

uses of 381<br />

replication services<br />

assigning 90<br />

definition of 89<br />

guidelines for assigning 89<br />

removing 91<br />

when to use 89<br />

requirements for passwords 39<br />

requiring variable existence for validation 262<br />

<strong>webMethods</strong> <strong>Developer</strong> User’s <strong>Guide</strong> Version 6.5, Service Pack 3 � � � 508<br />

Index


Reset command 290<br />

resizing<br />

panels 35<br />

window areas 35<br />

Restore Pipeline from Server command 306<br />

Restore Pipeline Locally command 306<br />

restorePipelineFromFile service 303, 306<br />

restoring<br />

pipeline values from a file<br />

into Results panel 306<br />

overview 306<br />

with restorePipelineFromFile service 307<br />

sessions 38<br />

Results panel<br />

copying elements from 283<br />

described 33<br />

general information 282<br />

help about 41<br />

hiding and showing 35<br />

resizing 35<br />

saving results from 303<br />

retried audit log status 143<br />

Retry interval property 145<br />

Retry on ISRuntimeException category 145<br />

retry period, maximum 143<br />

retry, for service 143<br />

retrying a flow step 179<br />

Run command 277<br />

Run in Browser command 286<br />

running out of memory, during validation 274<br />

running services from <strong>Developer</strong> 277<br />

run-time exceptions 284<br />

run-time settings 326<br />

S<br />

Save Pipeline Locally command 304<br />

Save Pipeline to Server command 304<br />

savePipelineToFile service 305, 306<br />

saving<br />

changes to elements 57<br />

elements (IS) 57<br />

input values to a file 280<br />

test results from Results panel 304<br />

test results using savePipelineToFile service 305<br />

test results, overview 303<br />

scalar variables<br />

default behavior for linking 424<br />

definition of 424<br />

linking to or from array variables 424<br />

scale constraining facet 464<br />

schema browser, definition of 235<br />

schema details area, definition of 238<br />

schema editor 234<br />

schema processor, definition of 239<br />

schema services<br />

for document (IData object) validation 269<br />

for pipeline validation 270<br />

for XML validation 271<br />

Scope property, definition 402<br />

Send XML File command 287<br />

sequence content model 237<br />

SEQUENCE step<br />

as target for a BRANCH 175<br />

definition of 124, 408<br />

setting exit condition 185<br />

using in a flow 185<br />

server files, viewing for locked elements 103<br />

server. See <strong>webMethods</strong> Integration Server<br />

serveryyyymmdd.log file 309<br />

contents of 309<br />

dumping pipeline to 311<br />

overview 308<br />

posting messages to 310<br />

service auditing<br />

configuring 148<br />

described 148<br />

enabling 149<br />

error auditing 153<br />

failed and successful services 154<br />

including pipeline 151<br />

overwriting individual service settings 156<br />

performance impact 150, 152<br />

specifying which states to log 149<br />

use cases 153<br />

Service In 197<br />

Service Out 198<br />

<strong>webMethods</strong> <strong>Developer</strong> User’s <strong>Guide</strong> Version 6.5, Service Pack 3 � � � 509<br />

Index


Service property<br />

definition 403<br />

definition of 165<br />

editing 165<br />

for transformers 225<br />

renaming transformers with 231<br />

service retry<br />

adapter services 390<br />

audit log 143<br />

basic componenents 391<br />

configuring 143<br />

example 394<br />

overview 390<br />

requirements 144, 390<br />

restrictions 144<br />

throwing exceptions for 390<br />

services<br />

assigning universal names 145<br />

audit data<br />

enabling 149<br />

when generated 149<br />

auditing<br />

configuring 148<br />

enabling 149<br />

for recovery 155<br />

long-running services 155<br />

options 155<br />

caching to improve <strong>Developer</strong> performance 70<br />

configuring retry 143<br />

creating event filters for 368<br />

creating flow 127<br />

creating with Visual Basic 336, 339<br />

execution locale 141<br />

finding dependents 47<br />

finding invoked 63<br />

flow control 123<br />

input signature for trigger services 131<br />

invoking built-in 166<br />

invoking on another server 166<br />

invoking on remote servers 166<br />

locale policy 141<br />

naming 45<br />

provided by <strong>webMethods</strong> Integration Server 166<br />

<strong>webMethods</strong> <strong>Developer</strong> User’s <strong>Guide</strong> Version 6.5, Service Pack 3 � � � 510<br />

Index<br />

reinvoking 153<br />

retry exceptions 390<br />

retryiing 144<br />

retrying adapter services 390<br />

stages of creating 126<br />

state information 137<br />

testing and debugging 276<br />

throwing retry exceptions 390<br />

transformers 222<br />

validating input/output via Input/Output tab 267<br />

validating input/output via INVOKE step 268<br />

session<br />

closing on <strong>webMethods</strong> Integration Server 37<br />

opening on <strong>webMethods</strong> Integration Server 37<br />

restoring 38<br />

session end events<br />

building handlers for 383<br />

definition of 382<br />

session events<br />

See also session end events, session expire events, session<br />

start events<br />

definition of 362, 382<br />

uses of 382<br />

session expire events<br />

building handlers for 384<br />

definition of 382<br />

session start events<br />

building handlers for 383<br />

definition of 382<br />

Set Breakpoint command 296<br />

SET VALUE modifier 200, 216<br />

copying 219<br />

using in MAP step 218<br />

setting<br />

breakpoints on flow steps 296<br />

breakpoints on transformers 297<br />

variable values 216<br />

Settings tab. See Properties panel<br />

Shared tab 322<br />

short content constraint 462<br />

shortcuts, for toolbars 28<br />

showing and hiding panels 35


shutdown services<br />

assigning 90<br />

definition of 89<br />

guidelines for assigning 89<br />

removing 91<br />

when to use 89<br />

signature<br />

for trigger services 131<br />

of a service 316<br />

simple types 237<br />

editing in IS schema 242<br />

single view linking 223<br />

source code<br />

compiling Visual Basic 339<br />

compiling with C/C++ make file 336<br />

compiling with jcode 330, 332<br />

creating automatically for a Java service 325<br />

creating from namespace information 331<br />

creating in your own Java IDE 328<br />

creating Java 326<br />

location of 328, 339<br />

tagging for jcode 329<br />

writing in C/C++ 335<br />

writing in <strong>Developer</strong> 320<br />

source control system, integration with 94<br />

Source field on Shared tab 322<br />

Source tab. See Java service editor<br />

special characters<br />

in variable names 443<br />

typing in expressions 443<br />

specifications<br />

assigning to a service 258<br />

benefits of 256<br />

creating 256<br />

definition of 256<br />

finding dependents 47<br />

squares, green 265<br />

stack overflow, during validation 274<br />

standard relational operators<br />

definition of 435<br />

using in filters 435<br />

using in triggers 435<br />

starting <strong>Developer</strong> 21<br />

startup services<br />

assigning 90<br />

definition of 88<br />

effect on package dependencies 88, 91<br />

guidelines for assigning 89<br />

removing 91<br />

when to use 88<br />

stat events<br />

building handlers for 385<br />

definition of 363, 384<br />

uses of 384<br />

state information for a service 137<br />

status events. See port status events<br />

Step command 288, 292, 293<br />

Step Into command 288, 292, 294<br />

Step Out command 292, 294<br />

stepping through a flow 288, 292<br />

string content constraint 462<br />

String data type, definition of 420<br />

String list data type<br />

converting to document list 210<br />

definition of 420<br />

String table data type 420<br />

strings<br />

copying by reference 206<br />

transformation services 224<br />

structural constraints<br />

definition of 234, 261<br />

for validation 261<br />

for XML validation 234<br />

IS schemas 234<br />

structural transformations<br />

definition of 196<br />

examples 210<br />

linking to resolve 209<br />

subordinate flow steps. See child flows<br />

subscribing to events, overview 364<br />

super class, defining in IDE 322<br />

suspending event subscriptions 369<br />

Switch property 170, 178<br />

switch value, branching on 169<br />

<strong>webMethods</strong> <strong>Developer</strong> User’s <strong>Guide</strong> Version 6.5, Service Pack 3 � � � 511<br />

Index


symbol<br />

for content type constraints 265<br />

for optional variables 265<br />

syntax for conditional expressions and filters 431<br />

system locking<br />

defined 94<br />

elements 98<br />

T<br />

tables, support of 423<br />

tabs<br />

Input/Output tab 131<br />

Pipeline tab 196<br />

Schema tab. See schema editor 234<br />

selecting 30<br />

Settings tab for services. See also Properties panel 326<br />

Shared tab 322<br />

tagging source code for jcode 329<br />

templates<br />

assigning to a service 134<br />

definition of 134<br />

test perspective 36<br />

test results<br />

changing pipeline values 302<br />

copying 283<br />

loading 303<br />

saving 303<br />

viewing 281<br />

testing services<br />

entering test input 278<br />

from a browser 286<br />

from <strong>Developer</strong> 277<br />

inspecting the pipeline 281<br />

loading input values from a file 280<br />

loading the pipeline 303<br />

overview 276<br />

run-time exceptions 284<br />

saving input to a file 280<br />

saving the pipeline 303<br />

setting breakpoints 295<br />

testing in debug mode 288<br />

viewing results 281<br />

viewing the call stack 285<br />

viewing the pipeline 286<br />

XML document as input 287<br />

threshold value, for maxOccurs 274<br />

throw exception for retry 391<br />

time content constraint 463<br />

time conversion services 224<br />

timeDuration content constraint 457<br />

Timeout property 167<br />

definition 402<br />

for BRANCH step 177<br />

for LOOPstep 189<br />

for REPEAT step 181, 182<br />

token content constraint 463<br />

toolbar, <strong>Developer</strong> window 28<br />

toolbar, using to perform actions 34<br />

totalDigits constraining facet 466<br />

Trace command 288, 290, 291<br />

Trace Into command 288, 290, 292<br />

and breakpoints 296<br />

effect on breakpoints 296<br />

Trace to Here command 288, 290, 291<br />

tracePipeline service 311<br />

tracing<br />

a flow 288, 290<br />

into a child flow 292<br />

transaction events<br />

See also Tx End events, Tx Start events<br />

compared to guaranteed delivery events 378<br />

definition of 363, 386<br />

uses of 386<br />

when generated 378<br />

Transformer not found message 231<br />

transformers<br />

adding 224<br />

array variables 228<br />

clearing breakpoints 297<br />

collapsing 230<br />

considerations 224<br />

copying 230<br />

debugging 294<br />

definition of 222<br />

dimensionality mismatch 228<br />

disabling 299<br />

<strong>webMethods</strong> <strong>Developer</strong> User’s <strong>Guide</strong> Version 6.5, Service Pack 3 � � � 512<br />

Index


enabling 299<br />

expanding 230<br />

inserting 224<br />

linking 226<br />

linking array variables 228<br />

movement in Pipeline tab 227<br />

output variables 226<br />

properties 225<br />

re-enabling 299<br />

renaming 231<br />

Service property 225<br />

services provided by <strong>webMethods</strong> 224<br />

setting breakpoints 297<br />

stepping in/out of child flows 294<br />

Validate input property 225<br />

Validate output property 225<br />

validating input and output 229<br />

zooming in on 230<br />

transient error, definition of 143, 390<br />

trigger services, input signature requirements 131<br />

triggers<br />

creating filters for 430<br />

description of 25<br />

disabled when copied 52<br />

filter syntax restrictions 444<br />

filters and relational operators 437<br />

lexical operators 434<br />

testing 276<br />

used with adapter notifications 252<br />

using standard relational operators 435<br />

troubleshooting information 18<br />

try sequence, in service retry 391<br />

Tx End events<br />

building handlers for 387<br />

definition of 386<br />

uses of 386<br />

when generated 378<br />

Tx Start events<br />

building handlers for 387<br />

definition of 386<br />

uses of 386<br />

when generated 378<br />

type definitions<br />

anonymous 237<br />

complex types 237<br />

simple types 237<br />

typographical conventions in this document 17<br />

<strong>webMethods</strong> <strong>Developer</strong> User’s <strong>Guide</strong> Version 6.5, Service Pack 3 � � � 513<br />

U<br />

Unicode, and Java source code 331<br />

universal names<br />

assigning to services 145<br />

implicit vs explicit 146<br />

local portion of name 145<br />

namespace portion of name 145<br />

removing from a service 147<br />

unlocking elements<br />

more than one 99<br />

system locked 103<br />

using Integration Server Administrator 101<br />

using <strong>webMethods</strong> <strong>Developer</strong> 100<br />

unresolved references, finding 65<br />

unsignedByte content constraint 463<br />

unsignedInt content constraint 463<br />

unsignedLong content constraint 464<br />

unSignedShort content constraint 464<br />

update mode (jcode) 332<br />

URL, invoking services from 357, 359<br />

user account on <strong>webMethods</strong> Integration Server 20<br />

V<br />

Validate input property 167, 225<br />

definition 403<br />

Validate output property 168, 225<br />

definition 403<br />

validatePipeline service 270<br />

validating<br />

See also validation<br />

documents (IData objects) 269<br />

from Java services 271<br />

input/output for transformers 229<br />

input/output via Input/Output tab 267<br />

input/output via INVOKE step 268<br />

pipeline via built-in services 270<br />

pipeline, overview 270<br />

Index


service input/output 266, 267, 268<br />

XML documents 271<br />

validation<br />

See also validating<br />

allowing undeclared variables 262<br />

applying constraints 261<br />

benefits of 260<br />

blueprints for 260<br />

constraining facets 464<br />

constraints, definition of 261<br />

content constraints 454<br />

definition of 260<br />

errors 273, 468<br />

exceptions 273, 482<br />

input/output 266<br />

overview 260<br />

requiring variable existence 262<br />

running out of memory 274<br />

service input and output 266<br />

stack overflow 274<br />

types of 260<br />

XML validation 271<br />

validation errors and error codes 468<br />

validation services<br />

pub.schema:validate 269, 271<br />

pub.schema:validatePipeline 270<br />

value transformations, definition of 196<br />

variables<br />

adding to the pipeline 221<br />

addressing in the pipeline 441<br />

applying constraints 261<br />

applying content constraints 454<br />

applying content types 262<br />

checking for existence 434<br />

content type constraint symbol 265<br />

copying by reference 206<br />

copying by value 206<br />

copying values in pipeline 219<br />

declaring for a service 129, 130, 131<br />

declaring in a document (IData object) 244<br />

deleting links 214<br />

initializing values 218<br />

linked by blue line 212<br />

linking 202<br />

linking conditionally 214<br />

optional existence for validation 262<br />

optional symbol 265<br />

requiring existence for validation 262<br />

setting properties 255<br />

substitutions 218<br />

using as Set Value 218<br />

viewing applied constraints 265<br />

XML Namespace property 255<br />

VCS Integration feature, described 94<br />

version control system (VCS), integration with 94<br />

version numbers, assigning to packages 83<br />

View as HTML command 157, 200, 253<br />

view perspectives 36<br />

viewing<br />

assigned value of a variable 217<br />

breakpoints list 298<br />

elements in HTML 47<br />

status of a locked element 95, 99<br />

test results 281<br />

variable constraints 265<br />

Visual Basic clients, creating 352<br />

Visual Basic services<br />

creating 336, 339<br />

early binding 339, 341<br />

invoking early binding service 341<br />

invoking late binding service 339<br />

late binding 339<br />

win32.COM:invoke 339, 341<br />

win32.COM:invokeLate 339<br />

<strong>webMethods</strong> <strong>Developer</strong> User’s <strong>Guide</strong> Version 6.5, Service Pack 3 � � � 514<br />

W<br />

warnings<br />

document (IData object) generation 486<br />

flow service generation 486<br />

IS schema generation 486<br />

watt.server.auditLog property, described 156<br />

watt.server.invoke.maxRetryPeriod 144<br />

watt.server.stats.pollTime property 380<br />

<strong>webMethods</strong> API, for Java 328<br />

Index


<strong>webMethods</strong> <strong>Developer</strong><br />

main window 23<br />

online help 41<br />

starting 21<br />

toolbar 28<br />

<strong>webMethods</strong> Integration Server<br />

access requirements for 20<br />

closing a session 37<br />

connecting to 22, 37<br />

disconnecting from 37<br />

logging on to 22<br />

notification of shutdown 39<br />

opening a session 37<br />

performing ACL checking 111<br />

supported data types 420<br />

<strong>webMethods</strong> Monitor 148, 153<br />

<strong>webMethods</strong> Type Library 348, 352, 355<br />

When to include input pipeline options, described 151<br />

When to log options, described 149<br />

whiteSpace constraining facet 466<br />

win32.COM.dispatch:createObject 337<br />

win32.COM:invoke 339, 341<br />

win32.COM:invokeLate 339<br />

windows<br />

layout 23<br />

zooming 35<br />

WmPublic package, definition of 166<br />

WmVBDemo.vbp 339<br />

X<br />

XML documents<br />

creating documents (IData objects) from 244<br />

creating IS document types from 246<br />

creating IS schemas from 239<br />

testing services with 287<br />

XML Namespace property, described 255<br />

XML Schema definitions<br />

creating documents (IData objects) from 244<br />

creating IS document types from 246<br />

creating IS schemas from 239<br />

import mechanism 241<br />

include mechanism 241<br />

IS schema generation warnings 486<br />

redefine mechanism 241<br />

referenced by other XML Schemas 241<br />

XML validation<br />

content constraints 234<br />

creating IS schemas 239<br />

definition of 271<br />

errors 468<br />

exceptions 482<br />

IS schemas, overview 234<br />

performing 271<br />

structural constraints 234<br />

<strong>webMethods</strong> <strong>Developer</strong> User’s <strong>Guide</strong> Version 6.5, Service Pack 3 � � � 515<br />

Z<br />

zooming<br />

in a window 35<br />

in on transformers 230<br />

Index


Index<br />

<strong>webMethods</strong> <strong>Developer</strong> User’s <strong>Guide</strong> Version 6.5, Service Pack 3 � � � 516

Hooray! Your file is uploaded and ready to be published.

Saved successfully!

Ooh no, something went wrong!