Siebel eScript Language Reference > About Siebel eScript > Overview of Siebel eScript >

About Siebel eScript Code


Siebel CRM uses two versions of Siebel eScript code:

  • T eScript code. Compiled by the original T eScript engine.
  • ST eScript code. Compiled by the ST eScript engine beginning with Siebel CRM version 8.0. Siebel CRM introduced this code in Siebel CRM version 7.8. ST eScript code is the default code beginning with Siebel CRM version 8.0.

This book mentions these code versions only if differences exist between how the code functions.

Features of ST eScript Code

ST eScript code includes the following features. T eScript code does not include these features:

For more information about these features, see Using Siebel Tools.

Compatibility Between ST eScript Code and T eScript Code

ST eScript code is mostly backward compatible with T eScript code. Table 1 describes features that are not backward compatible.

Table 1. Incompatibilities Between ST eScript Code and T eScript Code
Feature
Description

Strong typing

For more information, see Using Strongly Typed and Typeless Variables.

Comparison operations

ST eScript code does the following:

  • If it compares typeless variables, then it compares object values.
  • If it compares strongly typed variables, then it compares object identities.

If you are not aware of these differences, then the results of a comparison operation that involves strongly typed variables might be misleading. For more information, see Using Logical Operators and Conditional Expressions.

Implicit variable type conversion

Siebel eScript does an implicit conversion differently depending on if a variable is strongly typed or if it is typeless. For more information, see How Siebel eScript Converts Data Types.

Methods

Siebel eScript restricts the parameters in some methods differently depending on if you use ST eScript code or T eScript code. If it restricts these parameters differently, then this book describes those differences. For an example, see Set Array Length Method.

Properties

For more information, see Overview of Regular Expression Methods.

Commands

ST eScript code does not support the #Define statement or the #If statement. As an alternative, you can use a Var statement. For example, consider the following code:

#define MY_DEFINE "abc"

The following code replaces the #Define statement with the Var statement:

var MY_DEFINE = "abc";

Objects and arrays

For more information, see Referencing Objects and Arrays.

Referencing Objects and Arrays

If you write code that references an array item, an object function, or object data, and:

  • You use T eScript code. Siebel eScript automatically creates a new object.
  • You use ST eScript code. Siebel eScript does not automatically create a new object. If you use ST eScript code, then you must configure Siebel eScript to explicitly initialize the object.
Referencing Object Functions or Data

The following script runs correctly using T eScript code but fails at runtime using ST eScript code:

var oArr = new Array ();
oArr[0].m_Data =1;

You must configure Siebel eScript to initialize the data object that it references so that the script runs correctly with ST eScript code. For example:

var oArr = new Array ();
oArr[0] = new Object ();
oArr[0].m_Data =1;

Using Arrays

The following script runs correctly using T eScript code but fails at runtime using ST eScript code:

var oArr = new Array ();
oArr[2][3].m_Data = 2;

You must configure Siebel eScript to initialize the data object that it references so that the script runs correctly with ST eScript code. For example:

var oArr = new Array ();
oArr[2] = new Array ();
oArr[2][3] = new Object ();
oArr[2][3].m_Data = 2;

Reverting ST eScript Code to T eScript Code

If you use ST eScript code, then you can revert this code back to T eScript code. This technique is not recommended.

To revert ST eScript code to T eScript code

  1. Create a service request or call Oracle Global Customer Support.

    For help with reverting ST eScript code to T eScript code, create a service request (SR) on My Oracle Support. Alternatively, you can phone Oracle Global Customer Support directly to create a service request or get a status update on your current SR. Support phone numbers are listed on My Oracle Support.

  2. In Siebel Tools, turn off the ST eScript engine.

    For more information, see Using Siebel Tools.

  3. Remove any script that you typed prior to compiling with the ST eScript engine.
  4. Do a full compile of all objects in the repository.
Siebel eScript Language Reference Copyright © 2018, Oracle and/or its affiliates. All rights reserved. Legal Notices.