You are on page 1of 19

Scripting (Siebel 7.

7)

Module 1: Siebel Scripting Overview

Module Objectives

After completing this module you will be able to:


Describe the scripting environment in Siebel 7 Describe browser script functionality Describe server script functionality Recognize valid uses for scripting Recognize alternatives to scripting

Why you need to know:

Module 1: Siebel Scripting Overview

2 of 19

Scripting Environment

Scripts can be written in eScript or Visual Basic Scripts are authored in Siebel Tools Scripts can be executed in the server context or in the browser Browser scripts use JavaScript Upgrade scenario (67): Scripts are migrated as server scripts Scripts that reference the UI and scripts with deprecated methods need to be rewritten(!)

Web Client

Desktop Applications Web Browser

Siebel Web Server Ext.

Web Server

Siebel Siebel Server Server

External Packaged and Legacy Applications

Application Servers

Siebel Database

Corporate Data

Module 1: Siebel Scripting Overview

3 of 19

Script Languages
Siebel eScript is similar to ECMA Script Siebel VB is similar to VB for Applications Browser scripts use JavaScript eScript and VB can coexist in the repository, but not on the same object

Scripts are compiled into the .srf file Scripts are interpreted at run time Server scripts run where the .srf is located
Web Client: Script runs on OM host machine (Siebel Server) Dedicated/Mobile Web Client: Script runs on the client machine

Browser scripts run in the browser

Module 1: Siebel Scripting Overview

4 of 19

Integrated Environment

Siebel Tools is an integrated environment with:


Script editor

No need to learn another tool Scripts are stored in the repository database; no separate development files to manage

Compiler

Compiles into the .srf file; no separate deployment files to manage Similar to other debugging tools

Debugger

Module 1: Siebel Scripting Overview

5 of 19

Browser Script

Executed in the browser during run time Is authored within Siebel Tools Uses JavaScript Usage:

Web Client

Desktop Applications Web Browser

Siebel Web UI interaction Server Ext. (for example: change background colors of fields) User interaction Siebel Siebel (such as confirmation of action) Server Server Desktop interaction (such as integrating with MS Office products) Collect data from the active Siebel business component (not Database available in server script)

Web Server

External Packaged and Legacy Applications

Application Servers

Corporate Data

Module 1: Siebel Scripting Overview

6 of 19

Browser Script Considerations

JavaScript/Web-development experience necessary Need external debugger (MS Script Debugger) Must deploy .js files to Web server and remote clients Use only when there is no other option
User interaction (such as multiple notifications)

Error notification is available in server script

UI (DOM) manipulation (such as changing the text color) Desktop integration (such as passing data to MS Word)

Often unnecessary on client; consider server-side functionality Such as ActiveBusComp

Server script needs data that is only available in browser script

Module 1: Siebel Scripting Overview

7 of 19

Server Script

Executed in the Siebel Object Manager/ siebel.exe Is authored within Siebel Tools or administrative views in the Siebel application Uses Siebel VB and eScript

Web Client

Desktop Applications Web Browser

Siebel Web Server Ext.

Web Server

Siebel Siebel Server Server

External Packaged and Legacy Applications

Application Servers

Siebel Database

Corporate Data

Module 1: Siebel Scripting Overview

8 of 19

Server Script Usage

Functionality not related to UI, user, or desktop Data operations (Create, Read, Update, Delete) without user notification EAI Collect data unavailable to browser scripts and pass data back to the calling browser script
Example: Use NextSelected() to parse all records in the users selection

Web Services
Provide Web service to external consumers Consume external Web services

Siebel Workflow
Cannot call browser-based business services from workflow

Module 1: Siebel Scripting Overview

9 of 19

Ask the Question

Is there another way to implement the requirement without scripting? Leverage standard functionality
State Model, Activity Plans, Siebel Workflow, and so forth

Identify declarative alternatives


User properties, field validation, built-in business services, and so on

Why ask?
Scripting is the most expensive and most error-prone approach to implement requirements Upgrading to the next Siebel release will be more difficult

Module 1: Siebel Scripting Overview

10 of 19

Ask the Question Continued

Scripting is a powerful way to add extended functionality Make sure that you do not reinvent the wheel! Limit the amount of code to increase the quality of the code that you really need to have Apply software-industry standards for programming to your scripts
Exception handling Tracing Encapsulation Headers, comments Library of (translatable) error messages Quality assurance (QA) Testing

Module 1: Siebel Scripting Overview

11 of 19

Example

Scenario: Close a service request and add two activities by clicking a button First approach: Applet server script instantiates the BusComps, sets status field to Closed and creates two activity records
Problem: Functionality is available on only one applet

Second approach: Move script to BusComp and call a workflow to update SR and create activity records
Problem: Need to limit functionality to certain user groups

Final solution: Call workflow from personalized runtime event


Satisfy requirements without any code

Module 1: Siebel Scripting Overview

12 of 19

Reasons to Avoid Siebel Scripting


Slows processing
Interpreted at run time

Introduces potential for data integrity issues and run-time errors Requires continued maintenance Introduces complexity Often reproduces functionality available through configuration Complicates upgrade process

Scripting

Module 1: Siebel Scripting Overview

13 of 19

Alternatives to Scripting

Before you script:


Ensure that you evaluated alternative approaches
Administrative

(such as Personalization, Validation Manager, and so forth), Declarative (Siebel Tools)

Benefits:
Common requirements already addressed as configurable options Has undergone performance testing Easier to maintain and upgrade Avoids cost associated with scripting

Module 1: Siebel Scripting Overview

14 of 19

Customization: Level of Effort (LOE)

Scripting requires a very high level of effort and costs; when implementing requirements, consider cheap options first

User options (file export, tab order) Built-in assistants (Activity plans) Built-in functionality (Order, eSales) State Model Audit Trail ...... Validation Manager Siebel Workflow Runtime Events Personalization ..... Declarative configuration (Tools objects) Scripting BC, Application Level Scripting Business Services Scripting Server Script Scripting Browser Script
Module 1: Siebel Scripting Overview

LOE=LOW Standard requires no/little administration no configuration

LOE=MEDIUM Mostly standard requires administration some configuration

LOE=HIGH No standard Repository changes Prefer declarative to scripting!


15 of 19

Administrative Solutions

Siebel 7.7 provides a rich set of prebuilt solutions


Siebel Workflow
Interactive

and long-running workflows allow to assist and guide users through complex business processes and automate steps
prebuilt business service to ensure that objects fulfill validation rules created by an administrator Views, Applets, Data ,and run-time behavior based on user, data, or system attributes

Validation Manager
A

Personalization
Control

State Model
Control

the transition of state values based on rules created by administrators

Module 1: Siebel Scripting Overview

16 of 19

Declarative Configuration

Declarative properties for BC fields:


Validation Required Pre Default Value Post Default Value Read Only Force Case Calculated Calculated Value

Module 1: Siebel Scripting Overview

17 of 19

Declarative Configuration Continued

User properties:
Object definitions that are added as children to applet, business component, control, field, or list column Use to configure specialized behavior Beyond what is configured in the parent object definition's properties Add conditional logic to user property record, instead of scripting Examples: Business component BC Read Only Field On Field Update Set

Module 1: Siebel Scripting Overview

18 of 19

Summary

This module showed you how to:


Describe the scripting environment in Siebel 7 Describe browser script functionality Describe server script functionality Recognize valid uses for scripting Recognize alternatives to scripting

Module 1: Siebel Scripting Overview

19 of 19

You might also like