Customer Educationeducation.informationbuilders.com/...studentguide(word)wm-ilo-sec.pdf · Student...

297
Customer Education Student Guide v7.04 DN7000508.0216 Course 972 iWay Service Manager t Tooling Techniques ILO Use ONLY Do Not Duplicate or Distribute ILO Use ONLY Do Not Duplicate or Distribute

Transcript of Customer Educationeducation.informationbuilders.com/...studentguide(word)wm-ilo-sec.pdf · Student...

Page 1: Customer Educationeducation.informationbuilders.com/...studentguide(word)wm-ilo-sec.pdf · Student Guide v7.04 DN7000508.0216 ... iSM iWay Integration Tools ... SAP®, Siebel®, PeopleSoft®,

Customer Education

Student Guide v7.04

DN7000508.0216

Course 972iWay Service Manager t – Tooling Techniques

ILO

Use

ON

LY D

o N

ot D

uplic

ate

or D

istri

bute

ILO

Use

ON

LY D

o N

ot D

uplic

ate

or D

istri

bute

Page 2: Customer Educationeducation.informationbuilders.com/...studentguide(word)wm-ilo-sec.pdf · Student Guide v7.04 DN7000508.0216 ... iSM iWay Integration Tools ... SAP®, Siebel®, PeopleSoft®,

ILO

Use

ON

LY D

o N

ot D

uplic

ate

or D

istri

bute

ILO

Use

ON

LY D

o N

ot D

uplic

ate

or D

istri

bute

Page 3: Customer Educationeducation.informationbuilders.com/...studentguide(word)wm-ilo-sec.pdf · Student Guide v7.04 DN7000508.0216 ... iSM iWay Integration Tools ... SAP®, Siebel®, PeopleSoft®,

iWay Service Manager Tooling Techniques i

Credits and Copyright

Copyright Notices:

Information Builders, Inc. reserves all rights, including copyright, in all aspects of its courses, including course software, lab guides, and other lab materials. These materials are supplied for in class use only. Any other use is prohibited without the express written consent of Information Builders, Inc. No part of our publications may be reproduced, stored in a retrieval system, or transmitted, in any form or by any means, electronic, mechanical, photocopying, recording, or otherwise, without prior written permission of Information Builders, Inc.

COPYRIGHT DATE:

COPYRIGHT (C) 2011, BY INFORMATION BUILDERS. ALL RIGHTS RESERVED.

ISBN: DN7000508.0216

ILO

Use

ON

LY D

o N

ot D

uplic

ate

or D

istri

bute

ILO

Use

ON

LY D

o N

ot D

uplic

ate

or D

istri

bute

Page 4: Customer Educationeducation.informationbuilders.com/...studentguide(word)wm-ilo-sec.pdf · Student Guide v7.04 DN7000508.0216 ... iSM iWay Integration Tools ... SAP®, Siebel®, PeopleSoft®,

iWay Service Manager Tooling Techniques ii

Table of Contents

Review the iSM Self-Study Course ............................................. 1

Course Conventions ...................................................................... 2

Review the iWay Architecture and Concepts........................................ 4

Introduction to iWay Service Manager ......................................................... 4

Understanding the Architecture ................................................................ 5

iSM iWay Integration Tools ...................................................................... 8

Review the Business Scenario ......................................................... 14

Review the Channel Builder ........................................................... 18

Introduction to Channel Builder ............................................................... 18

Review the iWay Integrated Application ............................................ 22

Review the Use of the Iterator Object .............................................. 27

Introduction to the Iterator Object ........................................................... 27

Completing Your Application .................................................. 31

Debugging Scenario ...................................................................... 32

Task Plan ......................................................................................... 32

Place Variables in an External File ........................................................... 32

Add Process Flow Debugging to the OrdersCSVtoXML_PF Process Flow ................. 68

Add Process Flow Debugging to the CheckOrders_PF Process Flow ...................... 75

Rebuild and Execute the OrdersCSVtoXML Application with Debug ........... 77

Advanced Error Handling and CatchError Processing ..................... 87

Error Processing Preparation .......................................................... 88

Business Scenario ................................................................................ 88

Build the Error Notification Process Flow ........................................... 90

Error Notification Process Flow ............................................................... 90

Build the CatchErrors and Internal Queue Components ......................... 96

Add CatchError and ErrorInternalQ Components ........................................... 96

Use Channel Builder to Create the Internal Listener Channel ................ 105

ILO

Use

ON

LY D

o N

ot D

uplic

ate

or D

istri

bute

ILO

Use

ON

LY D

o N

ot D

uplic

ate

or D

istri

bute

Page 5: Customer Educationeducation.informationbuilders.com/...studentguide(word)wm-ilo-sec.pdf · Student Guide v7.04 DN7000508.0216 ... iSM iWay Integration Tools ... SAP®, Siebel®, PeopleSoft®,

iWay Service Manager Tooling Techniques iii

CatchErrors_C Internal Queue Channel ..................................................... 105

Redeploy the Application ............................................................ 111

OrdersCSVtoXML Application .................................................................. 111

Introduction to the Process Flow Debugger ...................................... 119

Process Flow Debugging Operations ......................................................... 123

Advanced iIA and Ant Scripting.............................................. 143

Introduction to iWay SDK and Ant Scripting ...................................... 144

Understanding Ant Tasks ...................................................................... 147

Build, Upload, Deploy, and Start an iIA Application using Ant Scripts ....... 149

Deploying iWay Sentinel in Your Enterprise .............................. 161

Introduction to Sentinel .............................................................. 162

Sentinel Setup .................................................................................. 163

Deploy an Application ......................................................................... 175

Script to Stop an Application ................................................................. 184

Register Another Server ....................................................................... 187

Creating a Web Service of the Customer Project ........................ 191

Introduction ............................................................................. 192

Build the Customer XML to XML Web Service .................................... 194

Add the Schemas to the Process Flow ....................................................... 198

Review the SOAP Channel from the iWay Library .......................................... 200

Build the Web Service Application ................................................. 202

Reading Multiple Inputs ....................................................... 215

Introduction to Multiple Inputs ...................................................... 216

Create the Multiple Input Structure for the CustXMLtoXMLMI_C Channel .. 218

Add Inlet Preparsers ........................................................................... 221

Update, Deploy, and Start the CustXMLtoXMLMI_App Application ...................... 225

Cross-Channel Services ....................................................... 232

Introduction to Cross-Platform, Application, and Channel Services ......... 233

ILO

Use

ON

LY D

o N

ot D

uplic

ate

or D

istri

bute

ILO

Use

ON

LY D

o N

ot D

uplic

ate

or D

istri

bute

Page 6: Customer Educationeducation.informationbuilders.com/...studentguide(word)wm-ilo-sec.pdf · Student Guide v7.04 DN7000508.0216 ... iSM iWay Integration Tools ... SAP®, Siebel®, PeopleSoft®,

iWay Service Manager Tooling Techniques iv

Internal Queue Processing ........................................................... 235

Ordered Queue Processing ........................................................... 237

Ordered Queue Facility ........................................................................ 238

Reverse Invocation Queue Processing ............................................. 239

Asynchronous Forward Transfer Invocation Queue Processing ............... 240

Example of Cross-Channel Services using Ordered Queues ................... 242

Appendices ...................................................................... 248

Designer Menu Options and Toolbar Icons ................................ 248

Menu Options ................................................................................... 248

Toolbar Icons .................................................................................... 251

Improving Processing Performance Using Java .......................... 254

Setting JVM Options ............................................................................ 254

Configuring JVM Options for Windows ....................................................... 255

General Settings – Configuration Backup.................................................... 256

High Availability ................................................................................ 257

Failover .......................................................................................... 257

Scaling and Balancing .......................................................................... 258

Simple Failover Using iWay Heartbeat ...................................................... 258

IP-Based Horizontal Scaling ................................................................... 260

Web-Based Horizontal Scaling Using iWay Performance Monitor ........................ 261

Horizontal Scaling for Queuing ............................................................... 261

Horizontal Scaling for Transactions .......................................................... 262

The iWay Reverse Invocation Proxy and HA ................................................ 262

Join vs Junction ................................................................ 262

Sync Object ..................................................................... 265

Schedule Provider ............................................................. 267

Schedule Provider .............................................................................. 267

ILO

Use

ON

LY D

o N

ot D

uplic

ate

or D

istri

bute

ILO

Use

ON

LY D

o N

ot D

uplic

ate

or D

istri

bute

Page 7: Customer Educationeducation.informationbuilders.com/...studentguide(word)wm-ilo-sec.pdf · Student Guide v7.04 DN7000508.0216 ... iSM iWay Integration Tools ... SAP®, Siebel®, PeopleSoft®,

iWay Service Manager Tooling Techniques v

Event Flows ..................................................................... 274

Event Process Flows ............................................................................ 274

Server Startup .................................................................................. 275

iWay Business Activity Monitor Database Loss of Access.................................. 275

Channel Failure ................................................................................. 276

Retry Expired ................................................................................... 276

Failed ReplyTo .................................................................................. 277

Send to Dead Letter ............................................................................ 278

Parse Failure .................................................................................... 278

Functional Language Reference ............................................. 279

IFL Commands .................................................................................. 279

Function Categories ............................................................................ 279

Transactions .................................................................... 284

What is a Transaction? ......................................................................... 284

SQL Object Library Manager ................................................. 286

Add IFL _Property commands to the OrdersCSVtoXML_PF Process Flow ............... 286

ILO

Use

ON

LY D

o N

ot D

uplic

ate

or D

istri

bute

ILO

Use

ON

LY D

o N

ot D

uplic

ate

or D

istri

bute

Page 8: Customer Educationeducation.informationbuilders.com/...studentguide(word)wm-ilo-sec.pdf · Student Guide v7.04 DN7000508.0216 ... iSM iWay Integration Tools ... SAP®, Siebel®, PeopleSoft®,

ILO

Use

ON

LY D

o N

ot D

uplic

ate

or D

istri

bute

ILO

Use

ON

LY D

o N

ot D

uplic

ate

or D

istri

bute

Page 9: Customer Educationeducation.informationbuilders.com/...studentguide(word)wm-ilo-sec.pdf · Student Guide v7.04 DN7000508.0216 ... iSM iWay Integration Tools ... SAP®, Siebel®, PeopleSoft®,

Review the iSM Self-Study Course

iWay Service Manager Tooling Techniques 1

Lesson 1

Review the iSM Self-Study Course

Objectives

• Review the iWay Architecture and Concepts • Review the Business Scenario • Review the Channel Builder • Review the iWay Integrated Application Builder • Review the Use of the Iterator Object

ILO

Use

ON

LY D

o N

ot D

uplic

ate

or D

istri

bute

ILO

Use

ON

LY D

o N

ot D

uplic

ate

or D

istri

bute

Page 10: Customer Educationeducation.informationbuilders.com/...studentguide(word)wm-ilo-sec.pdf · Student Guide v7.04 DN7000508.0216 ... iSM iWay Integration Tools ... SAP®, Siebel®, PeopleSoft®,

Review the iSM Self-Study Course

iWay Service Manager Tooling Techniques 2

Course Conventions

The following icons are used throughout the course to give extra help along the way.

Business Situation Provides a business scenario that presents a fictitious business problem, which must be solved using a specific product tool, feature, or technique.

Notes Provides additional information that is not necessarily presented in the associated discussion, including ease of use, shortcuts, or alternative methods.

Key Provides crucial information that is important for understanding concepts, such as additional syntax options or more detail.

Alert Provides cautionary advice to help the student avert situations that can result in miscalculations or procedural errors.

Best Practices Denotes recommendations for the most effective technique or method for accomplishing a task, based on experience.

Question Signifies a question being posed to the student.

Dig Deeper Provides an opportunity to dig deeper into the presented information.

Student Exercise or Activity

Denotes an exercise or activity that students will perform independently.

ILO

Use

ON

LY D

o N

ot D

uplic

ate

or D

istri

bute

ILO

Use

ON

LY D

o N

ot D

uplic

ate

or D

istri

bute

Page 11: Customer Educationeducation.informationbuilders.com/...studentguide(word)wm-ilo-sec.pdf · Student Guide v7.04 DN7000508.0216 ... iSM iWay Integration Tools ... SAP®, Siebel®, PeopleSoft®,

Review the iSM Self-Study Course

iWay Service Manager Tooling Techniques 3

ILO

Use

ON

LY D

o N

ot D

uplic

ate

or D

istri

bute

ILO

Use

ON

LY D

o N

ot D

uplic

ate

or D

istri

bute

Page 12: Customer Educationeducation.informationbuilders.com/...studentguide(word)wm-ilo-sec.pdf · Student Guide v7.04 DN7000508.0216 ... iSM iWay Integration Tools ... SAP®, Siebel®, PeopleSoft®,

Review the iSM Self-Study Course

iWay Service Manager Tooling Techniques 4

Review the iWay Architecture and Concepts

Introduction to iWay Service Manager

iWay is a suite of products designed to facilitate the transfer of information between applications and systems. With iWay tools, an application can be designed to accept information in a variety of different formats, to process and enrich the information, and to output the information in any desired format.

iWay Service Manager (iSM) serves as the host for iWay service-oriented architecture. iSM is an enterprise service bus (ESB) product that enables you to create, compose, and manage information.

iSM includes design-time graphical tools to help you create sophisticated integration services without the need for any custom programming. Functions of iSM and its associated tools include:

• Creating metadata from target applications and data sources in XML format. • Transforming messages and mapping between disparate interfaces. • Designing and managing stateless processes.

ILO

Use

ON

LY D

o N

ot D

uplic

ate

or D

istri

bute

ILO

Use

ON

LY D

o N

ot D

uplic

ate

or D

istri

bute

Page 13: Customer Educationeducation.informationbuilders.com/...studentguide(word)wm-ilo-sec.pdf · Student Guide v7.04 DN7000508.0216 ... iSM iWay Integration Tools ... SAP®, Siebel®, PeopleSoft®,

Review the iSM Self-Study Course

iWay Service Manager Tooling Techniques 5

iSM is a robust, highly scalable and customizable platform for message and transaction processing. iSM is packaged with its own high performance ESB, which enables integration across an array of systems. It also enables you to join other ESBs already in place in other enterprise deployments by providing and following standard interfaces and message processing concepts for synchronous and asynchronous communication. For a seamless deployment into existing infrastructures, iSM can also run within common web application servers.

Understanding the Architecture

The iWay Service Manager is designed to host iWay Integrated Applications (ilAs) and their constituent components. Let's take a look at the components which make up the Integrated Application.

Channels

A channel serves as a container for all necessary components to support an integration process or business need. A channel enables a message to be received from one source and sent to another source. Channels define an integration operation: receipt of inputs, service processing, and transmission of outputs using any supported protocol. Channels can access applications, apply transformations, and receive or emit documents.

Every channel consists of at least one inlet, one or more routes, and one or more outlets. The following containers must be configured and associated with a channel to complete it:

• An inlet defines the entry point to a channel, and each channel must contain one at least one inlet.

• A route defines the path a message takes through a channel, and each channel must contain a reference to one or more routes.

• An outlet defines how a message leaves a channel, and each channel must contain one or more outlets.

Inlets

Inlets define the entry point to a channel. Each channel must contain at least one inlet. In the inlet, the message may be decrypted and/or preparsed (turned into XML), and then assigned to a route for further processing.

ILO

Use

ON

LY D

o N

ot D

uplic

ate

or D

istri

bute

ILO

Use

ON

LY D

o N

ot D

uplic

ate

or D

istri

bute

Page 14: Customer Educationeducation.informationbuilders.com/...studentguide(word)wm-ilo-sec.pdf · Student Guide v7.04 DN7000508.0216 ... iSM iWay Integration Tools ... SAP®, Siebel®, PeopleSoft®,

Review the iSM Self-Study Course

iWay Service Manager Tooling Techniques 6

• A listener is a protocol handler and is responsible for obtaining incoming messages. • A decryptor is an optional exit point for custom decryption routines. For example it

can be used, to verify that the sender is authorized, to check that the message has not been changed, and to decrypt any part of the message that has been encrypted.

• A preparser is an optional exit point used to invoke customized transforms to convert non-XML messages into XML documents. For example, any of the eBusiness adapters from Information Builders come with customized preparsers. Others use XSLT or Java® to create custom preparsers.

Routes

A route is the business logic that defines how the message is processed. Each channel may reference one or more routes.

• Transformers are sequences of either services or agents that manipulate a message as it passes through the channel.

• Processes perform the actual business operations on the document. A business process is composed of one or more services, with appropriate switching, testing, iteration, and error handling. Processes can call on other processes and web services, and in turn can be packaged as web services for external consumption.

• Outlets pass the processed document to one or more designated recipients. They convert the document to transport format and then emit the message.

Outlets

An outlet determines how a message leaves a channel. Each channel contains one or more outlets. In an outlet, the message may be transformed or encrypted, and finally emitted by the system. Each outlet incorporates all of the components needed to send the message to its destination.

• Preemitters are optional exit points used to invoke customized transforms to convert XML messages into non-XML message. For example, any of the eBusiness adapters from Information Builders come with customized preemitters. Others use XSLT or Java to create custom preemitters.

• Encryptors are optional exit points for custom encryption routines.

ILO

Use

ON

LY D

o N

ot D

uplic

ate

or D

istri

bute

ILO

Use

ON

LY D

o N

ot D

uplic

ate

or D

istri

bute

Page 15: Customer Educationeducation.informationbuilders.com/...studentguide(word)wm-ilo-sec.pdf · Student Guide v7.04 DN7000508.0216 ... iSM iWay Integration Tools ... SAP®, Siebel®, PeopleSoft®,

Review the iSM Self-Study Course

iWay Service Manager Tooling Techniques 7

• Emitters use the appropriate transport protocol (JMS, HTTP, email, AS2, and so on) to send the document to its destination.

Adapters

Access to data sources and respective protocols is gained through the use of adapters.

The types of adapters are:

• Data. For a relational view of proprietary databases and file systems. • Application. Provides transaction-level access to ERP, CRM, and SCM packages, such as

SAP®, Siebel®, PeopleSoft®, and JD Edwards™. • eBusiness. For EDI, SWIFT, cXML, HIPAA, and so on. • Transaction. Provides access to TP environments, such as CICS, IMS, and Tuxedo. • Technical. For JMS, FTP, email, 3GL, 4GL, and so on. • Emulation. Delivers access to legacy green-screen applications through screen-

scraping technologies for 3270, 5250, and so on.

ILO

Use

ON

LY D

o N

ot D

uplic

ate

or D

istri

bute

ILO

Use

ON

LY D

o N

ot D

uplic

ate

or D

istri

bute

Page 16: Customer Educationeducation.informationbuilders.com/...studentguide(word)wm-ilo-sec.pdf · Student Guide v7.04 DN7000508.0216 ... iSM iWay Integration Tools ... SAP®, Siebel®, PeopleSoft®,

Review the iSM Self-Study Course

iWay Service Manager Tooling Techniques 8

iWay Integrated Applications

iWay Integrated Applications (ilAs) provide a low-touch, automated, and scriptable iWay deployment of applications. iIAs allow you to leverage Ant-based building and deployment, and provide scriptable management through the iWay Software Development Kit (SDK). The key advantage of iIAs is that no registry or configuration dependencies exist, which ensures a complete and dedicated run-time environment. iIAs consist of integration components (for example, channels, processes, registers, and so on) and a deployment template, which defines run-time characteristics specific for each run-time server.

iSM iWay Integration Tools

The iWay Service Manager provides you with a suite of tools to help in the construction and deployment of a channel. This is referred to as the iWay Integration Tools Suite (ilT). These tools are integrated into the iWay Integration Perspective, which is a plug-in for the Eclipse IDE workbench software.

The iSM Web Console

The Web Console is a browser application used to build, deploy and monitor channels. It consists of:

• Server. Provides server-level configuration of properties, settings, providers, and facilities.

• Deployments. Deploys and manages run-time instances of iWay channels or web services.

• Tools. Includes server logging, monitoring, and diagnostic tools. • Management/Applications. Managing Applications (deploy, start, and monitor an

application; define a template and download an application).

ILO

Use

ON

LY D

o N

ot D

uplic

ate

or D

istri

bute

ILO

Use

ON

LY D

o N

ot D

uplic

ate

or D

istri

bute

Page 17: Customer Educationeducation.informationbuilders.com/...studentguide(word)wm-ilo-sec.pdf · Student Guide v7.04 DN7000508.0216 ... iSM iWay Integration Tools ... SAP®, Siebel®, PeopleSoft®,

Review the iSM Self-Study Course

iWay Service Manager Tooling Techniques 9

Management of Applications

1. The iWay Service Manager server is running in the background as a Windows Service. 2. To open the console, click Programs, point to iWay 7.0 Service Manager, and then

click Console. 3. When prompted for credentials, log on using iway/iway. The Service Manager console

is shown.

ILO

Use

ON

LY D

o N

ot D

uplic

ate

or D

istri

bute

ILO

Use

ON

LY D

o N

ot D

uplic

ate

or D

istri

bute

Page 18: Customer Educationeducation.informationbuilders.com/...studentguide(word)wm-ilo-sec.pdf · Student Guide v7.04 DN7000508.0216 ... iSM iWay Integration Tools ... SAP®, Siebel®, PeopleSoft®,

Review the iSM Self-Study Course

iWay Service Manager Tooling Techniques 10

4. As we will be referring back to this console frequently during the remainder of the course, minimize the window.

The iWay Integration Tools – Designer

The Designer is an Eclipse platform design-time tool that provides a visual method for creating process flows, which control the sequence in which tasks are performed. Each process flow you create is a single unit of work made up of one of more business objects, which are graphically represented by icons and connected by lines that establish a relationship between objects.

ILO

Use

ON

LY D

o N

ot D

uplic

ate

or D

istri

bute

ILO

Use

ON

LY D

o N

ot D

uplic

ate

or D

istri

bute

Page 19: Customer Educationeducation.informationbuilders.com/...studentguide(word)wm-ilo-sec.pdf · Student Guide v7.04 DN7000508.0216 ... iSM iWay Integration Tools ... SAP®, Siebel®, PeopleSoft®,

Review the iSM Self-Study Course

iWay Service Manager Tooling Techniques 11

The iWay Integration Tools – Transformer

The Transformer converts messages from one data format or structure into another. The Transformer is used to transform XML and non-XML documents, as well as to provide enhancement capabilities. It also supports the mapping of sources to target formats.

The iWay Explorer

Using Explorer, you can browse metadata, generate XML schemas, and create web services in a uniform fashion for any iWay licensed adapter.

ILO

Use

ON

LY D

o N

ot D

uplic

ate

or D

istri

bute

ILO

Use

ON

LY D

o N

ot D

uplic

ate

or D

istri

bute

Page 20: Customer Educationeducation.informationbuilders.com/...studentguide(word)wm-ilo-sec.pdf · Student Guide v7.04 DN7000508.0216 ... iSM iWay Integration Tools ... SAP®, Siebel®, PeopleSoft®,

Review the iSM Self-Study Course

iWay Service Manager Tooling Techniques 12

The iWay Library

The iWay Library is a facility used to store iSM bit components into specific categories. Bit components are individual objects used in iWay transforms (group nodes, elements, and attributes) and process (join, junction, and services) flows. The primary purpose is reusability. For example, a common service object, used in an error routine, can be used in many process flows, and that object can be stored in the appropriate process flow category.

iWay Channel Builder

The iWay Channel Builder is a wizard to assist in building channel components. The Channel Builder is part of the iWay Integrated Tools running under Eclipse. It builds the infrastructure of a channel with the inlet, route, and outlet components.

ILO

Use

ON

LY D

o N

ot D

uplic

ate

or D

istri

bute

ILO

Use

ON

LY D

o N

ot D

uplic

ate

or D

istri

bute

Page 21: Customer Educationeducation.informationbuilders.com/...studentguide(word)wm-ilo-sec.pdf · Student Guide v7.04 DN7000508.0216 ... iSM iWay Integration Tools ... SAP®, Siebel®, PeopleSoft®,

Review the iSM Self-Study Course

iWay Service Manager Tooling Techniques 13

iWay Integrated Application Wizard

The iWay Integrated Application Wizard provides a means to encapsulate all of an iSM Project's artifacts into an Integrated Application, which can be ported to several iWay Server instances.

ILO

Use

ON

LY D

o N

ot D

uplic

ate

or D

istri

bute

ILO

Use

ON

LY D

o N

ot D

uplic

ate

or D

istri

bute

Page 22: Customer Educationeducation.informationbuilders.com/...studentguide(word)wm-ilo-sec.pdf · Student Guide v7.04 DN7000508.0216 ... iSM iWay Integration Tools ... SAP®, Siebel®, PeopleSoft®,

Review the iSM Self-Study Course

iWay Service Manager Tooling Techniques 14

Review the Business Scenario

Several of our business partners send orders in a comma-delimited format. Our goal is to build an automated integration process that will receive order data from these partners, and enrich the order information to create our standard Purchase Order document for processing into our order-entry system.

First we need to identify our input and output.

• Input. Comma Separated Value (CSV) files • Output. An XML file that conforms to the required structure based on all of our

requirements.

The next step is to determine the business logic needed for generating our output.

1. Receive a CSV file as input. 2. Enrich the data by adding a timestamp field value to satisfy our internal auditor's

requirement. 3. Calculate the total item price, which is required for accounting and billing operations,

to minimize code in our back-end application. 4. Check the quantity in stock, and verify that the order can be satisfied before adding it

to the order-entry system. 5. If there is stock, write the output to a folder named ValidOrders, and update the units

in stock by subtracting the quantity ordered. 6. If there is no stock, write the output into a folder named BackOrders. 7. Create an XML file as final output.

Using this workflow, we can now go ahead and start our first iWay integration project.

iWay Integration Tools give the user the ability to graphically visualize a process flow in order to accomplish a business process.

To design our process flow, we need to start iIT in Eclipse.

1. On the desktop, click the iIT icon. The Workspace Launcher dialog box opens. 2. From the Workspace drop-down list, select the default workspace, and click OK. The

ilT workspace opens.

ILO

Use

ON

LY D

o N

ot D

uplic

ate

or D

istri

bute

ILO

Use

ON

LY D

o N

ot D

uplic

ate

or D

istri

bute

Page 23: Customer Educationeducation.informationbuilders.com/...studentguide(word)wm-ilo-sec.pdf · Student Guide v7.04 DN7000508.0216 ... iSM iWay Integration Tools ... SAP®, Siebel®, PeopleSoft®,

Review the iSM Self-Study Course

iWay Service Manager Tooling Techniques 15

The workspace is applicable to Eclipse, and it is where all resources needed for an Eclipse project are stored on a local computer.

Several views make up the iIT workspace:

• Integration Explorer. Shows the various projects and related process flows for a particular Eclipse workspace. By default, the workspace is your computer's file system, and each project is established as a folder under the workspace folder. Each project consists of the following folders: adapters, applications, channels, flows, registers, schemas, transforms, and XML.

• iWay Explorer. Provides access to the iWay run-time instance so that database adapters can be configured, iWay Business Services or Web Services can be configured

ILO

Use

ON

LY D

o N

ot D

uplic

ate

or D

istri

bute

ILO

Use

ON

LY D

o N

ot D

uplic

ate

or D

istri

bute

Page 24: Customer Educationeducation.informationbuilders.com/...studentguide(word)wm-ilo-sec.pdf · Student Guide v7.04 DN7000508.0216 ... iSM iWay Integration Tools ... SAP®, Siebel®, PeopleSoft®,

Review the iSM Self-Study Course

iWay Service Manager Tooling Techniques 16

or edited, events can be viewed (SAP IDOCS), and the iWay run-time registry can be viewed.

• Library Manager. Allows you to import and export saved objects for reusability. For example, an entire process flow, or parts of the flow, can be saved and used in other processes.

• Process Flow Editor. Is the canvas area where you drag objects to graphically build your flow and relationships.

• Console. Displays successful and unsuccessful status messages when you validate, compile, and publish a process flow to the iWay Registry.

• Outline. Shows you an outline of what you are building in the Edit view. This view can be minimized or closed.

See the appendix entitled iIT Menu Options and Toolbar Icons for more information.

In the next lesson, we will begin modifying the process flow.

Here is a review of the Purchase Order Integration process you developed in the self-study course.

As we look at our completed design, we can see that there are three distinct parts.

1 The first process flow takes in a CSV file abstract containing a single or multi-record input and converts the CSV file format into an XML document, which is then passed onto the OrdersCSVtoXML_PF process flow for business logic processing.

2 The second part, OrdersCSVtoXML_PF, will take the input XML document and query an SQL table to get the number of UnitsInStock for the ProductID passed from the CSV file. The results of the SQL Query are passed onto the CheckOrders process flow for final processing.

ILO

Use

ON

LY D

o N

ot D

uplic

ate

or D

istri

bute

ILO

Use

ON

LY D

o N

ot D

uplic

ate

or D

istri

bute

Page 25: Customer Educationeducation.informationbuilders.com/...studentguide(word)wm-ilo-sec.pdf · Student Guide v7.04 DN7000508.0216 ... iSM iWay Integration Tools ... SAP®, Siebel®, PeopleSoft®,

Review the iSM Self-Study Course

iWay Service Manager Tooling Techniques 17

3 The third process flow determines whether the quantity ordered for the ProductID is less than the UnitsInStock and then validates the order. If the UnitsInstock is less than the quantity ordered, then a BackOrder query is executed to update UnitsOnOrder.

ILO

Use

ON

LY D

o N

ot D

uplic

ate

or D

istri

bute

ILO

Use

ON

LY D

o N

ot D

uplic

ate

or D

istri

bute

Page 26: Customer Educationeducation.informationbuilders.com/...studentguide(word)wm-ilo-sec.pdf · Student Guide v7.04 DN7000508.0216 ... iSM iWay Integration Tools ... SAP®, Siebel®, PeopleSoft®,

Review the iSM Self-Study Course

iWay Service Manager Tooling Techniques 18

Review the Channel Builder

The Channel Builder within the iIT Workbench is used to design/build the channel(s) to execute your process flows and other components for the project.

Creating a channel involves the following steps from the iIT Workbench:

• Identify and build variables (register sets). • Configure a channel. • Define an inlet.

• Add a component (listener, preparser, or decryptor).

• Define the routes.

• Add a component (process flow).

• Define the outlets.

• Add a component (emitters, preemitters, or encryptors).

• Associate register sets to the channel. • Build an Integrated Application.

Introduction to Channel Builder

iWay Integration Tools (iIT) is designed specifically to integrate disparate systems. iIT is a toolkit that integrates different iWay components for building and testing business applications. iWay Service Manager (iSM) defines a channel as a container of components through which messages flow. The Channel Builder in iIT is a tool used to build channels using iWay components. Note: Alternatively, the channel can be built using the iWay Web Console. If the channel is built using the iWay Web Console, then it should be maintained through the console. If the channel is built through the iIT Workbench, then it should be maintained through the Workbench for consistency. It is a best practice to build the channel and components through iIT, maintain the channel through iIT, and embed the channel in an Integrated Application. Channels contain references to one or more inlets with multiple components (such as listeners, decrypters, or preparsers), multiple routes, and multiple outlets containing multiple components (such as preemitters, emitters, or encrypters).

ILO

Use

ON

LY D

o N

ot D

uplic

ate

or D

istri

bute

ILO

Use

ON

LY D

o N

ot D

uplic

ate

or D

istri

bute

Page 27: Customer Educationeducation.informationbuilders.com/...studentguide(word)wm-ilo-sec.pdf · Student Guide v7.04 DN7000508.0216 ... iSM iWay Integration Tools ... SAP®, Siebel®, PeopleSoft®,

Review the iSM Self-Study Course

iWay Service Manager Tooling Techniques 19

The Channel Builder allows you to:

• Create new channels. • Edit channels imported from the Library. • Expose channel information graphically.

Channel Builder and Component Editors

ILO

Use

ON

LY D

o N

ot D

uplic

ate

or D

istri

bute

ILO

Use

ON

LY D

o N

ot D

uplic

ate

or D

istri

bute

Page 28: Customer Educationeducation.informationbuilders.com/...studentguide(word)wm-ilo-sec.pdf · Student Guide v7.04 DN7000508.0216 ... iSM iWay Integration Tools ... SAP®, Siebel®, PeopleSoft®,

Review the iSM Self-Study Course

iWay Service Manager Tooling Techniques 20

The following image shows the OrdersCSVtoXML_C channel built in the Channel Editor with a corresponding inlet, route, and outlet.

ILO

Use

ON

LY D

o N

ot D

uplic

ate

or D

istri

bute

ILO

Use

ON

LY D

o N

ot D

uplic

ate

or D

istri

bute

Page 29: Customer Educationeducation.informationbuilders.com/...studentguide(word)wm-ilo-sec.pdf · Student Guide v7.04 DN7000508.0216 ... iSM iWay Integration Tools ... SAP®, Siebel®, PeopleSoft®,

Review the iSM Self-Study Course

iWay Service Manager Tooling Techniques 21

As a best practice, if a channel component, property, or attribute needs to be changed, change it at the design-time level. Also, to avoid using the registry all together, the iWay product group advises encapsulating the built channel with its components into an Integrated Application. You will see how to modify a channel to get it ready for production in an application in the next lesson. You will learn how to use the iWay Function Language (iFL) command _property to prepare a channel and its properties for production. iWay functions enable you to examine the context in which a message is processed and the attributes of that message. You can use the result to determine the subsequent processing steps for the message. You can select, bypass, or modify the steps in the defined process.

ILO

Use

ON

LY D

o N

ot D

uplic

ate

or D

istri

bute

ILO

Use

ON

LY D

o N

ot D

uplic

ate

or D

istri

bute

Page 30: Customer Educationeducation.informationbuilders.com/...studentguide(word)wm-ilo-sec.pdf · Student Guide v7.04 DN7000508.0216 ... iSM iWay Integration Tools ... SAP®, Siebel®, PeopleSoft®,

Review the iSM Self-Study Course

iWay Service Manager Tooling Techniques 22

Review the iWay Integrated Application

Managed Configurations Prior to the introduction of iWay Integration Applications (iIAs), the distributed deployment of application channels was supported by hosting the application logic (composed of channels, process flows, and so on) within a managed configuration for its runtime. You were able to create multiple managed

configurations, which were used to group and separate your applications into different runtime environments for management, monitoring, and maintenance. In this case, note that even though the runtime was separated across multiple configurations, all of the managed configurations shared the same iSM Registry. As a result, it is possible that starting from testing until production, artifacts collided and introduced inconsistencies. There is a base configuration that is also known as the master configuration, which is included with each iSM installation. The base configuration is designed only for the sole purpose of managing and monitoring other managed configurations. The base configuration is not intended to host the actual application logic in a production environment. However, even though this is possible, it is not in line with iWay best practices and is not suitable for enterprise-level deployments. iWay Integration Applications (iIAs) An iWay Integration Application (iIA) provides an automated, scriptable, deployment toolset that enables you to build and deploy integration solutions to development, test, and production environments. iIA is an application format that can contain multiple channels and services as well as custom iWay Functional Language (iFL) functions, agents, and other dependencies. iWay Integration Tools (iIT), iSM Administration Console, and deployment scripts will use Applications as containers for pre-built channels and services. Applications can be source managed and shared among different operational environments. Various operational environments (such as development, test, or production) are represented by specific server Templates. Templates contain specific environment settings (for example, email addresses, database connection parameters, and so on) in Special Registers (SREGs) or Providers. Once on an iWay server, an Application can be deployed by using a Template. iWay Integration Application (iIA) is an integration solution with a dedicated runtime environment. It can be deployed, started, stopped, and deleted without affecting other iIAs. iIA allow you to: Build application archives in a development environment and deploy them to test and

ILO

Use

ON

LY D

o N

ot D

uplic

ate

or D

istri

bute

ILO

Use

ON

LY D

o N

ot D

uplic

ate

or D

istri

bute

Page 31: Customer Educationeducation.informationbuilders.com/...studentguide(word)wm-ilo-sec.pdf · Student Guide v7.04 DN7000508.0216 ... iSM iWay Integration Tools ... SAP®, Siebel®, PeopleSoft®,

Review the iSM Self-Study Course

iWay Service Manager Tooling Techniques 23

production environments. Build application archives from the iWay Registry or an iIT project. Manage application deployment from iIT, iSM Administration Console, and deployment scripts. iIAs consist of Integration components (for example, channels, processes, registers, and so on) and a deployment template, which defines runtime characteristics specific for each runtime server. iIAs enable a flexible and agile architecture, where the same application logic can be deployed to multiple environments and a unique deployment template for each environment can be applied. The iIA can be managed, monitored, and updated remotely using the iSM Administration Console that is available on the master configuration (base) or using ANT-based scripts, which can be facilitated by the iWay SDK. Note that even though the master configuration (base) is not required for an iIA to run and process messages (since iIAs are independent), it is required to manage and monitor iIAs. This provides an access point to the iIA from external applications, since iIAs are considered a black box (similar to the managed configuration).

Some Application Use Cases:

• Transferring an iWay Application from a development server to a production server. • Building iWay Integration Applications in iWay Integration Tools. • Building and deploying iWay Integration Applications from the iWay Registry ssing the

iSM Administration Console • Configuring automatic deployments on multiple remote servers

1. In the Integration Explorer tab, expand the Applications and OrdersCSVtoXML_iia folders. Then expand all of the components below the application.

ILO

Use

ON

LY D

o N

ot D

uplic

ate

or D

istri

bute

ILO

Use

ON

LY D

o N

ot D

uplic

ate

or D

istri

bute

Page 32: Customer Educationeducation.informationbuilders.com/...studentguide(word)wm-ilo-sec.pdf · Student Guide v7.04 DN7000508.0216 ... iSM iWay Integration Tools ... SAP®, Siebel®, PeopleSoft®,

Review the iSM Self-Study Course

iWay Service Manager Tooling Techniques 24

The application structure contains the following:

• Components. Artifacts such as channels, process flows, and others that have been selected (or added as references) during the application creation and which contain the actual application processing logic.

• Libraries. Any external libraries that have been selected for inclusion, such as SQL-Server jar files. The jar files may not exist on the platform where the application resides, but they can be part of the application.

• Resources. Any external resources that have been included and are needed by an application. For example Property files can be included that are used to pass variables externally.

• Build.xml. An Ant-based build file that defines all available options for application management and deployment. This file can be updated with required information, and tasks can be executed as part of standard build process.

Build and Deploy an iIA Application There are multiple ways to build and deploy an iIA. These includes performing all building and deployment tasks from an iIT via the build.xml file, building an iIA from iIT but performing its management and deployment from the iSM console,or even doing everything on a separate system via iWay SDK.

1. In the Integration Explorer tab, under the OrdersCSVtoXML_iia application, right-click build.xml. Point to Run As and select 2 Ant Build.

ILO

Use

ON

LY D

o N

ot D

uplic

ate

or D

istri

bute

ILO

Use

ON

LY D

o N

ot D

uplic

ate

or D

istri

bute

Page 33: Customer Educationeducation.informationbuilders.com/...studentguide(word)wm-ilo-sec.pdf · Student Guide v7.04 DN7000508.0216 ... iSM iWay Integration Tools ... SAP®, Siebel®, PeopleSoft®,

Review the iSM Self-Study Course

iWay Service Manager Tooling Techniques 25

Note: There are two options to run the Ant Build. The first option, 1 Ant_Build has a shortcut (Alt+Shift+X,Q) that runs the default selection which is just iLA Build. The second option, 2 Ant Build presents you with a selection of all available functions for the iIA.

2. The Edit configuration and launch pane opens. It displays all available functions that are defined in the build.xml file. The user can select multiple options to be performed in a given order, and they can be reordered by clicking the Order button.

ILO

Use

ON

LY D

o N

ot D

uplic

ate

or D

istri

bute

ILO

Use

ON

LY D

o N

ot D

uplic

ate

or D

istri

bute

Page 34: Customer Educationeducation.informationbuilders.com/...studentguide(word)wm-ilo-sec.pdf · Student Guide v7.04 DN7000508.0216 ... iSM iWay Integration Tools ... SAP®, Siebel®, PeopleSoft®,

Review the iSM Self-Study Course

iWay Service Manager Tooling Techniques 26

The build[default] option is preselected automatically as it's required to build the iIA. This means that the application will be built and then uploaded to a configured iSM instance for further management. All of the other options listed can be completed using the iWay Web Console.

Start an Application The application you build can be started:.

• iWay Monitor. The iWay Monitor is on the Windows based systems toolbar which displays all of the deployed applications for an iWay server.

• iWay Service Manager Console. Through the Management link applications which are deployed can be started and stopped.

• Ant Scheduled Script. An Ant script can be created to build, deploy, and start an application on a schedule.

• iWay Sentinel. An iWay add-on that uses communication between Envoy and iSM to manage and monitor iWay Applications from a browser.

ILO

Use

ON

LY D

o N

ot D

uplic

ate

or D

istri

bute

ILO

Use

ON

LY D

o N

ot D

uplic

ate

or D

istri

bute

Page 35: Customer Educationeducation.informationbuilders.com/...studentguide(word)wm-ilo-sec.pdf · Student Guide v7.04 DN7000508.0216 ... iSM iWay Integration Tools ... SAP®, Siebel®, PeopleSoft®,

Review the iSM Self-Study Course

iWay Service Manager Tooling Techniques 27

Review the Use of the Iterator Object

The Iterator object allows other objects and the document that travels through those objects to be iterated (looped through) until the contents of the document are exhausted.

Introduction to the Iterator Object

Usually, the document is in XML format, but some of the Iterator types accept delimited value documents. Let's review these types in the following table:

Iterator Type Description Attachment Iterator {com.ibi.agents.XDIterAttachments}

Allows the Iterator object to navigate through document attachments.

Chunk Iterator {com.ibi.agents.XDIterChunk}

Reads the input stream in the input document and breaks it into chunks of a specified size.

Condition Iterator {com.ibi.agents.XDIterCond}

Counter Iterator {com.ibi.agents.XDIterCount}

Repeats the body of the loop a specified number of times.

FTP Iterator {com.ibi.agents.XDIterFTPEmitStdAgent}

Island Iterator {com.ibi.agents.XDIterIsland}

Performs document enhancement, that is, to replace parts of the input XML document with the results of a call to an agent or adapter.

Iter RVI Iterator {com.ibi.agents.XDIterRVIRelay}

Line Iterator {com.ibi.agents.XDIterLine}

Repeats the body of the loop once for each line in the document, as defined by standard end-of-line delimiters.

ILO

Use

ON

LY D

o N

ot D

uplic

ate

or D

istri

bute

ILO

Use

ON

LY D

o N

ot D

uplic

ate

or D

istri

bute

Page 36: Customer Educationeducation.informationbuilders.com/...studentguide(word)wm-ilo-sec.pdf · Student Guide v7.04 DN7000508.0216 ... iSM iWay Integration Tools ... SAP®, Siebel®, PeopleSoft®,

Review the iSM Self-Study Course

iWay Service Manager Tooling Techniques 28

Iterator Type Description SQL Batch Iterator {com.ibi.agents.XDIterSQLBatchAdd}

SQL Select Iterator {com.ibi.agents.XDItSQLSelect}

Sibling Iterator {com.ibi.agents.XDIterSibSplit}

Contains the output of multi-row SQL queries.

Test Iterator {com.ibi.agents.XDIterTest}

Repeats the body of the loop while a specified logical comparison evaluates to True.

XML SPLIT Iterator {com.ibi.agents.XDIterXMLSplit}

Extracts the repeating group specified by the XPath expression. Often, a single transaction document contains repeating groups of data, in this example, a simplified invoice with multiple line items.

Scenario

You processed a single transaction from a purchase order through a main process flow and a sub-process flow. In reality, your requirements must provide for a single purchase order with many products being ordered. How will you manage several transactions coming through a single purchase order? Let's review how you incorporated the Iterator object to read an XML document that has similarly

formatted records. You used the XML SPLIT Iterator to split out each similar XML chunk into separate transactions, which is passed to the OrdersCSVtoXML_PF process flow.

Task Plan

It is important to place the Iterator object for ease of use and efficient processing. In your case, because you need to call the SQL query for each product coming through the comma delimited file, creating a calling process flow to iterate over the OrdersCSVtoXML_PF process flow where the SQL object is contained is easier for development, debugging, and making the actual calls to the SQL Server. The main process flow will look like the following:

ILO

Use

ON

LY D

o N

ot D

uplic

ate

or D

istri

bute

ILO

Use

ON

LY D

o N

ot D

uplic

ate

or D

istri

bute

Page 37: Customer Educationeducation.informationbuilders.com/...studentguide(word)wm-ilo-sec.pdf · Student Guide v7.04 DN7000508.0216 ... iSM iWay Integration Tools ... SAP®, Siebel®, PeopleSoft®,

Review the iSM Self-Study Course

iWay Service Manager Tooling Techniques 29

• Build a New Main process flow to incorporate the Iterator object • Update the iWay Integrated Application to execute the new process flow • Deploy and test the iWay Integrated Application

Next, you add various error handling routines to account for issues which may occur with either incorrect data from the CSV file being presented to the flow or the SQL Server database system being unavailable.

ILO

Use

ON

LY D

o N

ot D

uplic

ate

or D

istri

bute

ILO

Use

ON

LY D

o N

ot D

uplic

ate

or D

istri

bute

Page 38: Customer Educationeducation.informationbuilders.com/...studentguide(word)wm-ilo-sec.pdf · Student Guide v7.04 DN7000508.0216 ... iSM iWay Integration Tools ... SAP®, Siebel®, PeopleSoft®,

Review the iSM Self-Study Course

iWay Service Manager Tooling Techniques 30

Lesson Review

Review the iWay Architecture and Concepts Review the Business Scenario Review the Channel Builder Review the iWay Integrated Application Builder Review the Use of the Iterator Object

ILO

Use

ON

LY D

o N

ot D

uplic

ate

or D

istri

bute

ILO

Use

ON

LY D

o N

ot D

uplic

ate

or D

istri

bute

Page 39: Customer Educationeducation.informationbuilders.com/...studentguide(word)wm-ilo-sec.pdf · Student Guide v7.04 DN7000508.0216 ... iSM iWay Integration Tools ... SAP®, Siebel®, PeopleSoft®,

Completing Your Application

iWay Service Manager Tooling Techniques 31

Lesson 2

Completing Your Application

Objectives

• Placing Variables in an External File • Introduction to iSM Process Flow Debugging • Add Process Flow Debugging to the OrdersCSVtoXML_PF Process Flow • Add Process Flow Debugging to the CheckOrders_PF Process Flow • Rebuild and Execute the OrdersCSVtoXML_iia Application with Debug

ILO

Use

ON

LY D

o N

ot D

uplic

ate

or D

istri

bute

ILO

Use

ON

LY D

o N

ot D

uplic

ate

or D

istri

bute

Page 40: Customer Educationeducation.informationbuilders.com/...studentguide(word)wm-ilo-sec.pdf · Student Guide v7.04 DN7000508.0216 ... iSM iWay Integration Tools ... SAP®, Siebel®, PeopleSoft®,

Completing Your Application

iWay Service Manager Tooling Techniques 32

Debugging Scenario

As you develop your application you may want to debug the project and review all of the variables which are set by each object in a process flow. You can place all of your properties from various components in your application to an external file. The external file can be accessed by the application by issuing an iWay Function Language (iFL) command _property() from each of the application

components. Currently, all of the properties contained in the application are hard coded or use a Register Set with local variables. By placing these properties in an easily maintained external file, an application can be readily migrated to other platforms with very little maintenance.

Task Plan

• Placing variables in an external file • Add Process Flow Debugging to the OrdersCSVtoXML_PF Process Flow • Add Process Flow Debugging to the CheckOrder_PF Process Flow

Place Variables in an External File

Before error handling techniques can be added to the Orders project, you will want to prepare the application for future migration from a development environment to a production system. In the Orders application several object properties are hard coded. Hard coding these attributes was convenient while developing the application, but when you are required to migrate the application

to another instance of the iWay software or to new hardware; maintaining those attributes becomes cumbersome and increase maintenance of the application (changes to process flows, updates to the channels, and required rebuilding of the application). The PROPERTIES file allows you to centralize the values for each objects properties, parameters or attributes. You change the values in the PROPERTIES files without changing the application. You will use the _property iFL command for each objects property to refer to the attribute pairs in the PROPERTIES file. A best practice is to create the PROPERTIES file to be part of the development project. You will create a new folder called Artifacts to contain all miscellaneous components used in the application. The PROPERTIES file is a text file containing pairs of attributes. The filename has the form of name.properties for instance, orders.properties. The attribute pairs take the form of: properties name=properties value

ILO

Use

ON

LY D

o N

ot D

uplic

ate

or D

istri

bute

ILO

Use

ON

LY D

o N

ot D

uplic

ate

or D

istri

bute

Page 41: Customer Educationeducation.informationbuilders.com/...studentguide(word)wm-ilo-sec.pdf · Student Guide v7.04 DN7000508.0216 ... iSM iWay Integration Tools ... SAP®, Siebel®, PeopleSoft®,

Completing Your Application

iWay Service Manager Tooling Techniques 33

Example: file.input=D:\Course9xx\Orders\in Note: The properties name = properties value combination is a standard tooling technique in the industry. The property pair can be encrypted in the property file. The file part of the equation is arbitrary, representing a category. The input of the equation part represents the actual name of the property. The value passed to the application is represented with the text after the assignment symbol. The properties name can be referenced in channels, process flow objects, and applications. The properties name is reference using the iFL command _property(). Review the example below: Input Path: _property(_sreg(iway.workdir)/resource/Orders.properties,'file.input','notfound','check') The Input Path is a property of a File Listener from a Channel's Inlet. The iFL command _property has three attributes, the location of the property file, the properties pair name, and an ELSE condition. In the above example, the _property command executes an iFL _sreg command which looks up the system register value for iway.workdir and appends /resource/Orders.properties for the fully qualified location of the properties file. The file.input is the properties name pair and the else condition is a text value notfound. The notfound text value is only executed when the properties name pair file.input is not found. The check option reloads the contents of the property file and property name pair in case a property has changed. The check option looks at the modification date before reloading the property value pair. Since the check option can increase overhead, use it with caution.

What you will do:

• Create an artifacts folder. • Create an Orders.properties file and add property.name pairs. • Change certain properties in the process flow objects and channel components. • Save, rebuild, redeploy and test the application.

Create an Artifacts Folder

Before you begin modifying the project from the self-study course, you will make a Duplicate copy of the project. The iIT workbench allows you to make a copy of a project using the Copy and Paste options. There is a Duplicate option which performs the same task. A project's components use references to various artifacts. If you used the copy and paste method of creating a new project, the

artifacts like process flows and transforms, will refer to those artifacts in the original version of the project. If you use the Duplicate option, the references are corrected, and the copied

ILO

Use

ON

LY D

o N

ot D

uplic

ate

or D

istri

bute

ILO

Use

ON

LY D

o N

ot D

uplic

ate

or D

istri

bute

Page 42: Customer Educationeducation.informationbuilders.com/...studentguide(word)wm-ilo-sec.pdf · Student Guide v7.04 DN7000508.0216 ... iSM iWay Integration Tools ... SAP®, Siebel®, PeopleSoft®,

Completing Your Application

iWay Service Manager Tooling Techniques 34

project path references for the workspace are corrected.

Duplicate the Orders Self-Study Project

1. In the Integration Explorer, right-click the Orders_Self_Study project and click Duplicate.

2. For the Project Name type Orders and click OK.

Note you may need to go to the disk and delete the Orders folder under the workspace.

3. Click on the Orders/Flows/Checkorders_PF process flow.

ILO

Use

ON

LY D

o N

ot D

uplic

ate

or D

istri

bute

ILO

Use

ON

LY D

o N

ot D

uplic

ate

or D

istri

bute

Page 43: Customer Educationeducation.informationbuilders.com/...studentguide(word)wm-ilo-sec.pdf · Student Guide v7.04 DN7000508.0216 ... iSM iWay Integration Tools ... SAP®, Siebel®, PeopleSoft®,

Completing Your Application

iWay Service Manager Tooling Techniques 35

Notice for the Orders project and Flows CheckOrders_PF process flow and the reference information for the flow. Next you will create an Artifacts folder to hold the Orders and Errors properties

ILO

Use

ON

LY D

o N

ot D

uplic

ate

or D

istri

bute

ILO

Use

ON

LY D

o N

ot D

uplic

ate

or D

istri

bute

Page 44: Customer Educationeducation.informationbuilders.com/...studentguide(word)wm-ilo-sec.pdf · Student Guide v7.04 DN7000508.0216 ... iSM iWay Integration Tools ... SAP®, Siebel®, PeopleSoft®,

Completing Your Application

iWay Service Manager Tooling Techniques 36

files for the Orders project.

The Artifacts folder is an arbitrary folder to hold miscellaneous files used by the various process flow objects. In this case you will be creating this folder to hold the Orders.properties file.

1. If you have not already logged into iIT, from the Desktop, double-click the iIT icon to open the iWay integrated development tool.

2. In the Integration Explorer, expand the Orders project. 3. Right-click Orders and click New — Other.

4. Scroll-down and expand the General category. 5. Click Folder and click Next.

ILO

Use

ON

LY D

o N

ot D

uplic

ate

or D

istri

bute

ILO

Use

ON

LY D

o N

ot D

uplic

ate

or D

istri

bute

Page 45: Customer Educationeducation.informationbuilders.com/...studentguide(word)wm-ilo-sec.pdf · Student Guide v7.04 DN7000508.0216 ... iSM iWay Integration Tools ... SAP®, Siebel®, PeopleSoft®,

Completing Your Application

iWay Service Manager Tooling Techniques 37

6. Click Orders as your parent folder. 7. Type Artifacts for the Folder name and click Finish.

ILO

Use

ON

LY D

o N

ot D

uplic

ate

or D

istri

bute

ILO

Use

ON

LY D

o N

ot D

uplic

ate

or D

istri

bute

Page 46: Customer Educationeducation.informationbuilders.com/...studentguide(word)wm-ilo-sec.pdf · Student Guide v7.04 DN7000508.0216 ... iSM iWay Integration Tools ... SAP®, Siebel®, PeopleSoft®,

Completing Your Application

iWay Service Manager Tooling Techniques 38

The Orders project folder structure with the Artifacts folder is shown in the following image.

Add the Orders Property File to the Project

In this task you will add a properties file in the Artifacts folder and review the property name pairs you will use within the channel components and process flow objects property attributes.

Import the Properties file

1. Right-click the Artifacts folder and click Import.

ILO

Use

ON

LY D

o N

ot D

uplic

ate

or D

istri

bute

ILO

Use

ON

LY D

o N

ot D

uplic

ate

or D

istri

bute

Page 47: Customer Educationeducation.informationbuilders.com/...studentguide(word)wm-ilo-sec.pdf · Student Guide v7.04 DN7000508.0216 ... iSM iWay Integration Tools ... SAP®, Siebel®, PeopleSoft®,

Completing Your Application

iWay Service Manager Tooling Techniques 39

2. Expand General and click File System. Click Next.

3. For the From Directory, click Browse. 4. Expand Computer, D: drive and Course9xx, then click OK.

ILO

Use

ON

LY D

o N

ot D

uplic

ate

or D

istri

bute

ILO

Use

ON

LY D

o N

ot D

uplic

ate

or D

istri

bute

Page 48: Customer Educationeducation.informationbuilders.com/...studentguide(word)wm-ilo-sec.pdf · Student Guide v7.04 DN7000508.0216 ... iSM iWay Integration Tools ... SAP®, Siebel®, PeopleSoft®,

Completing Your Application

iWay Service Manager Tooling Techniques 40

5. On the left pane scroll-down and click the Orders.properties check box. Click Finish.

ILO

Use

ON

LY D

o N

ot D

uplic

ate

or D

istri

bute

ILO

Use

ON

LY D

o N

ot D

uplic

ate

or D

istri

bute

Page 49: Customer Educationeducation.informationbuilders.com/...studentguide(word)wm-ilo-sec.pdf · Student Guide v7.04 DN7000508.0216 ... iSM iWay Integration Tools ... SAP®, Siebel®, PeopleSoft®,

Completing Your Application

iWay Service Manager Tooling Techniques 41

6. In the Integration Explorer under the Orders project, expand Artifacts.

Notice the Orders.properties file now resides in the Artifact folder.

You need to add the iFL _property command to various components in your project. You will add the _property command to the OrdersCSVtoXML_FL file listener and to the OrdersCSVtoXML_PF and CheckOrders_PF process flows.

Add Property Name Pairs

The property pairs have been created for you so you will copy them into the project.

1. Review the following table property name value pair set for the Orders.properties file:

ILO

Use

ON

LY D

o N

ot D

uplic

ate

or D

istri

bute

ILO

Use

ON

LY D

o N

ot D

uplic

ate

or D

istri

bute

Page 50: Customer Educationeducation.informationbuilders.com/...studentguide(word)wm-ilo-sec.pdf · Student Guide v7.04 DN7000508.0216 ... iSM iWay Integration Tools ... SAP®, Siebel®, PeopleSoft®,

Completing Your Application

iWay Service Manager Tooling Techniques 42

Property Pair Name

Assignment

Statement Value

file.in = D:/Course9xx/Orders/input

file.out = D:/Course9xx/Orders/output/ResultStatus_*.xml

file.removed = D:/Course9xx/Orders/removed/OriginalOrder_*.csv

file.error = D:/Course9xx/Orders/error/failed_*.xml

file.suffix.in = *

file.validorders

= D:/Course9xx/Orders/ValidOrders

file.backorders

= D:/Course9xx/Orders/BackOrders

SQL.query1 = Select ProductName, ProductID, UnitsInStock From Products Where ProductID=?ProductID

SQL.driver = com.microsoft.sqlserver.jdbc.SQLServerDriver

SQL.url = jdbc:sqlserver://localhost:1433;databaseName=northwind

SQL.query2 = UPDATE Products SET UnitsOnOrder=UnitsOnOrder + ?Quantity WHERE ProductID=?ProductID

ILO

Use

ON

LY D

o N

ot D

uplic

ate

or D

istri

bute

ILO

Use

ON

LY D

o N

ot D

uplic

ate

or D

istri

bute

Page 51: Customer Educationeducation.informationbuilders.com/...studentguide(word)wm-ilo-sec.pdf · Student Guide v7.04 DN7000508.0216 ... iSM iWay Integration Tools ... SAP®, Siebel®, PeopleSoft®,

Completing Your Application

iWay Service Manager Tooling Techniques 43

Add iFL _properties Command to Channel Components

You need to add the iFL _property command to various components in your project. You will add the _property command to the OrdersCSVtoXML_FL file listener and to the OrdersCSVtoXML_PF and CheckOrders_PF process flows.

1. Expand the Channels folder. 2. Double-click OrdersCSVtoXML_C Channel to open the Channel Builder.

3. Click the OrdersCSVtoXML_FL Listener.

Attributes of the listener can be changed on the right pane.

4. On the right pane, expand the Main category

ILO

Use

ON

LY D

o N

ot D

uplic

ate

or D

istri

bute

ILO

Use

ON

LY D

o N

ot D

uplic

ate

or D

istri

bute

Page 52: Customer Educationeducation.informationbuilders.com/...studentguide(word)wm-ilo-sec.pdf · Student Guide v7.04 DN7000508.0216 ... iSM iWay Integration Tools ... SAP®, Siebel®, PeopleSoft®,

Completing Your Application

iWay Service Manager Tooling Techniques 44

You will be changing the Input Path, Destination, and Removal Destination property values. For the iFL _property commands, a cheat sheet has been created for you to lessen the typing and mistakes in this lesson.

5. In the Integration Explorer, expand the XML folder. 6. Right-click Input_Parms_Cheat.txt and select Open With — System Editor.

ILO

Use

ON

LY D

o N

ot D

uplic

ate

or D

istri

bute

ILO

Use

ON

LY D

o N

ot D

uplic

ate

or D

istri

bute

Page 53: Customer Educationeducation.informationbuilders.com/...studentguide(word)wm-ilo-sec.pdf · Student Guide v7.04 DN7000508.0216 ... iSM iWay Integration Tools ... SAP®, Siebel®, PeopleSoft®,

Completing Your Application

iWay Service Manager Tooling Techniques 45

7. Maximize the Input_Parms_Cheat.txt file.8. Highlight and right-click the Input Path _property iFL command and click Copy.

9. Click the OrdersCSVtoXML_C tab.10. Highlight and right-click the Input Path property value and click Paste.

ILO

Use

ON

LY D

o N

ot D

uplic

ate

or D

istri

bute

ILO

Use

ON

LY D

o N

ot D

uplic

ate

or D

istri

bute

Page 54: Customer Educationeducation.informationbuilders.com/...studentguide(word)wm-ilo-sec.pdf · Student Guide v7.04 DN7000508.0216 ... iSM iWay Integration Tools ... SAP®, Siebel®, PeopleSoft®,

Completing Your Application

iWay Service Manager Tooling Techniques 46

The iFL _property command for the Input Path displayed.

The iFL _property command: _property(_sreg(iway.workdir)/resource/Orders.properties,'file.in','notfound') Translation: The _property IFL command calls a system defined register value for iway.worker which is set to D:/iWay7/config/XXXX (where XXXX = the name of the application) and concatenates the text /resource/Orders.properties which is the location of the properties file. The _property iFL command opens the file and

ILO

Use

ON

LY D

o N

ot D

uplic

ate

or D

istri

bute

ILO

Use

ON

LY D

o N

ot D

uplic

ate

or D

istri

bute

Page 55: Customer Educationeducation.informationbuilders.com/...studentguide(word)wm-ilo-sec.pdf · Student Guide v7.04 DN7000508.0216 ... iSM iWay Integration Tools ... SAP®, Siebel®, PeopleSoft®,

Completing Your Application

iWay Service Manager Tooling Techniques 47

reads the file.in pair and passes it to the input path as the readable value. If the file.in pair is not found in the properties file then a notfound text value is passed to the log file when processing errors. Optionally, you could add 'check' at the end of the _property iFL command to ensure it gets reloaded if the modification date has changed.

11. Maximize the Input_Parms_Cheat.txt file. 12. Highlight and right-click the Destination _property iFL command and click Copy.

13. Click the OrdersCSVtoXML_C tab. 14. Highlight and right-click the Destination value and click Paste.

ILO

Use

ON

LY D

o N

ot D

uplic

ate

or D

istri

bute

ILO

Use

ON

LY D

o N

ot D

uplic

ate

or D

istri

bute

Page 56: Customer Educationeducation.informationbuilders.com/...studentguide(word)wm-ilo-sec.pdf · Student Guide v7.04 DN7000508.0216 ... iSM iWay Integration Tools ... SAP®, Siebel®, PeopleSoft®,

Completing Your Application

iWay Service Manager Tooling Techniques 48

The iFL _property command for the Destination displayed.

The iFL _property command: _property(_sreg(iway.workdir)/resource/Orders.properties,'file.out','notfound') Translation: The _property iFL command calls a system defined register value for iway.worker which is set to D:/iWay7/config/XXXX (where XXXX = the name of the application) and concatenates the text /resource/Orders.properties which is the location of the properties file. The _property iFL command opens the file and reads the file.out pair and passes it to the output destination as the readable value. If the file.out pair is not found in the properties file then a notfound text value is passed to the log file when processing errors. Optionally, you could add 'check' at the end of the _property iFL command to ensure it gets reloaded if the modification date has changed.

Let's import from the iWay Library the finished OrdersCSVtoXML_FL file listener into the OrdersCSVtoXML_C channel and review the other attributes with the iFL _property command.

15. First you will delete the existing OrdersCSVtoXML_FL file listener. Right-click OrdersCSVtoXML_FL and click Delete. IL

O U

se O

NLY

Do

Not

Dup

licat

e or

Dis

tribu

te

ILO

Use

ON

LY D

o N

ot D

uplic

ate

or D

istri

bute

Page 57: Customer Educationeducation.informationbuilders.com/...studentguide(word)wm-ilo-sec.pdf · Student Guide v7.04 DN7000508.0216 ... iSM iWay Integration Tools ... SAP®, Siebel®, PeopleSoft®,

Completing Your Application

iWay Service Manager Tooling Techniques 49

16. Right-click the OrdersCSVtoXML_I inlet and click Import from Library. 17. Under the Listener/Default artifact, select OrdersCSVtoXML_FL and click OK.

The OrdersCSVtoXML_C channel will show an error until you save the channel.

18. Click the OrdersCSVtoXML_FL file listener. In the right pane, click the Main category down arrow. Review the Removal Destination property.

ILO

Use

ON

LY D

o N

ot D

uplic

ate

or D

istri

bute

ILO

Use

ON

LY D

o N

ot D

uplic

ate

or D

istri

bute

Page 58: Customer Educationeducation.informationbuilders.com/...studentguide(word)wm-ilo-sec.pdf · Student Guide v7.04 DN7000508.0216 ... iSM iWay Integration Tools ... SAP®, Siebel®, PeopleSoft®,

Completing Your Application

iWay Service Manager Tooling Techniques 50

The iFL _property command for the Removal Destination is displayed.

The iFL _property command: _property(_sreg(iway.workdir)/resource/Orders.properties,'file.removed','notfound') Translation: The _property iFL command calls a system defined register value for iway.worker which is set to D:/iWay7/config/XXXX (where XXXX = the name of the application) and concatenates the text /resource/Orders.properties which is the location of the properties file. The _property IFL command opens the file and reads the file.removed pair and passes it to the Removal Destination as the readable value. If the file.removed pair is not found in the properties file then a notfound text value is passed to the log file when processing errors. Optionally, you could add 'check' at the end of the _property iFL command to ensure it gets reloaded if the modification date has changed.

19. Scroll-down and review the Suffix In value.

ILO

Use

ON

LY D

o N

ot D

uplic

ate

or D

istri

bute

ILO

Use

ON

LY D

o N

ot D

uplic

ate

or D

istri

bute

Page 59: Customer Educationeducation.informationbuilders.com/...studentguide(word)wm-ilo-sec.pdf · Student Guide v7.04 DN7000508.0216 ... iSM iWay Integration Tools ... SAP®, Siebel®, PeopleSoft®,

Completing Your Application

iWay Service Manager Tooling Techniques 51

The iFL _property command for the Suffix In is displayed.

The iFL _property command: _property(_sreg(iway.workdir)/resource/Orders.properties,'file.suffix.in','notfound') Translation: The _property iFL command calls a system defined register value for iway.worker which is set to D:/iWay7/config/XXXX (where XXXX = the name of the application) and concatenates the text /resource/Orders.properties which is the location of the properties file. The _property iFL command opens the file and reads the file.removed pair and passes it to the Suffix In Filter as the readable value. If the file.suffix.in pair is not found in the properties file then a notfound text value is passed to the log file when processing errors. Optionally, you could add 'check' at the end of the _property iFL command to ensure it gets reloaded if the modification date has changed.

20. Save the Channel. 21. Click the OrdersCSVtoXML_E File Emitter.

ILO

Use

ON

LY D

o N

ot D

uplic

ate

or D

istri

bute

ILO

Use

ON

LY D

o N

ot D

uplic

ate

or D

istri

bute

Page 60: Customer Educationeducation.informationbuilders.com/...studentguide(word)wm-ilo-sec.pdf · Student Guide v7.04 DN7000508.0216 ... iSM iWay Integration Tools ... SAP®, Siebel®, PeopleSoft®,

Completing Your Application

iWay Service Manager Tooling Techniques 52

You will import OrdersCSVtoXML_E Emitter from the iWay Library to read the Destination property to use the iFL _property command.

22. First you will delete the exiting emitter. Right-click OrdersCSVtoXML_E emitter and click Delete.

23. Right-click the OrdersCSVtoXML_O outlet and click Import from Library. 24. Under the emitter/Default artifact select OrdersCSVtoXML_E and click OK.

25. Click the OrdersCSVtoXML_E emitter. On the right pane click the Main category and review the Destination property.

ILO

Use

ON

LY D

o N

ot D

uplic

ate

or D

istri

bute

ILO

Use

ON

LY D

o N

ot D

uplic

ate

or D

istri

bute

Page 61: Customer Educationeducation.informationbuilders.com/...studentguide(word)wm-ilo-sec.pdf · Student Guide v7.04 DN7000508.0216 ... iSM iWay Integration Tools ... SAP®, Siebel®, PeopleSoft®,

Completing Your Application

iWay Service Manager Tooling Techniques 53

The iFL _property command: _property(_sreg(iway.workdir)/resource/Orders.properties,'file.error','notfound') Translation: The _property iFL command calls a system defined register value for iway.worker which is set to D:/iWay7/config/XXXX (where XXXX = the name of the application) and concatenates the text /resource/Orders.properties which is the location of the properties file. The _property iFL command opens the file and reads the file.removed pair and passes it to the Destination as the readable value. If the file.error pair is not found in the properties file then a notfound text value is passed to the log file when processing errors. Optionally, you could add 'check' at the end of the _property iFL command to ensure it gets reloaded if the modification date has changed.

26. Save the Channel. 27. Close the Channel tab.

Add iFL _Property commands to the CheckOrders Process Flow

Now you can add the IFL _properties command to the CheckOrders process flow. Again these properties have been built for you. To save time you will import objects from the iWay Library.

1. From the Integration Explorer, expand the Flows folder. 2. Double-click the CheckOrders_PF process flow to open it in the edit area.

ILO

Use

ON

LY D

o N

ot D

uplic

ate

or D

istri

bute

ILO

Use

ON

LY D

o N

ot D

uplic

ate

or D

istri

bute

Page 62: Customer Educationeducation.informationbuilders.com/...studentguide(word)wm-ilo-sec.pdf · Student Guide v7.04 DN7000508.0216 ... iSM iWay Integration Tools ... SAP®, Siebel®, PeopleSoft®,

Completing Your Application

iWay Service Manager Tooling Techniques 54

You will need to delete the existing ValidOrders File Write object and then drag and drop the ValidOrders File object stored in the iWay Library. To maintain process flow alignment turn on Grid and Snap to Geometry.

3. Right-click the ValidOrders File Write object and click Delete. 4. Click the Library Manager tab. 5. Expand PFLOW and File artifacts. 6. Drag and drop the ValidOrders File Write object to between the CheckOrders Decision

Test and ValidUpdateInventory_T Transform objects. 7. Reconnect the CheckOrders Decision Test object to the ValidOrders File Write object

with an OnCustom event and a true case value. Click Finish.

ILO

Use

ON

LY D

o N

ot D

uplic

ate

or D

istri

bute

ILO

Use

ON

LY D

o N

ot D

uplic

ate

or D

istri

bute

Page 63: Customer Educationeducation.informationbuilders.com/...studentguide(word)wm-ilo-sec.pdf · Student Guide v7.04 DN7000508.0216 ... iSM iWay Integration Tools ... SAP®, Siebel®, PeopleSoft®,

Completing Your Application

iWay Service Manager Tooling Techniques 55

8. Reconnect the ValidOrders File Write object to the ValidUpdateInventory_T Transform object with an OnSuccess event.

9. Below, click the Properties tab. 10. Under the File Object, click the Properties tab.

You will review the iFL _property command for the Target Directory.

11. Review the Target Directory value for ValidOrders File Write object.

The iFL _property command: _property(_sreg(iway.workdir)/resource/Orders.properties,'file.validorders','notfound') Translation: The _property iFL command calls a system defined register value for iway.worker which is set to D:/iWay7/config/XXXX (where XXXX is the name of the application) and concatenates the text /resource/Orders.properties which is the location of the properties file. The _property iFL command opens the file and reads the file.removed pair and passes it to the Target Directory as the readable value. If the file.validorders pair is not found in the properties file then a notfound text value is passed to the log file when processing errors.

Re-align the process flow if necessary. Turn on Grid and Snap to Geometry to make realignment easier.

12. Right-click the BackOrders File Write object and click Delete. 13. Click the Library Manager tab. 14. Expand PFLOW and File artifacts. 15. Drag and drop the BackOrders File Write object to between the CheckOrders Decision

Test object and Update Back Orders SQL objects. 16. Reconnect the CheckOrders Decision Test object to the BackOrders File Write object

with an OnCustom event and a false case value. Click Finish.

ILO

Use

ON

LY D

o N

ot D

uplic

ate

or D

istri

bute

ILO

Use

ON

LY D

o N

ot D

uplic

ate

or D

istri

bute

Page 64: Customer Educationeducation.informationbuilders.com/...studentguide(word)wm-ilo-sec.pdf · Student Guide v7.04 DN7000508.0216 ... iSM iWay Integration Tools ... SAP®, Siebel®, PeopleSoft®,

Completing Your Application

iWay Service Manager Tooling Techniques 56

17. Reconnect the BackOrders File Write object to the Update Back Orders SQL object with an OnSuccess event.

18. Below, click the Properties tab. 19. Review the Target Directory value for BackOrders File Write object.

ILO

Use

ON

LY D

o N

ot D

uplic

ate

or D

istri

bute

ILO

Use

ON

LY D

o N

ot D

uplic

ate

or D

istri

bute

Page 65: Customer Educationeducation.informationbuilders.com/...studentguide(word)wm-ilo-sec.pdf · Student Guide v7.04 DN7000508.0216 ... iSM iWay Integration Tools ... SAP®, Siebel®, PeopleSoft®,

Completing Your Application

iWay Service Manager Tooling Techniques 57

The iFL _property command: _property(_sreg(iway.workdir)/resource/Orders.properties,'file.backorders','notfound') Translation: The _property iFL command calls a system defined register value for iway.worker which is set to D:/iWay7/config/base and concatenates the text /resource/Orders.properties which is the location of the properties file. The _property iFL command opens the file and reads the file.backorders pair and passes it to the Target Directory as the readable value. If the file.backorders pair is not found in the properties file then a notfound text value is passed to the log file when processing errors.

You should align your flow accordingly.

20. Save the CheckOrders_PF process flow. 21. Close the CheckOrders_PF process flow.

Reconfigure the OrdersCSVtoXML_iia Application to Include the Property File

You will need to reconfigure the OrdersCSVtoXML application to include the Orders property file. You will add the property file to the Resource section of the application builder.

1. In the Integration Explorer, expand the Applications folder. 2. Right-click OrdersCSVtoXML_iia and click Delete. 3. Right-click Applications and click New — Application. 4. For the Name of the Application type OrdersCSVtoXML and click Next.

ILO

Use

ON

LY D

o N

ot D

uplic

ate

or D

istri

bute

ILO

Use

ON

LY D

o N

ot D

uplic

ate

or D

istri

bute

Page 66: Customer Educationeducation.informationbuilders.com/...studentguide(word)wm-ilo-sec.pdf · Student Guide v7.04 DN7000508.0216 ... iSM iWay Integration Tools ... SAP®, Siebel®, PeopleSoft®,

Completing Your Application

iWay Service Manager Tooling Techniques 58

5. Select the OrdersCSVtoXML_C inline channel from the /Orders/Channel folder artifact. Click Next.

6. Click Next.

ILO

Use

ON

LY D

o N

ot D

uplic

ate

or D

istri

bute

ILO

Use

ON

LY D

o N

ot D

uplic

ate

or D

istri

bute

Page 67: Customer Educationeducation.informationbuilders.com/...studentguide(word)wm-ilo-sec.pdf · Student Guide v7.04 DN7000508.0216 ... iSM iWay Integration Tools ... SAP®, Siebel®, PeopleSoft®,

Completing Your Application

iWay Service Manager Tooling Techniques 59

7. Click Next. 8. On the Resources pane click Add Files.

9. Expand Artifacts. 10. Click Orders.properties and click OK.

ILO

Use

ON

LY D

o N

ot D

uplic

ate

or D

istri

bute

ILO

Use

ON

LY D

o N

ot D

uplic

ate

or D

istri

bute

Page 68: Customer Educationeducation.informationbuilders.com/...studentguide(word)wm-ilo-sec.pdf · Student Guide v7.04 DN7000508.0216 ... iSM iWay Integration Tools ... SAP®, Siebel®, PeopleSoft®,

Completing Your Application

iWay Service Manager Tooling Techniques 60

11. Click Next.

12. Click Finish.

ILO

Use

ON

LY D

o N

ot D

uplic

ate

or D

istri

bute

ILO

Use

ON

LY D

o N

ot D

uplic

ate

or D

istri

bute

Page 69: Customer Educationeducation.informationbuilders.com/...studentguide(word)wm-ilo-sec.pdf · Student Guide v7.04 DN7000508.0216 ... iSM iWay Integration Tools ... SAP®, Siebel®, PeopleSoft®,

Completing Your Application

iWay Service Manager Tooling Techniques 61

The OrdersCSVtoXML_iia application is displayed. Notice the Resources artifact.

Next you need to build the application and upload it to the iWay server.

13. Right-click build.xml, point to Run As — , and click 2 Ant Build.

14. Click build and upload check boxes. 15. Click Run.

ILO

Use

ON

LY D

o N

ot D

uplic

ate

or D

istri

bute

ILO

Use

ON

LY D

o N

ot D

uplic

ate

or D

istri

bute

Page 70: Customer Educationeducation.informationbuilders.com/...studentguide(word)wm-ilo-sec.pdf · Student Guide v7.04 DN7000508.0216 ... iSM iWay Integration Tools ... SAP®, Siebel®, PeopleSoft®,

Completing Your Application

iWay Service Manager Tooling Techniques 62

The order in which you check targets to execute is important to the processing of the application. As you check items in the target list they become an ordered list in which to process the application. For instance for an existing application, you could build and upload the application and perform all of the other functions to get an application running manually. But if you check some of the other functions in the correct order then a running application can be redeployed automatically. To fully redeploy an application from this configuration pane after upload you would click the following targets in this order: stop, (undeploy), deploy, and start. Of course you would be deploying the application with the same template. You will try these operations later in this class.

The build.xml messages are displayed.

ILO

Use

ON

LY D

o N

ot D

uplic

ate

or D

istri

bute

ILO

Use

ON

LY D

o N

ot D

uplic

ate

or D

istri

bute

Page 71: Customer Educationeducation.informationbuilders.com/...studentguide(word)wm-ilo-sec.pdf · Student Guide v7.04 DN7000508.0216 ... iSM iWay Integration Tools ... SAP®, Siebel®, PeopleSoft®,

Completing Your Application

iWay Service Manager Tooling Techniques 63

Let's take a look at the build.xml file.

16. Right-click build.xml, point to Open with — , and click Ant Editor.

ILO

Use

ON

LY D

o N

ot D

uplic

ate

or D

istri

bute

ILO

Use

ON

LY D

o N

ot D

uplic

ate

or D

istri

bute

Page 72: Customer Educationeducation.informationbuilders.com/...studentguide(word)wm-ilo-sec.pdf · Student Guide v7.04 DN7000508.0216 ... iSM iWay Integration Tools ... SAP®, Siebel®, PeopleSoft®,

Completing Your Application

iWay Service Manager Tooling Techniques 64

Redeploy and Test the Application

Once the application has been built and uploaded to the iWay server instance, you can redeploy and test the application.

1. Maximize the iWay Web Console. 2. Click the Management link.

A template for an application should have all of the artifacts required to run an application. For instance, if an application needs to have a pooling provider for the HttpClient or any global registers to process the application, then establish those artifacts ONCE in the template before deploying and starting the application. The artifacts can be established when the template is created. Otherwise these artifacts would need to be created every time you need to deploy it because a change has been made to some part of the application.

3. On the left tree click Templates. 4. For the Dev template, click the View icon under the Actions column.

5. The Dev template is displayed.

ILO

Use

ON

LY D

o N

ot D

uplic

ate

or D

istri

bute

ILO

Use

ON

LY D

o N

ot D

uplic

ate

or D

istri

bute

Page 73: Customer Educationeducation.informationbuilders.com/...studentguide(word)wm-ilo-sec.pdf · Student Guide v7.04 DN7000508.0216 ... iSM iWay Integration Tools ... SAP®, Siebel®, PeopleSoft®,

Completing Your Application

iWay Service Manager Tooling Techniques 65

6. On the left tree scroll-down and click Pooling Providers.

Notice the pooling provider is set to HttpClient which is used by the CheckOrders_PF process flow when calling the SQL Web Service.

7. Click Management.

ILO

Use

ON

LY D

o N

ot D

uplic

ate

or D

istri

bute

ILO

Use

ON

LY D

o N

ot D

uplic

ate

or D

istri

bute

Page 74: Customer Educationeducation.informationbuilders.com/...studentguide(word)wm-ilo-sec.pdf · Student Guide v7.04 DN7000508.0216 ... iSM iWay Integration Tools ... SAP®, Siebel®, PeopleSoft®,

Completing Your Application

iWay Service Manager Tooling Techniques 66

8. Click Applications. 9. For the OrdersCSVtoXML application under the Actions columns, click the Deploy icon. 10. For the Configuration Template, select Dev and click Deploy. 11. Click Deployments. 12. For the application OrdersCSVtoXML_Dev, under the State column click the red circle

to start the application.

13. Click OK.

Let's review the components of the new application, especially the location of the properties file.

14. In the Management window click the pull-down and click OrdersCSVtoXML_Dev under Applications.

15. The iWay Web Console for the OrdersCSVtoXML_Dev application is displayed.

ILO

Use

ON

LY D

o N

ot D

uplic

ate

or D

istri

bute

ILO

Use

ON

LY D

o N

ot D

uplic

ate

or D

istri

bute

Page 75: Customer Educationeducation.informationbuilders.com/...studentguide(word)wm-ilo-sec.pdf · Student Guide v7.04 DN7000508.0216 ... iSM iWay Integration Tools ... SAP®, Siebel®, PeopleSoft®,

Completing Your Application

iWay Service Manager Tooling Techniques 67

16. Along the left tree click Register Settings.

If you remember the beginning of every iFL _property command is: _property(_sreg(iway.workdir)/resource/Orders.properties The sreg(iway.workdir) piece looks at a system register value for iway.workdir which is set to D:/iWay7/config/OrdersCSVtoXML_Dev. The /resource was created when the application was built with the Resource artifact. This section of the _property command is the location of the property file.

ILO

Use

ON

LY D

o N

ot D

uplic

ate

or D

istri

bute

ILO

Use

ON

LY D

o N

ot D

uplic

ate

or D

istri

bute

Page 76: Customer Educationeducation.informationbuilders.com/...studentguide(word)wm-ilo-sec.pdf · Student Guide v7.04 DN7000508.0216 ... iSM iWay Integration Tools ... SAP®, Siebel®, PeopleSoft®,

Completing Your Application

iWay Service Manager Tooling Techniques 68

The location of Orders.properties file on the disk is show in the following image.

Let's test the application to make sure the iFL _property commands you added work correctly. To be sure all of the components are running, click Monitoring and make sure the Listeners are started.

17. Using a Windows Explorer browser navigate to D:\Course9xx\Orders\data. 18. Right-click PO_Item_3.csv and click Copy. 19. Navigate to D:\Course9xx\Orders\input. Right-click in the empty pane and click

Paste.

This directory is the input directory for the OrdersCSVtoXML_FL file listener.

20. Look in the output, error, removed, and ValidOrders directories to review the success or failure of the execution.

Add Process Flow Debugging to the OrdersCSVtoXML_PF Process Flow

Process flows visually show the chronological order of an application processing a message. Since you have complete control of the message flow, you can place Debug objects along the wired edges for objects you want to debug. To begin to learn about error processing and debugging you will place Debug Service objects on the wired edges to view the workings of the transformer and SQL objects.

ILO

Use

ON

LY D

o N

ot D

uplic

ate

or D

istri

bute

ILO

Use

ON

LY D

o N

ot D

uplic

ate

or D

istri

bute

Page 77: Customer Educationeducation.informationbuilders.com/...studentguide(word)wm-ilo-sec.pdf · Student Guide v7.04 DN7000508.0216 ... iSM iWay Integration Tools ... SAP®, Siebel®, PeopleSoft®,

Completing Your Application

iWay Service Manager Tooling Techniques 69

Import the Debug Properties File

Before you begin using some of the error processing techniques you can add the error property details to the Errors.properties file and use the _properties iFL command to call those properties into your application.

1. In the Integration Explorer right-click the Artifacts folder and click Import 2. Expand General and select File System, then click Next. 3. From the From Directory pull-down select D:\Course9xx. 4. On the right pane, click the Errors.properties check box and click Finish.

5. Double-click the Errors.properties file to open its contents in the editor.

ILO

Use

ON

LY D

o N

ot D

uplic

ate

or D

istri

bute

ILO

Use

ON

LY D

o N

ot D

uplic

ate

or D

istri

bute

Page 78: Customer Educationeducation.informationbuilders.com/...studentguide(word)wm-ilo-sec.pdf · Student Guide v7.04 DN7000508.0216 ... iSM iWay Integration Tools ... SAP®, Siebel®, PeopleSoft®,

Completing Your Application

iWay Service Manager Tooling Techniques 70

You will use some of these properties in the next section.

6. Review the following table of property pairs:

Property Pair Name

Assignment

Value

obj.start = D:/Course9xx/Orders/Debug/Request_after_Start_*.xml

obj.transform1

= D:/Course9xx/Orders/Debug/Request_after_OrdersCSVtoXML_*.xml

obj.SQL1 = D:/Course9xx/Orders/Debug/Request_after_SQLProductQuery_*.xml

obj.transform2

= D:/Course9xx/Debug/Request_after_CleanUpOrderXML_*.xml

obj.webservice

= D:/Course9xx/Debug/Request_after_WebService_*.xml

obj.SQL2 = D:/Course9xx/Debug/Request_after_SQLUpdateBackOrders_*.xml

Add Debug Service Objects

You will add Debug objects after the Start object through to the CleanUpOrdersXML_T Transform object. When you run the application you will be able to review debug information for each object you identify to part of the debugging process. Using the Debug object is primarily for development purposes. In Lesson 3 you will learn how to utilize a CatchErr agent to catch

errors during the running of the application and pass them to an email distribution list.

1. Open the OrdersCSVtoXML_PF process flow in the editor.

ILO

Use

ON

LY D

o N

ot D

uplic

ate

or D

istri

bute

ILO

Use

ON

LY D

o N

ot D

uplic

ate

or D

istri

bute

Page 79: Customer Educationeducation.informationbuilders.com/...studentguide(word)wm-ilo-sec.pdf · Student Guide v7.04 DN7000508.0216 ... iSM iWay Integration Tools ... SAP®, Siebel®, PeopleSoft®,

Completing Your Application

iWay Service Manager Tooling Techniques 71

To maintain process alignment, turn on Grid and Snap to Geometry.

2. From the Palette under the Control Objects category, drag and drop a Debug object to the bottom of the flow.

3. Type QA_After_Start for the Name of the Service object and click Next.

4. From the Input_Parms_Cheat.txt file, highlight the first _property iFL command under Object Debug section and click Copy.

5. Right-click the text box for the Where property and click Paste.

ILO

Use

ON

LY D

o N

ot D

uplic

ate

or D

istri

bute

ILO

Use

ON

LY D

o N

ot D

uplic

ate

or D

istri

bute

Page 80: Customer Educationeducation.informationbuilders.com/...studentguide(word)wm-ilo-sec.pdf · Student Guide v7.04 DN7000508.0216 ... iSM iWay Integration Tools ... SAP®, Siebel®, PeopleSoft®,

Completing Your Application

iWay Service Manager Tooling Techniques 72

6. Click Finish.

ILO

Use

ON

LY D

o N

ot D

uplic

ate

or D

istri

bute

ILO

Use

ON

LY D

o N

ot D

uplic

ate

or D

istri

bute

Page 81: Customer Educationeducation.informationbuilders.com/...studentguide(word)wm-ilo-sec.pdf · Student Guide v7.04 DN7000508.0216 ... iSM iWay Integration Tools ... SAP®, Siebel®, PeopleSoft®,

Completing Your Application

iWay Service Manager Tooling Techniques 73

Before you connect this object to the flow, there are three other Debug objects you want to create to debug other flow objects. The other three Debug objects have been created for you and can be retrieved from the Library Manager.

7. Click the Library Manager tab. 8. Expand PFLOW and the Debug artifact. 9. Drag and drop QA_After_OrdersXMLtoXML_Transform, QA_After_SQLProductQuery,

and QA_After_CleanupOrders Debug objects next to the QA_After Start object.

10. Save the process flow.

Next you need to move the four Debug service objects onto the wired edges.

Move the Debug Service Objects to the Wired Edges

Next you will move the Debug Service objects to the locations in the process flow required to capture any debug values.

Move the Debug Service Objects to the Wired Edges

1. Drag the QA_After_Start Service object onto the wired line between the Start and OrdersCSVtoXML_T objects.

ILO

Use

ON

LY D

o N

ot D

uplic

ate

or D

istri

bute

ILO

Use

ON

LY D

o N

ot D

uplic

ate

or D

istri

bute

Page 82: Customer Educationeducation.informationbuilders.com/...studentguide(word)wm-ilo-sec.pdf · Student Guide v7.04 DN7000508.0216 ... iSM iWay Integration Tools ... SAP®, Siebel®, PeopleSoft®,

Completing Your Application

iWay Service Manager Tooling Techniques 74

2. Drag the QA_After_OrdersXMLtoXML_Transform Debug Service object onto the wired line between the OrdersXMLtoXML_T and the Join objects.

3. Drag the QA_After_SQLProductQuery Service object onto the wired line between the SQLProductQuery and the Join objects.

4. Drag the QA_After_CleanUpOrdersXML Service object onto the wired line between the CleanUpOrdersXML Transform object and the CheckOrders_PF process flow objects.

5. Save the OrdersCSVtoXML_PF process flow. Realign the objects if needed.

You will be adding a fail agent when a message fails and/or cause retry of the message of the flow. The failure business service always returns an XDException. If the retry option is selected for the Type of failure parameter, the exception

ILO

Use

ON

LY D

o N

ot D

uplic

ate

or D

istri

bute

ILO

Use

ON

LY D

o N

ot D

uplic

ate

or D

istri

bute

Page 83: Customer Educationeducation.informationbuilders.com/...studentguide(word)wm-ilo-sec.pdf · Student Guide v7.04 DN7000508.0216 ... iSM iWay Integration Tools ... SAP®, Siebel®, PeopleSoft®,

Completing Your Application

iWay Service Manager Tooling Techniques 75

calls for a retry of the input, if possible. This service is useful when debugging rollback logic in a customer business service.

Add Process Flow Debugging to the CheckOrders_PF Process Flow

You can add the same level of debugging to the CheckOrders_PF process flow as you did for the OrdersCSVtoXML_PF process flow.

1. Open CheckOrders_PF process flow in the editor. 2. Click the Library Manager tab. 3. Under the PFLOW category, expand the Debug artifact. 4. Drag the QA_After_WebService debug service object onto the connection line

between the Valid Inventory Update WS WebService object and the End object.

5. Click Properties and the Properties subtab. 6. Review the Where property's _property command.

7. Save the CheckOrders_PF process flow. 8. Next from the Library Manager drag the QA_After_UpdateBackOrders Debug Service

object onto the line between the Update Back Orders SQL object and the End object.

ILO

Use

ON

LY D

o N

ot D

uplic

ate

or D

istri

bute

ILO

Use

ON

LY D

o N

ot D

uplic

ate

or D

istri

bute

Page 84: Customer Educationeducation.informationbuilders.com/...studentguide(word)wm-ilo-sec.pdf · Student Guide v7.04 DN7000508.0216 ... iSM iWay Integration Tools ... SAP®, Siebel®, PeopleSoft®,

Completing Your Application

iWay Service Manager Tooling Techniques 76

9. Click Properties and Properties tabs. 10. Review the Where property's _property command property pair.

11. Save the CheckOrders_PF process flow.

Always realign your flows to keep them readable.

ILO

Use

ON

LY D

o N

ot D

uplic

ate

or D

istri

bute

ILO

Use

ON

LY D

o N

ot D

uplic

ate

or D

istri

bute

Page 85: Customer Educationeducation.informationbuilders.com/...studentguide(word)wm-ilo-sec.pdf · Student Guide v7.04 DN7000508.0216 ... iSM iWay Integration Tools ... SAP®, Siebel®, PeopleSoft®,

Completing Your Application

iWay Service Manager Tooling Techniques 77

Rebuild and Execute the OrdersCSVtoXML Application with Debug

Several components of the OrdersCSVtoXML application were changed to assert error processing and debug services. The application needs to be rebuilt before you can test the changes and review your efforts in regard to debugging and error processing. In this section you will rebuild, upload and redeploy the application to get the most current changes to the process flows and channel.

Also, you must create a global register to activate the debug parameter used by the various QA Agent objects in the process flows.

1. In the Integration Explorer, expand Applications and OrdersCSVtoXML.

Since you used another properties file (Errors.properties), you will need to add this to the Resources section of the application before it can be rebuilt.

2. Right-click OrdersCSVtoXML_iia and select Open With — Application Editor. 3. Click the Resources tab.

4. Click Add files.

5. Expand the Artifacts folder and select Errors.properties. Click OK.

ILO

Use

ON

LY D

o N

ot D

uplic

ate

or D

istri

bute

ILO

Use

ON

LY D

o N

ot D

uplic

ate

or D

istri

bute

Page 86: Customer Educationeducation.informationbuilders.com/...studentguide(word)wm-ilo-sec.pdf · Student Guide v7.04 DN7000508.0216 ... iSM iWay Integration Tools ... SAP®, Siebel®, PeopleSoft®,

Completing Your Application

iWay Service Manager Tooling Techniques 78

6. Save the OrdersCSVtoXML application.

Before you can rebuild the application and start the target from iIT, you must stop and undeploy the application on the server.

7. Maximize the iWay Web Console and click Management. 8. Click Deployments. 9. Stop the application. For the Deployment OrdersCSVtoXML_Dev, under the State

column click the green check symbol.

10. Click OK.

You need to undeploy the application.

11. For the Deployment OrdersCSVtoXML_Dev, click the red "X" under Actions. 12. Click OK. 13. Minimize the iWay Web Console and Maximize iIT.

ILO

Use

ON

LY D

o N

ot D

uplic

ate

or D

istri

bute

ILO

Use

ON

LY D

o N

ot D

uplic

ate

or D

istri

bute

Page 87: Customer Educationeducation.informationbuilders.com/...studentguide(word)wm-ilo-sec.pdf · Student Guide v7.04 DN7000508.0216 ... iSM iWay Integration Tools ... SAP®, Siebel®, PeopleSoft®,

Completing Your Application

iWay Service Manager Tooling Techniques 79

If you want to automate the build process using the Dev template, you will need to make an adjustment to the build.xml file. You will learn more about the use of the build.xml file in the lesson on Ant programming later.

14. Right-click build.xml, point to Open With, and click Ant Editor.

15. To refer to the Dev template, add the following statements: <property name="template.name" value="Dev" /> <property name="deployment.name" value="OrdersCSVtoXML_Dev" />

16. Scroll down to the iwdeploy section and add the following statement: templateName="${template.name}"

ILO

Use

ON

LY D

o N

ot D

uplic

ate

or D

istri

bute

ILO

Use

ON

LY D

o N

ot D

uplic

ate

or D

istri

bute

Page 88: Customer Educationeducation.informationbuilders.com/...studentguide(word)wm-ilo-sec.pdf · Student Guide v7.04 DN7000508.0216 ... iSM iWay Integration Tools ... SAP®, Siebel®, PeopleSoft®,

Completing Your Application

iWay Service Manager Tooling Techniques 80

The templateName parameter is passed to the server for deployment with the template name you defined.

17. Scroll down to the iwstart section and add the following statement: deploymentName="${deployment.name}"

This statement tells the build.xml file which deployment name to start.

18. To save the build.xml file, click Save. Close the build.xml tab. 19. Right-click the build.xml artifact, point to Run As, and click 2 Ant Build.

20. After build and upload, select deploy and start as targets.

ILO

Use

ON

LY D

o N

ot D

uplic

ate

or D

istri

bute

ILO

Use

ON

LY D

o N

ot D

uplic

ate

or D

istri

bute

Page 89: Customer Educationeducation.informationbuilders.com/...studentguide(word)wm-ilo-sec.pdf · Student Guide v7.04 DN7000508.0216 ... iSM iWay Integration Tools ... SAP®, Siebel®, PeopleSoft®,

Completing Your Application

iWay Service Manager Tooling Techniques 81

21. Click Run.

ILO

Use

ON

LY D

o N

ot D

uplic

ate

or D

istri

bute

ILO

Use

ON

LY D

o N

ot D

uplic

ate

or D

istri

bute

Page 90: Customer Educationeducation.informationbuilders.com/...studentguide(word)wm-ilo-sec.pdf · Student Guide v7.04 DN7000508.0216 ... iSM iWay Integration Tools ... SAP®, Siebel®, PeopleSoft®,

Completing Your Application

iWay Service Manager Tooling Techniques 82

The build option is checked as a default. The application will be built into an iia file type. The upload is checked because the option was checked in a previous build. The upload option sends the iia built application up to the base server.

22. Open the iWay Web Console. 23. Click Management. 24. Click Deployments.

Notice that the OrdersCSVtoXML_Dev deployment has been started.

25. Under the Management link click the down arrow and click OrdersCSVtoXML_Dev under Applications.

The OrdersCSVtoXML application is displayed.

26. On the left tree, click Register Settings under Settings. 27. Review that the debug register variable has been set to true.

ILO

Use

ON

LY D

o N

ot D

uplic

ate

or D

istri

bute

ILO

Use

ON

LY D

o N

ot D

uplic

ate

or D

istri

bute

Page 91: Customer Educationeducation.informationbuilders.com/...studentguide(word)wm-ilo-sec.pdf · Student Guide v7.04 DN7000508.0216 ... iSM iWay Integration Tools ... SAP®, Siebel®, PeopleSoft®,

Completing Your Application

iWay Service Manager Tooling Techniques 83

The Special Registers are displayed.

Before the debug process can take place, you need to turn on Logging and Trace settings.

28. On the left tree click Log Settings under the Settings category. 29. Click Logging On and click Update.

ILO

Use

ON

LY D

o N

ot D

uplic

ate

or D

istri

bute

ILO

Use

ON

LY D

o N

ot D

uplic

ate

or D

istri

bute

Page 92: Customer Educationeducation.informationbuilders.com/...studentguide(word)wm-ilo-sec.pdf · Student Guide v7.04 DN7000508.0216 ... iSM iWay Integration Tools ... SAP®, Siebel®, PeopleSoft®,

Completing Your Application

iWay Service Manager Tooling Techniques 84

30. On the left tree click Trace Settings. 31. Under Trace Settings, click Debug and Deep Click Update.

Notice the Defer option. Defer only writes lines to the log file when an error occurs, but the trace lines are still generated and written to memory. This can result in much of the trace overhead in terms of performance as well as the use of memory. Using the Defer option will, however, reduce the size of the trace files required for analysis. Defer state is set when the listener starts.

32. Stop and Start the OrdersCSVtoXML_iia application.

The application needs to be stopped and started before the logging and tracing activities can occur.

Next, test the application and look at some of the debug files.

1. In the Windows Explorer, navigate to D:\Course9xx\Orders\data. 2. Right-click PO_Item_3.csv and click Copy. 3. Navigate to D:\Course9xx\Orders\input ,right-click, and click Paste. 4. Navigate to D:\Course9xx\Orders\Debug. 5. Double-click Request_after_OrdersCSVtoXML_datetimestamp.xml.

ILO

Use

ON

LY D

o N

ot D

uplic

ate

or D

istri

bute

ILO

Use

ON

LY D

o N

ot D

uplic

ate

or D

istri

bute

Page 93: Customer Educationeducation.informationbuilders.com/...studentguide(word)wm-ilo-sec.pdf · Student Guide v7.04 DN7000508.0216 ... iSM iWay Integration Tools ... SAP®, Siebel®, PeopleSoft®,

Completing Your Application

iWay Service Manager Tooling Techniques 85

This debug document is at the very start of the OrdersCSVtoXML_PF process flow. It shows the incoming document to the flow and all variables defined to the flow at the outset.

6. Close the Request_after_Start_datetimestamp.xml tab.

In the next lesson you will learn how to add advanced error processing to the process flow which runs in real time to catch errors thrown by the application. Those errors can be sent via email to a distribution list for a plan of action including retry options.

Application and Template cleanup

1. On the iWay Web Console open the Dev template. 2. Turn off Logging and the Trace Settings.

ILO

Use

ON

LY D

o N

ot D

uplic

ate

or D

istri

bute

ILO

Use

ON

LY D

o N

ot D

uplic

ate

or D

istri

bute

Page 94: Customer Educationeducation.informationbuilders.com/...studentguide(word)wm-ilo-sec.pdf · Student Guide v7.04 DN7000508.0216 ... iSM iWay Integration Tools ... SAP®, Siebel®, PeopleSoft®,

Completing Your Application

iWay Service Manager Tooling Techniques 86

Completing Your Application: Lesson Review

Placing Variables in an External File Introduction to iSM Process Flow Debugging Add Process Flow Debugging to the OrdersCSVtoXML_PF Process Flow Add Process Flow Debugging to the CheckOrders_PF Process Flow Rebuild and Execute the OrdersCSVtoXML_iia Application with Debug

ILO

Use

ON

LY D

o N

ot D

uplic

ate

or D

istri

bute

ILO

Use

ON

LY D

o N

ot D

uplic

ate

or D

istri

bute

Page 95: Customer Educationeducation.informationbuilders.com/...studentguide(word)wm-ilo-sec.pdf · Student Guide v7.04 DN7000508.0216 ... iSM iWay Integration Tools ... SAP®, Siebel®, PeopleSoft®,

Advanced Error Handling and CatchError Processing

iWay Service Manager Tooling Techniques 87

Lesson 3

Advanced Error Handling and CatchError Processing

Objectives

• Error Processing Preparation • Build the Error Notification Process Flow • Build the CatchErr and Internal Queue Components • Use Channel Builder to Create the Internal Listener Channel • Redeploy the Application

ILO

Use

ON

LY D

o N

ot D

uplic

ate

or D

istri

bute

ILO

Use

ON

LY D

o N

ot D

uplic

ate

or D

istri

bute

Page 96: Customer Educationeducation.informationbuilders.com/...studentguide(word)wm-ilo-sec.pdf · Student Guide v7.04 DN7000508.0216 ... iSM iWay Integration Tools ... SAP®, Siebel®, PeopleSoft®,

Advanced Error Handling and CatchError Processing

iWay Service Manager Tooling Techniques 88

Error Processing Preparation

Business Scenario

Before you migrate the OrdersCSVtoXML application into a production environment you will need to address an error capturing system. You need to anticipate the kind of errors which would bring the application to a stop. For instance, what if the incoming document does not match the CSV format expected by the application? What if the SQL Server database is down and can't

respond to queries by the application? Would you like to notify others in the organization of these errors so they can be resolved? Without an error processing system in your application, you are hoping for the best to occur. In this lesson you will learn how to apply error type service objects and supporting techniques to provide a solid error process to your application.

Task Plan

• Add Property Pairs to Support Error Processing

Add Property Pairs to Support Error Processing

In this section you will review property pairs to support the error processing routines. You will review the Errors.properties file with property pairs used to define the CatchError service object.

1. Review the following table of property pairs to support the CatchError service object:

ILO

Use

ON

LY D

o N

ot D

uplic

ate

or D

istri

bute

ILO

Use

ON

LY D

o N

ot D

uplic

ate

or D

istri

bute

Page 97: Customer Educationeducation.informationbuilders.com/...studentguide(word)wm-ilo-sec.pdf · Student Guide v7.04 DN7000508.0216 ... iSM iWay Integration Tools ... SAP®, Siebel®, PeopleSoft®,

Advanced Error Handling and CatchError Processing

iWay Service Manager Tooling Techniques 89

Property Pair Assignment Value

err.filepath = D:/Course9xx/Orders/error

err.filename = catcherror_*.xml

err.mailhost = localhost

err.mailto = [email protected]

err.sendto = [email protected]

The Errors.properties file is displayed.

These properties could easily be changed from time to time and you don't want to have to recompile the process flows if the administrator changes. To construct messages for the errors to be distributed in an email, you will use global system variables.

ILO

Use

ON

LY D

o N

ot D

uplic

ate

or D

istri

bute

ILO

Use

ON

LY D

o N

ot D

uplic

ate

or D

istri

bute

Page 98: Customer Educationeducation.informationbuilders.com/...studentguide(word)wm-ilo-sec.pdf · Student Guide v7.04 DN7000508.0216 ... iSM iWay Integration Tools ... SAP®, Siebel®, PeopleSoft®,

Advanced Error Handling and CatchError Processing

iWay Service Manager Tooling Techniques 90

Build the Error Notification Process Flow

You will create a simple Error Notification process that can be included in many different process flows. This process consists of using an iWay Service XDConstant service agent to formulate the body of the email and the Email Object to notify someone of any errors. Before you begin designing the error process, you need to add the iWay Service used to formulate the body of the

email to the iSM Registry. A Service object allows you to call some of the built-in and custom services, called Agents, which are installed with iSM, such as a file writer. You are going to be using a service agent to build the body of the email.

Error Notification Process Flow

The ErrorNotification process flow will get called by an Internal Queue Listener whenever an error occurs within an application. The ErrorNotifcation is paired with the CatchError and InternalQ service objects. In the next section you will build components to invoke the ErrorNotification process flow.

1. From the Flows folder, right-click and select New — Process Flow.

2. Type ErrorNotification for the Name of the process flow, optionally type a description, and click Finish.

ILO

Use

ON

LY D

o N

ot D

uplic

ate

or D

istri

bute

ILO

Use

ON

LY D

o N

ot D

uplic

ate

or D

istri

bute

Page 99: Customer Educationeducation.informationbuilders.com/...studentguide(word)wm-ilo-sec.pdf · Student Guide v7.04 DN7000508.0216 ... iSM iWay Integration Tools ... SAP®, Siebel®, PeopleSoft®,

Advanced Error Handling and CatchError Processing

iWay Service Manager Tooling Techniques 91

3. The first step in the process flow is to write out the error information to a disk file location. The Debug object will be used to write error information to a disk file. The Debug object has been created for you and is stored in the Library. Click the Library Manager tab.

4. Expand the PFLOW and Debug artifacts. Drag and drop the QA_ErrorNotification Debug object after the Start object.

Don't forget to turn on Grid and Snap to Geometry to better align your flow.

5. Click Properties for the Debug object. Click the submenu Properties.

ILO

Use

ON

LY D

o N

ot D

uplic

ate

or D

istri

bute

ILO

Use

ON

LY D

o N

ot D

uplic

ate

or D

istri

bute

Page 100: Customer Educationeducation.informationbuilders.com/...studentguide(word)wm-ilo-sec.pdf · Student Guide v7.04 DN7000508.0216 ... iSM iWay Integration Tools ... SAP®, Siebel®, PeopleSoft®,

Advanced Error Handling and CatchError Processing

iWay Service Manager Tooling Techniques 92

Notice the location where the debug messages are written to, referred to as the property pair err.filepath, stored in the Errors.properties file.

6. Drag the QA_ErrorNotification File object onto the relation line between the Start and End objects.

The ErrorNotification process flow is displayed.

Next you will add a Service object to build the body of the email containing components about where the error occurred in the application. You need to build the email body message. An iWay Service object will help us construct the email body. The ConstructEmailBody is stored in the Library.

7. Click the Library Manager tab. 8. Expand PFLOW and Service artifacts. 9. Drag and drop the ConstructEmailBody Service object onto the relation line between

the QA_ErrorNotification Debug and End objects.

ILO

Use

ON

LY D

o N

ot D

uplic

ate

or D

istri

bute

ILO

Use

ON

LY D

o N

ot D

uplic

ate

or D

istri

bute

Page 101: Customer Educationeducation.informationbuilders.com/...studentguide(word)wm-ilo-sec.pdf · Student Guide v7.04 DN7000508.0216 ... iSM iWay Integration Tools ... SAP®, Siebel®, PeopleSoft®,

Advanced Error Handling and CatchError Processing

iWay Service Manager Tooling Techniques 93

10. Click Properties for the ConstructEmailBody Constant Service Object Properties pane, in the text box under Constant Output to Emit, review the _concat(_tstamp(),'ERROR: Object',SREG(NodeName),'Prior object:',SREG(tid),'',SREG(ErrMsg)).

This string concatenates the timestamp, several descriptive text strings, and three special registers that are either set in the calling process flow or a global variable and are available throughout the application execution.

11. The Properties tab for the ConstructBodyEmail Service object is displayed.

12. The ErrorNotification process flow is displayed.

Next you will drag an Email object onto the canvas from the library.

13. In the Library Manager expand PFLOW and the Email artifacts. 14. Drag and drop the SendErrEmail Email Service object onto the relation line between

the ConstructEmailBody Service and End objects.

ILO

Use

ON

LY D

o N

ot D

uplic

ate

or D

istri

bute

ILO

Use

ON

LY D

o N

ot D

uplic

ate

or D

istri

bute

Page 102: Customer Educationeducation.informationbuilders.com/...studentguide(word)wm-ilo-sec.pdf · Student Guide v7.04 DN7000508.0216 ... iSM iWay Integration Tools ... SAP®, Siebel®, PeopleSoft®,

Advanced Error Handling and CatchError Processing

iWay Service Manager Tooling Techniques 94

15. Review the following table for the Email object properties:

Property

Property Value

Outgoing Mail Host

_property(_sreg(iway.workdir)/resource/Errors.properties,'err.mailhost','notfound')

To _property(_sreg(iway.workdir)/resource/Errors.properties,'err.mailto','notfound')

Subject of Msg

_concat('Error For Flow: ',sreg(PFName),'at ',sreg(NodeName))

Sender Address

_property(_sreg(iway.workdir)/resource/Errors.properties,'err.sendto','notfound')

16. The ErrorNotification process flow is displayed.

ILO

Use

ON

LY D

o N

ot D

uplic

ate

or D

istri

bute

ILO

Use

ON

LY D

o N

ot D

uplic

ate

or D

istri

bute

Page 103: Customer Educationeducation.informationbuilders.com/...studentguide(word)wm-ilo-sec.pdf · Student Guide v7.04 DN7000508.0216 ... iSM iWay Integration Tools ... SAP®, Siebel®, PeopleSoft®,

Advanced Error Handling and CatchError Processing

iWay Service Manager Tooling Techniques 95

17. Save the ErrorNotification process flow. 18. Close the ErrorNotification Process Flow tab.

ILO

Use

ON

LY D

o N

ot D

uplic

ate

or D

istri

bute

ILO

Use

ON

LY D

o N

ot D

uplic

ate

or D

istri

bute

Page 104: Customer Educationeducation.informationbuilders.com/...studentguide(word)wm-ilo-sec.pdf · Student Guide v7.04 DN7000508.0216 ... iSM iWay Integration Tools ... SAP®, Siebel®, PeopleSoft®,

Advanced Error Handling and CatchError Processing

iWay Service Manager Tooling Techniques 96

Build the CatchErrors and Internal Queue Components

The CatchErrors object will catch any (OnError) errors that are coming out of the process flow. The line going to the first object of the standard part of the process will be an OnComplete. The line to capture all errors will be an OnError. Any variables or REGISTERS (like pre or post) must be defined as Header and Message so that they can be passed to the internal Queue object. All objects that

take part in the CatchErrors process must have an OnSuccess line. An OnError line is implied so any errors get directed to the CatchErrors path.

Add CatchError and ErrorInternalQ Components

All of the Relation events after the Start object are set to OnSuccess which is a pre-requisite for laying down the objects to capture errors in this process flow. You will add some post-execution variables to the SQLProductQuery so you can see values posted to the email.

1. Click the OrdersCSVtoXML_PF tab. 2. Click the SQLProductQuery SQL object. 3. Click the Properties tab in the middle of the workbench. 4. Click the Post-Execution subtab. 5. Click the green + symbol to add new variables. Add the following variables:

Name Type Value Usage Scope

NodeName string SQLProductQuery header message

ErrMsg string See Error file in Errors folder

header message

PFName string OrdersCSVtoXML_PF header message

6. Right-click anywhere under the Start object and click Create Object — Service.

ILO

Use

ON

LY D

o N

ot D

uplic

ate

or D

istri

bute

ILO

Use

ON

LY D

o N

ot D

uplic

ate

or D

istri

bute

Page 105: Customer Educationeducation.informationbuilders.com/...studentguide(word)wm-ilo-sec.pdf · Student Guide v7.04 DN7000508.0216 ... iSM iWay Integration Tools ... SAP®, Siebel®, PeopleSoft®,

Advanced Error Handling and CatchError Processing

iWay Service Manager Tooling Techniques 97

7. Type Catch_Error_Service for the Name. Optionally, type a meaningful description and click Next.

8. For the Service Object Type, scroll-down and expand Operations. Click Catch errors in flows and click Next.

ILO

Use

ON

LY D

o N

ot D

uplic

ate

or D

istri

bute

ILO

Use

ON

LY D

o N

ot D

uplic

ate

or D

istri

bute

Page 106: Customer Educationeducation.informationbuilders.com/...studentguide(word)wm-ilo-sec.pdf · Student Guide v7.04 DN7000508.0216 ... iSM iWay Integration Tools ... SAP®, Siebel®, PeopleSoft®,

Advanced Error Handling and CatchError Processing

iWay Service Manager Tooling Techniques 98

The Catch errors in flows service will catch all errors that occur as a result of any OnError event. The OnError event could be a specifically defined event or an implied OnError event from an OnSuccess event. The resulting error information is captured by the Catch errors service and passed to the Internal Queue for processing. The Internal Queue will execute the ErrorNotification process flow.

9. Use 1 for the Maximum Entries. Click Finish.

ILO

Use

ON

LY D

o N

ot D

uplic

ate

or D

istri

bute

ILO

Use

ON

LY D

o N

ot D

uplic

ate

or D

istri

bute

Page 107: Customer Educationeducation.informationbuilders.com/...studentguide(word)wm-ilo-sec.pdf · Student Guide v7.04 DN7000508.0216 ... iSM iWay Integration Tools ... SAP®, Siebel®, PeopleSoft®,

Advanced Error Handling and CatchError Processing

iWay Service Manager Tooling Techniques 99

The OrdersCSVtoXML_PF process flow displayed.

10. Click Properties and click Post-Execution. 11. Drag the OnCompletion event line that links the Start and the QA_After_Start objects

to the Catch Errors Service. Build a relation between the Catch Errors Service object and the QA_After_Start object with an OnCompletion event.

Next you will add the Error Internal Queue which will be used to kick off the ErrorNotification process flow.

12. Right-click next to the Catch Error Service object and click Create Object — Service. 13. Type Error Internal Service for the Name. Supply a meaningful description and click

Next.

ILO

Use

ON

LY D

o N

ot D

uplic

ate

or D

istri

bute

ILO

Use

ON

LY D

o N

ot D

uplic

ate

or D

istri

bute

Page 108: Customer Educationeducation.informationbuilders.com/...studentguide(word)wm-ilo-sec.pdf · Student Guide v7.04 DN7000508.0216 ... iSM iWay Integration Tools ... SAP®, Siebel®, PeopleSoft®,

Advanced Error Handling and CatchError Processing

iWay Service Manager Tooling Techniques 100

14. Begin typing Internal Emit Agent into the filter search box. Click Internal Emit Agent. Click Next.

ILO

Use

ON

LY D

o N

ot D

uplic

ate

or D

istri

bute

ILO

Use

ON

LY D

o N

ot D

uplic

ate

or D

istri

bute

Page 109: Customer Educationeducation.informationbuilders.com/...studentguide(word)wm-ilo-sec.pdf · Student Guide v7.04 DN7000508.0216 ... iSM iWay Integration Tools ... SAP®, Siebel®, PeopleSoft®,

Advanced Error Handling and CatchError Processing

iWay Service Manager Tooling Techniques 101

If you know the Service object, just type in the name into the filter search box and the service will be found if it exists.

15. For the Name of the Queue type ErrorQueue. Use the defaults for all of the other properties. Click Finish.

ILO

Use

ON

LY D

o N

ot D

uplic

ate

or D

istri

bute

ILO

Use

ON

LY D

o N

ot D

uplic

ate

or D

istri

bute

Page 110: Customer Educationeducation.informationbuilders.com/...studentguide(word)wm-ilo-sec.pdf · Student Guide v7.04 DN7000508.0216 ... iSM iWay Integration Tools ... SAP®, Siebel®, PeopleSoft®,

Advanced Error Handling and CatchError Processing

iWay Service Manager Tooling Techniques 102

The Queue Name must match the Queue Name in the Channel you build for the Internal Queue Listener.

16. Using a Relation object connect the Catch Error Service object and the Error Internal Queue object using an OnError event.

17. Drag an End object from the palette to the right of the Error Internal Queue service object. For the Name of the End object type EndErrorPath and click Next.

ILO

Use

ON

LY D

o N

ot D

uplic

ate

or D

istri

bute

ILO

Use

ON

LY D

o N

ot D

uplic

ate

or D

istri

bute

Page 111: Customer Educationeducation.informationbuilders.com/...studentguide(word)wm-ilo-sec.pdf · Student Guide v7.04 DN7000508.0216 ... iSM iWay Integration Tools ... SAP®, Siebel®, PeopleSoft®,

Advanced Error Handling and CatchError Processing

iWay Service Manager Tooling Techniques 103

18. Click the Terminate check box to denote the end completion point of the flow and click Finish.

19. Use a Relation object and connect the Error Internal Service to the EndErrorPath object using an OnSuccess event.

ILO

Use

ON

LY D

o N

ot D

uplic

ate

or D

istri

bute

ILO

Use

ON

LY D

o N

ot D

uplic

ate

or D

istri

bute

Page 112: Customer Educationeducation.informationbuilders.com/...studentguide(word)wm-ilo-sec.pdf · Student Guide v7.04 DN7000508.0216 ... iSM iWay Integration Tools ... SAP®, Siebel®, PeopleSoft®,

Advanced Error Handling and CatchError Processing

iWay Service Manager Tooling Techniques 104

20. Save the OrdersCSVtoXML_PF process flow.

ILO

Use

ON

LY D

o N

ot D

uplic

ate

or D

istri

bute

ILO

Use

ON

LY D

o N

ot D

uplic

ate

or D

istri

bute

Page 113: Customer Educationeducation.informationbuilders.com/...studentguide(word)wm-ilo-sec.pdf · Student Guide v7.04 DN7000508.0216 ... iSM iWay Integration Tools ... SAP®, Siebel®, PeopleSoft®,

Advanced Error Handling and CatchError Processing

iWay Service Manager Tooling Techniques 105

Use Channel Builder to Create the Internal Listener Channel

You must build an always running channel to be used by any application that can process errors in a standard way. Any application such as yours can pass errors to an Internal Queue when they occur once the channel containing an Internal Listener receives messages via the Queue name, in our case ErrorQueue. Any route associated with the channel is

executed. The ErrorNotification process flow is executed, sending any error messages to the list on the email. Let's create the channel containing the Internal Listener to process errors. You are going to use the iSM Channel Builder to create the channel.

CatchErrors_C Internal Queue Channel

You will use the Channel Builder to create the Internal Queue channel which will be populated with the ErrorNotification process flow as a Route.

1. Click the Integration Explorer tab. 2. For the Orders project, right-click the Channels folder and click New — Channel.

3. Type CatchErrors_C for the Name of the channel. Supply a meaningful description. Click Next.

ILO

Use

ON

LY D

o N

ot D

uplic

ate

or D

istri

bute

ILO

Use

ON

LY D

o N

ot D

uplic

ate

or D

istri

bute

Page 114: Customer Educationeducation.informationbuilders.com/...studentguide(word)wm-ilo-sec.pdf · Student Guide v7.04 DN7000508.0216 ... iSM iWay Integration Tools ... SAP®, Siebel®, PeopleSoft®,

Advanced Error Handling and CatchError Processing

iWay Service Manager Tooling Techniques 106

4. To add an Inbound protocol, click the green + button to the upper right.

5. Scroll-down and click Internal Queue. Click Finish.

ILO

Use

ON

LY D

o N

ot D

uplic

ate

or D

istri

bute

ILO

Use

ON

LY D

o N

ot D

uplic

ate

or D

istri

bute

Page 115: Customer Educationeducation.informationbuilders.com/...studentguide(word)wm-ilo-sec.pdf · Student Guide v7.04 DN7000508.0216 ... iSM iWay Integration Tools ... SAP®, Siebel®, PeopleSoft®,

Advanced Error Handling and CatchError Processing

iWay Service Manager Tooling Techniques 107

6. For the Inbound listener, type CatchErrors_IQ into the Name column to rename listener.1.

7. Click the Have an inlet created for each inbound protocol check box. 8. Click the Have an outlet created for each outbound protocol check box and click

Finish.

ILO

Use

ON

LY D

o N

ot D

uplic

ate

or D

istri

bute

ILO

Use

ON

LY D

o N

ot D

uplic

ate

or D

istri

bute

Page 116: Customer Educationeducation.informationbuilders.com/...studentguide(word)wm-ilo-sec.pdf · Student Guide v7.04 DN7000508.0216 ... iSM iWay Integration Tools ... SAP®, Siebel®, PeopleSoft®,

Advanced Error Handling and CatchError Processing

iWay Service Manager Tooling Techniques 108

The inbound protocol of Internal Queue is used to pass messages from the flow to the ErrorNotification process flow you will assign to the route of the channel. The CatchErrors_C channel displayed. Next you need to configure the channel.

ILO

Use

ON

LY D

o N

ot D

uplic

ate

or D

istri

bute

ILO

Use

ON

LY D

o N

ot D

uplic

ate

or D

istri

bute

Page 117: Customer Educationeducation.informationbuilders.com/...studentguide(word)wm-ilo-sec.pdf · Student Guide v7.04 DN7000508.0216 ... iSM iWay Integration Tools ... SAP®, Siebel®, PeopleSoft®,

Advanced Error Handling and CatchError Processing

iWay Service Manager Tooling Techniques 109

Configure the CatchErrors_C Internal Queue

Next you can configure the Internal Queue listener.

1. Click the Inlet:1 inlet and rename it to CatchErrors_I.

2. Click the CatchError_IQ listener. On the Property pane to the right, expand Main. 3. For the Name of the Internal Queue, type ErrorQueue.

Remember this is the same name you used when you configured the Errors Internal Service object in the OrdersCSVtoXML_PF process flow.

4. Click the route:1 and rename it to CatchErrors_R. 5. Click process:process.1. 6. On the Process pane to the right, click the Select process icon.

ILO

Use

ON

LY D

o N

ot D

uplic

ate

or D

istri

bute

ILO

Use

ON

LY D

o N

ot D

uplic

ate

or D

istri

bute

Page 118: Customer Educationeducation.informationbuilders.com/...studentguide(word)wm-ilo-sec.pdf · Student Guide v7.04 DN7000508.0216 ... iSM iWay Integration Tools ... SAP®, Siebel®, PeopleSoft®,

Advanced Error Handling and CatchError Processing

iWay Service Manager Tooling Techniques 110

7. Expand Orders and Flows. Click ErrorNotification and click OK.

8. Click Outlet: outlet.1. 9. Rename outlet.1 to CatchErrors_O. 10. Save the CatchErrors_C channel. IL

O U

se O

NLY

Do

Not

Dup

licat

e or

Dis

tribu

te

ILO

Use

ON

LY D

o N

ot D

uplic

ate

or D

istri

bute

Page 119: Customer Educationeducation.informationbuilders.com/...studentguide(word)wm-ilo-sec.pdf · Student Guide v7.04 DN7000508.0216 ... iSM iWay Integration Tools ... SAP®, Siebel®, PeopleSoft®,

Advanced Error Handling and CatchError Processing

iWay Service Manager Tooling Techniques 111

Redeploy the Application

Whenever a component of an application changes the application must be rebuilt and redeployed before those changes can be seen. You need to rebuild the OrdersCSVtoXML_iia application to have the new Internal Queue channel and the error routines compiled into the application.

OrdersCSVtoXML Application

Update the OrdersCSVtoXML application with the CatchError_C channel.

1. Right-click the OrdersCSVtoXML application under the Applications folder, and point to Open With, and click Application Editor.

You need to add the Internal Queue to the application.

2. To the far right, click the green + sign button to add a component.

3. On the Resource Selection pane, expand Channels and click CatchErrors_C. 4. Click OK.

ILO

Use

ON

LY D

o N

ot D

uplic

ate

or D

istri

bute

ILO

Use

ON

LY D

o N

ot D

uplic

ate

or D

istri

bute

Page 120: Customer Educationeducation.informationbuilders.com/...studentguide(word)wm-ilo-sec.pdf · Student Guide v7.04 DN7000508.0216 ... iSM iWay Integration Tools ... SAP®, Siebel®, PeopleSoft®,

Advanced Error Handling and CatchError Processing

iWay Service Manager Tooling Techniques 112

The OrdersCSVtoXML_iia application displayed.

5. On the toolbar click the Save button to save the OrdersCSVtoXML application.

Next, you will rebuild the application and deploy it to the iWay Server. Make sure you stop and remove the application before continuing.

6. In the Integrated Explorer under Applications for the OrdersCSVtoXML component, right-click build.xml, point to Run As, and click 2 Ant Build.... .

ILO

Use

ON

LY D

o N

ot D

uplic

ate

or D

istri

bute

ILO

Use

ON

LY D

o N

ot D

uplic

ate

or D

istri

bute

Page 121: Customer Educationeducation.informationbuilders.com/...studentguide(word)wm-ilo-sec.pdf · Student Guide v7.04 DN7000508.0216 ... iSM iWay Integration Tools ... SAP®, Siebel®, PeopleSoft®,

Advanced Error Handling and CatchError Processing

iWay Service Manager Tooling Techniques 113

7. Click Run.

ILO

Use

ON

LY D

o N

ot D

uplic

ate

or D

istri

bute

ILO

Use

ON

LY D

o N

ot D

uplic

ate

or D

istri

bute

Page 122: Customer Educationeducation.informationbuilders.com/...studentguide(word)wm-ilo-sec.pdf · Student Guide v7.04 DN7000508.0216 ... iSM iWay Integration Tools ... SAP®, Siebel®, PeopleSoft®,

Advanced Error Handling and CatchError Processing

iWay Service Manager Tooling Techniques 114

Notice that the deploy and start check boxes are checked as well.

8. Open the iWay Server Web Console. 9. Click the Management link. 10. Notice the OrdersCSVtoXML_Dev application has been started.

You can simulate an error by shutting down the SQL Server database to make it unavailable to the application.

11. On the desktop click Start — Administrative Tools — Services.

12. Scroll-down until you find SQL Server (MSSQLSERVER). 13. Right-click SQL Server (MSSQLSERVER) and click Stop.

14. Using a Windows Explorer, browse to D:\Course9xx\Orders\data. 15. To the right pane file listings, right-click PO_Item_3.csv and click Copy.

ILO

Use

ON

LY D

o N

ot D

uplic

ate

or D

istri

bute

ILO

Use

ON

LY D

o N

ot D

uplic

ate

or D

istri

bute

Page 123: Customer Educationeducation.informationbuilders.com/...studentguide(word)wm-ilo-sec.pdf · Student Guide v7.04 DN7000508.0216 ... iSM iWay Integration Tools ... SAP®, Siebel®, PeopleSoft®,

Advanced Error Handling and CatchError Processing

iWay Service Manager Tooling Techniques 115

16. Navigate to D:\Course9xx\Orders\input where the OrdersCSVtoXML_iia application is listening on.

17. Right-click in the right pane and click Paste.

Since you shutdown the SQL-Server database, you should see a CatchError file written to the error folder.

18. Next navigate to the error folder D:\Course9xx\Orders\error.

ILO

Use

ON

LY D

o N

ot D

uplic

ate

or D

istri

bute

ILO

Use

ON

LY D

o N

ot D

uplic

ate

or D

istri

bute

Page 124: Customer Educationeducation.informationbuilders.com/...studentguide(word)wm-ilo-sec.pdf · Student Guide v7.04 DN7000508.0216 ... iSM iWay Integration Tools ... SAP®, Siebel®, PeopleSoft®,

Advanced Error Handling and CatchError Processing

iWay Service Manager Tooling Techniques 116

Notice two files. The failed_ file comes from the Emitter in the Outlet of the OrdersCSVtoXML_C channel. The catcherror_ file comes from the Internal Queue CatchError_C channel.

19. Double-click the errstart_ file to review its contents.

Notice that the error message indicates thqt a connection could not be made to the SQL-Server running on port 1433 localhost.

Next, let's see if an email was sent to Chuck Dickens regarding this error.

20. On the desktop double-click the Utilities folder.

21. Double-click on Microsoft Live Mail.

ILO

Use

ON

LY D

o N

ot D

uplic

ate

or D

istri

bute

ILO

Use

ON

LY D

o N

ot D

uplic

ate

or D

istri

bute

Page 125: Customer Educationeducation.informationbuilders.com/...studentguide(word)wm-ilo-sec.pdf · Student Guide v7.04 DN7000508.0216 ... iSM iWay Integration Tools ... SAP®, Siebel®, PeopleSoft®,

Advanced Error Handling and CatchError Processing

iWay Service Manager Tooling Techniques 117

Microsoft Live Mail opens to the Chuck Dickens account. You should see one new unopened mail item.

22. Double-click the unopened mail item to see its contents.

The contents of the email (Subject and Body):

23. Close Microsoft Live Mail. 24. Restart the SQL Server database on localhost.

ILO

Use

ON

LY D

o N

ot D

uplic

ate

or D

istri

bute

ILO

Use

ON

LY D

o N

ot D

uplic

ate

or D

istri

bute

Page 126: Customer Educationeducation.informationbuilders.com/...studentguide(word)wm-ilo-sec.pdf · Student Guide v7.04 DN7000508.0216 ... iSM iWay Integration Tools ... SAP®, Siebel®, PeopleSoft®,

Advanced Error Handling and CatchError Processing

iWay Service Manager Tooling Techniques 118

Next you will take a look at how to use the Process Flow Debugger.

ILO

Use

ON

LY D

o N

ot D

uplic

ate

or D

istri

bute

ILO

Use

ON

LY D

o N

ot D

uplic

ate

or D

istri

bute

Page 127: Customer Educationeducation.informationbuilders.com/...studentguide(word)wm-ilo-sec.pdf · Student Guide v7.04 DN7000508.0216 ... iSM iWay Integration Tools ... SAP®, Siebel®, PeopleSoft®,

Advanced Error Handling and CatchError Processing

iWay Service Manager Tooling Techniques 119

Introduction to the Process Flow Debugger

The Flow Debugger is a command line debugger for process flows deployed within a configuration. It runs in the iWay Service Manager console or in a telnet console. The user enters text commands and the debugger prints a text output. The debugger allows for setting breakpoints and watchpoints, single-stepping

nodes, debugging subflows, setting registers, changing the current document, among other functions. The debugger can be attached to a running application to debug in-situ if required. When running the debugger, performance is slowed and memory usage is increased.

Operating Modes

The debugger works in two modes, standalone unit testing mode, or server configuration testing mode.

• Unit Testing Mode: In this mode, the debugger starts the flow. The input document comes from the debugger and the output document is trapped by the debugger. This mode is ideal if the flow can be tested without the channel protocol.

• Configuration Testing Mode: In this mode, the server channels start the flows and provide the initial documents. The output documents are handled normally by the channel outlets. This mode makes it possible to debug an entire application (iIA).

Nodes and Edges The flow consists of nodes connected by edges. Nodes are the units of execution in a flow. The node name is specified in iIT. An edge coming into a node is called an inedge. An edge coming out of a node is called an outedge, as shown in the following example.

The same edge is both an outedge and an inedge for different nodes, as shown in the following example.

ILO

Use

ON

LY D

o N

ot D

uplic

ate

or D

istri

bute

ILO

Use

ON

LY D

o N

ot D

uplic

ate

or D

istri

bute

Page 128: Customer Educationeducation.informationbuilders.com/...studentguide(word)wm-ilo-sec.pdf · Student Guide v7.04 DN7000508.0216 ... iSM iWay Integration Tools ... SAP®, Siebel®, PeopleSoft®,

Advanced Error Handling and CatchError Processing

iWay Service Manager Tooling Techniques 120

Source The source name tells the debugger where to find the source code of the process flow. For a system flow, it is just the name of the flow. For flows deployed under a channel, the format is channelname:[flowname]. A colon is sometimes valid in a channelname but never in a flowname.The debugger looks for the last colon to match the syntax. If the flowname is missing, the debugger selects the flow from the default route and adds the flowname after the channelname. In the output, the flowname is always explicit. The debugger reads the compiled version of the flow. Small differences in the shape of the flow may be visibly compared to iIT. This is due to the flow compilation.

Threads A thread is a line of execution in a specific process flow. A thread may create other threads when execution splits into multiple edges, or when a subflow is called. All threads execute simultaneously, although some threads may be paused at a breakpoint. The debugger is multi-threaded. It can control multiple threads within a flow and multiple independent flows simultaneously. While a thread runs, the debugger remains responsive to commands since it runs asynchronously with the flow. A thread terminates normally when it reaches an end node, or abnormally when it cannot handle an error condition. A process flow terminates when all its threads terminate. Therefore, before the original thread in the flow terminates, it must wait for all its child threads to terminate. The original thread is said to be in the waiting state when it has finished execution, but some child thread is still running. The following table lists all the thread states:

State Description running Continuous execution.

waiting Flow ended, waiting for child flows to end.

stepping Executing a single node, skipping over subflows

stepping_into Executing a single node,entering into subflows.

stepping_nearest Executing half a node, processing stage only, or dispatch stage only.

pausing Suspended waiting for debugger command.

ILO

Use

ON

LY D

o N

ot D

uplic

ate

or D

istri

bute

ILO

Use

ON

LY D

o N

ot D

uplic

ate

or D

istri

bute

Page 129: Customer Educationeducation.informationbuilders.com/...studentguide(word)wm-ilo-sec.pdf · Student Guide v7.04 DN7000508.0216 ... iSM iWay Integration Tools ... SAP®, Siebel®, PeopleSoft®,

Advanced Error Handling and CatchError Processing

iWay Service Manager Tooling Techniques 121

State Description

ending Stopping execution per user's request.

Breakpoints and Watchpoints A breakpoint is an instruction to stop the execution of the flow at a specific location under some conditions. A watchpoint is an instruction to stop the execution of the flow at any location when an event that satisfies some condition is detected.

Within a Node, the execution is divided into two stages:

• The node is processed. This returns a document and a list of edges. • The document is dispatched on the matching wired outedges. One outedge

continues execution on the same thread. If multiple edges match, each remaining outedge forks a new thread.

When none of the returned edges can be followed, dispatch will create a synthetic edge and attempt to match it. For example, it may attempt to match OnDefault, OnCompletion or OnFailure. If that still does not match, it will attempt OnError. If OnError is not followed and the error is not caught, the flow terminates abnormally.

The debugger supports two kinds of breakpoints depending on the stage where it stops within the node execution.

• An inedge breakpoint: Stops before the processing stage and therefore before the node executes. This is similar to a Java debugger that stops on a line before that line executes.

• An outedge breakpoint: Stops after the node processing but before the dispatch stage. There is no equivalent in a Java debugger.

ILO

Use

ON

LY D

o N

ot D

uplic

ate

or D

istri

bute

ILO

Use

ON

LY D

o N

ot D

uplic

ate

or D

istri

bute

Page 130: Customer Educationeducation.informationbuilders.com/...studentguide(word)wm-ilo-sec.pdf · Student Guide v7.04 DN7000508.0216 ... iSM iWay Integration Tools ... SAP®, Siebel®, PeopleSoft®,

Advanced Error Handling and CatchError Processing

iWay Service Manager Tooling Techniques 122

A watchpoint behaves like an outedge breakpoint because it also stops before the dispatch stage. Logically, this identifies the node that satisfied the condition. This is more convenient than stopping at the start of the next node because there could be many nodes due to multiple outedges matching. The following image depicts the inedge and outedge stages of the debugger:

For a service node, an inedge breakpoint occurs before the assignment of the pre-registers. Conversely, an outedge breakpoint occurs after the assignment of the post-registers.

While paused on an inedge breakpoint, commands are available to inspect and modify: the inedge, the registers and the input document. While paused on an outedge breakpoint, possibly due to a watchpoint, commands are available to inspect and modify: the returned list of edges, the registers, and the output document. The debugger assigns a unique breakpoint ID to each breakpoint. The format is bNNNN where NNNN is a monotonically increasing number. Watchpoints are also assigned a unique watchpoint ID with the format wNNNN.

Current Location The debugger keeps track of the current source, the current node, and the current thread. The current node is always within the current source, but the current source and the current thread may be unrelated. For example, it is possible to set the current source to a subflow,

ILO

Use

ON

LY D

o N

ot D

uplic

ate

or D

istri

bute

ILO

Use

ON

LY D

o N

ot D

uplic

ate

or D

istri

bute

Page 131: Customer Educationeducation.informationbuilders.com/...studentguide(word)wm-ilo-sec.pdf · Student Guide v7.04 DN7000508.0216 ... iSM iWay Integration Tools ... SAP®, Siebel®, PeopleSoft®,

Advanced Error Handling and CatchError Processing

iWay Service Manager Tooling Techniques 123

before calling it from the current thread. The user can set the current location explicitly. The debugger also maintains the location intuitively.

Special Registers and Scope A special register holds a value. It is the equivalent of a variable for the flow. A register is defined in a scope. Scopes form a hierarchy from the most specific (at the thread level) to the most general (at the server level). A register is inherited from a higher scope unless it is redeclared at an inner scope. The inner scope register shadows the outer scope register, but both continue to exist. It is possible to access the outer scope register by specifying the correct scope. This is useful to share a value between threads, or to return a value to a higher scope before the current scope ends.

Scope Aliases Description

local thread Most local scope for the current thread line.

flow Registers available throughout the flow.

message global,system, worker

Registers available following completion of the flow.

channel master Registers available to all workers in the channel.

session Registers saved in the session. For example: cookies.

server manager Registers available to all channels in the configuration.

Process Flow Debugging Operations

In this scenario you will learn how to walk a process flow through the Process Flow Tool Debugger. This exercise demonstrates basic operation in unit testing mode, illustrating breakpoints, single stepping, setting the input document, and modifying registers.

ILO

Use

ON

LY D

o N

ot D

uplic

ate

or D

istri

bute

ILO

Use

ON

LY D

o N

ot D

uplic

ate

or D

istri

bute

Page 132: Customer Educationeducation.informationbuilders.com/...studentguide(word)wm-ilo-sec.pdf · Student Guide v7.04 DN7000508.0216 ... iSM iWay Integration Tools ... SAP®, Siebel®, PeopleSoft®,

Advanced Error Handling and CatchError Processing

iWay Service Manager Tooling Techniques 124

Basic Operations in Debugger

In this exercise you will be using the Flow Debugger to step through a flow which has been created for you and placed into a route running in a started channel. You will test the flow using out server and in server modes.

1. Open the Start — menu and click Run. Click OK for the cmd to get a Windows DOS session.

2. At the DOS prompt, type telnet localhost 1234 and press enter.

3. For login: type iway and press enter. 4. For iway's Password type iway and press enter.

5. Start the debugger by typing tool debugger into the Enter command line prompt.

ILO

Use

ON

LY D

o N

ot D

uplic

ate

or D

istri

bute

ILO

Use

ON

LY D

o N

ot D

uplic

ate

or D

istri

bute

Page 133: Customer Educationeducation.informationbuilders.com/...studentguide(word)wm-ilo-sec.pdf · Student Guide v7.04 DN7000508.0216 ... iSM iWay Integration Tools ... SAP®, Siebel®, PeopleSoft®,

Advanced Error Handling and CatchError Processing

iWay Service Manager Tooling Techniques 125

The Tool Debugger is displayed. The debugger starts and responds with the debug> prompt, with the following default message:

Displayed is the process flow which will be referenced in this exercise.

ILO

Use

ON

LY D

o N

ot D

uplic

ate

or D

istri

bute

ILO

Use

ON

LY D

o N

ot D

uplic

ate

or D

istri

bute

Page 134: Customer Educationeducation.informationbuilders.com/...studentguide(word)wm-ilo-sec.pdf · Student Guide v7.04 DN7000508.0216 ... iSM iWay Integration Tools ... SAP®, Siebel®, PeopleSoft®,

Advanced Error Handling and CatchError Processing

iWay Service Manager Tooling Techniques 126

Next you need to set the source of the process flow you want to debug.

If the Orders_Debug_C Channel is not running you may need to deploy it using the iWay Web Console.

6. After the debug> command prompt type set source Orders_Debug_C:Orders_Debug_PF and press the Enter key.

The set source command allows you to change the source and location of the process flow to be debugged. The Orders_Debug_C is the running channel for the in route process flow Orders_Debug_PF.

7. Hint: you can change the background and text colors of the iSM DOS window. Click the iWay symbol at the top left corner and a drop-down pane displays. Click Properties.

ILO

Use

ON

LY D

o N

ot D

uplic

ate

or D

istri

bute

ILO

Use

ON

LY D

o N

ot D

uplic

ate

or D

istri

bute

Page 135: Customer Educationeducation.informationbuilders.com/...studentguide(word)wm-ilo-sec.pdf · Student Guide v7.04 DN7000508.0216 ... iSM iWay Integration Tools ... SAP®, Siebel®, PeopleSoft®,

Advanced Error Handling and CatchError Processing

iWay Service Manager Tooling Techniques 127

8. Click the Colors tab. Change the Screen Text to black and the Screen Background to White. Click OK.

ILO

Use

ON

LY D

o N

ot D

uplic

ate

or D

istri

bute

ILO

Use

ON

LY D

o N

ot D

uplic

ate

or D

istri

bute

Page 136: Customer Educationeducation.informationbuilders.com/...studentguide(word)wm-ilo-sec.pdf · Student Guide v7.04 DN7000508.0216 ... iSM iWay Integration Tools ... SAP®, Siebel®, PeopleSoft®,

Advanced Error Handling and CatchError Processing

iWay Service Manager Tooling Techniques 128

Changing the colors of the Screen Text and Background just makes looking at the debug print easier.

9. After the debug> command prompt type list to review the Node list and their relationships in the process flow.

The output has one line per node, beginning with the Start node. The outgoing edges are listed underneath, indented one level to the right. The format is edgename -> nodename. For example, the second line says there is an OnCompletion edge from the Start node to the PO_Item3D_T node. In the subsequent lines, the Is Default? node has two out edges, true and false, because they appear at the same indentation level. You can use the list command to find out the exact names of the nodes. Before you begin testing the process flow through the debugger, you need to set a breakpoint.

10. After the debug> command prompt type breakpoint 'Is Default?' node and press the Enter key.

ILO

Use

ON

LY D

o N

ot D

uplic

ate

or D

istri

bute

ILO

Use

ON

LY D

o N

ot D

uplic

ate

or D

istri

bute

Page 137: Customer Educationeducation.informationbuilders.com/...studentguide(word)wm-ilo-sec.pdf · Student Guide v7.04 DN7000508.0216 ... iSM iWay Integration Tools ... SAP®, Siebel®, PeopleSoft®,

Advanced Error Handling and CatchError Processing

iWay Service Manager Tooling Techniques 129

The name must be in quotes because it contains a space and a special character.

You can see the breakpoint has been created.

Next you can run the process flow with a document.

11. After the debug> command prompt type run and press the Enter key.

The execution stops at the breakpoint 'Is Default?'.

12. To inspect the values of the special registers, type show registers after the debug> command prompt and press the Enter key. IL

O U

se O

NLY

Do

Not

Dup

licat

e or

Dis

tribu

te

ILO

Use

ON

LY D

o N

ot D

uplic

ate

or D

istri

bute

Page 138: Customer Educationeducation.informationbuilders.com/...studentguide(word)wm-ilo-sec.pdf · Student Guide v7.04 DN7000508.0216 ... iSM iWay Integration Tools ... SAP®, Siebel®, PeopleSoft®,

Advanced Error Handling and CatchError Processing

iWay Service Manager Tooling Techniques 130

You can step through the process flow one node at a time using the step command.

13. Into the debug> command prompt type step and press the Enter key.

ILO

Use

ON

LY D

o N

ot D

uplic

ate

or D

istri

bute

ILO

Use

ON

LY D

o N

ot D

uplic

ate

or D

istri

bute

Page 139: Customer Educationeducation.informationbuilders.com/...studentguide(word)wm-ilo-sec.pdf · Student Guide v7.04 DN7000508.0216 ... iSM iWay Integration Tools ... SAP®, Siebel®, PeopleSoft®,

Advanced Error Handling and CatchError Processing

iWay Service Manager Tooling Techniques 131

The default register contains the value Y, therefore the execution steps to the 'It Is Default' node.

14. After the debug> command prompt type resume and press the Enter key to continue execution to the End node and terminates.

ILO

Use

ON

LY D

o N

ot D

uplic

ate

or D

istri

bute

ILO

Use

ON

LY D

o N

ot D

uplic

ate

or D

istri

bute

Page 140: Customer Educationeducation.informationbuilders.com/...studentguide(word)wm-ilo-sec.pdf · Student Guide v7.04 DN7000508.0216 ... iSM iWay Integration Tools ... SAP®, Siebel®, PeopleSoft®,

Advanced Error Handling and CatchError Processing

iWay Service Manager Tooling Techniques 132

15. After the debug> command prompt type show document and press the Enter key.

Show the output document. For this flow, it is the same as the input document.

ILO

Use

ON

LY D

o N

ot D

uplic

ate

or D

istri

bute

ILO

Use

ON

LY D

o N

ot D

uplic

ate

or D

istri

bute

Page 141: Customer Educationeducation.informationbuilders.com/...studentguide(word)wm-ilo-sec.pdf · Student Guide v7.04 DN7000508.0216 ... iSM iWay Integration Tools ... SAP®, Siebel®, PeopleSoft®,

Advanced Error Handling and CatchError Processing

iWay Service Manager Tooling Techniques 133

Let's run the flow again changing the register value to change the path of the flow.

16. After the debug> command prompt type run and press the Enter key.

Notice this run is set to Thread t3 and the breakpoint is still set to 'Is Default?' Let's change the register value to N.

17. After the debug> command prompt type set register default N and press the Enter key.

Next you can step through the flow to see what path is taken.

18. After the debug> command prompt type step and press the Enter key.

ILO

Use

ON

LY D

o N

ot D

uplic

ate

or D

istri

bute

ILO

Use

ON

LY D

o N

ot D

uplic

ate

or D

istri

bute

Page 142: Customer Educationeducation.informationbuilders.com/...studentguide(word)wm-ilo-sec.pdf · Student Guide v7.04 DN7000508.0216 ... iSM iWay Integration Tools ... SAP®, Siebel®, PeopleSoft®,

Advanced Error Handling and CatchError Processing

iWay Service Manager Tooling Techniques 134

Notice the inedge path is set to 'Is Not Default'. Since you changed the value of the register default to N the path to the right is taken.

19. After the debug> command prompt type resume and press the Enter key to the End node and terminate the flow.

Now let's delete the breakpoint, add two more breakpoints and run the flow with a different register value.

20. Delete the breakpoint. Into the debug> command prompt type delete b1 and press the Enter key.

ILO

Use

ON

LY D

o N

ot D

uplic

ate

or D

istri

bute

ILO

Use

ON

LY D

o N

ot D

uplic

ate

or D

istri

bute

Page 143: Customer Educationeducation.informationbuilders.com/...studentguide(word)wm-ilo-sec.pdf · Student Guide v7.04 DN7000508.0216 ... iSM iWay Integration Tools ... SAP®, Siebel®, PeopleSoft®,

Advanced Error Handling and CatchError Processing

iWay Service Manager Tooling Techniques 135

Next, set the breakpoints at the 'It Is Default' and 'Is Not Default' nodes.

21. After the debug> command prompt type breakpoint 'It Is Default' and press the Enter key.

22. After the debug> command prompt type breakpoint 'Is Not Default' and press the Enter key. IL

O U

se O

NLY

Do

Not

Dup

licat

e or

Dis

tribu

te

ILO

Use

ON

LY D

o N

ot D

uplic

ate

or D

istri

bute

Page 144: Customer Educationeducation.informationbuilders.com/...studentguide(word)wm-ilo-sec.pdf · Student Guide v7.04 DN7000508.0216 ... iSM iWay Integration Tools ... SAP®, Siebel®, PeopleSoft®,

Advanced Error Handling and CatchError Processing

iWay Service Manager Tooling Techniques 136

Show the breakpoints.

23. After the debug> command prompt type show breakpoints and press the Enter key.

Run the flow.

24. After the debug> command prompt type run -xml <default>Y</default> and press the Enter key.

ILO

Use

ON

LY D

o N

ot D

uplic

ate

or D

istri

bute

ILO

Use

ON

LY D

o N

ot D

uplic

ate

or D

istri

bute

Page 145: Customer Educationeducation.informationbuilders.com/...studentguide(word)wm-ilo-sec.pdf · Student Guide v7.04 DN7000508.0216 ... iSM iWay Integration Tools ... SAP®, Siebel®, PeopleSoft®,

Advanced Error Handling and CatchError Processing

iWay Service Manager Tooling Techniques 137

25. After the debug> command prompt type resume and press the Enter key to finish the flow.

Add an outedge breakpoint on the 'Is Default?' node.

26. After the debug> command prompt type breakpoint 'Is Default?' -outedge and press the Enter key.

Rerun the process flow.

27. After the debug> command prompt type rerun and press the Enter key.

ILO

Use

ON

LY D

o N

ot D

uplic

ate

or D

istri

bute

ILO

Use

ON

LY D

o N

ot D

uplic

ate

or D

istri

bute

Page 146: Customer Educationeducation.informationbuilders.com/...studentguide(word)wm-ilo-sec.pdf · Student Guide v7.04 DN7000508.0216 ... iSM iWay Integration Tools ... SAP®, Siebel®, PeopleSoft®,

Advanced Error Handling and CatchError Processing

iWay Service Manager Tooling Techniques 138

Show the edges.

28. After the debug> command prompt type show edges and press the Enter key.

The edge is true because the register value for default is T. Next you can change the edge to false and step to the next node.

29. After the debug> command prompt type set edges false and press the Enter key. 30. After the debug> command prompt type step and press the Enter key.

By setting the edges to false you changed the direction of flows path without changing the register value.

31. To terminate the debugger into the debug> command prompt type end and press the Enter key.

Configuration Testing Mode.

1. After the Enter Command> command prompt type tool debugger -server

ILO

Use

ON

LY D

o N

ot D

uplic

ate

or D

istri

bute

ILO

Use

ON

LY D

o N

ot D

uplic

ate

or D

istri

bute

Page 147: Customer Educationeducation.informationbuilders.com/...studentguide(word)wm-ilo-sec.pdf · Student Guide v7.04 DN7000508.0216 ... iSM iWay Integration Tools ... SAP®, Siebel®, PeopleSoft®,

Advanced Error Handling and CatchError Processing

iWay Service Manager Tooling Techniques 139

The process flows already being executed in the server are inaccessible, but every new instance of a process flow will be available to the debugger. Show what resources are available to the server.

2. After the debug> command prompt type shell info and press the Enter key.

You can set the source to the channel where the process flow is running.

3. After the debug> command prompt type set source Orders_Debug_C: and press the Enter key.

ILO

Use

ON

LY D

o N

ot D

uplic

ate

or D

istri

bute

ILO

Use

ON

LY D

o N

ot D

uplic

ate

or D

istri

bute

Page 148: Customer Educationeducation.informationbuilders.com/...studentguide(word)wm-ilo-sec.pdf · Student Guide v7.04 DN7000508.0216 ... iSM iWay Integration Tools ... SAP®, Siebel®, PeopleSoft®,

Advanced Error Handling and CatchError Processing

iWay Service Manager Tooling Techniques 140

Since you will be running a document through the channel you can set a watchpoint for the register you want to review.

4. After the debug> command prompt type watchpoint default and press the Enter key.

5. Using a Windows browser, navigate to D:\Course9xx\Orders_Debug\Data and Copy PO_Item3D.xml to D:\Course9xx\Orders_Debug\Input.

6. After the debug> command prompt type show register and press the Enter key.

ILO

Use

ON

LY D

o N

ot D

uplic

ate

or D

istri

bute

ILO

Use

ON

LY D

o N

ot D

uplic

ate

or D

istri

bute

Page 149: Customer Educationeducation.informationbuilders.com/...studentguide(word)wm-ilo-sec.pdf · Student Guide v7.04 DN7000508.0216 ... iSM iWay Integration Tools ... SAP®, Siebel®, PeopleSoft®,

Advanced Error Handling and CatchError Processing

iWay Service Manager Tooling Techniques 141

The channel picks up the file and runs the flow. The Set Register 1 node assigns the name of the root element to the default register.

7. After the debug> command prompt type resume and press the Enter key to complete the flow.

8. After the debug> command prompt type end and press the Enter key. 9. Type quit to exit the telnet session.

ILO

Use

ON

LY D

o N

ot D

uplic

ate

or D

istri

bute

ILO

Use

ON

LY D

o N

ot D

uplic

ate

or D

istri

bute

Page 150: Customer Educationeducation.informationbuilders.com/...studentguide(word)wm-ilo-sec.pdf · Student Guide v7.04 DN7000508.0216 ... iSM iWay Integration Tools ... SAP®, Siebel®, PeopleSoft®,

Advanced Error Handling and CatchError Processing

iWay Service Manager Tooling Techniques 142

Lesson Review

Error Processing Preparation Build the Error Notification Process Flow Build the CatchErr and Internal Queue Components Use Channel Builder to Create the Internal Listener Channel Redeploy the Application

ILO

Use

ON

LY D

o N

ot D

uplic

ate

or D

istri

bute

ILO

Use

ON

LY D

o N

ot D

uplic

ate

or D

istri

bute

Page 151: Customer Educationeducation.informationbuilders.com/...studentguide(word)wm-ilo-sec.pdf · Student Guide v7.04 DN7000508.0216 ... iSM iWay Integration Tools ... SAP®, Siebel®, PeopleSoft®,

Advanced iIA and Ant Scripting

iWay Service Manager Tooling Techniques 143

Lesson 4

Advanced iIA and Ant Scripting

Objectives

• Introduction to iWay SDK and Ant Scripting • Understanding Ant Tasks • Build, Upload, Deploy, and Start an iIA Application using Ant Scripts

ILO

Use

ON

LY D

o N

ot D

uplic

ate

or D

istri

bute

ILO

Use

ON

LY D

o N

ot D

uplic

ate

or D

istri

bute

Page 152: Customer Educationeducation.informationbuilders.com/...studentguide(word)wm-ilo-sec.pdf · Student Guide v7.04 DN7000508.0216 ... iSM iWay Integration Tools ... SAP®, Siebel®, PeopleSoft®,

Advanced iIA and Ant Scripting

iWay Service Manager Tooling Techniques 144

Introduction to iWay SDK and Ant Scripting

The iWay Software Development Kit (SDK) provides the tools and technologies that are required for the management of iWay applications and their web archives at an enterprise level.

Key features and advantages of using Ant scripts:

• A complete Java/Ant based framework, which can be integrated into an existing IT operations cycle as part of an existing build process.

• Enabling Ant-based scripting to comprise, build, and deploy iWay Applications from a centralized build system without requiring an iSM installation.

• A fully scriptable, scheduled, remote distribution and management of iWay Applications across an enterprise environment.

This section describes the folder structure that is created after you install the iWay SDK on your system. Folder Structure

• \ant - Contains the tools.xml file, which is an Ant script file that the iWay SDK includes for enhanced Ant script patterns.

• \bin - Contains the install.xml file, which contains information obtained during the installation and includes versioning information for the iWay SDK.

• \build - This folder utilizes Ant tasks found in the iwscript.jar file, which is located in the \lib directory. The following files are included in the \build folder:

ILO

Use

ON

LY D

o N

ot D

uplic

ate

or D

istri

bute

ILO

Use

ON

LY D

o N

ot D

uplic

ate

or D

istri

bute

Page 153: Customer Educationeducation.informationbuilders.com/...studentguide(word)wm-ilo-sec.pdf · Student Guide v7.04 DN7000508.0216 ... iSM iWay Integration Tools ... SAP®, Siebel®, PeopleSoft®,

Advanced iIA and Ant Scripting

iWay Service Manager Tooling Techniques 145

- build.cmd (Windows), build.sh (UNIX). Performs build type tasks.

- build.xml. Ant (interface) for build.cmd or build.sh.

ILO

Use

ON

LY D

o N

ot D

uplic

ate

or D

istri

bute

ILO

Use

ON

LY D

o N

ot D

uplic

ate

or D

istri

bute

Page 154: Customer Educationeducation.informationbuilders.com/...studentguide(word)wm-ilo-sec.pdf · Student Guide v7.04 DN7000508.0216 ... iSM iWay Integration Tools ... SAP®, Siebel®, PeopleSoft®,

Advanced iIA and Ant Scripting

iWay Service Manager Tooling Techniques 146

- iwbuild.xml. Ant support file for build.xml utilizing the iwscript Ant interface.

Sample Integration Tasks: ► BUILDAPP - builds application (IIA) from IIT Eclipse based projects. ► BUILDWAR - builds a Web Archive (WAR) based on an IIA and ITA files. ► DEPLOYAPP - deploys an application (IIA) to an ISM server. ► UNDEPLOYAPP - undeploys an application (IIA) from an ISM server. ► UPDATEAPP - updates/redeploys an application (IIA) on an ISM server. ► STARTAPP - starts a deployed application (IIA). ► STOPAPP - stops a deployed application (IIA).

- <sample_config>\default\ (target configuration assets) - The \build folder contains a \configurations subfolder, which contains a set of build/deploy configurations utilized by build.xxx found within the build directory (build\configurations\).

- \war - This folder includes custom WEB-INF and META-INF directories to be merged during the BUILDWAR task.

- \scripts - Contains the user.xml file. This is an Ant-based script file used to customize the pre-execution and post-execution of supported tasks.

- \dist - Serves as the build destination for iIA and WAR deployments. • default.properties (target). The Ant property file used to manage build and

deployment options as name-value pairs. The following structure for maintained configuration is expected:

- newconfiguration directory

- default.properties

- customtarget.properties

- customtarget1.properties

The \build folder also contains a \projects subfolder, which is the location of iIT Eclipse-based projects. The \projects subfolder contains a sample application (iIT project) under \app sample IIT project which can be used to test the iWay SDK.

• \config - The iWay Service Manager configuration directory. • \etc IL

O U

se O

NLY

Do

Not

Dup

licat

e or

Dis

tribu

te

ILO

Use

ON

LY D

o N

ot D

uplic

ate

or D

istri

bute

Page 155: Customer Educationeducation.informationbuilders.com/...studentguide(word)wm-ilo-sec.pdf · Student Guide v7.04 DN7000508.0216 ... iSM iWay Integration Tools ... SAP®, Siebel®, PeopleSoft®,

Advanced iIA and Ant Scripting

iWay Service Manager Tooling Techniques 147

- \doc - Contains iwscript Java documentation in the etc\doc\iwscript\java folder. Contains iwscript Ant documentation in the etc\doc\iwscript\ant folder. Contains the iWay SDK build documentation in the etc\doc\build folder.

- \licenses - Contains license files for the iWay SDK, including those required by third-party open source distributions.

- \manager - The directory of the deployment, which contains the deployment\iia subfolder. The iway-ant-tasks.xml file is located here, which contains the code for the Ant iwscript interface.

- \packages -This is a required empty directory.

- \setup - Contains the ismbase.war file, which is a sample .war file packaged with iSM server resources.

• \lib - Contains the iwscript.jar, which is the Ant interface used to build and deploy iWay applications. The remaining .jar files in this folder are supporting files for the iwscript.jar file.

Understanding Ant Tasks

The iWay SDK is made up of two major components. The first, an Apache Ant extension that exposes several tasks for managing the building and deploying process for an iWay Integration Application (iIA).

The following is a list of Ant tasks that are currently supported by the iWay SDK:

• iwaddtemplate. Uploads an application template file (.ita) to iWay Service Manager (iSM).

• iwbuild. Builds an iWay Integration Application (.iia file) from an Eclipse-based iIT project. This task can only run in an application directory, ending with *.iab.

• iwdelete. Deletes an iIA template (.ita), application (.iia), or deployment from iSM. • iwdeploy. Deploys an iIA with a specified template (.ita) to iSM. • iwdeploylocal. Deploys an iIA with a specified template (.ita) to a local directory. • iwscript. Executes a remote Ant script through iSM. • iwstart. Starts a deployed iIA or application channel(s). If no channel nodes are found,

then the application is started. Otherwise, specified channels are started. • iwstop. Stops a deployed iIA or application channel(s). If no channel nodes are found,

then the application is stopped. Otherwise, specified channels are stopped. • iwupload. Uploads an iIA archive file (.iia) to iSM.

Before you continue let's take a look at the build.xml from within the IIT workbench.

ILO

Use

ON

LY D

o N

ot D

uplic

ate

or D

istri

bute

ILO

Use

ON

LY D

o N

ot D

uplic

ate

or D

istri

bute

Page 156: Customer Educationeducation.informationbuilders.com/...studentguide(word)wm-ilo-sec.pdf · Student Guide v7.04 DN7000508.0216 ... iSM iWay Integration Tools ... SAP®, Siebel®, PeopleSoft®,

Advanced iIA and Ant Scripting

iWay Service Manager Tooling Techniques 148

1. Under the Customer project, expand Applications. 2. Right-click build.xml, point to Open With, and click Ant Editor.

The build.xml file displayed in the Ant Editor.

As a developer you can modify the build.xml to your requirements and execute from within iIT.

ILO

Use

ON

LY D

o N

ot D

uplic

ate

or D

istri

bute

ILO

Use

ON

LY D

o N

ot D

uplic

ate

or D

istri

bute

Page 157: Customer Educationeducation.informationbuilders.com/...studentguide(word)wm-ilo-sec.pdf · Student Guide v7.04 DN7000508.0216 ... iSM iWay Integration Tools ... SAP®, Siebel®, PeopleSoft®,

Advanced iIA and Ant Scripting

iWay Service Manager Tooling Techniques 149

Build, Upload, Deploy, and Start an iIA Application using Ant Scripts

In this section you will learn how to use Ant Scripts to build, upload, deploy start, stop and undeploy an iIA Application using the iWay SDK. Learning how to use the iWay SDK and Ant scripts affords you the knowledge to manage applications remotely on a schedule.

Preparing the Application

1. Using a Windows Browser navigate to D:\iASM_Workspace\workspace\Customer.

To begin the process of using the SDK and Ant scripts you must copy the project you want to use to a directory folder within the folder structure for the SDK software. You will use the BUILD scripts to process the project into a running application in your enterprise.

2. Right-click the Customer project and click Copy.

ILO

Use

ON

LY D

o N

ot D

uplic

ate

or D

istri

bute

ILO

Use

ON

LY D

o N

ot D

uplic

ate

or D

istri

bute

Page 158: Customer Educationeducation.informationbuilders.com/...studentguide(word)wm-ilo-sec.pdf · Student Guide v7.04 DN7000508.0216 ... iSM iWay Integration Tools ... SAP®, Siebel®, PeopleSoft®,

Advanced iIA and Ant Scripting

iWay Service Manager Tooling Techniques 150

3. Using a Windows Browser navigate to D:\iWaySDK\7.0.4\build\projects, right-click, and click Paste.

ILO

Use

ON

LY D

o N

ot D

uplic

ate

or D

istri

bute

ILO

Use

ON

LY D

o N

ot D

uplic

ate

or D

istri

bute

Page 159: Customer Educationeducation.informationbuilders.com/...studentguide(word)wm-ilo-sec.pdf · Student Guide v7.04 DN7000508.0216 ... iSM iWay Integration Tools ... SAP®, Siebel®, PeopleSoft®,

Advanced iIA and Ant Scripting

iWay Service Manager Tooling Techniques 151

The Customer project is displayed in the D:\iWaySDK\7.0.4\build\projects folder.

4. Create a new folder called MyNewConfig under the \iWaySDK\7.0.4\build\configurations.

5. Copy the contents of \build\configurations\iway to the \build\configurations\MyNewConfig folder.

A best practice is to copy the contents of the \build\configuration\iway configuration to a new configuration. You will be modifying the default.properties file for your application project. At this point, you should have a \build\configuration\MyNewConfig directory with a default.properties file.

6. Navigate to \build\configuration\MyNewConfig and open default.properties with a text editor.

ILO

Use

ON

LY D

o N

ot D

uplic

ate

or D

istri

bute

ILO

Use

ON

LY D

o N

ot D

uplic

ate

or D

istri

bute

Page 160: Customer Educationeducation.informationbuilders.com/...studentguide(word)wm-ilo-sec.pdf · Student Guide v7.04 DN7000508.0216 ... iSM iWay Integration Tools ... SAP®, Siebel®, PeopleSoft®,

Advanced iIA and Ant Scripting

iWay Service Manager Tooling Techniques 152

You will need to make a few changes to the build.properties to reflect the Customer project and CustXMLtoXML_App application.

7. At the top of default.properties under IIT Project Properties change the following items:

IIT Project Properties Value

iitproject.name=app iitproject.name=Customer

application.name=mover application.name=CustXMLtoXML_App

8. Click the Save icon to save default.properties.

ILO

Use

ON

LY D

o N

ot D

uplic

ate

or D

istri

bute

ILO

Use

ON

LY D

o N

ot D

uplic

ate

or D

istri

bute

Page 161: Customer Educationeducation.informationbuilders.com/...studentguide(word)wm-ilo-sec.pdf · Student Guide v7.04 DN7000508.0216 ... iSM iWay Integration Tools ... SAP®, Siebel®, PeopleSoft®,

Advanced iIA and Ant Scripting

iWay Service Manager Tooling Techniques 153

Note: Depending on whether you are using Notepad or Wordpad for the editor the Save icon may be on the toolbar at the top.

9. Under General Deployment Properties use the defaults. The server.url, server.user, and server.password may change depending on your enterprise environment. Since this class is being presented on an image you will use localhost for the server.url and the default user/password is iway/iway.

10. Change the name of the application once deployed. Change deployment.name=mover to deployment.name=CustXMLtoXML_App. You can type a description for the deployment.description= property.

ILO

Use

ON

LY D

o N

ot D

uplic

ate

or D

istri

bute

ILO

Use

ON

LY D

o N

ot D

uplic

ate

or D

istri

bute

Page 162: Customer Educationeducation.informationbuilders.com/...studentguide(word)wm-ilo-sec.pdf · Student Guide v7.04 DN7000508.0216 ... iSM iWay Integration Tools ... SAP®, Siebel®, PeopleSoft®,

Advanced iIA and Ant Scripting

iWay Service Manager Tooling Techniques 154

11. The update.template is only used when the UPDATEAPP command is issued. This property uploads a new template for the project. The application.template=Dev is the default template to be used for deploying the application. You can use the default of dev for the CustXMLtoXML_APP application. The deployment.template= is commented out and is used to override the location of where the template is located when it is deployed. Make sure the application.template is set to Dev.

12. The WAR Properties are used when the BUILDWAR command is execute. These properties relate to the building of a .war file.

13. Change the start.timeout=10 to start.timeout=30 in seconds. Change the stop.timeout=30 to stop.timeout=30 in seconds.

These two properties work with the STARTAPP and STOPAPP action tasks and attempts to verify that the application has successfully started or stopped. The stop.timeout should have enough time to make sure all of the messages going through the application can finish before a hard stop.

14. Save the build.properties file.

ILO

Use

ON

LY D

o N

ot D

uplic

ate

or D

istri

bute

ILO

Use

ON

LY D

o N

ot D

uplic

ate

or D

istri

bute

Page 163: Customer Educationeducation.informationbuilders.com/...studentguide(word)wm-ilo-sec.pdf · Student Guide v7.04 DN7000508.0216 ... iSM iWay Integration Tools ... SAP®, Siebel®, PeopleSoft®,

Advanced iIA and Ant Scripting

iWay Service Manager Tooling Techniques 155

15. Close the build.properties file.

Execute the BUILD command

1. Open a DOS Run command window. Click Start — Run.

2. Make sure cmd is in the text box and click OK.

3. Change directory. Type cd d:\iWaySDK\7.0.4\build.

ILO

Use

ON

LY D

o N

ot D

uplic

ate

or D

istri

bute

ILO

Use

ON

LY D

o N

ot D

uplic

ate

or D

istri

bute

Page 164: Customer Educationeducation.informationbuilders.com/...studentguide(word)wm-ilo-sec.pdf · Student Guide v7.04 DN7000508.0216 ... iSM iWay Integration Tools ... SAP®, Siebel®, PeopleSoft®,

Advanced iIA and Ant Scripting

iWay Service Manager Tooling Techniques 156

4. To see what command can be executed type build ABOUT and press Enter.

5. To get help information about a command type build ABOUT BUILDAPP and press Enter.

6. To build your application, type build BUILDAPP MyNewConfig and press Enter.

ILO

Use

ON

LY D

o N

ot D

uplic

ate

or D

istri

bute

ILO

Use

ON

LY D

o N

ot D

uplic

ate

or D

istri

bute

Page 165: Customer Educationeducation.informationbuilders.com/...studentguide(word)wm-ilo-sec.pdf · Student Guide v7.04 DN7000508.0216 ... iSM iWay Integration Tools ... SAP®, Siebel®, PeopleSoft®,

Advanced iIA and Ant Scripting

iWay Service Manager Tooling Techniques 157

Before the build command can run successfully, you must install the most current release of Apache Ant software. For instructions on installing Apache Ant see the following URL - Error! Hyperlink reference not valid..

The following image shows a successful build of the CustXMLtoXML_App application.

7. Using a Microsoft Windows browser navigate to D:\iWaySDK\7.0.4\build\configurations\MyNewConfig\default\dist. The dist folder was created by the BUILDAPP command. The result of the BUILDAPP command if successful is the CustXMLtoXML_App.iia application file.

ILO

Use

ON

LY D

o N

ot D

uplic

ate

or D

istri

bute

ILO

Use

ON

LY D

o N

ot D

uplic

ate

or D

istri

bute

Page 166: Customer Educationeducation.informationbuilders.com/...studentguide(word)wm-ilo-sec.pdf · Student Guide v7.04 DN7000508.0216 ... iSM iWay Integration Tools ... SAP®, Siebel®, PeopleSoft®,

Advanced iIA and Ant Scripting

iWay Service Manager Tooling Techniques 158

The BUILDAPP command is the same Run As Build Ant command you issued through the iIT workbench.

Next, you can deploy the application to the iWay Server runtime environment.

Before the application can be deployed, a copy of the Dev template must be downloaded to the Customer project. Using the iWay Web Console download the Dev.ita template to the /projects/Customer folder. Also, before you make sure the application has been undeployed.

8. In the Windows DOS Cmd window, type build DEPLOYAPP MyNewConfig and press Enter.

ILO

Use

ON

LY D

o N

ot D

uplic

ate

or D

istri

bute

ILO

Use

ON

LY D

o N

ot D

uplic

ate

or D

istri

bute

Page 167: Customer Educationeducation.informationbuilders.com/...studentguide(word)wm-ilo-sec.pdf · Student Guide v7.04 DN7000508.0216 ... iSM iWay Integration Tools ... SAP®, Siebel®, PeopleSoft®,

Advanced iIA and Ant Scripting

iWay Service Manager Tooling Techniques 159

9. To start the deployed application, in the Windows DOS Cmd window, type build STARTAPP MyNewConfig and press Enter.

10. To stop the deployed application, in the Windows DOS Cmd window, type build STOPAPP MyNewConfig and press Enter.

ILO

Use

ON

LY D

o N

ot D

uplic

ate

or D

istri

bute

ILO

Use

ON

LY D

o N

ot D

uplic

ate

or D

istri

bute

Page 168: Customer Educationeducation.informationbuilders.com/...studentguide(word)wm-ilo-sec.pdf · Student Guide v7.04 DN7000508.0216 ... iSM iWay Integration Tools ... SAP®, Siebel®, PeopleSoft®,

Advanced iIA and Ant Scripting

iWay Service Manager Tooling Techniques 160

Lesson Review

Introduction to iWay SDK and Ant Scripting Understanding Ant Tasks Build, Upload, Deploy, and Start an iIA Application using Ant Scripts

ILO

Use

ON

LY D

o N

ot D

uplic

ate

or D

istri

bute

ILO

Use

ON

LY D

o N

ot D

uplic

ate

or D

istri

bute

Page 169: Customer Educationeducation.informationbuilders.com/...studentguide(word)wm-ilo-sec.pdf · Student Guide v7.04 DN7000508.0216 ... iSM iWay Integration Tools ... SAP®, Siebel®, PeopleSoft®,

Deploying iWay Sentinel in Your Enterprise

iWay Service Manager Tooling Techniques 161

Lesson 5

Deploying iWay Sentinel in Your Enterprise

Objectives

• Introduction to Sentinel • Managing and Monitoring Servers • Managing and Monitoring Applications • Managing and Monitoring Channels • Administration

ILO

Use

ON

LY D

o N

ot D

uplic

ate

or D

istri

bute

ILO

Use

ON

LY D

o N

ot D

uplic

ate

or D

istri

bute

Page 170: Customer Educationeducation.informationbuilders.com/...studentguide(word)wm-ilo-sec.pdf · Student Guide v7.04 DN7000508.0216 ... iSM iWay Integration Tools ... SAP®, Siebel®, PeopleSoft®,

Deploying iWay Sentinel in Your Enterprise

iWay Service Manager Tooling Techniques 162

Introduction to Sentinel

iWay Sentinel uses Single Pane of Glass (SPOG) as a web-based interface to manage and monitor iWay Service Manager (iSM) instances, which are installed across an enterprise. Sentinel provides capabilities to detect failures in server status, message transmission, and performance issues across one or more instances of iSM. iWay Sentinel consists of two major components:

Sentinel Envoy

Sentinel is the core component of the application, which can be accessed from the browser. Envoy is a HTTP Listener component that runs on top of iSM and provides the connectivity between Sentinel and iSM. Sentinel provides monitoring functions, such as server connectivity status, health status for servers, applications, and channels based their success, failures, and performance. Sentinel also assigns the health status to servers, applications, and channels by comparing the health statistics among them based on a customizable algorithm. Through Sentinel, users can start and stop the servers, applications, channels, and change properties. In addition, Sentinel enables users to monitor the performance of JVM at the memory and thread level for the server and component functions. Sentinel simplifies management functionality, such as deploying applications, installing patches, and modifying the packages and components of iWay applications across multiple iWay servers. Servers and applications can be categorized in different groups, and management functions can be executed on top of them. You can also schedule specific tasks to execute at different days and times of the week as required. Sentinel allows users to view the status and queues related to the completed, ongoing, and pending status for the tasks. If the XDFAIL object is programmed into enterprise process flows, Sentinel allows you to monitor and manage those error counts by application. Sentinel includes a repository to store iWay artifacts, such as applications, packages, and other deployable components. A key feature of SPOG is the ability to manage functions, which can be executed using Java scripts. Automated scripts combined with scheduling functionality allows enterprises to carry out their deployment functionality in the background, without human intervention. Next you will go through an exercise to monitor and maintain the application OrdersCSVtoXML.

ILO

Use

ON

LY D

o N

ot D

uplic

ate

or D

istri

bute

ILO

Use

ON

LY D

o N

ot D

uplic

ate

or D

istri

bute

Page 171: Customer Educationeducation.informationbuilders.com/...studentguide(word)wm-ilo-sec.pdf · Student Guide v7.04 DN7000508.0216 ... iSM iWay Integration Tools ... SAP®, Siebel®, PeopleSoft®,

Deploying iWay Sentinel in Your Enterprise

iWay Service Manager Tooling Techniques 163

Sentinel Setup

In this section you will learn to login to iWay Sentinel and register your iWay Server to see all viewable applications and channels. When the iWay server is installed, the Envoy component must be checked. The Envoy component of the iWay server communicates between your iWay server and components (applications, channels, etc) and the Sentinel browser. By default Envoy is

running as a listener on port 9001. You can choose the Envoy port number during the installation of the iWay Service Manager software. First you will check to make sure Envoy is up and running using the RESTX Admin console.

1. Using a Chrome browser open a tab to http://localhost:9001.

Google Chrome or Mozilla Firefox browsers are used for Sentinel and RESTX because HTLM5 concepts are used to build their interfaces.

2. For the Username and Password type admin/admin.

ILO

Use

ON

LY D

o N

ot D

uplic

ate

or D

istri

bute

ILO

Use

ON

LY D

o N

ot D

uplic

ate

or D

istri

bute

Page 172: Customer Educationeducation.informationbuilders.com/...studentguide(word)wm-ilo-sec.pdf · Student Guide v7.04 DN7000508.0216 ... iSM iWay Integration Tools ... SAP®, Siebel®, PeopleSoft®,

Deploying iWay Sentinel in Your Enterprise

iWay Service Manager Tooling Techniques 164

The Welcome to RESTX admin console page determines whether Envoy is communicating with your server.

Envoy communicates to Sentinel and API's are used to talk to iWay Service Manager instances.

3. Minimize the IE browser.

Next you will start the Single Pane of Glass (SPOG) application.

4. Open a DOS Window command prompt. Change disk to the D drive. Change the directory to D:/Sentinel.

ILO

Use

ON

LY D

o N

ot D

uplic

ate

or D

istri

bute

ILO

Use

ON

LY D

o N

ot D

uplic

ate

or D

istri

bute

Page 173: Customer Educationeducation.informationbuilders.com/...studentguide(word)wm-ilo-sec.pdf · Student Guide v7.04 DN7000508.0216 ... iSM iWay Integration Tools ... SAP®, Siebel®, PeopleSoft®,

Deploying iWay Sentinel in Your Enterprise

iWay Service Manager Tooling Techniques 165

5. To start SPOG type java –jar spog.jar –httpPort 7777 and press Enter.

The default port is 8080, but you are using a different port so it won't interfere with any other application.

6. Minimize the DOS window. 7. Using a Chrome browser type the URL http://localhost:7777 to display the Spog -

Sentinel web page.

ILO

Use

ON

LY D

o N

ot D

uplic

ate

or D

istri

bute

ILO

Use

ON

LY D

o N

ot D

uplic

ate

or D

istri

bute

Page 174: Customer Educationeducation.informationbuilders.com/...studentguide(word)wm-ilo-sec.pdf · Student Guide v7.04 DN7000508.0216 ... iSM iWay Integration Tools ... SAP®, Siebel®, PeopleSoft®,

Deploying iWay Sentinel in Your Enterprise

iWay Service Manager Tooling Techniques 166

8. For the Username and Password type admin/admin and click Login.

IL

O U

se O

NLY

Do

Not

Dup

licat

e or

Dis

tribu

te

ILO

Use

ON

LY D

o N

ot D

uplic

ate

or D

istri

bute

Page 175: Customer Educationeducation.informationbuilders.com/...studentguide(word)wm-ilo-sec.pdf · Student Guide v7.04 DN7000508.0216 ... iSM iWay Integration Tools ... SAP®, Siebel®, PeopleSoft®,

Deploying iWay Sentinel in Your Enterprise

iWay Service Manager Tooling Techniques 167

The Single Pane of Glass main page displayed.

Next you will register your iWay server.

Register a Server

1. Click the down arrow next to Servers and click Register.

The localhost iWay server may already be registered so you may be able to skip the next few steps.

2. For the Name type localhost. 3. For the Description type MedIBCo local server. 4. Type localhost for the Host name.

ILO

Use

ON

LY D

o N

ot D

uplic

ate

or D

istri

bute

ILO

Use

ON

LY D

o N

ot D

uplic

ate

or D

istri

bute

Page 176: Customer Educationeducation.informationbuilders.com/...studentguide(word)wm-ilo-sec.pdf · Student Guide v7.04 DN7000508.0216 ... iSM iWay Integration Tools ... SAP®, Siebel®, PeopleSoft®,

Deploying iWay Sentinel in Your Enterprise

iWay Service Manager Tooling Techniques 168

5. Click Register.

6. Initially the server will show up as Missing state, but then will turn into Available. You may also refresh the screen by clicking on the refresh icon (circular icon to the far right)

7. You may need to click Servers. The Available will turn to 1 and the Status will show success.

ILO

Use

ON

LY D

o N

ot D

uplic

ate

or D

istri

bute

ILO

Use

ON

LY D

o N

ot D

uplic

ate

or D

istri

bute

Page 177: Customer Educationeducation.informationbuilders.com/...studentguide(word)wm-ilo-sec.pdf · Student Guide v7.04 DN7000508.0216 ... iSM iWay Integration Tools ... SAP®, Siebel®, PeopleSoft®,

Deploying iWay Sentinel in Your Enterprise

iWay Service Manager Tooling Techniques 169

8. Click Servers and click localhost. 9. Scroll-down and click System to view the information for the Server Details -

localhost.

The System details about the server localhost are displayed. The information displayed shows the Operating System, the User, Java and its release, Service Manager, Total Resources being used, and Number of Threads used. Sentinel works with the base configuration of iSM, but uses serialization to look across applications and installations.

10. Click Console.

ILO

Use

ON

LY D

o N

ot D

uplic

ate

or D

istri

bute

ILO

Use

ON

LY D

o N

ot D

uplic

ate

or D

istri

bute

Page 178: Customer Educationeducation.informationbuilders.com/...studentguide(word)wm-ilo-sec.pdf · Student Guide v7.04 DN7000508.0216 ... iSM iWay Integration Tools ... SAP®, Siebel®, PeopleSoft®,

Deploying iWay Sentinel in Your Enterprise

iWay Service Manager Tooling Techniques 170

This panel displays the Console Log file for the localhost server. This Console is for the base configuration of the iWay Server.

11. Click Settings.

You can increase or decrease the amount of memory you need for Java to run your applications. You can turn on Logging and Tracing to debug your applications from within Sentinel.

12. Click Registers.

ILO

Use

ON

LY D

o N

ot D

uplic

ate

or D

istri

bute

ILO

Use

ON

LY D

o N

ot D

uplic

ate

or D

istri

bute

Page 179: Customer Educationeducation.informationbuilders.com/...studentguide(word)wm-ilo-sec.pdf · Student Guide v7.04 DN7000508.0216 ... iSM iWay Integration Tools ... SAP®, Siebel®, PeopleSoft®,

Deploying iWay Sentinel in Your Enterprise

iWay Service Manager Tooling Techniques 171

Any special registers assigned to the Sentinel software are displayed here.

13. Click Applications.

This panel displays all of the available applications and their status or health. The As Of column refers to the date or time when Sentinel last recognized the application.

14. Click Packages.

This panel displays deployable packages within the Sentinel environment.

15. Click Graph.

ILO

Use

ON

LY D

o N

ot D

uplic

ate

or D

istri

bute

ILO

Use

ON

LY D

o N

ot D

uplic

ate

or D

istri

bute

Page 180: Customer Educationeducation.informationbuilders.com/...studentguide(word)wm-ilo-sec.pdf · Student Guide v7.04 DN7000508.0216 ... iSM iWay Integration Tools ... SAP®, Siebel®, PeopleSoft®,

Deploying iWay Sentinel in Your Enterprise

iWay Service Manager Tooling Techniques 172

Graphically displays the relationships between the host, server, applications, and channels. The dark blue dot is for Server, the light blue dot is for the host of the server, the bright orange dot is for an application and light orange dot is for a channel.

16. On the left tree click Applications.

The Application pane displays the available applications being monitored by Sentinel and the registered server.

17. Click Channels.

ILO

Use

ON

LY D

o N

ot D

uplic

ate

or D

istri

bute

ILO

Use

ON

LY D

o N

ot D

uplic

ate

or D

istri

bute

Page 181: Customer Educationeducation.informationbuilders.com/...studentguide(word)wm-ilo-sec.pdf · Student Guide v7.04 DN7000508.0216 ... iSM iWay Integration Tools ... SAP®, Siebel®, PeopleSoft®,

Deploying iWay Sentinel in Your Enterprise

iWay Service Manager Tooling Techniques 173

The Channel pane displays the available channels being monitored by Sentinel and the registered server.

18. Click Tasks.

The Tasks pane displays any tasks to be executed on a schedule. These tasks can be activated or deactivated. An example of a task may be to stop and restart an application.

19. Click Files.

The Files pane allows you to import and deploy files to the server. For example, you can import an application(.iia file which is the extension for an application). You can deploy the application to the server or across remote servers monitored by Sentinel.

20. Click the down arrow for Administration. Click Users.

ILO

Use

ON

LY D

o N

ot D

uplic

ate

or D

istri

bute

ILO

Use

ON

LY D

o N

ot D

uplic

ate

or D

istri

bute

Page 182: Customer Educationeducation.informationbuilders.com/...studentguide(word)wm-ilo-sec.pdf · Student Guide v7.04 DN7000508.0216 ... iSM iWay Integration Tools ... SAP®, Siebel®, PeopleSoft®,

Deploying iWay Sentinel in Your Enterprise

iWay Service Manager Tooling Techniques 174

The Users pane allows the Administrator the ability to add and remove new users. The administrator can provide roles to the new users.

21. On the far-right is a pane called Events. On this pane you can review notes pertaining to the server and running applications.

22. Click the Show All icon (top right corner) to view all of the messages being sent between Sentinel, RESTX, and iSM. You can set Filters to ON to limit what is displayed for Tasks, Comments, Messages, and Api.

ILO

Use

ON

LY D

o N

ot D

uplic

ate

or D

istri

bute

ILO

Use

ON

LY D

o N

ot D

uplic

ate

or D

istri

bute

Page 183: Customer Educationeducation.informationbuilders.com/...studentguide(word)wm-ilo-sec.pdf · Student Guide v7.04 DN7000508.0216 ... iSM iWay Integration Tools ... SAP®, Siebel®, PeopleSoft®,

Deploying iWay Sentinel in Your Enterprise

iWay Service Manager Tooling Techniques 175

The Log is displayed in the pane.

Deploy an Application

In this section we will utilize Sentinel Management functionality to import and deploy an application on your server. You will be uploading an application and deploying it to the server. The application itself is an Http Listener which, when accessed, returns a message to you indicating Congratulations.

1. On the left-hand side click the Files tab.

ILO

Use

ON

LY D

o N

ot D

uplic

ate

or D

istri

bute

ILO

Use

ON

LY D

o N

ot D

uplic

ate

or D

istri

bute

Page 184: Customer Educationeducation.informationbuilders.com/...studentguide(word)wm-ilo-sec.pdf · Student Guide v7.04 DN7000508.0216 ... iSM iWay Integration Tools ... SAP®, Siebel®, PeopleSoft®,

Deploying iWay Sentinel in Your Enterprise

iWay Service Manager Tooling Techniques 176

Here you can manage artifacts used by Sentinel to be sent over to various servers. The artifacts can be anything such as iIA files, templates, property files, keystores, and any other files which might need to be moved or published to a remote instance. You can also create sub-folders to manage the artifacts, which will create tags for the visual organization of files.

2. Click on the disk+ icon to add a file.

3. Navigate to D:\Course9xx\Orders_Debug and click on FinalApp.iia. 4. Click Open.

ILO

Use

ON

LY D

o N

ot D

uplic

ate

or D

istri

bute

ILO

Use

ON

LY D

o N

ot D

uplic

ate

or D

istri

bute

Page 185: Customer Educationeducation.informationbuilders.com/...studentguide(word)wm-ilo-sec.pdf · Student Guide v7.04 DN7000508.0216 ... iSM iWay Integration Tools ... SAP®, Siebel®, PeopleSoft®,

Deploying iWay Sentinel in Your Enterprise

iWay Service Manager Tooling Techniques 177

The uploaded FinalApp.iia application file displayed.

You could easily create a folder under the Files group and place the upload there.

5. Right-click on the FinalApp.iia file.

You can review the various operations which can be processed on upload files.

6. Click Deploy.

ILO

Use

ON

LY D

o N

ot D

uplic

ate

or D

istri

bute

ILO

Use

ON

LY D

o N

ot D

uplic

ate

or D

istri

bute

Page 186: Customer Educationeducation.informationbuilders.com/...studentguide(word)wm-ilo-sec.pdf · Student Guide v7.04 DN7000508.0216 ... iSM iWay Integration Tools ... SAP®, Siebel®, PeopleSoft®,

Deploying iWay Sentinel in Your Enterprise

iWay Service Manager Tooling Techniques 178

Each one of the options you see has an equivalent icon on the toolbar as you can see with the Deploy option.

7. Click Next.

ILO

Use

ON

LY D

o N

ot D

uplic

ate

or D

istri

bute

ILO

Use

ON

LY D

o N

ot D

uplic

ate

or D

istri

bute

Page 187: Customer Educationeducation.informationbuilders.com/...studentguide(word)wm-ilo-sec.pdf · Student Guide v7.04 DN7000508.0216 ... iSM iWay Integration Tools ... SAP®, Siebel®, PeopleSoft®,

Deploying iWay Sentinel in Your Enterprise

iWay Service Manager Tooling Techniques 179

You can keep the default name and provide an optional description or you can change the name as you did. You will let the server decide the port number the application will run on.

8. Click on the “localhost” on the left side to move it to the right-side as a target. Click Next.

You are going to deploy without a template (meaning a raw template will be used).

9. Click Finish.

10. Click Servers.

ILO

Use

ON

LY D

o N

ot D

uplic

ate

or D

istri

bute

ILO

Use

ON

LY D

o N

ot D

uplic

ate

or D

istri

bute

Page 188: Customer Educationeducation.informationbuilders.com/...studentguide(word)wm-ilo-sec.pdf · Student Guide v7.04 DN7000508.0216 ... iSM iWay Integration Tools ... SAP®, Siebel®, PeopleSoft®,

Deploying iWay Sentinel in Your Enterprise

iWay Service Manager Tooling Techniques 180

11. Click localhost.

12. Click Applications.

You should see the application FinalApp in a stopped state.

The application is not registered with the iSM instance, and if you’re on Windows, it will also show up in the systems tray. NOTE: If you’re running on VM Image, you have to set the application to run out-

ILO

Use

ON

LY D

o N

ot D

uplic

ate

or D

istri

bute

ILO

Use

ON

LY D

o N

ot D

uplic

ate

or D

istri

bute

Page 189: Customer Educationeducation.informationbuilders.com/...studentguide(word)wm-ilo-sec.pdf · Student Guide v7.04 DN7000508.0216 ... iSM iWay Integration Tools ... SAP®, Siebel®, PeopleSoft®,

Deploying iWay Sentinel in Your Enterprise

iWay Service Manager Tooling Techniques 181

of-process same way as you did for the BASE configuration.

13. Open Systems Tray. Click ISM Monitor.

14. Select FinalApp. Click Properties.

15. Click Installation.

ILO

Use

ON

LY D

o N

ot D

uplic

ate

or D

istri

bute

ILO

Use

ON

LY D

o N

ot D

uplic

ate

or D

istri

bute

Page 190: Customer Educationeducation.informationbuilders.com/...studentguide(word)wm-ilo-sec.pdf · Student Guide v7.04 DN7000508.0216 ... iSM iWay Integration Tools ... SAP®, Siebel®, PeopleSoft®,

Deploying iWay Sentinel in Your Enterprise

iWay Service Manager Tooling Techniques 182

16. From the Type pull-down select Out-of-Process 64bit. Click OK.

17. Click Exit.

ILO

Use

ON

LY D

o N

ot D

uplic

ate

or D

istri

bute

ILO

Use

ON

LY D

o N

ot D

uplic

ate

or D

istri

bute

Page 191: Customer Educationeducation.informationbuilders.com/...studentguide(word)wm-ilo-sec.pdf · Student Guide v7.04 DN7000508.0216 ... iSM iWay Integration Tools ... SAP®, Siebel®, PeopleSoft®,

Deploying iWay Sentinel in Your Enterprise

iWay Service Manager Tooling Techniques 183

18. Maximize the Spog Chrome browser. 19. To start an application from Sentinel, simply click on it to select it and then click the

red icon under the Status column.

20. Click OK.

ILO

Use

ON

LY D

o N

ot D

uplic

ate

or D

istri

bute

ILO

Use

ON

LY D

o N

ot D

uplic

ate

or D

istri

bute

Page 192: Customer Educationeducation.informationbuilders.com/...studentguide(word)wm-ilo-sec.pdf · Student Guide v7.04 DN7000508.0216 ... iSM iWay Integration Tools ... SAP®, Siebel®, PeopleSoft®,

Deploying iWay Sentinel in Your Enterprise

iWay Service Manager Tooling Techniques 184

The application will take some time to start and you can click refresh to get the latest status or wait for an update to complete. Upon start, the application status will turn into a green icon

21. To test this application, you can simply navigate to http://localhost:5555 and you should get back a Congratulations response. All this application is doing is returning back a simple message upon an HTTP Get request.

22. Go back to the Spog- Sentinel tab. 23. On the left tree click Applications, then click FinalApp. 24. Under Application Details, click Channels.

Script to Stop an Application

In this section we will create a simple script to stop a given application. There is a set of sample scripts provided and documented with the product.

1. On the left tree click Files. 2. Click the disk + icon. 3. Browse to D:\Course9xx\Orders_Debug. Select stop_app.js. Click Open.

ILO

Use

ON

LY D

o N

ot D

uplic

ate

or D

istri

bute

ILO

Use

ON

LY D

o N

ot D

uplic

ate

or D

istri

bute

Page 193: Customer Educationeducation.informationbuilders.com/...studentguide(word)wm-ilo-sec.pdf · Student Guide v7.04 DN7000508.0216 ... iSM iWay Integration Tools ... SAP®, Siebel®, PeopleSoft®,

Deploying iWay Sentinel in Your Enterprise

iWay Service Manager Tooling Techniques 185

4. The File stop_app.js displayed.

From the previous exercise, your FinalApp should be running at this point and you will use this script to stop it. This script can also be scheduled and updated with various functions. You could stop and start the app on a regular basis for maintenance.

5. If you need to edit the file from Sentinel, right-click stop_app.js and select Edit file. Make any changes and click Save.

ILO

Use

ON

LY D

o N

ot D

uplic

ate

or D

istri

bute

ILO

Use

ON

LY D

o N

ot D

uplic

ate

or D

istri

bute

Page 194: Customer Educationeducation.informationbuilders.com/...studentguide(word)wm-ilo-sec.pdf · Student Guide v7.04 DN7000508.0216 ... iSM iWay Integration Tools ... SAP®, Siebel®, PeopleSoft®,

Deploying iWay Sentinel in Your Enterprise

iWay Service Manager Tooling Techniques 186

6. Change the period to a comma on the last line between server_name and app_name. Click Save.

7. Right-click on the stop_app.js file and click Run on Sentinel. This will execute the script on Sentinel server. Run on Sentinel – Run the script on the local Sentinel Server Run on Server – Push the script to the iSM instance and enable Envoy to run it there locally (useful for heavy scripts which take longer time)

ILO

Use

ON

LY D

o N

ot D

uplic

ate

or D

istri

bute

ILO

Use

ON

LY D

o N

ot D

uplic

ate

or D

istri

bute

Page 195: Customer Educationeducation.informationbuilders.com/...studentguide(word)wm-ilo-sec.pdf · Student Guide v7.04 DN7000508.0216 ... iSM iWay Integration Tools ... SAP®, Siebel®, PeopleSoft®,

Deploying iWay Sentinel in Your Enterprise

iWay Service Manager Tooling Techniques 187

8. The script will run and you’ll be taken to the log files by default. Since you are not doing any logging, you can ignore that script and navigate back to Servers. Select localhost and Applications tab.

9. View the Api in the Log and you can see the JavaScript was executed.

Register Another Server

The iWay Sentinel application can register more than one instance or remote iWay server. You may have multiple instances of iWay running on a single platform or multiple remote platforms. You can register and manage/monitor those instances.

ILO

Use

ON

LY D

o N

ot D

uplic

ate

or D

istri

bute

ILO

Use

ON

LY D

o N

ot D

uplic

ate

or D

istri

bute

Page 196: Customer Educationeducation.informationbuilders.com/...studentguide(word)wm-ilo-sec.pdf · Student Guide v7.04 DN7000508.0216 ... iSM iWay Integration Tools ... SAP®, Siebel®, PeopleSoft®,

Deploying iWay Sentinel in Your Enterprise

iWay Service Manager Tooling Techniques 188

1. On the left tree click Servers. 2. Click the Server's pull-down and select Register.

3. Type the Server Name and Description. Type the Server Host Name or the IP address. Click Register.

ILO

Use

ON

LY D

o N

ot D

uplic

ate

or D

istri

bute

ILO

Use

ON

LY D

o N

ot D

uplic

ate

or D

istri

bute

Page 197: Customer Educationeducation.informationbuilders.com/...studentguide(word)wm-ilo-sec.pdf · Student Guide v7.04 DN7000508.0216 ... iSM iWay Integration Tools ... SAP®, Siebel®, PeopleSoft®,

Deploying iWay Sentinel in Your Enterprise

iWay Service Manager Tooling Techniques 189

The instructor will provide the Server Name, Description and Host. You may register another student's machine.

4. Notice the two Servers registered localhost and ismadvism.

Now you can manage and monitor both servers from a single SPOG.

ILO

Use

ON

LY D

o N

ot D

uplic

ate

or D

istri

bute

ILO

Use

ON

LY D

o N

ot D

uplic

ate

or D

istri

bute

Page 198: Customer Educationeducation.informationbuilders.com/...studentguide(word)wm-ilo-sec.pdf · Student Guide v7.04 DN7000508.0216 ... iSM iWay Integration Tools ... SAP®, Siebel®, PeopleSoft®,

Deploying iWay Sentinel in Your Enterprise

iWay Service Manager Tooling Techniques 190

Lesson Review

Introduction to Sentinel Managing and Monitoring Servers Managing and Monitoring Applications Managing and Monitoring Channels Administration

ILO

Use

ON

LY D

o N

ot D

uplic

ate

or D

istri

bute

ILO

Use

ON

LY D

o N

ot D

uplic

ate

or D

istri

bute

Page 199: Customer Educationeducation.informationbuilders.com/...studentguide(word)wm-ilo-sec.pdf · Student Guide v7.04 DN7000508.0216 ... iSM iWay Integration Tools ... SAP®, Siebel®, PeopleSoft®,

Creating a Web Service of the Customer Project

iWay Service Manager Tooling Techniques 191

Lesson 6

Creating a Web Service of the Customer Project

Objectives

• Introduction • Build the Customer XML to XML Web Service • Deploy the Web Service • Invoke the Web Service

ILO

Use

ON

LY D

o N

ot D

uplic

ate

or D

istri

bute

ILO

Use

ON

LY D

o N

ot D

uplic

ate

or D

istri

bute

Page 200: Customer Educationeducation.informationbuilders.com/...studentguide(word)wm-ilo-sec.pdf · Student Guide v7.04 DN7000508.0216 ... iSM iWay Integration Tools ... SAP®, Siebel®, PeopleSoft®,

Creating a Web Service of the Customer Project

iWay Service Manager Tooling Techniques 192

Introduction

For this lesson, we are going to create a Web Service from the Customer XML to XML process flow you used in the Ant Build lesson earlier. In order to create a Web Service from a process flow, there must be an XML Schema that represents the input and output of the flow. The input schema will be used in the Start object, and the output schema will be used in the End object. Note: The input

and output schemas you will be using have already been created. When you create a Web Service in iWay, the tool generates a WSDL (Web Service Description Language) and SOAP Request and Response documents. A WSDL is a file that describes the Web Service. So, when you define an input schema and an output schema to the process flow Start and End objects, the tool wraps those two schemas inside the WSDL. That gives anyone who is trying to use the Web Service the ability to look inside the WSDL you create and determine what the Web Service is expecting to receive, and what it will return. Let’s review what the Customer XML to XML Channel/process flow is expecting. Here is a view of the input file Customer.xml data file. It is in the D:\Course9xx\Customer \Data folder. This process flow processes an XML to XML document transformation.

Here is a view of the CustXMLtoXML_In.xsd schema file. It is in the D:\Course9xx\Customer\Schemas folder. This file describes the Customer.xml input file, with the element names and element formats used for validating the data. This schema represents the input to the process flow and will be used in the Start object.

ILO

Use

ON

LY D

o N

ot D

uplic

ate

or D

istri

bute

ILO

Use

ON

LY D

o N

ot D

uplic

ate

or D

istri

bute

Page 201: Customer Educationeducation.informationbuilders.com/...studentguide(word)wm-ilo-sec.pdf · Student Guide v7.04 DN7000508.0216 ... iSM iWay Integration Tools ... SAP®, Siebel®, PeopleSoft®,

Creating a Web Service of the Customer Project

iWay Service Manager Tooling Techniques 193

The result of the transformed Customer XML document process flow found in the D:\Course9xx\Customer\ValidCust folder is shown below.

Here is a view of the CustXMLtoXML_Out.xsd file. It is in the D:\Course9xx\Customer\Schemas folder. This file describes the Customer output XML document, with the element names and element formats used for validating the data. This schema represents the output to the process flow and will be used in the END object.

ILO

Use

ON

LY D

o N

ot D

uplic

ate

or D

istri

bute

ILO

Use

ON

LY D

o N

ot D

uplic

ate

or D

istri

bute

Page 202: Customer Educationeducation.informationbuilders.com/...studentguide(word)wm-ilo-sec.pdf · Student Guide v7.04 DN7000508.0216 ... iSM iWay Integration Tools ... SAP®, Siebel®, PeopleSoft®,

Creating a Web Service of the Customer Project

iWay Service Manager Tooling Techniques 194

Build the Customer XML to XML Web Service

In this section you will convert the Customer XML to XML process flow into a Web Service. The Web Service must accept a certain style of document that is dictated by the SOAP request document. The SOAP request document will be placed with the Start object of the process flow.

Since you might want to keep the original Customer XML to XML process flow intact, you will make a copy of it and turn it into a Web Service.

1. Close all tabs in the editor. 2. From the Integration Explorer tab expand the Customer project.

3. Expand the Flows artifact.

ILO

Use

ON

LY D

o N

ot D

uplic

ate

or D

istri

bute

ILO

Use

ON

LY D

o N

ot D

uplic

ate

or D

istri

bute

Page 203: Customer Educationeducation.informationbuilders.com/...studentguide(word)wm-ilo-sec.pdf · Student Guide v7.04 DN7000508.0216 ... iSM iWay Integration Tools ... SAP®, Siebel®, PeopleSoft®,

Creating a Web Service of the Customer Project

iWay Service Manager Tooling Techniques 195

4. Right-click CustXMLtoXML_PF and click Duplicate.

5. For the new name type CustXMLtoXML_WS and click OK.

ILO

Use

ON

LY D

o N

ot D

uplic

ate

or D

istri

bute

ILO

Use

ON

LY D

o N

ot D

uplic

ate

or D

istri

bute

Page 204: Customer Educationeducation.informationbuilders.com/...studentguide(word)wm-ilo-sec.pdf · Student Guide v7.04 DN7000508.0216 ... iSM iWay Integration Tools ... SAP®, Siebel®, PeopleSoft®,

Creating a Web Service of the Customer Project

iWay Service Manager Tooling Techniques 196

6. Double-click CustXMLtoXML_WS to open it in the Process Flow Editor.

Next you will import the CustXMLtoXML_In and CustXMLtoXML_Out schemas into the Customer project.

7. In the Integration Explorer under the Customer project, right-click the Schemas folder and select Import.

8. Under the General artifact click File System and click Next. 9. Click the Browse button and navigate to D:\Course9xx\Customer\Schemas.

Also you may click the pull-down arrow in the From directory section and file the folder.

10. Select both CustXMLtoXML_In.xsd and CustXMLtoXML_Out.xsd by clicking their respective check boxes.

11. Click Finish.

ILO

Use

ON

LY D

o N

ot D

uplic

ate

or D

istri

bute

ILO

Use

ON

LY D

o N

ot D

uplic

ate

or D

istri

bute

Page 205: Customer Educationeducation.informationbuilders.com/...studentguide(word)wm-ilo-sec.pdf · Student Guide v7.04 DN7000508.0216 ... iSM iWay Integration Tools ... SAP®, Siebel®, PeopleSoft®,

Creating a Web Service of the Customer Project

iWay Service Manager Tooling Techniques 197

12. The two schemas are displayed in the Schemas artifact.

ILO

Use

ON

LY D

o N

ot D

uplic

ate

or D

istri

bute

ILO

Use

ON

LY D

o N

ot D

uplic

ate

or D

istri

bute

Page 206: Customer Educationeducation.informationbuilders.com/...studentguide(word)wm-ilo-sec.pdf · Student Guide v7.04 DN7000508.0216 ... iSM iWay Integration Tools ... SAP®, Siebel®, PeopleSoft®,

Creating a Web Service of the Customer Project

iWay Service Manager Tooling Techniques 198

Add the Schemas to the Process Flow

You need to add the CustXMLtoXML_In and CustXMLtoXML_Out schemas to the CustXMLtoXML_WS process flow.

1. Click the Start object. 2. In the middle of the editor, click the Properties tab and click Schema.

3. For the Schema property, click the ellipsis button.

4. Expand the Customer project and the Schemas artifact. 5. Click CustXMLtoXML_In.xsd and click OK.

ILO

Use

ON

LY D

o N

ot D

uplic

ate

or D

istri

bute

ILO

Use

ON

LY D

o N

ot D

uplic

ate

or D

istri

bute

Page 207: Customer Educationeducation.informationbuilders.com/...studentguide(word)wm-ilo-sec.pdf · Student Guide v7.04 DN7000508.0216 ... iSM iWay Integration Tools ... SAP®, Siebel®, PeopleSoft®,

Creating a Web Service of the Customer Project

iWay Service Manager Tooling Techniques 199

6. For the Root Tag Element property select Customer from the drop-down menu.

Next you can update the contents of the End object with the CustXMLtoXML_Out.xsd schema.

7. Click the End object. 8. Click the Properties tab and click Schema. 9. For the Schema property, click the ellipsis button. 10. Expand the Customer project and expand the Schemas artifact. 11. Select CustXMLtoXML_Out.xsd and click OK.

ILO

Use

ON

LY D

o N

ot D

uplic

ate

or D

istri

bute

ILO

Use

ON

LY D

o N

ot D

uplic

ate

or D

istri

bute

Page 208: Customer Educationeducation.informationbuilders.com/...studentguide(word)wm-ilo-sec.pdf · Student Guide v7.04 DN7000508.0216 ... iSM iWay Integration Tools ... SAP®, Siebel®, PeopleSoft®,

Creating a Web Service of the Customer Project

iWay Service Manager Tooling Techniques 200

12. For the Root Tag Element property select INFO from the drop-down menu.

13. Save the CustXMLtoXML_WS process flow.

You will use a pre-defined SOAP listener to execute the web service.

Review the SOAP Channel from the iWay Library

Using the iWay Library you can get components of a SOAP channel which will be used to process the CustXMLtoXML_WS process flow as a business service.

1. Under the Customer project, expand the Channel artifact. 2. Double-click the CustomerSOAP_C channel to open it in the editor. 3. Save the CustomerSOAP_C channel.

ILO

Use

ON

LY D

o N

ot D

uplic

ate

or D

istri

bute

ILO

Use

ON

LY D

o N

ot D

uplic

ate

or D

istri

bute

Page 209: Customer Educationeducation.informationbuilders.com/...studentguide(word)wm-ilo-sec.pdf · Student Guide v7.04 DN7000508.0216 ... iSM iWay Integration Tools ... SAP®, Siebel®, PeopleSoft®,

Creating a Web Service of the Customer Project

iWay Service Manager Tooling Techniques 201

ILO

Use

ON

LY D

o N

ot D

uplic

ate

or D

istri

bute

ILO

Use

ON

LY D

o N

ot D

uplic

ate

or D

istri

bute

Page 210: Customer Educationeducation.informationbuilders.com/...studentguide(word)wm-ilo-sec.pdf · Student Guide v7.04 DN7000508.0216 ... iSM iWay Integration Tools ... SAP®, Siebel®, PeopleSoft®,

Creating a Web Service of the Customer Project

iWay Service Manager Tooling Techniques 202

Build the Web Service Application

In this section you will need to build the application that incorporates the CustomerSOAPC channel and the CustXMLtoXML_WS process flow containing the Start and End schemas.

1. Under the Customer project, right-click the Applications artifact, point to New , and click Application.

2. For the Name of the application type CustXMLtoXML_WS and click Next.

3. Select the CustomerSOAP_C inlineChannel and the CustXMLtoXML_WS process flow. Click Next.

ILO

Use

ON

LY D

o N

ot D

uplic

ate

or D

istri

bute

ILO

Use

ON

LY D

o N

ot D

uplic

ate

or D

istri

bute

Page 211: Customer Educationeducation.informationbuilders.com/...studentguide(word)wm-ilo-sec.pdf · Student Guide v7.04 DN7000508.0216 ... iSM iWay Integration Tools ... SAP®, Siebel®, PeopleSoft®,

Creating a Web Service of the Customer Project

iWay Service Manager Tooling Techniques 203

Make sure you select the CustXMLtoXML_WS process from the Customer Project.

4. For the Process Business Services pane select CustXMLtoXML_WS to expose it as an iWay Business Service. Click Next.

ILO

Use

ON

LY D

o N

ot D

uplic

ate

or D

istri

bute

ILO

Use

ON

LY D

o N

ot D

uplic

ate

or D

istri

bute

Page 212: Customer Educationeducation.informationbuilders.com/...studentguide(word)wm-ilo-sec.pdf · Student Guide v7.04 DN7000508.0216 ... iSM iWay Integration Tools ... SAP®, Siebel®, PeopleSoft®,

Creating a Web Service of the Customer Project

iWay Service Manager Tooling Techniques 204

5. Click Next. 6. Click Next. 7. Click Finish.

ILO

Use

ON

LY D

o N

ot D

uplic

ate

or D

istri

bute

ILO

Use

ON

LY D

o N

ot D

uplic

ate

or D

istri

bute

Page 213: Customer Educationeducation.informationbuilders.com/...studentguide(word)wm-ilo-sec.pdf · Student Guide v7.04 DN7000508.0216 ... iSM iWay Integration Tools ... SAP®, Siebel®, PeopleSoft®,

Creating a Web Service of the Customer Project

iWay Service Manager Tooling Techniques 205

The CustXMLtoXML_WS Application is displayed in the editor.

Next you can build and upload the application to the iWay server.

8. Expand CustXMLtoXML_WS application, right-click the build.xml artifact, point to Run As, and click 2 Ant Build.

ILO

Use

ON

LY D

o N

ot D

uplic

ate

or D

istri

bute

ILO

Use

ON

LY D

o N

ot D

uplic

ate

or D

istri

bute

Page 214: Customer Educationeducation.informationbuilders.com/...studentguide(word)wm-ilo-sec.pdf · Student Guide v7.04 DN7000508.0216 ... iSM iWay Integration Tools ... SAP®, Siebel®, PeopleSoft®,

Creating a Web Service of the Customer Project

iWay Service Manager Tooling Techniques 206

9. Click Run. 10. Maximize the iWay Web Console. 11. Click Management. 12. In the left tree under Application Management click Applications. 13. For the Application CustXMLtoXML_WS, under the Actions column, click Deploy.

14. Select ws01 for the Configuration Template and click Deploy.

ILO

Use

ON

LY D

o N

ot D

uplic

ate

or D

istri

bute

ILO

Use

ON

LY D

o N

ot D

uplic

ate

or D

istri

bute

Page 215: Customer Educationeducation.informationbuilders.com/...studentguide(word)wm-ilo-sec.pdf · Student Guide v7.04 DN7000508.0216 ... iSM iWay Integration Tools ... SAP®, Siebel®, PeopleSoft®,

Creating a Web Service of the Customer Project

iWay Service Manager Tooling Techniques 207

The ws01 template was created for you to select. The ws01 template has the ibseport special register set to 9993 already defined.

15. Click Deployments. For the CustXMLtoXML_WS_ws01 application, under the State column, click the red circle icon to start the application.

16. Click OK.

17. In the browser create a new tab. In the address bar type http://localhost:9993/ and press the Enter key.

ILO

Use

ON

LY D

o N

ot D

uplic

ate

or D

istri

bute

ILO

Use

ON

LY D

o N

ot D

uplic

ate

or D

istri

bute

Page 216: Customer Educationeducation.informationbuilders.com/...studentguide(word)wm-ilo-sec.pdf · Student Guide v7.04 DN7000508.0216 ... iSM iWay Integration Tools ... SAP®, Siebel®, PeopleSoft®,

Creating a Web Service of the Customer Project

iWay Service Manager Tooling Techniques 208

This web page is the iWay Business Service you created from the CustXMLtoXML_WS process flow. The SOAP2 listener is listening on port 9993 which is set by the template ws01 for the application. The SREG(ibseport) references the value 9993. Let's test the CustXMLtoXML_WS business service.

18. Click the test license.

19. Click the CustXMLtoXML_WS link.

ILO

Use

ON

LY D

o N

ot D

uplic

ate

or D

istri

bute

ILO

Use

ON

LY D

o N

ot D

uplic

ate

or D

istri

bute

Page 217: Customer Educationeducation.informationbuilders.com/...studentguide(word)wm-ilo-sec.pdf · Student Guide v7.04 DN7000508.0216 ... iSM iWay Integration Tools ... SAP®, Siebel®, PeopleSoft®,

Creating a Web Service of the Customer Project

iWay Service Manager Tooling Techniques 209

The CustXMLtoXML_WS process is the method or executable to the process flow.

20. Click run.

This link runs the CustXMLtoXML_WS process flow.

21. Use a Windows Explorer browser and navigate to the directory D:\Course9xx|Customer\Data. Double-click customer.xml to open its contents in an IE browser.

22. Highlight all of the XML code. Right-click and then click Copy.

ILO

Use

ON

LY D

o N

ot D

uplic

ate

or D

istri

bute

ILO

Use

ON

LY D

o N

ot D

uplic

ate

or D

istri

bute

Page 218: Customer Educationeducation.informationbuilders.com/...studentguide(word)wm-ilo-sec.pdf · Student Guide v7.04 DN7000508.0216 ... iSM iWay Integration Tools ... SAP®, Siebel®, PeopleSoft®,

Creating a Web Service of the Customer Project

iWay Service Manager Tooling Techniques 210

23. Click the http://localhost:9993/ tab. 24. Right-click in the input xml text box and click Paste.

ILO

Use

ON

LY D

o N

ot D

uplic

ate

or D

istri

bute

ILO

Use

ON

LY D

o N

ot D

uplic

ate

or D

istri

bute

Page 219: Customer Educationeducation.informationbuilders.com/...studentguide(word)wm-ilo-sec.pdf · Student Guide v7.04 DN7000508.0216 ... iSM iWay Integration Tools ... SAP®, Siebel®, PeopleSoft®,

Creating a Web Service of the Customer Project

iWay Service Manager Tooling Techniques 211

25. Click Invoke.

ILO

Use

ON

LY D

o N

ot D

uplic

ate

or D

istri

bute

ILO

Use

ON

LY D

o N

ot D

uplic

ate

or D

istri

bute

Page 220: Customer Educationeducation.informationbuilders.com/...studentguide(word)wm-ilo-sec.pdf · Student Guide v7.04 DN7000508.0216 ... iSM iWay Integration Tools ... SAP®, Siebel®, PeopleSoft®,

Creating a Web Service of the Customer Project

iWay Service Manager Tooling Techniques 212

The results:

26. Click the Back button twice in the browser.

You will need the Service Description (WSDL) for the next part of the exercise.

27. Point to Service Description, right-click and select Open in new window.

ILO

Use

ON

LY D

o N

ot D

uplic

ate

or D

istri

bute

ILO

Use

ON

LY D

o N

ot D

uplic

ate

or D

istri

bute

Page 221: Customer Educationeducation.informationbuilders.com/...studentguide(word)wm-ilo-sec.pdf · Student Guide v7.04 DN7000508.0216 ... iSM iWay Integration Tools ... SAP®, Siebel®, PeopleSoft®,

Creating a Web Service of the Customer Project

iWay Service Manager Tooling Techniques 213

The CustXMLtoXML_WS WSDL syntax:

You can scroll down through the WSDL. The CustXMLtoXML_WS WSDL represents the SOAP request document and the SOAP response document. The SOAP request document contains the XML elements you must send to the CustXMLtoXML_WS method for it to execute properly. The SOAP response document is the elements which are returned as output. Next you will build a process flow to invoke the CustXMLtoXML_WS WSDL web service.

28. Minimize the browser(s). 29. Maximize iIT and close all open tabs in the editor.

ILO

Use

ON

LY D

o N

ot D

uplic

ate

or D

istri

bute

ILO

Use

ON

LY D

o N

ot D

uplic

ate

or D

istri

bute

Page 222: Customer Educationeducation.informationbuilders.com/...studentguide(word)wm-ilo-sec.pdf · Student Guide v7.04 DN7000508.0216 ... iSM iWay Integration Tools ... SAP®, Siebel®, PeopleSoft®,

Creating a Web Service of the Customer Project

iWay Service Manager Tooling Techniques 214

Lesson Review

Understand the Benefits to Converting a Project into a Web Service Define the Customer Request and Response documents Deploy the Web Service Invoke the Web Service

ILO

Use

ON

LY D

o N

ot D

uplic

ate

or D

istri

bute

ILO

Use

ON

LY D

o N

ot D

uplic

ate

or D

istri

bute

Page 223: Customer Educationeducation.informationbuilders.com/...studentguide(word)wm-ilo-sec.pdf · Student Guide v7.04 DN7000508.0216 ... iSM iWay Integration Tools ... SAP®, Siebel®, PeopleSoft®,

Reading Multiple Inputs

iWay Service Manager Tooling Techniques 215

Lesson 7

Reading Multiple Inputs

Objectives

• Introduction • Create the Multiple Input Structure for the CustXMLtoXML_C Channel

ILO

Use

ON

LY D

o N

ot D

uplic

ate

or D

istri

bute

ILO

Use

ON

LY D

o N

ot D

uplic

ate

or D

istri

bute

Page 224: Customer Educationeducation.informationbuilders.com/...studentguide(word)wm-ilo-sec.pdf · Student Guide v7.04 DN7000508.0216 ... iSM iWay Integration Tools ... SAP®, Siebel®, PeopleSoft®,

Reading Multiple Inputs

iWay Service Manager Tooling Techniques 216

Introduction to Multiple Inputs

A request has been received to read data from various systems using multiple inputs and process this data in a coherent fashion, while running an application that can be easily maintained and managed.

The incoming data will originate and be read from the following sources:

• A comma-separated values (CSV) file from a location on a file system. • A Microsoft Excel® data file from a FTP File location.

Data that is read from these data sources will be converted into a common canonical format for data processing (iSM process flow). As a best practice, ensure that data processing is performed in a canonical format, so the defined business logic will not need to change if the data source should change. The multi-input canonical setup takes advantage of the multi-channel architecture. This architecture is a set of channels that read data and send this data to other dedicated channels for processing instead of performing data processing tasks themselves. This can be done by taking advantage of Internal Queues, Ordered Queues, or Remote Verified Invocation (RVI) components which also enable load-balancing, persistence, and prioritization. For more information on these topics, see the iWay Cross-Channel topic in the Appendix. Channel Architecture In this lesson you will be creating a composite channel which under the covers, creates channels for data processing. The composite channel approach is used to simplify development efforts by enabling you to create a single composite channel instead of multiple similar channels. An understanding of inbound data processing is a key to understanding the composite format. It is important to note that regardless of how you visualize components in the Channel Builder, the result will be the creation of a number of channel listeners with a corresponding set of processing logic (for example, preparsers, process flows, and so on). For every input that you need to convert to a canonical, you may have a separate listener preparser (transformer) component combination assigned to separate listener types. In the following diagram, the Order_Processing channel has two inlets, which host five listeners. During runtime, the channel group will create five channel listeners, which have corresponding components from the configured inlets and routes.

ILO

Use

ON

LY D

o N

ot D

uplic

ate

or D

istri

bute

ILO

Use

ON

LY D

o N

ot D

uplic

ate

or D

istri

bute

Page 225: Customer Educationeducation.informationbuilders.com/...studentguide(word)wm-ilo-sec.pdf · Student Guide v7.04 DN7000508.0216 ... iSM iWay Integration Tools ... SAP®, Siebel®, PeopleSoft®,

Reading Multiple Inputs

iWay Service Manager Tooling Techniques 217

ILO

Use

ON

LY D

o N

ot D

uplic

ate

or D

istri

bute

ILO

Use

ON

LY D

o N

ot D

uplic

ate

or D

istri

bute

Page 226: Customer Educationeducation.informationbuilders.com/...studentguide(word)wm-ilo-sec.pdf · Student Guide v7.04 DN7000508.0216 ... iSM iWay Integration Tools ... SAP®, Siebel®, PeopleSoft®,

Reading Multiple Inputs

iWay Service Manager Tooling Techniques 218

Create the Multiple Input Structure for the CustXMLtoXMLMI_C Channel

In the next exercise you will be modifying the CustXMLtoXMLMI_C channel to another input type. This will entail adding another inlet with a corresponding listener with a transformer tied to a preparser. You will read in a comma separated values (CSV) file and convert it into an XML canonical.

1. In the Integration Explorer, from the Customer_MultiInput project under the channels artifact, double-click the CustXMLtoXMLMI_C channel to open it in the Channel Builder.

First, you will add a new inlet to the channel. Then you can add the necessary components for the second input type (listener, preparser, and so on).

2. In the Channel Builder, right-click the channel: CustXMLtoXMLMI_C, point to Add Channel Component, and click Inlet.

ILO

Use

ON

LY D

o N

ot D

uplic

ate

or D

istri

bute

ILO

Use

ON

LY D

o N

ot D

uplic

ate

or D

istri

bute

Page 227: Customer Educationeducation.informationbuilders.com/...studentguide(word)wm-ilo-sec.pdf · Student Guide v7.04 DN7000508.0216 ... iSM iWay Integration Tools ... SAP®, Siebel®, PeopleSoft®,

Reading Multiple Inputs

iWay Service Manager Tooling Techniques 219

3. Change the name of the inlet to CustCSVtoXML_I.

Next add a listener to the new Inlet. The listener has been completed for you, so you can import it from the iWay library.

4. Right-click the new inlet CustCSVtoXML_I and click Import from Library.

5. Under the Listener Default folder, select CustCSVtoXML_FL and click OK.

ILO

Use

ON

LY D

o N

ot D

uplic

ate

or D

istri

bute

ILO

Use

ON

LY D

o N

ot D

uplic

ate

or D

istri

bute

Page 228: Customer Educationeducation.informationbuilders.com/...studentguide(word)wm-ilo-sec.pdf · Student Guide v7.04 DN7000508.0216 ... iSM iWay Integration Tools ... SAP®, Siebel®, PeopleSoft®,

Reading Multiple Inputs

iWay Service Manager Tooling Techniques 220

The CustXMLtoXMLMI_C with the CustCSVtoXML_FL file listener is displayed.

6. In the right pane, click the arrow to expand Main.

ILO

Use

ON

LY D

o N

ot D

uplic

ate

or D

istri

bute

ILO

Use

ON

LY D

o N

ot D

uplic

ate

or D

istri

bute

Page 229: Customer Educationeducation.informationbuilders.com/...studentguide(word)wm-ilo-sec.pdf · Student Guide v7.04 DN7000508.0216 ... iSM iWay Integration Tools ... SAP®, Siebel®, PeopleSoft®,

Reading Multiple Inputs

iWay Service Manager Tooling Techniques 221

You can browse the properties for the CustCSVtoXML_FL file listener. Notice in this listener the Removal Destination is blank. The Removal Destination is optional because if thousands of files are coming into the channel daily, the folder with the Removal Destination will fill up and become unmanageable.

For each inlet you need to add a preparser. The preparser for each inlet is equipped to transform the incoming date files into a canonical format for processing in the Routes process flow. The preparsers have been prepared for you and can be imported from the library.

Add Inlet Preparsers

In this section you will add two preparsers to each inlet to accommodate the conversion of an incoming file formats into an XML canonical document.

1. Right-click the inlet CustXMLtoXML_I and click Import from Library.

ILO

Use

ON

LY D

o N

ot D

uplic

ate

or D

istri

bute

ILO

Use

ON

LY D

o N

ot D

uplic

ate

or D

istri

bute

Page 230: Customer Educationeducation.informationbuilders.com/...studentguide(word)wm-ilo-sec.pdf · Student Guide v7.04 DN7000508.0216 ... iSM iWay Integration Tools ... SAP®, Siebel®, PeopleSoft®,

Reading Multiple Inputs

iWay Service Manager Tooling Techniques 222

2. Under the preparser artifact and Default folder select CustXMLtoXML_Preparser and click OK.

3. On the right pane click change type for the Type of preparser.

ILO

Use

ON

LY D

o N

ot D

uplic

ate

or D

istri

bute

ILO

Use

ON

LY D

o N

ot D

uplic

ate

or D

istri

bute

Page 231: Customer Educationeducation.informationbuilders.com/...studentguide(word)wm-ilo-sec.pdf · Student Guide v7.04 DN7000508.0216 ... iSM iWay Integration Tools ... SAP®, Siebel®, PeopleSoft®,

Reading Multiple Inputs

iWay Service Manager Tooling Techniques 223

4. On the right pane, expand Main. The Transform name is CustXMLtoXML_T which transforms the incoming XML document into a canonical format used by the Routes process flow. The Expected input is XML and the Document type is XML. Click Finish.

ILO

Use

ON

LY D

o N

ot D

uplic

ate

or D

istri

bute

ILO

Use

ON

LY D

o N

ot D

uplic

ate

or D

istri

bute

Page 232: Customer Educationeducation.informationbuilders.com/...studentguide(word)wm-ilo-sec.pdf · Student Guide v7.04 DN7000508.0216 ... iSM iWay Integration Tools ... SAP®, Siebel®, PeopleSoft®,

Reading Multiple Inputs

iWay Service Manager Tooling Techniques 224

Next you need to create another preparser which converts the CSV document to an XML document preparser.

5. Right-click the CustCSVtoXML_I inlet and select Import from Library.

6. Under the preparser artifact and Default folder select CustCSVtoXML_Preparser and click OK.

7. On the right pane expand Main. Notice the Transform name of CustCtX_T which transforms the incoming csv document into a Canonical XML document.

ILO

Use

ON

LY D

o N

ot D

uplic

ate

or D

istri

bute

ILO

Use

ON

LY D

o N

ot D

uplic

ate

or D

istri

bute

Page 233: Customer Educationeducation.informationbuilders.com/...studentguide(word)wm-ilo-sec.pdf · Student Guide v7.04 DN7000508.0216 ... iSM iWay Integration Tools ... SAP®, Siebel®, PeopleSoft®,

Reading Multiple Inputs

iWay Service Manager Tooling Techniques 225

The CustXMLtoXMLMI_C channel is displayed.

8. Click the Save icon to save the channel.

Update, Deploy, and Start the CustXMLtoXMLMI_App Application

You will need to update the CustXMLtoXMLMI_App application before you can deploy and start it on the iSM server. It is important to note that if you select a high-level component, such as a channel, then all referenced components of the channel (such as register-sets, process flows, transforms, and so on) are automatically added. However, any components that are called by name (for

ILO

Use

ON

LY D

o N

ot D

uplic

ate

or D

istri

bute

ILO

Use

ON

LY D

o N

ot D

uplic

ate

or D

istri

bute

Page 234: Customer Educationeducation.informationbuilders.com/...studentguide(word)wm-ilo-sec.pdf · Student Guide v7.04 DN7000508.0216 ... iSM iWay Integration Tools ... SAP®, Siebel®, PeopleSoft®,

Reading Multiple Inputs

iWay Service Manager Tooling Techniques 226

example transformations named in preparsers) rather than referenced must be included explicitly. You will need to add CustXMLtoXML_T and CustCtX_T transforms to the build of the application.

1. In the Integration Explorer, under the Customer_MultiInput project, expand the Application folder artifact.

2. Right-click CustXMLtoXMLMI_App, point to Open With, and click Application Editor.

3. In the Application Editor, click the green "+" sign to add a component.

4. For the CustXMLtoXML_MultiInput project expand Transforms and select CustCtX_T. Press the Ctrl key and select CustXMLtoXML_T. Both transforms are selected. Click OK.

ILO

Use

ON

LY D

o N

ot D

uplic

ate

or D

istri

bute

ILO

Use

ON

LY D

o N

ot D

uplic

ate

or D

istri

bute

Page 235: Customer Educationeducation.informationbuilders.com/...studentguide(word)wm-ilo-sec.pdf · Student Guide v7.04 DN7000508.0216 ... iSM iWay Integration Tools ... SAP®, Siebel®, PeopleSoft®,

Reading Multiple Inputs

iWay Service Manager Tooling Techniques 227

The CustXMLtoXML_App application is displayed.

5. Click the Save icon to save the application. 6. In the Integration Explorer, right-click build.ant, point to Run As, and click 2 Ant

Build.

ILO

Use

ON

LY D

o N

ot D

uplic

ate

or D

istri

bute

ILO

Use

ON

LY D

o N

ot D

uplic

ate

or D

istri

bute

Page 236: Customer Educationeducation.informationbuilders.com/...studentguide(word)wm-ilo-sec.pdf · Student Guide v7.04 DN7000508.0216 ... iSM iWay Integration Tools ... SAP®, Siebel®, PeopleSoft®,

Reading Multiple Inputs

iWay Service Manager Tooling Techniques 228

7. Click the build(default) and upload check boxes. Click Run.

ILO

Use

ON

LY D

o N

ot D

uplic

ate

or D

istri

bute

ILO

Use

ON

LY D

o N

ot D

uplic

ate

or D

istri

bute

Page 237: Customer Educationeducation.informationbuilders.com/...studentguide(word)wm-ilo-sec.pdf · Student Guide v7.04 DN7000508.0216 ... iSM iWay Integration Tools ... SAP®, Siebel®, PeopleSoft®,

Reading Multiple Inputs

iWay Service Manager Tooling Techniques 229

The build messages are displayed.

8. Maximize the iWay Service Manage Web Console. 9. Click the Management link. 10. In the left tree click Applications.

11. For the CustXMLtoXMLMI_App application under the Actions column, click the Deploy icon.

12. Select Prod for the Configuration Template. 13. Click Deploy.

14. To start the CustXMLtoXMLMI_App_Prod application click the red circle under the State column.

15. Click OK.

ILO

Use

ON

LY D

o N

ot D

uplic

ate

or D

istri

bute

ILO

Use

ON

LY D

o N

ot D

uplic

ate

or D

istri

bute

Page 238: Customer Educationeducation.informationbuilders.com/...studentguide(word)wm-ilo-sec.pdf · Student Guide v7.04 DN7000508.0216 ... iSM iWay Integration Tools ... SAP®, Siebel®, PeopleSoft®,

Reading Multiple Inputs

iWay Service Manager Tooling Techniques 230

16. To Test the CustXMLtoXML_App_Prod application, using an Internet Explorer browser, navigate to D:\Course9xx\Cust_Fix\data and copy CustXtX_Excel.cvs to D:\Course9xx\Cust_Fix\input.

17. Navigate to D:\Course9xx\Customer\ValidCustomer and open the most current ValidCustomer xml file.

18. Maximize the Chrome browser with Sprog Sentinel. 19. In the left tree click Servers. 20. In the middle of the display, click localhost and then Applications.

You can monitor the localhost server and access all of its applications. Each application can be monitored for successful or failed executions and to review the health of the running instance.

ILO

Use

ON

LY D

o N

ot D

uplic

ate

or D

istri

bute

ILO

Use

ON

LY D

o N

ot D

uplic

ate

or D

istri

bute

Page 239: Customer Educationeducation.informationbuilders.com/...studentguide(word)wm-ilo-sec.pdf · Student Guide v7.04 DN7000508.0216 ... iSM iWay Integration Tools ... SAP®, Siebel®, PeopleSoft®,

Reading Multiple Inputs

iWay Service Manager Tooling Techniques 231

Lesson Review

Introduction Create the Multiple Input Structure for the CustXtX_C Channel

ILO

Use

ON

LY D

o N

ot D

uplic

ate

or D

istri

bute

ILO

Use

ON

LY D

o N

ot D

uplic

ate

or D

istri

bute

Page 240: Customer Educationeducation.informationbuilders.com/...studentguide(word)wm-ilo-sec.pdf · Student Guide v7.04 DN7000508.0216 ... iSM iWay Integration Tools ... SAP®, Siebel®, PeopleSoft®,

Cross-Channel Services

iWay Service Manager Tooling Techniques 232

Lesson 8

Cross-Channel Services

Objectives

• Introduction to Cross-Platform, Application and Channel Services • Example of Cross-Channel Services using Ordered Queues

ILO

Use

ON

LY D

o N

ot D

uplic

ate

or D

istri

bute

ILO

Use

ON

LY D

o N

ot D

uplic

ate

or D

istri

bute

Page 241: Customer Educationeducation.informationbuilders.com/...studentguide(word)wm-ilo-sec.pdf · Student Guide v7.04 DN7000508.0216 ... iSM iWay Integration Tools ... SAP®, Siebel®, PeopleSoft®,

Cross-Channel Services

iWay Service Manager Tooling Techniques 233

Introduction to Cross-Platform, Application, and Channel Services

iWay Service Manager (iSM) provides channels that link processes within iSM to other processes in the same or another instance of iSM. This contrasts with channels that acquire messages from external media, such as a file or FTP connection. These channels divide the message execution process into stages for application purposes, such as:

• Dividing the application into more manageable portions. • Changing threading models based on specific sections of the application. • Performance tuning.

Cross-channel message exchanges can be used to facilitate application modularization. In addition to simplifying application development and maintenance, an application that is composed of modular sections provides horizontal and vertical scaling. The modular sections can be executed:

• Within the same JVM. This facilitates the selection of the appropriate threading model for that portion of the application.

• Across JVMs on the same computer to take advantage of the dispatching mechanisms that belong to this computer.

• Across computers, this allows several computer systems to work on the application simultaneously.

The mechanisms that support cross-channel message exchanges provide opportunities for workload balancing and backup/recovery when used in appropriately designed applications. The application design that is best oriented for the use of cross-channel distributions is called the multi-channel architecture, which is a common architecture for iSM-based applications. For example, consider the following modularized breakdown of a typical application:

1. A message arrives from an external source. This message is examined and transformed, routed to a section of the application that processes the payload, and then passed to a section that emits the final result.

2. A special error handler is configured to report on application issues that are not handled specifically in other portions of the application.

3. An error handler channel receives messages through the errorTo facility of each channel using an internal emitter to direct the error messages that are not handled within the application channel.

The following channel types are available:

ILO

Use

ON

LY D

o N

ot D

uplic

ate

or D

istri

bute

ILO

Use

ON

LY D

o N

ot D

uplic

ate

or D

istri

bute

Page 242: Customer Educationeducation.informationbuilders.com/...studentguide(word)wm-ilo-sec.pdf · Student Guide v7.04 DN7000508.0216 ... iSM iWay Integration Tools ... SAP®, Siebel®, PeopleSoft®,

Cross-Channel Services

iWay Service Manager Tooling Techniques 234

• Internal. Passes messages between channels for asynchronous or synchronous execution. For more information, see Internal Queue Processing.

• Ordered. Passes messages between channels for asynchronous execution, maintaining execution order and batch control. For more information, see Ordered Queue Processing.

• Reverse Invocation (RVI). Exchanges messages between two or more instances of iSM, with support for reverse connections. This allows full protection of the iSM instances behind outbound-only firewalls. For more information, see Reverse Invocation Queue Processing.

• Asynchronous Forward Transfer Invocation (AFTI). Marshals and unmarshals messages and their context to be exchanged over protocols other than the existing cross-channel protocols that are provided by iSM. For more information, see Asynchronous Forward Transfer Invocation Queue Processing.

All of the cross-channel links pass messages and full execution context. Additionally, all messages and contexts can be compressed and encrypted for secure processing.

ILO

Use

ON

LY D

o N

ot D

uplic

ate

or D

istri

bute

ILO

Use

ON

LY D

o N

ot D

uplic

ate

or D

istri

bute

Page 243: Customer Educationeducation.informationbuilders.com/...studentguide(word)wm-ilo-sec.pdf · Student Guide v7.04 DN7000508.0216 ... iSM iWay Integration Tools ... SAP®, Siebel®, PeopleSoft®,

Cross-Channel Services

iWay Service Manager Tooling Techniques 235

Internal Queue Processing

Some designs require that a message be passed from one process to another. For example, a process might receive a message on a protocol, process it, and then desire another listener (thread) to complete the message operation. Frequently, such messages are stored in the file system using the File emitter, and then picked up using the File listener.

As an alternative, iWay Service Manager offers the Internal Queue listener. Messages are stored in memory by the internal emitter and held until picked up by the Internal Queue listener. Messages can be made to persist in the event that the server fails or is terminated before all held messages are processed. Each listener is associated with one internal queue that has been assigned a name. The flow that is required to store a message in the queue configures an internal emitter to that assigned name. The listener picks up the stored messages by First In, First Out (FIFO) method, and passes them for execution. As the queue grows and shrinks, the Internal Queue listener can manage the listeners feeding the queue to maintain an average, desirable size. This is referred to as rubber banding or back pressure. The low and high mark configuration values control this. A common use of the internal emitter is to pass a message to one or more work flows that operate asynchronously. For example, each Internal Queue listener flow may update a different database or may access records from a single database based upon a computed modulus key.

The following is a list of additional scenarios where Internal Queue processing can be implemented:

• Dividing an application into multiple steps simplifies development efforts. iWay Business Activity Monitor (BAM) can restart the message processing between steps.

• There are several applications that must emit to SAP through a single-access connection.

• HTTP messages are currently being received on many slow-speed lines. There is a requirement to multiplex the messages for effective use on a single high-speed line to a third party

• A high-performance application needs to take advantage of channel throttling and control between application steps to improve overall throughput.

• There is a requirement to consolidate error handling into a single channel.

Other Internal Queue Processing Properties The control list, high mark, and low mark parameters all go together. The control list is a list of channel names, normally channels that send messages to this queue. If the size of the

ILO

Use

ON

LY D

o N

ot D

uplic

ate

or D

istri

bute

ILO

Use

ON

LY D

o N

ot D

uplic

ate

or D

istri

bute

Page 244: Customer Educationeducation.informationbuilders.com/...studentguide(word)wm-ilo-sec.pdf · Student Guide v7.04 DN7000508.0216 ... iSM iWay Integration Tools ... SAP®, Siebel®, PeopleSoft®,

Cross-Channel Services

iWay Service Manager Tooling Techniques 236

queue reaches the high mark, the channels on the control list all get a passivate message. This means that they stop accepting new messages which in turn means that they stop putting messages on the queue. Meanwhile, the internal listener continues to grind through the messages already on the queue until the size of the queue reaches the low mark. At this point, the channels on the control list all get an activate message, which wakes them up and puts them back to work. As an example, you could create a file channel that sends messages to an internal queue. For example, you could make the internal listener's high mark 10 and the low mark parameter 5. Put the channel's name into the control list. First, you slow down the internal channel a bit by making it single threaded and adding a copy agent with a delay of a few seconds. Load 100 or so files on the file listener. Before too long the size of the queue reaches the high mark of 10 and the file channel is passivated. After a few seconds, the queue will reach the low mark of 5 and the file channel will be reactivated. You should see the file channel moving in spurts like this, while the internal channel stays steady. The inhibit option also uses the high and low mark parameters. The queue stops accepting messages when it reaches the high mark, and opens back up when it gets down to the low mark. A caller who tries to put a message on an inhibited queue gets an error.

ILO

Use

ON

LY D

o N

ot D

uplic

ate

or D

istri

bute

ILO

Use

ON

LY D

o N

ot D

uplic

ate

or D

istri

bute

Page 245: Customer Educationeducation.informationbuilders.com/...studentguide(word)wm-ilo-sec.pdf · Student Guide v7.04 DN7000508.0216 ... iSM iWay Integration Tools ... SAP®, Siebel®, PeopleSoft®,

Cross-Channel Services

iWay Service Manager Tooling Techniques 237

Ordered Queue Processing

Order Queue Processing is a system that receives messages in some intermixed sequence, is charged with not losing any messages, and desires to process the incoming messages in parallel. Parallelism loses the input ordering. However, single threading has an adverse impact on performance.

The ordered listener is an iWay Service Manager (iSM) channel that alleviates these concerns of parallelism, retaining the required order, and collecting messages for a specific purpose for dispatch to the next channel. Messages can be dispatched as they become available, while retaining the order, or as an ordered group when the final message of the group is recognized. With the exception of the ordering facility, an ordered queue is similar to the commonly used internal queue, and it retains the characteristics of that type of channel. This includes support for low and high watermark tracking, passivation, inhibition, and so on. It is the responsibility of the application designer to determine the type of queue required and to place messages on the queue appropriately for the application. A common application requirement is to present messages to a channel for processing in an order that is not directly related to the order of their arrival at the prior channel. For example:

• Retail Applications. EDI messages for shipping arrive from the warehouse in random order, and must be dispatched to the appropriate customer record for invoicing.

• Medical Applications. Test results are generated by a lab in the order of processing, but need to be dispatched to the record of a patent as a group (all or none).

• Shipping Applications. Messages must be sent to a remote location in processing order. If the entire message set cannot be created, then none of the messages should be sent.

• Cross-system Message Exchange Application. Sequenced messages are sent across the web to another system. The arrival order at the destination cannot be predicted, and the messages must be processed in a particular sequence that is not related to their arrival time.

• Unordered batches must be processed in a specific order. Incoming messages, perhaps from an iterator over an incoming message, must process portions of a message in a sequence that is different from the defined order of the elements in the original message.

ILO

Use

ON

LY D

o N

ot D

uplic

ate

or D

istri

bute

ILO

Use

ON

LY D

o N

ot D

uplic

ate

or D

istri

bute

Page 246: Customer Educationeducation.informationbuilders.com/...studentguide(word)wm-ilo-sec.pdf · Student Guide v7.04 DN7000508.0216 ... iSM iWay Integration Tools ... SAP®, Siebel®, PeopleSoft®,

Cross-Channel Services

iWay Service Manager Tooling Techniques 238

Ordered Queue Facility

The ordered queue facility of iSM collects messages for dispatch and ensures that they are dispatched in the appropriate order. It is a variation of the internal queue listener and emitter, and supports the complete set of capabilities of the internal queuing facility. In the internal queuing facility, messages are emitted to the queue, where they are generally selected for execution in the order of arrival. Multiple subchannels can be defined to process the messages in parallel. Pended messages are placed back on the queue as they are selected to be retried. The use of multiple subchannels (threads) and the use of pending prevent any control of message ordering. To maintain ordering, applications frequently define a single subchannel and avoid use of the pending facility. This technique maintains ordering, but at the expense of performance and complexity. This is the issue that the ordered internal queue facility is intended to address. The ordered queue facility allows messages to be categorized by group. A group is any value of meaning to the application. For example, a patient ID, a transaction ID, a shipment number, and so on. The group identifier is passed along with the message from the emitter. Messages within the group will be dispatched by the Ordered Queue listener in the order they are received. The group is defined when it is first presented for a message. There is no need to predefine the group during configuration. Within a group, subsorting by a designated sequencing field is possible, allowing the ordered queue to resort the messages before passing them to the application process flow. This allows situations, such as the unpredictability of input order due to communication delays for some messages or unsorted input in general, to be handled. The intra-batch subsort key is presented by the emitter. For non-batching queues, subsorting is not available.

ILO

Use

ON

LY D

o N

ot D

uplic

ate

or D

istri

bute

ILO

Use

ON

LY D

o N

ot D

uplic

ate

or D

istri

bute

Page 247: Customer Educationeducation.informationbuilders.com/...studentguide(word)wm-ilo-sec.pdf · Student Guide v7.04 DN7000508.0216 ... iSM iWay Integration Tools ... SAP®, Siebel®, PeopleSoft®,

Cross-Channel Services

iWay Service Manager Tooling Techniques 239

Reverse Invocation Queue Processing

Reverse Invocation (RVI) queue (also referred to as gateway) processing links two or more iWay Service Manager (iSM) instances in a message receiver or a message executor relationship to tunnel through secure firewalls.

iSM horizontal scaling through reverse invocation allows a message received by one iSM configuration to be processed on another configuration. Configurations are expected to be on separate machines, but this is not a requirement. Messages can be distributed over an arbitrary number of associated configurations to balance workload and provide for high availability of processing services. Messages are received at a receiving engine (the iWay Proxy) and executed at an execution engine. Each message arriving at the iWay Proxy is assigned to a named service. This assignment can be configured in a fixed manner based on the receiving listener or it can be assigned using the full services of iSM intelligent routing services. Regardless of how the assignment is made, the receiving engine locates an execution engine offering the named service, and passes the message to that engine for execution. Processing engines connect to the receiving engine on a secure, reverse channel. This enables the receiving engine to be located across a firewall, enabling execution to be carried on in a secure environment not open to outside, unauthorized access. This is also referred to as Reverse Invocation because the execution engine connects to the receiving engine rather than the receiving engine connecting to the execution engine to pass a document.

ILO

Use

ON

LY D

o N

ot D

uplic

ate

or D

istri

bute

ILO

Use

ON

LY D

o N

ot D

uplic

ate

or D

istri

bute

Page 248: Customer Educationeducation.informationbuilders.com/...studentguide(word)wm-ilo-sec.pdf · Student Guide v7.04 DN7000508.0216 ... iSM iWay Integration Tools ... SAP®, Siebel®, PeopleSoft®,

Cross-Channel Services

iWay Service Manager Tooling Techniques 240

Asynchronous Forward Transfer Invocation Queue Processing

The cross-channel protocols that are described in the previous chapters of this documentation are completely managed by iSM. Sometimes an application requires a cross-channel structure that must use another protocol, such as MQ Series, MSMQ, FTP, or any other protocol that is not specific to iSM. To support this requirement, it is necessary to marshall the message and its context for

transmission into a format that iSM can support. Asynchronous Forward Transfer Invocation (AFTI) allows a service to transfer a message and its context across a channel using a protocol that is not specific to iSM. There is no restriction on the type of protocol that can be used. In iSM terms, marshalling refers to the serialization of the current message and its context (special registers) for saving or transmission purposes. Unmarshalling takes a marshalled serialized message and restores its content and context. AFTI is accomplished through the use of a provided service within a process flow. To send a context and a message to another party, configure the Marshall preemitter (com.ibi.preemit.XDMarshall) on the emit service or emitter being used. When the message is received by an iSM channel, it is automatically unmarshalled. The message context is reestablished and the message flows through the standard channel functionality. Additionally, the Marshall service (com.ibi.agents.XDMarshallAgent) is available, which can be positioned to marshall the message and its context before it is passed to an emitter. For example: In this example, a process flow is defined and a preparser is added to reach the Marshall service. Next, a service is defined to prepare the message, which will be sent to one of two destinations. Note that this example uses an emit object, so that the message is sent after the process flow is completed. An emit service could have also been used, which would depend on the requirements of the application.

ILO

Use

ON

LY D

o N

ot D

uplic

ate

or D

istri

bute

ILO

Use

ON

LY D

o N

ot D

uplic

ate

or D

istri

bute

Page 249: Customer Educationeducation.informationbuilders.com/...studentguide(word)wm-ilo-sec.pdf · Student Guide v7.04 DN7000508.0216 ... iSM iWay Integration Tools ... SAP®, Siebel®, PeopleSoft®,

Cross-Channel Services

iWay Service Manager Tooling Techniques 241

On the receiving side, a simple process flow can deposit the unmarshalled message into the desired internal queue. A best practice can be to put the name of the desired queue in a Special Register (SREG) if the process flow can deposit into different queues. AFTI offers optional data compression and encryption through AES. Encryption is offered, since the marshalled message may reside on an intermediate media (for example, a file system). Any message-bearing protocol can be used. If the marshalled message will never be serialized to external media, then encryption is probably not required. While decompression is handled automatically by the receiving channel, the encryption key must be supplied to the receiver. This is the purpose of the AES Key parameter, which is available for all iSM listeners.

ILO

Use

ON

LY D

o N

ot D

uplic

ate

or D

istri

bute

ILO

Use

ON

LY D

o N

ot D

uplic

ate

or D

istri

bute

Page 250: Customer Educationeducation.informationbuilders.com/...studentguide(word)wm-ilo-sec.pdf · Student Guide v7.04 DN7000508.0216 ... iSM iWay Integration Tools ... SAP®, Siebel®, PeopleSoft®,

Cross-Channel Services

iWay Service Manager Tooling Techniques 242

Example of Cross-Channel Services using Ordered Queues

In this example you will learn how to use Ordered Queues to process documents based on a group key and a sorted sequence. You will see how two medical patient records are processed through an Ordered Queue. Each document has a patientID and a sequence number element which will be used as a group key and sort numeric in the ordered listener.

1. A number of patient record documents have been created with the following format:

The patientID element will be set as the Group Key and the sequence element will set to the sort order numeric. The islast element will be used to tell the Ordered Queue Service when to stop processing. You will review the first process flow which calls the Ordered Queue Services objects to send the documents to the Ordered Queue Listener.

2. Expand the CrossChannels project. Expand the Flows artifact. Double-click PO_Orders to open the process flow.

3. Click the first CC_Ordered object after the Start object. Click the Properties tab and the Properties sub-tab.

ILO

Use

ON

LY D

o N

ot D

uplic

ate

or D

istri

bute

ILO

Use

ON

LY D

o N

ot D

uplic

ate

or D

istri

bute

Page 251: Customer Educationeducation.informationbuilders.com/...studentguide(word)wm-ilo-sec.pdf · Student Guide v7.04 DN7000508.0216 ... iSM iWay Integration Tools ... SAP®, Siebel®, PeopleSoft®,

Cross-Channel Services

iWay Service Manager Tooling Techniques 243

The Queue name where messages get posted is CC_OrdQue. This name is arbitrary, but it must equal the Queue Name in the Ordered Queue Listener. The Group Key identifies the group for the message. Messages belonging to a group will execute strictly in order one after the other but concurrently with messages belonging to other groups. The _xpath(testresult/patientID) is the patient ID number in the incoming document. Initially, the Message type is set to doc because XML documents are being loaded through a file listener.

4. A Decision Switch object is used to determine the end of the ordered list. The Expression _xpath(/testresult/islast) looks at the value in the islast element.

If the value of islast is false, go to a natural end and read the next document in the stream. If the value of islast is true go to the CC_Ordered1 Ordered Queue Service call.

5. The CC_Ordered1 Ordered Queue Service call is the same as the CC_Ordered object from before except the Message Type is set to end.

ILO

Use

ON

LY D

o N

ot D

uplic

ate

or D

istri

bute

ILO

Use

ON

LY D

o N

ot D

uplic

ate

or D

istri

bute

Page 252: Customer Educationeducation.informationbuilders.com/...studentguide(word)wm-ilo-sec.pdf · Student Guide v7.04 DN7000508.0216 ... iSM iWay Integration Tools ... SAP®, Siebel®, PeopleSoft®,

Cross-Channel Services

iWay Service Manager Tooling Techniques 244

The last document sends a document payload with the end group signal. The end signal sends the end of group signal. The CC_OrdersA_C channel is a normal File Listener channel accepting XML documents. The CC_OrdersB_C channel is the Orders Queue Listener type channel managing the orders as a group. Let's take a look at its properties.

6. Expand the Channels artifact. Double-click the CC_OrdersB_C channel to open it in the editor.

7. Click the CC_OrdersB_OQ Ordered Queue listener and expand the Main category in the right pane.

The name of the Ordered Queue is CC_OrdQue which is the same name property in the Ordered Queue service objects. The Queuing Mode is set to batch, which means the Ordered Queue will wait until all of the documents are ready to be

ILO

Use

ON

LY D

o N

ot D

uplic

ate

or D

istri

bute

ILO

Use

ON

LY D

o N

ot D

uplic

ate

or D

istri

bute

Page 253: Customer Educationeducation.informationbuilders.com/...studentguide(word)wm-ilo-sec.pdf · Student Guide v7.04 DN7000508.0216 ... iSM iWay Integration Tools ... SAP®, Siebel®, PeopleSoft®,

Cross-Channel Services

iWay Service Manager Tooling Techniques 245

processed as a batch and not immediate the other option. The Sorting Mode is set to numerical which means it will use the sequence numbering in the actual document itself. You could set the High and Low Mark options to chunk the documents to better gauge performance.

8. The Route of the CC_Orders_OQ channel is just a simple file write process flow.

9. The CC_Orders_App Application and its components are displayed.

10. The CC_Orders_App_Dev application is running.

ILO

Use

ON

LY D

o N

ot D

uplic

ate

or D

istri

bute

ILO

Use

ON

LY D

o N

ot D

uplic

ate

or D

istri

bute

Page 254: Customer Educationeducation.informationbuilders.com/...studentguide(word)wm-ilo-sec.pdf · Student Guide v7.04 DN7000508.0216 ... iSM iWay Integration Tools ... SAP®, Siebel®, PeopleSoft®,

Cross-Channel Services

iWay Service Manager Tooling Techniques 246

11. Run through the following scenarios and review how each scenario works with Ordered Queues:

• Run all Order files in sequence through the Ordered Queue Application. Copy Order01.xml through Order10.xml from D:\Course9xx\CC_Orders\data to D:\Course9xx\CC_Orders\input. Notice they all disappear at the same time. Both Order groups with patientID of 100 and 101 are processed in parallel and when an order with the islast element set to true is encountered, the records get written to ValidOrders. Review what is in the output and ValidOrders folders.

• Delete the contents of the output and ValidOrder folders. Create a sixth document for patientID 100 (Order11.xml). Copy Order5.xml and rename it to Order11.xml. Change the islast element to false for Order5.xml. Re-execute the process - copy Order01.xml through Order10.xml to the input directory. Do not copy Order11.xml yet. Notice Order06.xml through Order10.xml disappear, but the others remain. Because patientID 101 had a true value set in its last document so they were all processed. Now copy Order11.xml to the input folder. What do you see? Review what is in the output folders and ValidOrder folders.

• Delete the contents of the output and ValidOrder folders. Change the sequence. Copy Order02, Order05, Order08, Order06, Order01, Order10, and Order11 to the input folder. Then copy Order03, Order04, and Order09 to the input folder. What happens? You will only see seven output files in the ValidOrders folder. Until a document with patientID 100 and 101 with an islast element value of true is sent to the input folder Order03, Order04 and Order09 will not be fully processed.

12. Review the results:

Walk through each resultstatus XML document in the Output folder.

ILO

Use

ON

LY D

o N

ot D

uplic

ate

or D

istri

bute

ILO

Use

ON

LY D

o N

ot D

uplic

ate

or D

istri

bute

Page 255: Customer Educationeducation.informationbuilders.com/...studentguide(word)wm-ilo-sec.pdf · Student Guide v7.04 DN7000508.0216 ... iSM iWay Integration Tools ... SAP®, Siebel®, PeopleSoft®,

Cross-Channel Services

iWay Service Manager Tooling Techniques 247

Lesson Review

Introduction to Cross-Platform, Application and Channel Services Example of Cross-Channel Services using Ordered Queues

ILO

Use

ON

LY D

o N

ot D

uplic

ate

or D

istri

bute

ILO

Use

ON

LY D

o N

ot D

uplic

ate

or D

istri

bute

Page 256: Customer Educationeducation.informationbuilders.com/...studentguide(word)wm-ilo-sec.pdf · Student Guide v7.04 DN7000508.0216 ... iSM iWay Integration Tools ... SAP®, Siebel®, PeopleSoft®,

Cross-Channel Services

iWay Service Manager Tooling Techniques 248

Appendices

Designer Menu Options and Toolbar Icons

Menu Options

The iWay Designer main menu:

The File menu:

Option Function New Create a new project.

Open Load a previously saved project.

Close Active View Close the active project.

Close All Views Close all opened projects.

Save Save changes to the current project to disk.

Print Print the contents of the project.

Print Setup Change how to print.

Exit Close iWay Designer.

ILO

Use

ON

LY D

o N

ot D

uplic

ate

or D

istri

bute

ILO

Use

ON

LY D

o N

ot D

uplic

ate

or D

istri

bute

Page 257: Customer Educationeducation.informationbuilders.com/...studentguide(word)wm-ilo-sec.pdf · Student Guide v7.04 DN7000508.0216 ... iSM iWay Integration Tools ... SAP®, Siebel®, PeopleSoft®,

Designer Menu Options and Toolbar Icons

iWay Service Manager Tooling Techniques 249

The Edit menu contains standard Windows commands, such as Undo, Copy, Paste, Delete, and along with a search function.

The View menu is context-sensitive. While most options are available at any time, some options are only available when certain components are selected.

The Build menu option allows you to validate, compile and publish a process flow to a server when you are finished.

Option Function Test Allows you to test run the workflow.

Validate Checks the syntax of the objects and relations of the flow.

ILO

Use

ON

LY D

o N

ot D

uplic

ate

or D

istri

bute

ILO

Use

ON

LY D

o N

ot D

uplic

ate

or D

istri

bute

Page 258: Customer Educationeducation.informationbuilders.com/...studentguide(word)wm-ilo-sec.pdf · Student Guide v7.04 DN7000508.0216 ... iSM iWay Integration Tools ... SAP®, Siebel®, PeopleSoft®,

Designer Menu Options and Toolbar Icons

iWay Service Manager Tooling Techniques 250

Option Function Compile Reduces the process flow to object code to be executed by iSM.

Publish Publishes the process flow to the iWay server and repository.

From the Build menu, the Test menu contains the following options:

Option Function Run Executes the workflow with options.

Default Run Executes the workflow with default options.

Rerun Re-executes the workflow after an initial run.

View View the results of the workflow process.

The Tools menu gives you the option to customize the colors and fonts of the Designer, create and manage variables, manage your repositories, launch the Transformer tool, and unpublish (or recall) published workflows.

ILO

Use

ON

LY D

o N

ot D

uplic

ate

or D

istri

bute

ILO

Use

ON

LY D

o N

ot D

uplic

ate

or D

istri

bute

Page 259: Customer Educationeducation.informationbuilders.com/...studentguide(word)wm-ilo-sec.pdf · Student Guide v7.04 DN7000508.0216 ... iSM iWay Integration Tools ... SAP®, Siebel®, PeopleSoft®,

Designer Menu Options and Toolbar Icons

iWay Service Manager Tooling Techniques 251

Option Function Customize Used to configure the colors and fonts of the objects.

Communication Timeout Specify timeout settings for handling communications between the client and the server.

Languages Determines whether Designer is displayed in English or multi-languages.

Design Mode Allows process flows to be built in non-executable mode only.

Debug Settings Apply trace settings to new objects.

XPATH Builder Assists in building XML XPATH commands.

Property Manager Create global variables to be used by your projects.

Transformer Create XML transformation templates to be used in your flow.

Service Manager Launches the Service Manager Web console so you can create listeners for your flow.

Repository Management Locate a repository to manage your projects.

Publication Management Unpublish a process flow from the repository and make it inactive.

Toolbar Icons

There are two distinct toolbars aligned in a single row, and each is used for a different purpose. The project toolbar contains functions that apply to your project as a whole. The object toolbar contains objects you can add to your workflow. The following tables describe each of the toolbar’s icons.

Project Toolbar

ILO

Use

ON

LY D

o N

ot D

uplic

ate

or D

istri

bute

ILO

Use

ON

LY D

o N

ot D

uplic

ate

or D

istri

bute

Page 260: Customer Educationeducation.informationbuilders.com/...studentguide(word)wm-ilo-sec.pdf · Student Guide v7.04 DN7000508.0216 ... iSM iWay Integration Tools ... SAP®, Siebel®, PeopleSoft®,

Designer Menu Options and Toolbar Icons

iWay Service Manager Tooling Techniques 252

Icon Description

Create a New Project.

Open an existing Project.

Save a Project to disk.

Copy an object.

Paste an object.

Delete an object.

Find an object in a workspace.

Validate a workflow for syntax errors.

Compile a workflow for Logic correctness.

Publish a workflow to a repository.

Test the Process Flow.

Re-test the Process Flow.

Manage Project Properties.

Manage the Servers’ Repository.

Publication Management.

Print.

Object Toolbar

Icon Description

ILO

Use

ON

LY D

o N

ot D

uplic

ate

or D

istri

bute

ILO

Use

ON

LY D

o N

ot D

uplic

ate

or D

istri

bute

Page 261: Customer Educationeducation.informationbuilders.com/...studentguide(word)wm-ilo-sec.pdf · Student Guide v7.04 DN7000508.0216 ... iSM iWay Integration Tools ... SAP®, Siebel®, PeopleSoft®,

Designer Menu Options and Toolbar Icons

iWay Service Manager Tooling Techniques 253

End Object Denotes the end of the process flow; required in all processes.

Text Object Provides text documentation to the flow.

Relation Object Specifies relationships between objects. All objects must be related in some way.

Loop Object Used in conjunction with the Iterator object.

Join Object Combines two or more documents into a single document.

Junction Object Combines two or more paths of execution into a single path.

Decision Switch Object Evaluates the contents of a document and uses the results to determine the routing.

Decision Test Object Provides Boolean (true/false) testing on previous object results.

Set Object Fires one or more events for which Sync Objects are waiting.

Sync Object Waits for a condition to be met.

Debug Object Traces the state of a document through the process.

Service Object Specifies a server-side custom event.

Iterator Object Enables the flow to loop/iterate through data in a document, such as when inserting SQL records.

Transform Object Applies a selected transform to the document.

Adapter Object Represents a configured connection to a backend service.

ILO

Use

ON

LY D

o N

ot D

uplic

ate

or D

istri

bute

ILO

Use

ON

LY D

o N

ot D

uplic

ate

or D

istri

bute

Page 262: Customer Educationeducation.informationbuilders.com/...studentguide(word)wm-ilo-sec.pdf · Student Guide v7.04 DN7000508.0216 ... iSM iWay Integration Tools ... SAP®, Siebel®, PeopleSoft®,

Improving Processing Performance Using Java

iWay Service Manager Tooling Techniques 254

Process Object Inserts a published system process into this process as an object.

Web Service Object Executes a Web Service, passing the incoming document as the payload.

SQL Object Uses an iWay request to drive a named JDBC adapter.

ETL Object Executes a DataMigrator Flow.

BI Object Executes a WebFOCUS business intelligence report.

ReportCaster Object Triggers a ReportCaster schedule to execute a WebFOCUS report.

Email Object Sends or receives emails with attachments.

FTP Object Sends or receives data via FTP protocol.

File Object Performs file operations at execution time.

HTTP Object Sends or receives data via HTTP protocol.

Queue Object Sends or receives data via a queue type.

Emitter Object Adds an address to the payload via a supported protocol.

Improving Processing Performance Using Java

Setting JVM Options

Setting JVM options can improve the performance of Service Manager or correct problems. The most common setting adjustments are for the size of the Java heap and stack, which determine memory availability for Java programs and the JVM. If sufficient memory is not available, errors can occur. The heap size affects performance, as it determines how often garbage collection occurs.

ILO

Use

ON

LY D

o N

ot D

uplic

ate

or D

istri

bute

ILO

Use

ON

LY D

o N

ot D

uplic

ate

or D

istri

bute

Page 263: Customer Educationeducation.informationbuilders.com/...studentguide(word)wm-ilo-sec.pdf · Student Guide v7.04 DN7000508.0216 ... iSM iWay Integration Tools ... SAP®, Siebel®, PeopleSoft®,

Improving Processing Performance Using Java

iWay Service Manager Tooling Techniques 255

If you encounter performance problems or receive “out of memory” exceptions, you can adjust these sizes. The following are the JVM memory settings most commonly adjusted:

-Xss ### M

Sets the Java thread stack size.

-Xmx ### M

Sets the maximum Java heap size.

-Xms ### M

Sets the initial Java heap size.

The size is usually set in megabytes, for example:

-Xmx512M

Optimum sizes vary, depending on the total memory available, the requirements of your application, the number of other processes that require memory, the type of JVM, and other considerations.

The location for setting these and other JVM options depends on the operating system. You must edit the UNIX iway55smService.sh script or the iway55sm.sh script to include JVM options on that platform.

Configuring JVM Options for Windows

To configure the JVM for iSM on the Windows platform:

1. From the Server tab, click Java Settings (under Settings). 2. Enter –Xmx512M to increase the virtual size of the Java Virtual Machine. 3. Click Update. 4. Click Restart.

ILO

Use

ON

LY D

o N

ot D

uplic

ate

or D

istri

bute

ILO

Use

ON

LY D

o N

ot D

uplic

ate

or D

istri

bute

Page 264: Customer Educationeducation.informationbuilders.com/...studentguide(word)wm-ilo-sec.pdf · Student Guide v7.04 DN7000508.0216 ... iSM iWay Integration Tools ... SAP®, Siebel®, PeopleSoft®,

Improving Processing Performance Using Java

iWay Service Manager Tooling Techniques 256

Specify JVM settings for Non-Windows (Service) environments

To specify JVM options on a non-Windows platform when running Service Manager as a service (daemon):

1. Manually edit the shell script that runs the iWay Service Manager Service and add the JVM options.

su $IWAYUSER -c "java -Xmx512M

-Xss256M $REMDBG -cp $CLASSPATH -DIWAY55=$IWAY55sm

-Diwaysoftware.af.idocument=com.ibi.edaqm.XDDocument

com.ibi.service.edaqmSilentService -config base >>

$IWAY55sm/serviceOut.txt &"

General Settings – Configuration Backup

Under Server and General Settings, the iWay System Administrator can manage some very important settings. There are two XML files that manage an iWay SM instance: config.xml and base.xml. As you create, build and deploy conduits and their components (Channels, Inlets, Routes, and Outlets plus their respective components Listeners, Preparsers, Emitters, Processes, etc.), they are registered within the two managed XML documents. You can manage the number of configuration backups you want to maintain. In the screen below, the number is set to 5, which means that whenever the iSM server is restarted, the base.xml document is preserved up to the number 5.

ILO

Use

ON

LY D

o N

ot D

uplic

ate

or D

istri

bute

ILO

Use

ON

LY D

o N

ot D

uplic

ate

or D

istri

bute

Page 265: Customer Educationeducation.informationbuilders.com/...studentguide(word)wm-ilo-sec.pdf · Student Guide v7.04 DN7000508.0216 ... iSM iWay Integration Tools ... SAP®, Siebel®, PeopleSoft®,

Improving Processing Performance Using Java

iWay Service Manager Tooling Techniques 257

High Availability

High Availability (HA) describes the ability of a system to accept and process transactions a great percentage of the time, achieving as close to 100% as technically possible. The features and characteristics of a specific software product are not solely responsible for the ability of a system to be "highly available." For example, choosing high reliability hardware, and ensuring uninterruptible power, network connectivity, and sufficient capacity and throughput, are all essential to achieving high availability.

There are specific architectural mechanisms and design patterns employed to make a system highly available, the most important being failover and scaling. iWay is compatible with architectures comprising third-party HA solutions and also has its own native features to facilitate HA.

Failover

Failover is the capability to switch over automatically to a redundant or "hot" standby host or subsystem upon the failure or abnormal termination of the primary host or subsystem. Ideally, failover is accomplished without manual intervention since failures generally occur without warning.

ILO

Use

ON

LY D

o N

ot D

uplic

ate

or D

istri

bute

ILO

Use

ON

LY D

o N

ot D

uplic

ate

or D

istri

bute

Page 266: Customer Educationeducation.informationbuilders.com/...studentguide(word)wm-ilo-sec.pdf · Student Guide v7.04 DN7000508.0216 ... iSM iWay Integration Tools ... SAP®, Siebel®, PeopleSoft®,

Improving Processing Performance Using Java

iWay Service Manager Tooling Techniques 258

Scaling and Balancing

Vertical Scaling refers to increasing the processing capability of a host system. This is accomplished by adding processors, memory, faster storage, and so on. Vertical scaling is primarily a hardware effort that does not affect the system topology or software configuration.

Horizontal Scaling refers to increasing the number of hardware systems hosting the software. For example, two hardware hosts running iWay achieve roughly double the throughput of one, assuming other dependent resources are available and adequately performing. Effectively distributing the workload across two or more iWay Service Manager instances is referred to as load balancing and is a key factor in achieving maximum throughput with horizontal scaling. Supporting adequate throughput is an important aspect of HA, because while a system may be online, if it is running at or close to capacity, it may appear unavailable to clients. Scaling directly addresses the throughput issue, and also provides some of the benefits of failover because it eliminates a single point of failure. Failure of one host (out of two or more) will not make the supported service(s) unavailable, although it may impact throughput and response times until the failed host has "failed over" to its backup or is brought back online.

Simple Failover Using iWay Heartbeat

iWay Service Manager can be deployed to automatically fail over to another waiting machine, usually referred to as a "hot backup" host. In this model, configuration and repository files are shared so that the backup iSM behavior is identical to the primary iWay Service Manager. Simple failover relies on iWay's native functionality to emit and respond to "heartbeat" messages that signify normal operation of the primary server. When a failure is detected, the backup host executes a process which manages the switch-over (sending an appropriate message to the router to reconfigure itself, posting an e-mail to the SysOp, and so on) and then assumes the workload of the primary server.

ILO

Use

ON

LY D

o N

ot D

uplic

ate

or D

istri

bute

ILO

Use

ON

LY D

o N

ot D

uplic

ate

or D

istri

bute

Page 267: Customer Educationeducation.informationbuilders.com/...studentguide(word)wm-ilo-sec.pdf · Student Guide v7.04 DN7000508.0216 ... iSM iWay Integration Tools ... SAP®, Siebel®, PeopleSoft®,

Improving Processing Performance Using Java

iWay Service Manager Tooling Techniques 259

To configure Failover:

1. On the iWay Web Console, on the left tree, click Backup Settings.

2. For the location of backup type a host:port combination for where the heartbeat

signals are sent. 3. For the Heartbeat port type a port number to listen on for the live system's heartbeat.

ILO

Use

ON

LY D

o N

ot D

uplic

ate

or D

istri

bute

ILO

Use

ON

LY D

o N

ot D

uplic

ate

or D

istri

bute

Page 268: Customer Educationeducation.informationbuilders.com/...studentguide(word)wm-ilo-sec.pdf · Student Guide v7.04 DN7000508.0216 ... iSM iWay Integration Tools ... SAP®, Siebel®, PeopleSoft®,

Improving Processing Performance Using Java

iWay Service Manager Tooling Techniques 260

4. Type a valid number in seconds for a Threshold period the backup can tolerate. 5. Click Update.

The server must be started with -b for backup mode.

IP-Based Horizontal Scaling

IP traffic is very easy to redirect and load balance, and there are very efficient and robust solutions for managing communications at this level in the protocol stack. Because the content of messages is not inspected, this method of work distribution is extremely fast.

Devices such as Cisco 7500 series routers can provide round-robin address translation to distribute requests across several identical iWay Service Managers. In the case of a single server stoppage, the router detects the failure and processing continues on the remaining servers. Sharing of iWay repositories (not shown in the diagram) may also be part of this solution. For maximum reliability, each of the iWay instances can have hot backup failover, implemented either via iWay or a third-party tool.

ILO

Use

ON

LY D

o N

ot D

uplic

ate

or D

istri

bute

ILO

Use

ON

LY D

o N

ot D

uplic

ate

or D

istri

bute

Page 269: Customer Educationeducation.informationbuilders.com/...studentguide(word)wm-ilo-sec.pdf · Student Guide v7.04 DN7000508.0216 ... iSM iWay Integration Tools ... SAP®, Siebel®, PeopleSoft®,

Improving Processing Performance Using Java

iWay Service Manager Tooling Techniques 261

Web-Based Horizontal Scaling Using iWay Performance Monitor

iWay Performance Monitor is a Web Service monitoring and routing solution. Policy-based routing can be used to manage traffic and distribute workloads across iWay instances in complex ways. In an HA environment, the iWay Performance Monitor node should be deployed with hot backup so there is no single point of failure.

Horizontal Scaling for Queuing

An extensive explanation of configuring third-party message queuing products for the HA environment is beyond the scope of this appendix. All mature queuing products support the configuration options needed to scale horizontally without adversely affecting guaranteed, non-duplicated message delivery. The simplest approaches entail allowing multiple consumers to access a queue and message filtering to balance the load between iWay listeners. If that is inappropriate, stateless horizontal scaling can be achieved by using additional instances of iSM and redistributing existing clients to these instances. Stateful horizontal scaling is

ILO

Use

ON

LY D

o N

ot D

uplic

ate

or D

istri

bute

ILO

Use

ON

LY D

o N

ot D

uplic

ate

or D

istri

bute

Page 270: Customer Educationeducation.informationbuilders.com/...studentguide(word)wm-ilo-sec.pdf · Student Guide v7.04 DN7000508.0216 ... iSM iWay Integration Tools ... SAP®, Siebel®, PeopleSoft®,

Join vs Junction

iWay Service Manager Tooling Techniques 262

generally achieved by connecting instances of iSM into a cluster, which allows those instances to communicate with each other, as well as to the application clients.

Horizontal Scaling for Transactions

iWay is optimized for handling stateless processes. Scaling and load balancing may affect the order of processing of messages and may allow a series of related messages to execute on different iWay instances. Because of this, moving to an HA architecture can reveal idiosyncrasies and/or limit design assumptions in the application. Applications that have implied transactions or implied message order dependence may behave differently in the HA environment. In situations where a Web router is part of the iWay HA solution, enabling session affinity may ensure correct application behavior.

The iWay Reverse Invocation Proxy and HA

The iWay Reverse Invocation Proxy has the ability to distribute transactions to multiple iWay worker instances on other hosts. The workers register themselves with the relay, informing it about which services they (the workers) can provide. Workers may register for mutually exclusive services; workers may register to handle the same services; or workers may do a combination of both, resulting in partially overlapping areas of responsibility.

The proxy is intended for applications where direct connection from the Internet/DMZ to the enterprise intranet is not permitted for security reasons. The proxy itself may be horizontally scaled and/or set up to support failover using the mechanisms previously discussed.

Join vs Junction

This section will define the JOIN and JUNCTION objects in the iWay Designer Tool.

JOIN Object The Join object combines two or more documents into a single document. The single document then proceeds to the next object in the process flow. For example, if you have two XML documents:

ILO

Use

ON

LY D

o N

ot D

uplic

ate

or D

istri

bute

ILO

Use

ON

LY D

o N

ot D

uplic

ate

or D

istri

bute

Page 271: Customer Educationeducation.informationbuilders.com/...studentguide(word)wm-ilo-sec.pdf · Student Guide v7.04 DN7000508.0216 ... iSM iWay Integration Tools ... SAP®, Siebel®, PeopleSoft®,

Join vs Junction

iWay Service Manager Tooling Techniques 263

When you add a Join object to the flow, the New Join Object dialog box opens, as shown in the following image. Type a Name to identify the Join object and, optionally, type a brief Description. The Design mode option allows you to include the object in the process flow as a place marker, that is, without defining its parameters.

The New Join Object - Timeout dialog box opens, as shown in the following image

ILO

Use

ON

LY D

o N

ot D

uplic

ate

or D

istri

bute

ILO

Use

ON

LY D

o N

ot D

uplic

ate

or D

istri

bute

Page 272: Customer Educationeducation.informationbuilders.com/...studentguide(word)wm-ilo-sec.pdf · Student Guide v7.04 DN7000508.0216 ... iSM iWay Integration Tools ... SAP®, Siebel®, PeopleSoft®,

Join vs Junction

iWay Service Manager Tooling Techniques 264

Timeout is the amount of time (in seconds) that the Join object will wait to receive the documents it must join. The timeout count begins when the first document enters the Join object. If the Join receives all of the documents before the timeout period ends, the join process continues. If all documents needed to satisfy the join are not received, then a status document is generated and sent along the OnTimeout edge.

JUNCTION Object A Junction object joins two or more paths of execution into a single path. It does not join documents that travel along the path. For example, if you have five distinct paths that run to a certain point, and then all paths execute the same logic, use the Junction object to consolidate the flow at the point of common execution.

Caution: Use caution when mixing Join and Junction objects in a process flow. When a Join object is located after a Junction object, results can be unpredictable.

ILO

Use

ON

LY D

o N

ot D

uplic

ate

or D

istri

bute

ILO

Use

ON

LY D

o N

ot D

uplic

ate

or D

istri

bute

Page 273: Customer Educationeducation.informationbuilders.com/...studentguide(word)wm-ilo-sec.pdf · Student Guide v7.04 DN7000508.0216 ... iSM iWay Integration Tools ... SAP®, Siebel®, PeopleSoft®,

Sync Object

iWay Service Manager Tooling Techniques 265

Sync Object

The Synch object waits for a condition to be met, such as the expiration of a time limit or the evaluation of an expression as 'true'. The conditions are based on the events created through the Set object. The Synch object icon is shown below.

When you add a Synch object to a flow, the New Synch Object dialog box opens, as shown in the following image.

Type a Name to identify the Synch object and, optionally, type a brief Description. The Design mode option allows you to include the object in the process flow as a place marker, that is, without defining its parameters. Click Next to continue configuring the object. The Expression Builder dialog box opens, as shown in the following image.

ILO

Use

ON

LY D

o N

ot D

uplic

ate

or D

istri

bute

ILO

Use

ON

LY D

o N

ot D

uplic

ate

or D

istri

bute

Page 274: Customer Educationeducation.informationbuilders.com/...studentguide(word)wm-ilo-sec.pdf · Student Guide v7.04 DN7000508.0216 ... iSM iWay Integration Tools ... SAP®, Siebel®, PeopleSoft®,

Sync Object

iWay Service Manager Tooling Techniques 266

To build a Synch expression, click the Plus button. The default, Condition1, appears under the Name column, as shown in the following image. You can change the name and select the Event Name, Operation, and Value for the new condition. The Event Name drop-down list consists of the events defined in the process flow Set objects. Add as many conditions as required. Above the condition parameters, select the relationship between these conditions as an And or OR operation. To delete a condition, select the condition, and click the X above the list of conditions. Click Next. The Timeout dialog box opens, as shown in the following image.

Type a timeout value (in seconds). This is the time period for which the Synch object will wait for the expression to be evaluated as 'true'. A value of zero (0) means that the Synch object will wait indefinitely. Click Finish. The Synch object icon appears in the workspace.

ILO

Use

ON

LY D

o N

ot D

uplic

ate

or D

istri

bute

ILO

Use

ON

LY D

o N

ot D

uplic

ate

or D

istri

bute

Page 275: Customer Educationeducation.informationbuilders.com/...studentguide(word)wm-ilo-sec.pdf · Student Guide v7.04 DN7000508.0216 ... iSM iWay Integration Tools ... SAP®, Siebel®, PeopleSoft®,

Schedule Provider

iWay Service Manager Tooling Techniques 267

Schedule Provider

Schedule Provider

Using the iWay Service Manager Administration Console to schedule and configure Service Manager tasks. You can setup special tasks to be executed using the Schedule Provider.

To access the Schedule Provider:

1. Click Server from the navigation menu in the top pane. 2. Select Schedule Provider from the configuration menu in the left pane.

3. Click New.

ILO

Use

ON

LY D

o N

ot D

uplic

ate

or D

istri

bute

ILO

Use

ON

LY D

o N

ot D

uplic

ate

or D

istri

bute

Page 276: Customer Educationeducation.informationbuilders.com/...studentguide(word)wm-ilo-sec.pdf · Student Guide v7.04 DN7000508.0216 ... iSM iWay Integration Tools ... SAP®, Siebel®, PeopleSoft®,

Schedule Provider

iWay Service Manager Tooling Techniques 268

Column Description

Name Name associated with the task.

Active Flag indicating whether or not the configured task is active. If True, the task is active and will be scheduled whenever iWay Service Manager is recycled. If False, the task is inactive and will not be scheduled whenever iWay Service Manager is recycled.

Description Description of the task; this is a freeform field that is entered in the Schedule Configuration page, containing a description of what the task does.

Status Last known status reported by the task.

Last Run Last time that the task was run by the Service Manager.

Next Run Next time that the task will be run by the Service Manager.

4. The Schedule Provider Configuration pane is displayed.

Figure 1

ILO

Use

ON

LY D

o N

ot D

uplic

ate

or D

istri

bute

ILO

Use

ON

LY D

o N

ot D

uplic

ate

or D

istri

bute

Page 277: Customer Educationeducation.informationbuilders.com/...studentguide(word)wm-ilo-sec.pdf · Student Guide v7.04 DN7000508.0216 ... iSM iWay Integration Tools ... SAP®, Siebel®, PeopleSoft®,

Schedule Provider

iWay Service Manager Tooling Techniques 269

Figure 2

Figure 3

Figure 4

ILO

Use

ON

LY D

o N

ot D

uplic

ate

or D

istri

bute

ILO

Use

ON

LY D

o N

ot D

uplic

ate

or D

istri

bute

Page 278: Customer Educationeducation.informationbuilders.com/...studentguide(word)wm-ilo-sec.pdf · Student Guide v7.04 DN7000508.0216 ... iSM iWay Integration Tools ... SAP®, Siebel®, PeopleSoft®,

Schedule Provider

iWay Service Manager Tooling Techniques 270

Column Description

Name* Name to associate to this task. Task names are case sensitive and can not contain punctuation or other special characters.

Description A brief description of what this task does. This description should be descriptive enough to identify the task. This description is displayed on the Schedule Provider list of scheduled tasks.

Alternate User If this task is being executed with credentials of a different user, enter the User ID of that user. An alternate user must be a valid user defined on this iSM server. Note: The Alternate user can contain iFL commands (iSM functions like _SREG, _PROPERTY, and so on) that will be evaluated when the schedule provider is called.

Password If this task is being executed with credentials from a different user, enter the password of that user. Note: The Password can contain iFL commands (iSM functions like _SREG, _PROPERTY, and so on) that will be evaluated when the schedule provider is called.

Active If set to true, this task will be scheduled each and every time the Service Manager is recycled.

ILO

Use

ON

LY D

o N

ot D

uplic

ate

or D

istri

bute

ILO

Use

ON

LY D

o N

ot D

uplic

ate

or D

istri

bute

Page 279: Customer Educationeducation.informationbuilders.com/...studentguide(word)wm-ilo-sec.pdf · Student Guide v7.04 DN7000508.0216 ... iSM iWay Integration Tools ... SAP®, Siebel®, PeopleSoft®,

Schedule Provider

iWay Service Manager Tooling Techniques 271

Column Description

Minutes Checks the starting minute(s) of the hour to start the task at. Six short cut buttons are supplied to help in setting the minutes to start execution: Checks the starting minute(s) of the hour to start the task at. Six short cut buttons are supplied to help in setting the minutes to start execution: Clicking the CLEAR ALL button sets all the minute check boxes off. Clicking the SET ALL button sets all the minute check boxes on. Clicking the 5 minutes button starts at 0 and sets each 5 minute check box on. For example, 0, 5, 10, 15, and so on. Clicking the 10 minutes button starts at 0 and sets each 10 minute check box on. For example, 0, 10, 20, 30, and so on. Clicking the 15 minutes button starts at 0 and sets each 15 minute check box on. For example, 0, 15, 30, 45, and so on. Clicking the 20 minutes button starts at 0 and sets each 20 minute check box on. For example, 0, 20, 40, 60, and so on.

Hours Checks the starting Hour(s) of the day to start the task at. Six shortcut buttons are supplied to help in setting the minutes to start execution. Clicking the CLEAR ALL button sets all the hour check boxes off. Clicking the SET ALL button sets all the hour check boxes on. Clicking the 2 hour button starts at 12am and sets each 2 hour check box on. For example, 12 am, 2 am, 4 am, and so on. Clicking the 4 hour button starts at 12am and sets each 4 hour check box on. For example, 12am, 4 am, 8 am, and so on. Clicking the 8 hour button starts at 12am and sets each 8 hour check box on. For example, 12am, 8am, 4pm, and so on. Clicking the 12 hour button starts at 12am and sets each 12 hour check box on. For example, 12am, 12pm, and so on.

ILO

Use

ON

LY D

o N

ot D

uplic

ate

or D

istri

bute

ILO

Use

ON

LY D

o N

ot D

uplic

ate

or D

istri

bute

Page 280: Customer Educationeducation.informationbuilders.com/...studentguide(word)wm-ilo-sec.pdf · Student Guide v7.04 DN7000508.0216 ... iSM iWay Integration Tools ... SAP®, Siebel®, PeopleSoft®,

Schedule Provider

iWay Service Manager Tooling Techniques 272

Column Description

Month Checks the month that the task should run on. Two shortcut buttons are also provided: Clicking the CLEAR ALL button un-checks all of the Month check boxes. Clicking the SET ALL button checks all of the Month check boxes.

Weekday A number between 0 (Sunday) and 6 (Saturday) or 1 and 7 depending on the default Schedule Settings that represents what day of the week that the task should run on. In addition to the numerical representation, the weekday names or abbreviations can also be used: Clicking the CLEAR ALL button un-checks all of the Weekday check boxes. Clicking the SET ALL button checks all of the Weekday check boxes. Clicking the Set Weekdays button checks the Monday (Mon) through Friday (Fri) check boxes. Clicking the Set Weekend button checks the Saturday (Sat) and Sunday (Sun) check boxes.

ILO

Use

ON

LY D

o N

ot D

uplic

ate

or D

istri

bute

ILO

Use

ON

LY D

o N

ot D

uplic

ate

or D

istri

bute

Page 281: Customer Educationeducation.informationbuilders.com/...studentguide(word)wm-ilo-sec.pdf · Student Guide v7.04 DN7000508.0216 ... iSM iWay Integration Tools ... SAP®, Siebel®, PeopleSoft®,

Schedule Provider

iWay Service Manager Tooling Techniques 273

Column Description

Day of Month Checks the day of the month that the task should run on. In addition to the days, the following special values can also be checked: @FMOM: First Monday of the month, can be abbreviated as @FM. @LFOM: Last Friday of the month, can be abbreviated as @LF. @LBDOM: Last business day of the month. This value will return the last calendar workday (Monday through Friday) of the month. This value can be abbreviated as @LBD. @LDOM: Last day of the month; can be abbreviated as @LD. Clicking the CLEAR ALL button un-checks all of the Day of Month check boxes but does not clear the Special Value check boxes. Clicking the SET ALL button checks all of the Day of Month check boxes but does not check the Special Value check boxes.

Command* The command that the task will execute when the scheduled time comes. Any Service Manager command will be executed. Some Service Manager commands make more sense than others to schedule as tasks.

Duration Timer Length of time that the task will run prior to the Dependent Command. The format of duration [in seconds] is in the form [xxh][xxm]xx[s], as shown in the following example: 04h30m45 This creates a duration of 4 hours, 30 minutes, and 45 seconds.

ILO

Use

ON

LY D

o N

ot D

uplic

ate

or D

istri

bute

ILO

Use

ON

LY D

o N

ot D

uplic

ate

or D

istri

bute

Page 282: Customer Educationeducation.informationbuilders.com/...studentguide(word)wm-ilo-sec.pdf · Student Guide v7.04 DN7000508.0216 ... iSM iWay Integration Tools ... SAP®, Siebel®, PeopleSoft®,

Event Flows

iWay Service Manager Tooling Techniques 274

Column Description

Dependent Command Command to be executed after the Duration Timer of the task has expired. This can be the name of another configured scheduler task or be a separate iSM command (for example, stop listener, start listener, and so on). This task is entered into the Service Manager schedule as name.dependent, where name is the name assigned to this task. The dependent task will not be rescheduled after executing, but rather scheduled again only after the command of the primary task has started.

Event Flows

Event Process Flows

Event process flows can be executed when specific (defined) events occur in iWay Service Manager (iSM) or during message processing. The process flows must be published to the configuration (iWay Integration Application) and must be available for execution at the time that they are called. The Event process flows can run under the following constraints:

• Communicate with the caller by passing a return code as the name of the End node. This is the same rule as is required for subflows of a regular process.

• Can only return a single document, which may or may not be meaningful to the caller. • Cannot use Emit nodes, although Emit services are permitted. Emit nodes schedule

emits for execution at a later time (asynchronous to the process flow), while Emit services emit directly when they are called.

Other restrictions may apply for individual Event process flows. All Event process flows are conditional, and must be configured for execution if their use is required. The following Event process flows are described in this section:

• Server Startup • iWay Business Activity Monitor (BAM) Database Loss of Access • Channel Startup Failure • Retry Expired • Failed ReplyTo

ILO

Use

ON

LY D

o N

ot D

uplic

ate

or D

istri

bute

ILO

Use

ON

LY D

o N

ot D

uplic

ate

or D

istri

bute

Page 283: Customer Educationeducation.informationbuilders.com/...studentguide(word)wm-ilo-sec.pdf · Student Guide v7.04 DN7000508.0216 ... iSM iWay Integration Tools ... SAP®, Siebel®, PeopleSoft®,

Event Flows

iWay Service Manager Tooling Techniques 275

• Send to Dead Letter • Parse Failure

Server Startup

The Server Startup process flow is executed by the iSM initialization routines as iSM starts its execution. This process flow can check for the availability of resources that are required by iSM, and can prevent iSM from starting if the resources are not available. A return of success allows iSM to continue its startup sequence. Otherwise the iSM startup is terminated. The Server Startup process flow cannot start channels, since iSM is not ready to run channels at this early (startup) stage. The name of the Server Startup process flow must be entered in the Recovery area of the General Settings page (Process Name field), as shown in the following image.

The following table lists and describes the possible edges that are returned by the Server Startup process flow. success - Continue with iSM startup. <other> or flow fails - Do not continue to start iSM.

iWay Business Activity Monitor Database Loss of Access

This process flow is executed when the iWay Business Activity Monitor (BAM) drivers lose connectivity to the BAM database. The process flow can notify an operation area of the problem, and can determine how iSM should continue:

• iSM continues, but BAM update is ignored. • iSM terminates. • iSM maintains a local file on disk containing BAM information and attempts to update

the database when connectivity is restored.

ILO

Use

ON

LY D

o N

ot D

uplic

ate

or D

istri

bute

ILO

Use

ON

LY D

o N

ot D

uplic

ate

or D

istri

bute

Page 284: Customer Educationeducation.informationbuilders.com/...studentguide(word)wm-ilo-sec.pdf · Student Guide v7.04 DN7000508.0216 ... iSM iWay Integration Tools ... SAP®, Siebel®, PeopleSoft®,

Event Flows

iWay Service Manager Tooling Techniques 276

Channel Failure

The channel failure process flow is executed if the channel fails during its normal run cycle. iSM monitors the channels, and attempts to intercept failures within the channel that are not handled by normal channel and server error management. If such an error is detected, the ChannelFailure exit is entered. The input document to the process flow signals the cause of the failure, along with statistical and other information as available. This process flow must be published to the system, and is executed whenever the channel encounters an error that cannot be handled by normal logic. The process flow is often used to send an email to alert an administrator of the issue. iSM divides channel operation into three parts:

• Initialization • Startup • Message Handling

The channel failure process flow applies for initialization and startup only to channels that are not started by a specific manual command. This is because the operator is usually starting the channel and is monitoring its startup. To configure a channel failure process, enter the name of the published process flow to run in the Channel Failure Flow field of your listener configuration, as shown in the following image.

Retry Expired

Messages can be queued for retry on channels that support this facility. This includes queue-based channels, the File channel, and the Internal Queue channel. The retries are triggered by logic in the process flow. In this circumstance, the message is re-executed on a periodic basis until expiration has been reached. At the expiration point, a process flow can be executed to take recovery actions including notification, and optionally, changing the destination address or restarting with a changed (extended) expiration time. Enter the name of a published process flow to be executed in the Expired Retry Flow field, as

ILO

Use

ON

LY D

o N

ot D

uplic

ate

or D

istri

bute

ILO

Use

ON

LY D

o N

ot D

uplic

ate

or D

istri

bute

Page 285: Customer Educationeducation.informationbuilders.com/...studentguide(word)wm-ilo-sec.pdf · Student Guide v7.04 DN7000508.0216 ... iSM iWay Integration Tools ... SAP®, Siebel®, PeopleSoft®,

Event Flows

iWay Service Manager Tooling Techniques 277

shown in the following image. This field is a common channel property that is available for all iSM listeners.

On entry, the process flow receives the document as it exists, at the point at which the process flow is called.

Failed ReplyTo

A reply designation associated with a document triggers an emit operation following completion of the process flow. If the emit operation is not successful, the Failed ReplyTo process flow is triggered. Enter the name of a published process flow to be executed in the Failed ReplyTo Flow field, as shown in the following image. This field is a common channel property that is available for all iSM listeners.

Each ReplyTo and ErrorTo is treated separately. If an error occurs for one, an attempt is made to handle the error, and iSM continues with the rest of the list. Error handling, however, differs for ReplyTo versus ErrorTo. A failed ReplyTo causes the Failed ReplyTo process flow to execute (if present). If the process flow is successful (by terminating at an End node called success), the error is considered to be handled and iSM continues through the rest of the address list. If the process flow is absent, fails, or reaches an End node with a different name, then iSM creates an error document and attempts to send it to the ErrorTo instances recursively. All ErrorTo instances will be called for each ReplyTo that fails. Document siblings are treated as independent documents. The net effect should be similar to sending the document first, and then each of its siblings one by one. iSM does not expect error documents to contain siblings. However, if present, they too will be sent as top-level documents (which may or may not be in error).

ILO

Use

ON

LY D

o N

ot D

uplic

ate

or D

istri

bute

ILO

Use

ON

LY D

o N

ot D

uplic

ate

or D

istri

bute

Page 286: Customer Educationeducation.informationbuilders.com/...studentguide(word)wm-ilo-sec.pdf · Student Guide v7.04 DN7000508.0216 ... iSM iWay Integration Tools ... SAP®, Siebel®, PeopleSoft®,

Event Flows

iWay Service Manager Tooling Techniques 278

Send to Dead Letter

Messages queued for emitting at a later time, using the ReplyTo and ErrorTo channel configurations, or the Emit object in a process flow, are sent when the outlet of the channel is executed. Messages can also have alternate addresses if required. If all attempts to emit the message fail, then by default, the message is written to a configured dead letter directory. If an emit failed process flow is configured, then the process flow can examine the message, redirect it, replace it, and potentially notify an appropriate authority. It can then send the message to another channel for a retry attempt or continue to allow the message to be written to the dead letter queue. Enter the name of a published process flow to be executed in the Dead Letter Flow field, as shown in the following image. This field is a common channel property that is available for all iSM listeners.

Parse Failure

The Parse Failure flow is invoked if an incoming message fails the parse to XML operation for a channel. This does not apply to a parse that is handled within a process flow by a service (agent) for that purpose. The incoming document to the flow contains the message that failed parsing. The standard Special Registers (SREGs) for the protocol are available in the flow. For example, a bad message on a File listener will provide the usual information on the source of the file. The Parse Failure flow can also be used to send a notification. The flow can replace the document that could not be parsed. This might be done to fill in an element in a large batch managed by a splitting preparser. To replace the message, set the document on output to the message required, and return through an End node named Replace. The replaced message will then pass through the normal channel cycle. It may be necessary in your application to set a SREG in order to notify subsequent processes that this is a placeholder message. If this technique is used, then remember to set the SREG at the channel level, so as to make it available beyond the scope of the flow.

ILO

Use

ON

LY D

o N

ot D

uplic

ate

or D

istri

bute

ILO

Use

ON

LY D

o N

ot D

uplic

ate

or D

istri

bute

Page 287: Customer Educationeducation.informationbuilders.com/...studentguide(word)wm-ilo-sec.pdf · Student Guide v7.04 DN7000508.0216 ... iSM iWay Integration Tools ... SAP®, Siebel®, PeopleSoft®,

Functional Language Reference

iWay Service Manager Tooling Techniques 279

On entry to the event flow, the SREG iway.parsefail will be set to the count of the number of parse failures in this channel for this transaction. This count is useful for batch handling, in which a splitting preparser divides the batch into a sequence of sub-messages. For example, your flow might determine that the count of placeholder messages returned to the channel has exceeded a threshold, and so elects to take application action to reject the batch.

Functional Language Reference

IFL Commands

iWay functions enable you to examine the context in which a message is processed and the attributes of that message. You can use the result to determine the subsequent processing steps for the message. You can select, bypass, or modify the steps in the defined process. Conditional routing uses functions that either return a Boolean value (true or false) or can, as a result of a relationship test, result in a Boolean condition. If the result is true, the step governed by the conditional routing expression is performed. Otherwise, it is bypassed. For example, if you use an emitter only if a document is in error, you might use the _ISERROR() conditional routing expression. Runtime Functions iWay Service Manager supports a large number of runtime functions that can be used to make routing decisions and supply configuration parameters to iWay components, such as services and listeners. These functions can be combined into expressions, which consist of one or more of the functions that are discussed in this chapter.

Functions fall into several categories:

• Functions that reference the system environment. • Functions that reference the server's operational context. • Functions that reference the current document flowing through the server.

Function Categories

The IFL Command functions come in many categories and will be explained in the following sections.

Environmental Environmental functions return information about or from the environment in which the document is being processed.

ILO

Use

ON

LY D

o N

ot D

uplic

ate

or D

istri

bute

ILO

Use

ON

LY D

o N

ot D

uplic

ate

or D

istri

bute

Page 288: Customer Educationeducation.informationbuilders.com/...studentguide(word)wm-ilo-sec.pdf · Student Guide v7.04 DN7000508.0216 ... iSM iWay Integration Tools ... SAP®, Siebel®, PeopleSoft®,

Functional Language Reference

iWay Service Manager Tooling Techniques 280

1. _sreg(name [,default]) - Lookup a Special Register. Special registers contain context information. The information can be configured on the runtime system, reflect the processing state of the current message, or be explicitly set by services in a process flow. Example: _sreg(A, 'Hello')

2. _property(file, attribute [, default [,control] [,evaluate]] ) - function loads the value for the desired property from a Java properties object file. For example, assume file justatest.properties contains: one=first two=second The following function call causes the value first to be returned: _property('test','one','notfound','check')

3. _propertymatch(file,input,[,default [,control [,encoding]]] - A properties file contains key=value pairs consisting of a regular expression and a value. An input string is matched against the patterns in the properties file, and the value associated with the first pattern to match the input is returned. The properties file consists of one or more regular expressions (keys), each with an associated value. Standard properties file comments (lines starting with #) and blank lines are allowed. Continuation lines are not supported.

4. _inlist(list, key [,control]) - function checks whether a key value is in a list. The _inlist() function facilitates checking whether a value is in a list of valid values (for example, a set of medical codes). The following _inlist() function evaluates as false: _inlist("washington,adams,jefferson","cohen",string)

5. _setreg(name,value[,type [,scope [,action] ]]) - function sets the specified special register to the value that is entered and returns the previous value, if any. The action operand controls how the value is handled. Normally, it is a string and inserted into the register. If set to parse, the string is treated as a flat XML tree, which is parsed and set into the register.

Document Document functions access information pertaining to the current document being processed.

ILO

Use

ON

LY D

o N

ot D

uplic

ate

or D

istri

bute

ILO

Use

ON

LY D

o N

ot D

uplic

ate

or D

istri

bute

Page 289: Customer Educationeducation.informationbuilders.com/...studentguide(word)wm-ilo-sec.pdf · Student Guide v7.04 DN7000508.0216 ... iSM iWay Integration Tools ... SAP®, Siebel®, PeopleSoft®,

Functional Language Reference

iWay Service Manager Tooling Techniques 281

1. _docinfo(type) - The _docinfo() function returns information about the current document (message) that is passing through the process flow. Some document information can also be obtained using other functions, such as _iserror().

2. _isroot(name) - The _isroot() function returns true if the root of the current document matches the parameter.

3. _root() - The _root() function returns the root element name of the current document.

4. _isxml() - The current document can hold either XML or non-XML information. The _isxml function returns true if the current document holds XML. If the document has no contents, this function returns false.

5. _isflat() - The current document can hold either XML or non-XML information. The _isflat function returns true if the current document holds non-XML. If the document has no contents, this function returns false.

6. _iserror() - The current document can have errors posted to it by the system, or can be set into an error state by the actions of an application process. If the document is in error state, default replies are delivered to the configured error addresses, otherwise they are delivered to the configured reply addresses. The _iserror() function returns true if the document is in error state.

7. _hasruleerr() - As the document passes through its execution route, a supplied rules-based validation system can be employed. Often the rules relate to eBusiness documents such as SWIFT or EDI. If the rules system has posted a validation error to this document, the _hasruleerr() returns true.

8. _hasschemaerr() - Certain rules and services can detect schema violations during the life of a document in the system. Whether such a violation has been detected can be tested with this function. A common use of this function is in a process flow test object.

9. iswellformed() - The current document can hold either XML or non-XML information. This function returns true if the current document holds XML or holds flat information that can be parsed into XML. If it has not been parsed, a true response from this function assures that the message can be parsed into XML.

10. _iseos() - The end of stream can also be tested with the _iseos() function. A common use of this function is in a process flow test object.

11. _xpath1(expression [,nsmap [,object]]) - The document is evaluated by the provided xpath expression. The start is always considered to be the root, so all expressions are assumed to begin with '/'. The purpose of the xpath in the context of functions is to extract values from an input document to be used as configuration parameters. This use of xpath is not intended for general XML tree manipulation.

String String functions operate on information that is in string form. Such strings can be returned

ILO

Use

ON

LY D

o N

ot D

uplic

ate

or D

istri

bute

ILO

Use

ON

LY D

o N

ot D

uplic

ate

or D

istri

bute

Page 290: Customer Educationeducation.informationbuilders.com/...studentguide(word)wm-ilo-sec.pdf · Student Guide v7.04 DN7000508.0216 ... iSM iWay Integration Tools ... SAP®, Siebel®, PeopleSoft®,

Functional Language Reference

iWay Service Manager Tooling Techniques 282

from other functions such as _flatof() or can be literals with operation parameters taken from other operations such as xpath().

1. _lcase(input) - This function converts the input string to lower case. 2. _ucase(input) - This function converts the input string to upper case. 3. _trim(input) - This function removes leading and trailing white spaces from a string.

This includes blanks, tabs, and carriage returns. Whitespace includes blanks, tabs, carriage returns, and any characters defined for the current locale as a whitespace character.

4. _substr(input, start [,end]) - The _substr() function extracts a substring from the input string. The substring begins at the starting position and extends to the ending position, which is not included in the substring. If a specific ending position is omitted, the substring extends to the end of the input string. For example, _substr('abcde',1,3) returns bc.

5. _concat(input*) - This function joins together to generate a single string. For example, if special register x holds the letter 'b', _concat('a',sreg(x),'c') returns abc.

6. _length(input) - This function returns the number of characters in the supplied input string.

7. _count(input [,action][,delim]) - Thid function returns the number of items in the supplied input string. For example: _count(“a,b,,c,d”,empty,’,’) yields 1.

8. _indexof(input, pattern [,startat]) - The input string is searched for the contained pattern. The index of the pattern is returned, base 0. The function is useful when you are parsing or extracting elements of an input string.

Time Time services are used to enter parameters requiring time of day operations or to test for values relating to the current time. For example, a process flow can be configured to perform one operation on Friday and another operation on every other day.

1. _now([pattern]) - This function returns the current time based on a provided pattern. The default pattern (MM/dd/yyyy) returns the date in month/day/year format.

2. _tstamp() - This function returns a timestamp in ISO 8601 format. 3. _dateof(pattern, value [,zone][,default]) - The _dateof() function parses a date and

returns the corresponding number of milliseconds since January 1, 1970, 00:00:00 GMT. For example: _dateof('MM/dd/yyyy', '06/25/2009') yields the following: 1245902400000

ILO

Use

ON

LY D

o N

ot D

uplic

ate

or D

istri

bute

ILO

Use

ON

LY D

o N

ot D

uplic

ate

or D

istri

bute

Page 291: Customer Educationeducation.informationbuilders.com/...studentguide(word)wm-ilo-sec.pdf · Student Guide v7.04 DN7000508.0216 ... iSM iWay Integration Tools ... SAP®, Siebel®, PeopleSoft®,

Functional Language Reference

iWay Service Manager Tooling Techniques 283

Math Functions Math functions enable you to generate configuration parameters and to assist with tests. This section lists and describes the various math functions that you can use in iWay Service Manager.

1. _add(term, term*) - This function is used to add a list of terms. 2. _sub(minuend, subtrahend) - This function is used to return the difference. 3. _mul(multiplicand, multiplier) - This function returns the product of the first factor

multiplied by the second factor. Recall that multiplication is commutative and therefore there is nothing implied by the order of the factors.

4. _div(dividend, divisor) - This function returns the quotient of the first factor divided by the second factor. This is a floating point number.

5. _iadd(term, term*) - This function returns the sum of the terms. There is nothing implied by the order of the terms. Any term can be an XPATH() function. If the XPATH() returns multiple results, all are added into the sum. All values are assumed to be integers, and the result is an integer. The iadd() function is suitable for date manipulation, as the addition is computed with sufficient precision to maintain the field integrity.

6. _isub(minuend, subtrahend) - This function returns the difference with integer arithmetic. The isub() function is suitable for date manipulation, as the subtraction is computed with sufficient precision to maintain the field integrity.

7. _imul(multiplicand, multiplier) - This function returns the product of the first factor multiplied by the second factor. Recall that multiplication is commutative and therefore there is nothing implied by the order of the factors.

8. _idiv(dividend, divisor) - This function returns the quotient of the first factor divided by the second factor. The quotient is an integer, with the fractional part disregarded.

9. _max(term, term*) - Returns the maximum value of the terms. There is nothing implied by the order of the terms. Any term can be an XPATH() function. If the XPATH() returns multiple results, all are evaluated.

10. _min(term, term*) - Returns the minimum value of the terms. There is nothing implied by the order of the terms. Any term can be an XPATH() function. If the XPATH() returns multiple results, all are evaluated.

11. _round(number) - This function returns the closest integer to the argument value.

Other

1. _eval(expression [,tracemsg [,level]]) - This function evaluates a string as an expression of the function. The use of this tracing facility is to help debug by reporting the setting of parameters that are set by iFL.

ILO

Use

ON

LY D

o N

ot D

uplic

ate

or D

istri

bute

ILO

Use

ON

LY D

o N

ot D

uplic

ate

or D

istri

bute

Page 292: Customer Educationeducation.informationbuilders.com/...studentguide(word)wm-ilo-sec.pdf · Student Guide v7.04 DN7000508.0216 ... iSM iWay Integration Tools ... SAP®, Siebel®, PeopleSoft®,

Transactions

iWay Service Manager Tooling Techniques 284

2. _cond(expression,operator [,operand]) - The first parameter is a string, often obtained from some other function. This value is operated upon as ordered by the second parameter, possibly using the optional third parameter to complete the test. The result of _cond() is true or false.

3. _exists(statement) - An attempt is made to determine whether the object exists. If the path parameter starts with a /, this is presumed to be an xpath expression and if the statement locates a value this function returns true. Otherwise, the object is assumed to be some other internal object such as a special register, and its existence is tested.

4. _if(test [, trueclause [,falseclause]]) - The test is evaluated, If the test results in a true condition, the true clause is returned, else the false clause is returned. This is useful to set a value in a configuration based on a test. The clauses can themselves be tests.

Transactions

What is a Transaction?

In iWay transactions are defined as all activity in a process flow, e.g., updating a database, either succeeds or fails. In the industry this is often called "two phase commit". Transactionality is built into iSM but iSM is not a transaction manager and all process flow activities do not comply with industry transaction rules. Transaction support is a the process flow level (one channel at a time).

How does iSM See a Transaction? There are two parts to a transaction, the Outer and Inner Transaction. The Outer Transaction acquires a message non-destructively. If the outer transaction receives a completion message of the inner transaction it commits the message off (erases the input files from the listener, from the MQ Input Queue, and performs a read commit). The Inner Transaction will always finish unless power is lost to the computer running the application. As a consequence, the Outer Transaction is NEVER rolled back. Even if the process flow detects an error the message has been handled. Only a loss of control in the process flow will cause the message to continue to be found in the next read. Success or failure are signals that the message has been handled.

ILO

Use

ON

LY D

o N

ot D

uplic

ate

or D

istri

bute

ILO

Use

ON

LY D

o N

ot D

uplic

ate

or D

istri

bute

Page 293: Customer Educationeducation.informationbuilders.com/...studentguide(word)wm-ilo-sec.pdf · Student Guide v7.04 DN7000508.0216 ... iSM iWay Integration Tools ... SAP®, Siebel®, PeopleSoft®,

Transactions

iWay Service Manager Tooling Techniques 285

The control of the process flow commit can be set when a listener is configured. The process flow commit is considered a one and a half commit. The channel acts as a transaction manager when the listener is configured for it. When the Listener is Transaction Manager property is set to true agents and services run with a local transaction managed by the listener. In this case the process flow serves as the transaction boundary and use of the fail service or an error can trigger a rollback. The message is considered to be acquired and does not roll back to the original source; use retry queues or other application specific services to handle such a case. If a listener is NOT a transaction manager the agent does full activity, e.g., and insert into a database is committed. If a listener is a transaction manager, then an agent defers its commit to the completion of the flow. If the flow ends successfully, all agents in the flow can issue a commit. If a flow ends in failure, all agents in the flow can issue a rollback.

Compensating Transactions If a listener is a transaction manager a process flow may need to issue a commit or rollback on a wider level. A process flow may need to run many steps depending on how the flow ends. When a transaction completes a registration node is issued to determine commit or rollback. Compensation is done by a process flow. Based on object properties compensation is scheduled to run depending upon the completion status of the flow.

ILO

Use

ON

LY D

o N

ot D

uplic

ate

or D

istri

bute

ILO

Use

ON

LY D

o N

ot D

uplic

ate

or D

istri

bute

Page 294: Customer Educationeducation.informationbuilders.com/...studentguide(word)wm-ilo-sec.pdf · Student Guide v7.04 DN7000508.0216 ... iSM iWay Integration Tools ... SAP®, Siebel®, PeopleSoft®,

SQL Object Library Manager

iWay Service Manager Tooling Techniques 286

Examples of Transactionality

• A simple example would be to create an SQL agent in a process flow for inserting records with no transactionality turned on by the listenr and issue a fail agent (XDFail) in the flow. Note that the sql insert takes place. Run the example again with “listener is transaction manager” set to true (on). The insert will not be done. Note that a catch agent that does not issue a fail will be consisted of a success and the commit will be done. After all, a failure that is handled is not a failure. Note that in either success or failure case the e.g., file in a file listener will be deleted.

• For an example of outer transaction, read a file into a file listener and set a move agent (route) with a long sleep. Then cancel the server via a PID kill while the flow is active. The file will not be deleted. The transaction will continue to run because the inner transaction still processes.

SQL Object Library Manager

Add IFL _Property commands to the OrdersCSVtoXML_PF Process Flow

Now you can add the IFL _properties command to the OrdersCSVtoXML_PF process flow. Again these properties have been built for you, to save time you will import objects from the iWay Library.

1. From the Integration Explorer expand the Flows folder. 2. Double-click the OrdersCSVtoXML_PF process flow to open it in the edit area.

ILO

Use

ON

LY D

o N

ot D

uplic

ate

or D

istri

bute

ILO

Use

ON

LY D

o N

ot D

uplic

ate

or D

istri

bute

Page 295: Customer Educationeducation.informationbuilders.com/...studentguide(word)wm-ilo-sec.pdf · Student Guide v7.04 DN7000508.0216 ... iSM iWay Integration Tools ... SAP®, Siebel®, PeopleSoft®,

SQL Object Library Manager

iWay Service Manager Tooling Techniques 287

You will need to delete the existing SQLProductQuery SQL object and then drag and drop the SQLProductQuery SQL object stored in the iWay Library. Note to keep the process aligned turn on Grid and Snap to Geometry.

3. Right-click the SQLProductQuery SQL object and click Delete. 4. Click the Library Manager tab. 5. Expand PFLOW and SQL artifacts. 6. Drag and drop the SQLProductQuery SQL object to between the OrdersXMLtoXML_T

Transform and Join objects. Snap the object to the grid to align it with the other objects.

7. Reconnect the OrdersXMLtoXML_T Transform object to the SQLProductQuery SQL object with an OnSuccess event. Click Finish. Reconnect the SQLProductQuery SQL object to the Join object with an OnSuccess event. Click Finish.

8. Click the SQLProductQuery SQL object. Below, click the Properties tab. 9. Under the File Object, click the Properties tab.

You will review the IFL _property command for the Target Directory.

10. Review the SQL Statement value.

The IFL _property command: _property(_sreg(iway.workdir)/resource/Orders.properties,'sql.query1','nosql') Translation: The _property IFL command calls a system defined register value for iway.worker which is set to D:/iWay7/config/XXXX (where XXXX is the name of the application) and concatenates the text /resource/Orders.properties which is the location of the properties file. The _property IFL command opens the file and

ILO

Use

ON

LY D

o N

ot D

uplic

ate

or D

istri

bute

ILO

Use

ON

LY D

o N

ot D

uplic

ate

or D

istri

bute

Page 296: Customer Educationeducation.informationbuilders.com/...studentguide(word)wm-ilo-sec.pdf · Student Guide v7.04 DN7000508.0216 ... iSM iWay Integration Tools ... SAP®, Siebel®, PeopleSoft®,

SQL Object Library Manager

iWay Service Manager Tooling Techniques 288

reads the sql.query1 pair and passes it to the SQL Statement as the readable value. If the SQL.query1 pair is not found in the properties file then a nosql text value is passed to the log file when processing errors.

Re-align the process flow if necessary. Turn Grid and Snap to Geometry to make realignment easier.

11. Save the OrdersCSVtoXML_PF process flow.12. Close the OrdersCSVtoXML_PF process flow.

ILO

Use

ON

LY D

o N

ot D

uplic

ate

or D

istri

bute

ILO

Use

ON

LY D

o N

ot D

uplic

ate

or D

istri

bute

Page 297: Customer Educationeducation.informationbuilders.com/...studentguide(word)wm-ilo-sec.pdf · Student Guide v7.04 DN7000508.0216 ... iSM iWay Integration Tools ... SAP®, Siebel®, PeopleSoft®,

Worldwide Offices

Corporate HeadquartersTwo Penn Plaza New York, NY 10121-2898 (212) 736-4433 (800) 969-4636

United StatesAtlanta, GA* (770) 395-9913

Boston, MA* (781) 224-7660

Channels (770) 677-9923

Charlotte, NC (980) 215-8416

Chicago, IL* (630) 971-6700

Cincinnati, OH* (513) 891-2338

Dallas, TX* (972) 398-4100

Denver, CO* (303) 770-4440

Detroit, MI* (248) 641-8820

Federal Systems, D.C.* (703) 276-9006

Florham Park, NJ (973) 593-0022

Houston, TX* (713) 952-4800

Los Angeles, CA* (310) 615-0735

Minneapolis, MN* (651) 602-9100

New York, NY* (212) 736-4433

Philadelphia, PA* (610) 940-0790

Pittsburgh, PA (412) 494-9699

San Jose, CA* (408) 453-7600

Seattle, WA (206) 624-9055

St. Louis, MO* (636) 519-1411, ext. 321

Washington, D.C.* (703) 276-9006

InternationalAustralia* Melbourne 61-3-9631-7900 Sydney 61-2-8223-0600

Austria Raffeisen Informatik Consulting GmbH Wien 43-1-211-36-3344

Brazil São Paulo 55-11-3372-0300

Canada Calgary (403) 718-9828 Montreal* (514) 421-1555 Ottawa (416) 364-2760 Toronto* (416) 364-2760 Vancouver (604) 688-2499

China Peacom, Inc. Fuzhou 86-15-8800-93995 SolventoSOFT Technology (HK) Limited Hong Kong 852-9802-4757

Czech Republic InfoBuild Software CE s.r.o. Praha 420-234-234-773

Estonia InfoBuild Estonia ÖÜ Tallinn 372-618-1585

Finland InfoBuild Oy Espoo 358-207-580-840

France* Suresnes +33 (0)1-49-00-66-00

Germany Eschborn* 49-6196-775-76-0

Greece Applied Science Ltd. Athens 30-210-699-8225

Guatemala IDS de Centroamerica Guatemala City (502) 2412-4212

India* InfoBuild India Chennai 91-44-42177082

Israel SRL Software Products Ltd. Petah-Tikva 972-3-9787273

Italy Agrate Brianza 39-039-59-66-200

Japan KK Ashisuto Tokyo 81-3-5276-5863

Latvia InfoBuild Lithuania, UAB Vilnius 370-5-268-3327

Lithuania InfoBuild Lithuania, UAB Vilnius 370-5-268-3327

Mexico Mexico City 52-55-5062-0660

Middle East Barmajiat Information Technology, LLC Dubai 971-4-420-9100 n Bahrain n Kuwait n Oman n Qatar n Saudi Arabia n United Arab Emirates (UAE)

Innovative Corner Est. Riyadh 966-1-2939007 n Iraq n Lebanon n Oman n Saudi Arabia n UAE

Netherlands* Amstelveen 31 (0)20-4563333 n Belgium n Luxembourg

Nigeria InfoBuild Nigeria Garki-Abuja 234-9-290-2621

Norway InfoBuild Norge AS c/o Okonor Tynset 358-0-207-580-840

Portugal Lisboa 351-217-217-400

Singapore Automatic Identification Technology Ltd. Singapore 65-69080191/92

South Africa InfoBuild (Pty) Ltd. Johannesburg 27-11-064-5668

South Korea Dfocus Co., Ltd. Seoul 02-3452-3900

UVANSYS, Inc. Seoul 82-2-832-0705

Southeast Asia Information Builders SEAsia Pte. Ltd. Singapore 60-172980912 n Bangladesh n Brunei n Burma n Cambodia n Indonesia n Malaysia n Papua New Guinea n Thailand n The Philippines n Vietnam

Spain Barcelona 34-93-452-63-85 Bilbao 34-94-400-88-05 Madrid* 34-91-710-22-75

Sweden Stockholm 46-8-76-46-000

Switzerland Wallisellen 41-44-839-49-49

Taiwan Azion Corporation Taipei 886-2-2356-3996 Galaxy Software Services, Inc. Taipei 886-2-2586-7890, ext. 114

United Kingdom* Uxbridge Middlesex 44-20-7107-4000

Venezuela InfoServices Consulting Caracas 58212-763-1653

West Africa InfoBuild FSA Abidjan 225-01-17-61-15

* Training facilities are located at these offices.

Corporate Headquarters Two Penn Plaza, New York, NY 10121-2898 (212) 736-4433 Fax (212) 967-6406 Connect With Us informationbuilders.com [email protected]

Copyright © 2016 by Information Builders. All rights reserved. [136] All products and product names mentioned in this publication are trademarks or registered trademarks of their respective companies.

ILO

Use

ON

LY D

o N

ot D

uplic

ate

or D

istri

bute

ILO

Use

ON

LY D

o N

ot D

uplic

ate

or D

istri

bute