Вы находитесь на странице: 1из 22

Scripting Tips to Avoid Common

Configuration Pitfalls in Siebel 7


Agenda

 Scripting in Siebel 7 – The New Architecture


 Tips for Assessing Scripts in prior Siebel 7.x versions
 Migrating Scripts from prior Siebel versions to Siebel 7.x
 Tips and Techniques for improving Scripting performance
in Siebel 7.x
Scripting in Siebel 7 – The New architecture

 Siebel 7 client architecture is Web based. Consequently,


Scripts should have the capability to execute on a browser
as well as the Application Server.
 Scripts in Siebel 7 are classified as
 Browser Scripts
 Server Scripts

 This architecture is significantly different from prior Siebel


version
 Scripts from prior releases have to be assessed and
migrated as either Browser Scripts and/or Server Scripts
Browser Scripts - Background

 Executed in the browser during run time


 Authored within Siebel Tools
 Written in JavaScript
 Included or excluded based on user's browser group and
corresponding property in Tools
 Included in the Web page at run time
 Provide a pre-defined list of objects and events for specific
virtual agents, some of which can be administered by
customer
Browser Scripts – Usage

How Browser Scripts Example


Are Used
Users of Siebel eSales must enter either
Client-side validation their city and state or Zip Code of their
ship-to address to place an order
COM-based integration with desktop
Desktop integration applications like Excel

Applet text boxes, links, and other


Dynamic manipulation of the members of the browser’s Document
user interface Object Model (DOM)
Server Scripts - Background

 Executed in the Siebel Object Manager on the Application


Server

 Authored within Siebel Tools and Administrative views in


other Siebel applications (e.g. Business Service
Administration, Smart Script Administration, etc.)

 Use Siebel VB and/or eScript

 Support integration with legacy and packaged applications


Server Scripts – Methods No Longer Supported

 Server Scripts no longer have no access to Siebel Methods


that reference the UI context or desktop
 Application.ActiveApplet
 Application.ActiveBusComp
 Application.GotoApplet
 Application.InputBox
 Application.MsgBox
 Application.ShowStatus
 Buscomp.AllowNotification
 Buscomp.SuppressNotification
Server Scripts – New Methods

 Siebel Methods that are new or were previously unavailable


to Server Scripts include
 Application.ActiveViewName
 Application.ActiveBusObject
 Application.InvokeMethod(“Data Source”)
 Application.Name
 Application.LookupMessage
 Application.RaiseError
 Application.RaiseErrorText
Assessing Scripts for Migration

A Siebel repository that involves script-intensive customization


presents a challenge for migration

Best Practice for Migrating Scripts: Assessment


 Siebel recommends assessment of all or a significant sample of the
Scripts in the current version before proceeding to Upgrade

 Objective: Determine the complexity of the existing script base and also
to devise a roadmap for migrating the scripts

 Goal: To fragment the effort into smaller, well-defined steps that have
clear exit-criteria to better manage the project
Determining Script Complexity

 How do you define “Complex” scripts?


 A Script is only defined as “complex” in terms of the level of effort
required to migrate that Script to Siebel 7.

 While a script could be complex in terms of the business logic that it


implements, it may upgrade as a Server Script without requiring any level
of effort.

 Classifying scripts and subsequently providing a complexity rating will


simplify the migration process.

 Siebel typically rates scripts as High, Medium, Low, and Minimal for
complexity
Determining Script Complexity - Classification

Best Practice for Determining Script Complexity: Classification

 One classification method to determine the complexity of the


scripts:
1. Scripts that have UI Context
 User-interactive in the sense that they require user input during execution
 E.G. VB Calls like MsgBox, InputBox inside a script
2. Scripts that implement some form of Desktop integration
 Interact with a desktop application like Excel, Word etc
3. Scripts that enforce a business rule

TIP: In some cases, individual scripts may offer a combination


of the above three categories. In such instances, they should
either be classified as UI Context or Desktop integration.
Script Complexity Ratings - High

A Script is rated as High if it meets one of the following


criteria
 Scripts that are written such that based on a user input, different branches
are taken inside the script

 Scripts that have a strong coupling of user-interactive code and business


logic code in such a way that they make no sense if de-coupled.

 Scripts that require some research as to where to place them (on what
event on Browser or Server)

 Scripts that explicitly load a DLL (or a static library) to achieve some client-
side integration.
Script Complexity Ratings – Medium, Low, Minimal.

A Script is rated as Medium if it meets one of the following


criteria
 Button Click events on Applets that are Scripted. This will require migrating
the script to the BC level as a PreInvoke event handler
 Scripts that are totally client-oriented. This will require the script to be re-
written in BrowserScript.

A Script is rated as Low if it meets one of the following


criteria
 Scripts that are UI intensive but nonetheless have one-to-one mapping of
UI methods. Examples:
 MsgBox method can be replace using the new RaiseError method.
 Script in the Applet_GotFocus event can be moved to the
WebApplet_Load Event.

A Minimal Script is one that does not require any


migration effort but will require some testing
Migration Approach

 During the Siebel 7 Upgrade process, all scripts will be


upgraded by default as Server Scripts
 As one of the Post-Upgrade steps, all the scripts should
be migrated. The following gives a high-level step by step
approach to do this migration.
1. Break down the Siebel Application functionality into different
categories with each category associated with a well-defined
business process.
 E.G. Account Management, Contact Management, etc.
2. Prioritize each of the business processes based on the business
requirement:
 Priority should be determined by the number of scripts that the
business process covers, and how critical the process is relative to
the application as a whole.
 E.G. Account and Contact Management supercede Service Requests.
Migration Approach – Contd.

 High level steps to migrate scripts


 Start migrating the top priority business processes. Applet Scripts,
Business Component Scripts and any Business Service scripts that are
part of this process should be migrated.
 Establish the exit criteria for each of the business processes. Exit criteria
would be successfully completing a test case for each business process.

 Please note that if there are dependencies among


business processes, they must be resolved first.
 Converting Scripts
 In Parrallel by Process, Category or Business Object
 Ensures rapid conversion.
Tips for increasing Siebel 7.x scripting performance

1. Only use indexed fields in scripting queries.


 Creating an Index ties the information in a data store (table) to one single
column
 SQL runtime will be faster if an indexed column/field is provided in the
Search Specification to query the Business Component
 Use of non-indexed fields inside the Search Specification will increase the
amount of time required to query the database, resulting in performance
degradation.
Tips for increasing Siebel 7.x scripting performance

2. Ensure Siebel objects are released correctly.


 Memory is allocated to all objects used inside Siebel Scripts – so the
objects must be “released” to free the memory
 Objects include Business Components, Business Objects, Property
Sets, Arrays, Date Objects, etc.
 Objects are released by setting the object to NULL in eScript and Nothing
in VBScript within each Script
 In certain cases, order of object destruction is important –Dependent
(child) objects must be released prior to releasing independent (parent)
objects.
 E.G. Release the memory used by a BC before releasing the memory
used by a BO object.
 Not releasing the memory will result in performance degradation and
scalability problems
Tips for increasing Siebel 7.x scripting performance

3. Use the correct data type in scripts.


 Use “Option Explicit” on all the Script blocks in VB – eScript and
JavaScript natively natively enforce explicit variable definition.
 “Option Explicit” forces a compile time check for all declared variables and
their data types in VB.
 In VB, if not explicitly declared with a data type, the default data type of
“Variant” is assigned to all variables.
 This, in addition to occupying more memory than needed, will result
in longer debug times, as data types could be used interchangeably.
 E.G., A variable meant to store numeric data can hold text, and detecting
such will take considerably more time.
Tips for increasing Siebel 7.x scripting performance

4. Ensure error handling is in place for all scripts.


 Even if the script does not manipulate Siebel objects and does not
access the operating system, it may be changed in the future.
 Providing basic error handling ensures that errors will always be handled
no matter how and when the script is modified.
 Make sure error-handling is used in conjunction with releasing object
references on Scripts that have allocated memory for objects

5. Always ensure that shared programs on the server are


thread-safe.
 Make sure that custom programs on the server that handle requests from
Siebel Clients can support multiple requests simultaneously.
 Failure to take this precaution might result in concurrency and scalability
issues.
Tips for increasing Siebel 7.x scripting performance

6. Do not overuse the “Immediate Post Change” property.


 Setting the Immediate Post Change property on a Field object will force
the PreSetFieldValue event to execute on the server for that field.
 During the implementation design phase, customers need to decide which
fields need to be validated immediately, considering that setting a large
number of fields to this property will result in performance degradation.
 The Immediate Post Change property is set in Siebel Tools by navigating
to the Buscomp screen and opening up the Fields node. The property is
new in Siebel 7.
Tips for increasing Siebel 7.x scripting performance

7. Using the correct cursor mode for ExecuteQuery.


 When a business component’s record set is traversed from the first record to the last
record in the forward direction only, (there is no call to FirstRecord or PreviousRecord
after calling NextRecord) and the business component does not support the UI,
specifying the cursor mode of ForwardOnly will enhance performance.
 The cursor mode ForwardBackward should only be used for business components
that support the UI or where the record set will be traversed both forwards and
backwards for a specific instance.0
Contacts

Вам также может понравиться