tibco iprocess script plug-in user’s guide, version 10€¦ · tibco iprocess® script plug-in...

23
TIBCO iProcess ® Script Plug-in User’s Guide Software Release 11.8 May 2020

Upload: others

Post on 21-Jan-2021

5 views

Category:

Documents


0 download

TRANSCRIPT

Page 1: TIBCO iProcess Script Plug-in User’s Guide, Version 10€¦ · TIBCO iProcess® Script Plug-in User’s Guide Software Release 11.8 May 2020

TIBCO iProcess® Script Plug-in

User’s GuideSoftware Release 11.8May 2020

Page 2: TIBCO iProcess Script Plug-in User’s Guide, Version 10€¦ · TIBCO iProcess® Script Plug-in User’s Guide Software Release 11.8 May 2020

Important Information

SOME TIBCO SOFTWARE EMBEDS OR BUNDLES OTHER TIBCO SOFTWARE. USE OF SUCH EMBEDDED OR BUNDLED TIBCO SOFTWARE IS SOLELY TO ENABLE THE FUNCTIONALITY (OR PROVIDE LIMITED ADD-ON FUNCTIONALITY) OF THE LICENSED TIBCO SOFTWARE. THE EMBEDDED OR BUNDLED SOFTWARE IS NOT LICENSED TO BE USED OR ACCESSED BY ANY OTHER TIBCO SOFTWARE OR FOR ANY OTHER PURPOSE.USE OF TIBCO SOFTWARE AND THIS DOCUMENT IS SUBJECT TO THE TERMS AND CONDITIONS OF A LICENSE AGREEMENT FOUND IN EITHER A SEPARATELY EXECUTED SOFTWARE LICENSE AGREEMENT, OR, IF THERE IS NO SUCH SEPARATE AGREEMENT, THE CLICKWRAP END USER LICENSE AGREEMENT WHICH IS DISPLAYED DURING DOWNLOAD OR INSTALLATION OF THE SOFTWARE (AND WHICH IS DUPLICATED IN THE LICENSE FILE) OR IF THERE IS NO SUCH SOFTWARE LICENSE AGREEMENT OR CLICKWRAP END USER LICENSE AGREEMENT, THE LICENSE(S) LOCATED IN THE “LICENSE” FILE(S) OF THE SOFTWARE. USE OF THIS DOCUMENT IS SUBJECT TO THOSE TERMS AND CONDITIONS, AND YOUR USE HEREOF SHALL CONSTITUTE ACCEPTANCE OF AND AN AGREEMENT TO BE BOUND BY THE SAME.

ANY SOFTWARE ITEM IDENTIFIED AS THIRD PARTY LIBRARY IS AVAILABLE UNDER SEPARATE SOFTWARE LICENSE TERMS AND IS NOT PART OF A TIBCO PRODUCT. AS SUCH, THESE SOFTWARE ITEMS ARE NOT COVERED BY THE TERMS OF YOUR AGREEMENT WITH TIBCO, INCLUDING ANY TERMS CONCERNING SUPPORT, MAINTENANCE, WARRANTIES, AND INDEMNITIES. DOWNLOAD AND USE OF THESE ITEMS IS SOLELY AT YOUR OWN DISCRETION AND SUBJECT TO THE LICENSE TERMS APPLICABLE TO THEM. BY PROCEEDING TO DOWNLOAD, INSTALL OR USE ANY OF THESE ITEMS, YOU ACKNOWLEDGE THE FOREGOING DISTINCTIONS BETWEEN THESE ITEMS AND TIBCO PRODUCTS.

This document contains confidential information that is subject to U.S. and international copyright laws and treaties. No part of this document may be reproduced in any form without the written authorization of TIBCO Software Inc.TIBCO, the TIBCO logo, the TIBCO O logo, TIBCO Software, TIBCO Adapter, Predictive Business, Information Bus, The Power of Now, TIBCO iProcess are either registered trademarks or trademarks of TIBCO Software Inc. in the United States and/or other countries.Java and all Java based trademarks and logos are trademarks or registered trademarks of Oracle Corporation in the U.S. and other countries.All other product and company names and marks mentioned in this document are the property of their respective owners and are mentioned for identification purposes only.This software may be available on multiple operating systems. However, not all operating system platforms for a specific software version are released at the same time. See the readme file for the availability of this software version on a specific operating system platform.THIS DOCUMENT IS PROVIDED “AS IS” WITHOUT WARRANTY OF ANY KIND, EITHER EXPRESS OR IMPLIED, INCLUDING, BUT NOT LIMITED TO, THE IMPLIED WARRANTIES OF MERCHANTABILITY, FITNESS FOR A PARTICULAR PURPOSE, OR NON-INFRINGEMENT.THIS DOCUMENT COULD INCLUDE TECHNICAL INACCURACIES OR TYPOGRAPHICAL ERRORS. CHANGES ARE PERIODICALLY ADDED TO THE INFORMATION HEREIN; THESE CHANGES WILL BE INCORPORATED IN NEW EDITIONS OF THIS DOCUMENT. TIBCO SOFTWARE INC. MAY MAKE IMPROVEMENTS AND/OR CHANGES IN THE PRODUCT(S) AND/OR THE PROGRAM(S) DESCRIBED IN THIS DOCUMENT AT ANY TIME.THE CONTENTS OF THIS DOCUMENT MAY BE MODIFIED AND/OR QUALIFIED, DIRECTLY OR INDIRECTLY, BY OTHER DOCUMENTATION WHICH ACCOMPANIES THIS SOFTWARE, INCLUDING BUT NOT LIMITED TO ANY RELEASE NOTES AND "READ ME" FILES.This and other products of TIBCO Software Inc. may be covered by registered patents. Please refer to TIBCO's Virtual Patent Marking document (https://www.tibco.com/patents) for details.Copyright © 2002-2020. TIBCO Software Inc. All Rights Reserved. TIBCO Confidential Information.TIBCO

Page 3: TIBCO iProcess Script Plug-in User’s Guide, Version 10€¦ · TIBCO iProcess® Script Plug-in User’s Guide Software Release 11.8 May 2020

Contents | i

Contents

About This Guide . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . iii

About The TIBCO iProcess Script Plug-in . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . iv

Changes from the Previous Issue of This Guide . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . v

Where You Can Find More Information . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . vi

Documentation Conventions . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . vii

Chapter 1 Creating EAI Script Steps . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . .1

Example Uses of EAI Script Steps . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 2

What is the Transaction Scope of EAI Script Steps? . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 3

iProcess Expressions Not Available to the iProcess Script Plug-in . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 4

Prerequisites for Using EAI Script Steps . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 5

Creating an EAI Script Step. . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 6Define Basic EAI Step Information . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 6Define the EAI Script . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 7

Tracing Problems in Your Scripts . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 9

Error Logging . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 10Error Messages in the SWDIR\logs\sw_warn File . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 10

Index . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . .13

TIBCO iProcess Script Plug-in User’s Guide

Page 4: TIBCO iProcess Script Plug-in User’s Guide, Version 10€¦ · TIBCO iProcess® Script Plug-in User’s Guide Software Release 11.8 May 2020

ii | Contents

TIBCO iProcess Script Plug-in User’s Guide

Page 5: TIBCO iProcess Script Plug-in User’s Guide, Version 10€¦ · TIBCO iProcess® Script Plug-in User’s Guide Software Release 11.8 May 2020

About This Guide | iii

About This Guide

This guide explains how to use the TIBCO iProcess™ Script Plug-in to define and use EAI Script steps.

See Also:

• About The TIBCO iProcess Script Plug-in on page iv.

• Where You Can Find More Information on page vi.

• Documentation Conventions on page vii

TIBCO iProcess Script Plug-in User’s Guide

Page 6: TIBCO iProcess Script Plug-in User’s Guide, Version 10€¦ · TIBCO iProcess® Script Plug-in User’s Guide Software Release 11.8 May 2020

iv | About This Guide

About The TIBCO iProcess Script Plug-in

The TIBCO iProcess Script Plug-in software consists of client and server components:

• The TIBCO iProcess™ Script Client Plug-in is installed as part of the TIBCO iProcess™ Workspace (Windows).

• The TIBCO iProcess™ Script Server Plug-in is installed as part of the TIBCO iProcess™ Engine.

TIBCO iProcess Script Plug-in User’s Guide

Page 7: TIBCO iProcess Script Plug-in User’s Guide, Version 10€¦ · TIBCO iProcess® Script Plug-in User’s Guide Software Release 11.8 May 2020

Changes from the Previous Issue of This Guide | v

Changes from the Previous Issue of This Guide

Only minor changes have been made from the information presented in the previous issue of this guide.

TIBCO iProcess Script Plug-in User’s Guide

Page 8: TIBCO iProcess Script Plug-in User’s Guide, Version 10€¦ · TIBCO iProcess® Script Plug-in User’s Guide Software Release 11.8 May 2020

vi | About This Guide

Where You Can Find More Information

You can find more information about the iProcess™ Script Plug-in and EAI Script steps from the following sources.

• TIBCO iProcess Modeler Release Notes Read the release notes for a list of new and changed features. This document also contains lists of known issues and closed issues for this release. This document is available in the docs directory on the iProcess Modeler distribution set.

• TIBCO iProcess Suite™ Documentation Library This library contains all the guides for iProcess Workspace and other TIBCO products in the TIBCO iProcess Suite. The following guides are particularly relevant:

— the TIBCO iProcess™ Modeler set of guides, which explain how to create iProcess procedures.

— the TIBCO iProcess Modeler - Integration Techniques guide, which explains how and when to use EAI steps in your procedures.

— the TIBCO iProcess Expressions and Functions: Reference guide, which explains how to use iProcess expressions that you can use in your EAI Script steps.

— The TIBCO iProcess Script Plug-in User’s Guide explains how to use the plug-in to define EAI steps.

• There is also a useful resource, http://power.tibco.com, that delivers technical content to the TIBCO user community. This site has been developed to foster an open forum where users of TIBCO products can find valuable information, example projects and resources for those projects, and exchange ideas with other users. Entry to this site requires a username and password. If you do not have a username, you can request one.

TIBCO iProcess Script Plug-in User’s Guide

Page 9: TIBCO iProcess Script Plug-in User’s Guide, Version 10€¦ · TIBCO iProcess® Script Plug-in User’s Guide Software Release 11.8 May 2020

Documentation Conventions | vii

Documentation Conventions

Because this guide covers both Windows, UNIX and Linux versions of the iProcess server, this guide uses the Windows convention of a backslash (\). The equivalent pathname on a UNIX or Linux system is the same, but using the forward slash (/) as a separator character.

The following conventions are used throughout this guide.

UNIX or Linux pathnames are occasionally shown explicitly, using forward slashes as separators, where a UNIX/Linux-specific example or syntax is required.

Any references to UNIX in this guide also apply to Linux unless explicitly stated otherwise.

Convention Description

italics Indicates emphasis, manual titles or variables in parameters.

monospace text Indicates code samples, commands and their options, directories and filenames. Any text that you must enter from the keyboard is displayed as monospace text.

monospace italic text

Indicates variables in syntax lines.

{ } Indicates a set of choices in a syntax line. The braces should not be entered.

[ ] Indicates optional items in a syntax line. The brackets should not be entered.

Example:

SHOW_ALL_ATTRIBUTES [attribute]

| Indicates mutually exclusive choices in a syntax line i.e you enter only one of the given choices. You should not enter the symbol itself.

TIBCO iProcess Script Plug-in User’s Guide

Page 10: TIBCO iProcess Script Plug-in User’s Guide, Version 10€¦ · TIBCO iProcess® Script Plug-in User’s Guide Software Release 11.8 May 2020

viii | About This Guide

SWDIR Indicates the TIBCO iProcess system directory where the TIBCO iProcess Engine is installed.

Example:

If SWDIR is set to \swserver\staffw_nod1 then the full path to the swutil command would be:

\swserver\staffw_nod1\bin\swutil, or

SWDIR\bin\swutil

Note: On a UNIX system, the environment variable $SWDIR should be set up to point to the iProcess system directory for the root and iProcess Administrator users.

Convention Description

TIBCO iProcess Script Plug-in User’s Guide

Page 11: TIBCO iProcess Script Plug-in User’s Guide, Version 10€¦ · TIBCO iProcess® Script Plug-in User’s Guide Software Release 11.8 May 2020

Creating EAI Script Steps | 1

Chapter 1 Creating EAI Script Steps

This chapter describes how to define EAI Script steps in your iProcess procedures. EAI Script steps enable you to manipulate case data between other iProcess steps. For example, you might want to perform some calculations on some case data before sending the result to your next step.

Topics

• Example Uses of EAI Script Steps, page 2

• What is the Transaction Scope of EAI Script Steps?, page 3

• iProcess Expressions Not Available to the iProcess Script Plug-in, page 4

• Prerequisites for Using EAI Script Steps, page 5

• Creating an EAI Script Step, page 6

• Tracing Problems in Your Scripts, page 9

• Error Logging, page 10

TIBCO iProcess Script Plug-in User’s Guide

Page 12: TIBCO iProcess Script Plug-in User’s Guide, Version 10€¦ · TIBCO iProcess® Script Plug-in User’s Guide Software Release 11.8 May 2020

2 | Chapter 1 Creating EAI Script Steps

Example Uses of EAI Script Steps

The following examples describe typical uses for an EAI Script step to manipulate case data.

• Concatenating Data on page 2

• Performing Calculations on page 2.

Concatenating Data

You can use an EAI step to extract the date and time from an external application. You will then have two iProcess fields such as DATE and TIME containing these values. You can create an EAI Script step to concatenate the two fields to create just one TIMEDATE field. For example, you would enter the following script:

TIMEDATE:=TIME+DATE

You might need to do this before using an EAI Database plug-in to insert the time and date into your database.

Performing Calculations

You can perform background calculations such as calculating the interest owed on an account balance that has been extracted from a banking database. The new balance amount can then be passed to another external system.

The iProcess scripting language is used to create the scripts. Please refer to the TIBCO iProcess Expressions and Functions: Reference Guide for detailed information about using expressions and functions in your scripts.

Currently, not all of the iProcess expressions are supported in the iProcess Script plug-in. Refer to TIBCO iProcess Workspace (Windows) Release Notes for a current list of unsupported expressions.

TIBCO iProcess Script Plug-in User’s Guide

Page 13: TIBCO iProcess Script Plug-in User’s Guide, Version 10€¦ · TIBCO iProcess® Script Plug-in User’s Guide Software Release 11.8 May 2020

What is the Transaction Scope of EAI Script Steps? | 3

What is the Transaction Scope of EAI Script Steps?

Any changes made to iProcess case data by your script are committed or rolled back with the entire workflow transaction. If a subsequent EAI step fails then changes made by your EAI script will be rolled back.

If an invalid expression is found by the EAI run-time plug-in (i.e. syntax errors), the EAI Script step will stop immediately and iProcess is notified that the transaction should not be committed. The error(s) will be logged in the SWDIR\logs\sw_warn file - see Tracing Problems in Your Scripts on page 9 for more information.

TIBCO iProcess Script Plug-in User’s Guide

Page 14: TIBCO iProcess Script Plug-in User’s Guide, Version 10€¦ · TIBCO iProcess® Script Plug-in User’s Guide Software Release 11.8 May 2020

4 | Chapter 1 Creating EAI Script Steps

iProcess Expressions Not Available to the iProcess Script Plug-in

The following iProcess Expressions are currently not available to the iProcess Script Plug-in. Therefore, even though you can successfully enter the expressions in your iProcess Script plug-in definition, they will not be processed by the iProcess Engine. All of the following expressions will return SW_NA (except GOTOSTEP, which has its own error code).

• ATTACHFILENAME

• CALL

• CASECLOSE, CASESTART, CUSTAUDIT

• DBWRITEFIELDS, DDEGETNAME, DDEGETTOPIC, DDEINITIATE, DDEPOKE, DDETERMALL, DDETERMINATE, DDEXECUTE

• FILEREQUEST, FORMCONTROL, FORMMAXIMIZE, FORMMINIMIZE, FORMMOVE, FORMRESTORE, FORMSIZE

• GETHANDLE, GOTOSTEP

• MARKFIELDCHANGED, MEMOFILE, MESSAGEBOX

• READFIELDS

• SCRIPT

• SENDKEYS, SERVEREXEC, SERVERRUN

• TRIGGEREVENT

• UNIXEXEC, UNIXRUN

• VLDFILE, VLDFILEX, VLDQUERY

• WINACTION, WINACTIVATE, WINCLOSE, WINEXIST, WINFIND, WINMAXIMIZE, WINMESSAGE, WINMINIMIZE, WINMOVE, WINRESTORE, WINRUN, WINSIZE, WRITEFIELDS

TIBCO iProcess Script Plug-in User’s Guide

Page 15: TIBCO iProcess Script Plug-in User’s Guide, Version 10€¦ · TIBCO iProcess® Script Plug-in User’s Guide Software Release 11.8 May 2020

Prerequisites for Using EAI Script Steps | 5

Prerequisites for Using EAI Script Steps

Before using EAI Script steps in your business process, you need to make sure you meet the following prerequisites:

• The client (define-time) and server (run-time) iProcess Script Plug-in components must be installed.

• You need to be familiar with using the iProcess scripting language. Please refer to the TIBCO iProcess Expressions and Functions Reference Guide for more information.

• You need to know which iProcess Expressions are not available to the iProcess Script Plug-in, see See iProcess Expressions Not Available to the iProcess Script Plug-in on page 4.

If you are just running EAI Script steps on your server, you only need to install the run-time plug-in. You only need the define-time plug-in if you are creating EAI Script steps.

TIBCO iProcess Script Plug-in User’s Guide

Page 16: TIBCO iProcess Script Plug-in User’s Guide, Version 10€¦ · TIBCO iProcess® Script Plug-in User’s Guide Software Release 11.8 May 2020

6 | Chapter 1 Creating EAI Script Steps

Creating an EAI Script Step

To create an EAI Script step in your procedure, you need to perform the following steps:

1. Define Basic EAI Step Information (name, description, step type, deadline and audit trail information.)

2. Define the EAI Script.

When you have done this, the EAI step type is defined as a Script EAI step and the icon is displayed as .

Define Basic EAI Step Information1. Start the TIBCO iProcess Modeler, click the EAI Step tool and click in

the window where you want to place the EAI Step.

2. In the EAI Step Definition dialog, enter the Name and Description for the step.

3. In the EAI Type drop-down list, select EAISCRIPT - EAI SCRIPT EAI step plug-in.

You must enter this when you first create the step; it cannot be changed later. The list box displays EAI step types that have been installed as client EAI plug-ins. This name is used as the link between the EAI step and the run-time plug-in registered on the iProcess server(s).

4. Click the Deadlines button if you want to enter deadline information for this step. You can also enter the step duration if you are using case prediction. Refer to “Using Deadlines” in the TIBCO iProcess Modeler - Basic Design guide for an explanation of defining deadlines and using case prediction.

5. Click the Ignore Case Suspend check box if you want the step to still be processed as normal while a case is suspended by an iProcess Objects or SAL application.

If the EAI Script step does not appear in the drop-down list, you need to make sure the plug-in is installed using the Options > Install EAI plug-in menu option.

TIBCO iProcess Script Plug-in User’s Guide

Page 17: TIBCO iProcess Script Plug-in User’s Guide, Version 10€¦ · TIBCO iProcess® Script Plug-in User’s Guide Software Release 11.8 May 2020

Creating an EAI Script Step | 7

If Ignore Case Suspend is not checked (the default option), the step is not processed while the case is suspended.

6. Click the Audit Trail tab to define custom audit trail entry expressions. This enables you to define text expressions that are evaluated when the step is processed and inserted as the %USER value in the audit trail entries.

You must enter a value in both fields or leave them both empty:

— In the Call-out Initiated field, enter a valid text expression that will replace the %USER value in the audit trail when the call out is initiated.

— In the Call-out Complete field, enter a valid text expression that will replace the %USER value in the audit trail when the call out is complete.

7. Delayed release is not applicable to the EAI Script step so the Delayed Release tab is grayed out for the EAI Script step.

8. Click the General tab, then click Edit EAI Script Definition. The EAI Script Definition EAI Script Definition dialog is displayed. You can define your script in this dialog.

Define the EAI ScriptThe EAI Script Definition dialog enables you to define the iProcess script that you want to run when the EAI step is processed.

Cases can only be suspended and re-activated from an iProcess Objects or SAL application. Audit trail messages indicate whether a case is active or suspended. Refer to the iProcess Objects documentation for more information about suspending cases.

TIBCO iProcess Script Plug-in User’s Guide

Page 18: TIBCO iProcess Script Plug-in User’s Guide, Version 10€¦ · TIBCO iProcess® Script Plug-in User’s Guide Software Release 11.8 May 2020

8 | Chapter 1 Creating EAI Script Steps

1. In the Process Step Script text box, enter your iProcess script. The scripting language is the same that is used when creating scripts in other iProcess steps using the Script Editor.

Define your script using one expression per line. It can contain blank lines and comment lines starting with a semi-colon (;). Refer to the TIBCO iProcess Expressions and Functions: Reference Guide for information about the expressions and functions you can use. Also, refer to “Using Scripts” in the TIBCO iProcess Modeler - Advanced Design guide for detailed information about creating a script.

2. The iProcess Case Fields list enables you to insert a field (contained in the current procedure) into your script. Position your cursor at the appropriate place in your script, select the field from the list and click Insert.

3. You can validate your script at any time by clicking Check Script. If any errors are found, the Script Expression Error dialog is displayed and the incorrect expression is highlighted. You are prompted to either correct the script, not to correct it or to ignore all errors. If you choose not to fix the script or to ignore the errors, the step will be marked as incomplete until the error is corrected. The script is always syntax checked when you click OK.

4. Click OK to save your script.

TIBCO iProcess Script Plug-in User’s Guide

Page 19: TIBCO iProcess Script Plug-in User’s Guide, Version 10€¦ · TIBCO iProcess® Script Plug-in User’s Guide Software Release 11.8 May 2020

Tracing Problems in Your Scripts | 9

Tracing Problems in Your Scripts

To log the processing of EAI script steps by the run-time plug-in, you can set debugging on your background servers so that the processing is logged to a file. To set trace logging on, enter the following command on your TIBCO iProcess Engine:

swadm set_attribute 1 BG 0 DEBUG x=32

This causes EAI script trace level log messages to be output to text files in the SWDIR\logs directory on the machine hosting the TIBCO iProcess Engine (called bgn.log) where n is the number of the BG process.

TIBCO iProcess Script Plug-in User’s Guide

Page 20: TIBCO iProcess Script Plug-in User’s Guide, Version 10€¦ · TIBCO iProcess® Script Plug-in User’s Guide Software Release 11.8 May 2020

10 | Chapter 1 Creating EAI Script Steps

Error Logging

When iProcess processes the EAI Script step, any errors encountered are logged in one of two ways:

• In the SWDIR\logs\sw_warn file - see Error Messages in the SWDIR\logs\sw_warn File on page 10

• Or via an audit trail entry for the case. This happens only if the case was started in a previous transaction so that there is a case to add an audit entry for. The EAI Script step will be retried by iProcess according to the number of retry settings configured for the TIBCO iProcess Engine.

Error Messages in the SWDIR\logs\sw_warn FileThe following is a list of the possible EAI Script step error messages that can appear in the SWDIR\logs\sw_warn file.

Incorrectly defined WHILE/IF construct (or too many nested IF's).

Description The script has been incorrectly constructed.

Action Correct the WHILE/IF construct or remove the surplus IF statements. Use Trace logging to help you find the problem especially if it is a large script -see Tracing Problems in Your Scripts on page 9.

Invalid or non-boolean expression '<text from script line in question>' in WHILE statement.

Description The invalid expression errors are not common in the sw_warn file because the script is syntax checked when you are defining it. However, the following can cause these errors to be logged:

• Deletion of a procedure field used in the expression (after the script was last edited).

• Use of an expression that is valid in the version of the TIBCO iProcess Modeler that the procedure was defined on but is not valid on the server that the expression is run on.

Action Edit the script definition and check the script using the Check Script button. Correct any errors that are reported.

The following are similar error messages that can be logged in the sw_warn file. These can be corrected by editing the EAI Script step and using the Check Script button to find any errors.

TIBCO iProcess Script Plug-in User’s Guide

Page 21: TIBCO iProcess Script Plug-in User’s Guide, Version 10€¦ · TIBCO iProcess® Script Plug-in User’s Guide Software Release 11.8 May 2020

Error Logging | 11

Invalid or non-boolean expression '<text from script line in question>' in IF statement

See the description of the previous message.

Invalid or non-boolean expression '<text from script line in question>' in ELSEIF statement

See the description of the previous message.

Error processing command expression '<text from script line in question>'

See the description of the previous message.

TIBCO iProcess Script Plug-in User’s Guide

Page 22: TIBCO iProcess Script Plug-in User’s Guide, Version 10€¦ · TIBCO iProcess® Script Plug-in User’s Guide Software Release 11.8 May 2020

12 | Chapter 1 Creating EAI Script Steps

TIBCO iProcess Script Plug-in User’s Guide

Page 23: TIBCO iProcess Script Plug-in User’s Guide, Version 10€¦ · TIBCO iProcess® Script Plug-in User’s Guide Software Release 11.8 May 2020

TIBCO iProcess Script Plug-in User’s Guide

Index | 13

Index

C

Casesuspend 6

Creating an EAI Script step 6

D

Definebasic EAI Step information 6stored procedure to call 7

E

EAI stepcreate 6define 6prerequisites 5transaction scope 3

Error messages 10Example uses of EAI Script steps 2

I

Ignore case suspend 6

P

Prerequisites for using EAI Script steps 5

S

Script errorlogging 10messages 10

T

Tracing problems in scripts 9Transaction scope of EAI Script steps 3