Using Siebel Tools > Using Siebel Script Editors > Using the ST eScript Engine >

Using Script Libraries with the ST eScript Engine


A script library is a part of the ST eScript Engine that allows you to call a business service method from a script. This topic describes how to make a custom business service method available to a business service script library and how to call this method in the script library. Using a script library is optional. Siebel CRM supports code you write before Siebel CRM version 8.0. For more information about script libraries, see Siebel eScript Language Reference.

Making a Custom Business Service Method Available in a Script Library

This topic describes how to make a custom business service method available in a script library.

To make a custom business service method available in a script library

  1. Create a script for a business service method.
  2. Validate the script.

    For more information, see Validating Script Syntax.

  3. Save the script.
  4. Make sure the External Use property of the business service contains a check mark.

    Siebel Tools adds the custom business service method to the script library.

Using a Script Library to Call a Custom Business Service Method

After you make a business service available for use in Siebel Tools, the following items apply:

  • You can call a business service method of this business service from another script.
  • The Script Assist window displays these business service methods. For more information, see About Script Assist.

To use a script library to call a custom business service method

  1. Make sure the following options are enabled:
  2. In the Siebel Script Editor, type the name of a business service object followed by a period (.).

    Siebel Tools displays the business service methods that are available for the business service.

  3. Choose the business service method that you must add to the script.
  4. Validate the script.

    For more information, see Validating Script Syntax.

Example of Using a Script Library

In this example, the mathService business service is enabled for use in Siebel Tools. It uses a business service method named square:

function square (x)
{
return (x * x);
}

If you use a script library to call an argument, then the compiler examines the argument types to make sure the argument that your script calls is valid and is compatible. The following code calls a business service method named square:

var oBS: Service = TheApplication().GetService ("mathService");
var value = 10;
var square_value = oBS.square (value);

Figure 5 displays a list of the business service methods that are available for the mathService script library. This list displays the following code:

var square_value = oBS

Figure 5. Example of a Script Assist Window That Displays the Business Service Methods That Are Available for the MathService Script Library
Using Siebel Tools Copyright © 2013, Oracle and/or its affiliates. All rights reserved. Legal Notices.