Siebel Scripting 1
Siebel Scripting 1
Introduction
Types of scripts in Siebel Scripting Languages Siebel objects that use scripting Various uses for scripts in Siebel Browser Scripting
Types of Scripts
Server Scripts
Run on the Siebel server Not transferred to users machine Siebel VB or eScript Run on users PC in browser window Always JavaScript only
Browser Scripts
Scripting Languages
Siebel VB
Based on VBScript from Microsoft Has special Siebel extensions Includes many Siebel defined objects
eScript
Based on JavaScript Has special Siebel extensions Includes many Siebel defined objects
Based on C syntax
JavaScript
Used in browser scripts only Only scripting language used in browser scripts Based on C syntax Can use many of the Siebel objects previously mentioned
Applets Business Components Applications (Call Center, Fins, etc) Business Services Views, Screens, Tables, and Other Objects Cannot use Scripts
Scripting In Applets
Scripting In Applications
E.g.. Application_Start
Objects and functions on application object can be accessed from elsewhere in the system (escript only). E.g.. From an Applet or BusComp
Server Scripts Browser Scripts Events BS are objects designed for one purpose: holding scripts
Good place to put code you wish to access from various places Many pre-defined BS in system, mostly for EAI
Applet Buttons Sharing data between objects Enterprise Application Integration (EAI) As an alternative to configuration
Almost anything that can be done with configuration can be done with scripting
Applet Buttons
You can create your own buttons on applets Need script to make them clickable (not grayed out) Need script to do some action when they are clicked
SetSharedGlobal GetSharedGlobal SetProfileAttr GetProfileAttr Use to store data from one object, can be accessed from any object
Virtual business components (VBC) Parsing and creation of XML files Many built-in business services
More flexible than configuration Just because you CAN replicate configuration behavior in script doesnt necessarily mean that you SHOULD
Scripting something that can be done with configuration should never be the first choice: only if there is a specific reason
Browser Scripting
Browser Scripts are actually run on the client machine- including when using Web Client or Wireless Web Client So, they must be included with the HTML files and pushed to the client machine This makes them Physical UI files And Requires an extra step: genbscript.exe
Compiling the repository does not create the necessary UI files for browser scripts to work. Those files need to be in SIEBROOT\siebsrvr\WEBMASTER\ directory For Dev Clients in C:\Program Files\Siebel\7.8\web client\PUBLIC\enu Use genbscript.exe to generate them
genbscript Syntax
genbscript
Alternative Way
In Siebel Tools, select View -> Options Click Scripting Tab Enter Destination Directory into Browser Script Compilation Folder Box Each time you compile, browser scripts will be automatically generated You must still move them to the
If Browser scripts require so much more work (not to mention are slower), why use them? Some things can only be done (or only be done well) via browser script