Scripting Siebel 7.7

19
® Module 1: Siebel Scripting Overview Scripting (Siebel 7.7)

description

Scripting Siebel 7.7

Transcript of Scripting Siebel 7.7

Page 1: Scripting Siebel 7.7

®

Module 1: Siebel Scripting Overview

Module 1: Siebel Scripting Overview

Scripting (Siebel 7.7)Scripting (Siebel 7.7)

Page 2: Scripting Siebel 7.7

Module 1: Siebel Scripting Overview 2 of 19

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:

Page 3: Scripting Siebel 7.7

Module 1: Siebel Scripting Overview 3 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(!)

SiebelServer

Web Client

SiebelDatabase

WebBrowser

Corporate Data

Application Servers

Web ServerSiebel Ext.

WebServer

SiebelServer

External Packaged andLegacyApplications

Desktop Applications

Page 4: Scripting Siebel 7.7

Module 1: Siebel Scripting Overview 4 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

Page 5: Scripting Siebel 7.7

Module 1: Siebel Scripting Overview 5 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

Debugger Similar to other

debugging tools

Page 6: Scripting Siebel 7.7

Module 1: Siebel Scripting Overview 6 of 19

Browser Script

Executed in the browser during run time

Is authored within Siebel Tools

Uses JavaScript Usage:

UI interaction(for example: change backgroundcolors of fields)

User interaction(such as confirmation of action)

Desktop interaction (such as integrating with MS Office products)

Collect data from the active business component (not available in server script)

SiebelServer

Web Client

SiebelDatabase

WebBrowser

Corporate Data

Application Servers

Web ServerSiebel Ext.

WebServer

SiebelServer

External Packaged andLegacyApplications

Desktop Applications

Page 7: Scripting Siebel 7.7

Module 1: Siebel Scripting Overview 7 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

Server script needs data that is only available in browser script Such as ActiveBusComp

Page 8: Scripting Siebel 7.7

Module 1: Siebel Scripting Overview 8 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 Siebel

Server

Web Client

SiebelDatabase

WebBrowser

Corporate Data

Application Servers

Web ServerSiebel Ext.

WebServer

SiebelServer

External Packaged andLegacyApplications

Desktop Applications

Page 9: Scripting Siebel 7.7

Module 1: Siebel Scripting Overview 9 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 user’s

selection Web Services

Provide Web service to external consumers Consume external Web services

Siebel Workflow Cannot call browser-based business services from workflow

Page 10: Scripting Siebel 7.7

Module 1: Siebel Scripting Overview 10 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

Page 11: Scripting Siebel 7.7

Module 1: Siebel Scripting Overview 11 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

Page 12: Scripting Siebel 7.7

Module 1: Siebel Scripting Overview 12 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

Page 13: Scripting Siebel 7.7

Module 1: Siebel Scripting Overview 13 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

Page 14: Scripting Siebel 7.7

Module 1: Siebel Scripting Overview 14 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

Page 15: Scripting Siebel 7.7

Module 1: Siebel Scripting Overview 15 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

LOE=LOWStandard

requires no/little administrationno configuration

LOE=MEDIUMMostly standard

requires administrationsome configuration

LOE=HIGHNo standard

Repository changesPrefer declarative to scripting!

Page 16: Scripting Siebel 7.7

Module 1: Siebel Scripting Overview 16 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

Validation ManagerA prebuilt business service to ensure that objects fulfill validation

rules created by an administrator

PersonalizationControl Views, Applets, Data ,and run-time behavior based on

user, data, or system attributes

State ModelControl the transition of state values based on rules created by

administrators

Page 17: Scripting Siebel 7.7

Module 1: Siebel Scripting Overview 17 of 19

Declarative Configuration

Declarative properties for BC fields: Validation Required Pre Default Value Post Default Value Read Only Force Case Calculated Calculated Value

Page 18: Scripting Siebel 7.7

Module 1: Siebel Scripting Overview 18 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 FieldOn Field Update Set

Page 19: Scripting Siebel 7.7

Module 1: Siebel Scripting Overview 19 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