Professional Documents
Culture Documents
7)
Module Objectives
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
Web Server
Application Servers
Siebel Database
Corporate Data
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
4 of 19
Integrated Environment
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
5 of 19
Browser Script
Executed in the browser during run time Is authored within Siebel Tools Uses JavaScript Usage:
Web Client
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
Application Servers
Corporate Data
6 of 19
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)
UI (DOM) manipulation (such as changing the text color) Desktop integration (such as passing data to MS Word)
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
Web Server
Application Servers
Siebel Database
Corporate Data
8 of 19
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
9 of 19
Is there another way to implement the requirement without scripting? Leverage standard functionality
State Model, Activity Plans, Siebel Workflow, and so forth
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
10 of 19
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
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
12 of 19
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
13 of 19
Alternatives to Scripting
Benefits:
Common requirements already addressed as configurable options Has undergone performance testing Easier to maintain and upgrade Avoids cost associated with scripting
14 of 19
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
Administrative Solutions
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
16 of 19
Declarative Configuration
17 of 19
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
18 of 19
Summary
19 of 19