Siebel CRM Siebel Mobile Guide: Disconnected Siebel Innovation Pack 2017, Rev. A E52427-01 |
|
Previous |
Next |
View PDF |
This topic introduces the eScript Porting tool (escriptporter.exe) for porting Siebel Server-side scripts from the database to the Siebel Mobile disconnected client in offline mode. Using this tool eliminates the need to invest time in converting the existing server-side online customizations (originally done using eScript) to offline JavaScript services.
The steps involved in porting Siebel Server-side scripts to browser side JavaScript, (shown in Figure 6-2), are as follows:
Run the eScript Porting tool against the Siebel database. The eScript Porting tool executes SQL queries to extract server scripts for the following:
Events defined for the applet, business component, business object and application.
Business service methods.
For more information about the SQL queries that the eScript Porting tool executes, see "Using the eScript Porting Tool".
The (extracted) escripts are stored in a format which registers them into the Siebel Mobile disconnected framework.
A format template file is used for the application, applet, and business component and another format template file is used for business component
escriptporter.exe is located in the siebsrvr/BIN
folder. For example:
$SIEBEL_ROOT\bin\escriptporter.exe
The environment variable SIEBEL_REPOSITORY, which defines the repository to be extracted, must be set before running escriptporter.exe. For example:
Set SIEBEL_REPOSITORY=Siebel Repository
escriptporter.exe uses the following command arguments:
/U Username (Required)
/P Password (Required)
/C ODBC Data Source (Default Environment Variable: SIEBEL_DATA_SOURCE)
/D Siebel Table Owner (Default Environment Variable: SIEBEL_TABLE_OWNER)
/O OutputDir (Default: escripts)
/G Language (Default: ENU)
/W Siebel Application Interface Dir
Where:
/U username is the user name used to log in to the database.
/P Password is the password used to log in to the database.
/C ODBC Data Source is the database to log in to.
/D Siebel Table Owner is the table owner who owns Siebel tables.
/O OutputDir is the path where exported escripts are stored.
/G Language is the language the log will use.
/W Siebel Application Interface Dir is the path where eapps are located.
The eScript Porting tool command is located in $SIEBEL_ROOT\escriptTmpl
.
Filters are defined for applications, applets, business components, and business services in the escriptporter.cfg file as follows:
Application filters are defined in the APPLICATIONS section of escriptporter.cfg.
Applet filters are defined in the APPLETS section of escriptporter.cfg.
Business component filters are defined in the BUSCOMPS section of escriptporter.cfg.
Business service filters are defined in the BUSSVCS section of escriptporter.cfg.
You define a filter using either the exact name of the filter or a name pattern.
The syntax for defining a filter using the exact name of the filter is as follows:
Filter_Name X = name
Filter_Name is the prefix and X is a number, starting from 1. The name value is the name of application, applet, business component, or business service
Filter_NameListFile = filename
Filename is the file containing the names of the applications, applets, business components, or business services. Each line in the file defines a name, for example, as follows:
SAP 4x Account - SAP Maps (MO)
Send AlertOnline eMail
The file name can use a relative path or an absolute path. If using a relative path, then $siebroot\escriptTmpl\
is appended to the relative path.
The syntax for defining a filter using a name pattern (SQL format) is as follows:
Filter_SqlNamePattern[X] = name pattern
Filter_Name is the prefix. X is a number, starting from 1 (if there is a number). The name pattern value must be in SQL format.
An example of an escriptporter.cfg file is as follows:
[APPLICATIONS]
Filter_Name1= Siebel ePharma Mobile
[APPLETS]
Filter_SqlNamePattern = "Mobile"
[BUSCOMPS]
Filter_Name1= Account
Filter_Name2= Account Attachment
Filter_SqlNamePattern = "Account"
[BUSSVCS]
Filter_Name1= Quote - SAP 47 Maps
Filter_Name2= Send AlertOnline eMail
Filter_SqlNamePattern = "Order Maps"
Filter_SqlNamePattern = "Account"
Filter_NameListFile = service.txt
This topic shows some example SQL queries that escriptporter.exe (eScript Porting tool) executes to extract the server-side scripts from the Siebel database.
The table owner and hard coded parameter values in the following example SQL for querying application events are replaceable.
DM_GET_APPL_ESCRIPT =
SELECT app.NAME,script.Name scriptName, script.SCRIPT
FROM S_APPL_SCRIPT script,
S_APPLICATION app
WHERE app.ROW_ID = script.APPLICATION_ID
AND script.PROG_LANG = 'JS'
AND app.REPOSITORY_ID = (SELECT ROW_ID FROM DATAQ1.S_REPOSITORY WHERE NAME = 'Siebel Repository')
AND app.INACTIVE_FLG = 'N'
AND script.INACTIVE_FLG = 'N';
/
The table owner and hard coded parameter values in the following example SQL for querying applet events are replaceable.
DM_GET_APPLET_ESCRIPT =
SELECT applet.Name appletName,script.Name scriptName,script.SCRIPT
FROM DATAQ1.S_APPL_WEBSCRPT script,
DATAQ1.S_APPLET applet
WHERE script.APPLET_ID = applet.ROW_ID
AND script.PROG_LANG = 'JS'
AND applet.REPOSITORY_ID = (SELECT ROW_ID FROM DATAQ1.S_REPOSITORY WHERE NAME = 'Siebel Repository')
AND applet.INACTIVE_FLG = 'N'
AND script.INACTIVE_FLG = 'N';
/
The table owner and hard coded parameter values in the following example SQL for querying business component events are replaceable.
DM_GET_BUSCOMP_ESCRIPT =
SELECT buscomp.NAME bcName,script.Name scriptName, script.SCRIPT
FROM S_BUSCOMP_SCRIPT script,
S_BUSCOMP buscomp
WHERE buscomp.ROW_ID = script.BUSCOMP_ID
AND script.PROG_LANG = 'JS'
AND buscomp.REPOSITORY_ID = (SELECT ROW_ID FROM DATAQ1.S_REPOSITORY WHERE NAME = 'Siebel Repository')
AND buscomp.INACTIVE_FLG = 'N'
AND script.INACTIVE_FLG = 'N';
/
The table owner and hard coded parameter values in the following example SQL for querying business service events are replaceable.
DM_GET_SERVICE_ESCRIPT =
SELECT service.NAME svcName ,script.Name scriptName, script.SCRIPT
FROM S_SERVICE_SCRPT script,
S_SERVICE service
WHERE service.ROW_ID = script.SERVICE_ID
AND script.PROG_LANG = 'JS'
AND service.REPOSITORY_ID = (SELECT ROW_ID FROM DATAQ1.S_REPOSITORY WHERE NAME = 'Siebel Repository')
AND service.INACTIVE_FLG = 'N'
AND script.INACTIVE_FLG = 'N';
/
This topic lists the offline APIs supported by escriptporter.exe, the eScript Porting tool. Some objects and functions used in the Siebel Server-side script are missing or different in the Siebel Mobile disconnected framework. For a complete list of unsupported functions, see "Unsupported Offline APIs".
The technologies you can use to access the object interface methods include the following:
You can use the following technologies to access applet object interface methods. You can use an applet object interface method only with Server Script and Browser Script.
ActiveMode Method for an Applet
BusComp Method for an Applet
BusObject Method for an Applet
FindActiveXControl Method for an Applet
FindControl Method
Examples of Using the FindControl Method
Name Method for an Applet
For more information about each of these applet methods, see Siebel Object Types Reference.
You can use the following technologies to access application methods.
ActiveApplet Method for an Application
ActiveBusComp Method for an Application
ActiveBusObject Method for an Application
ActiveViewName Method for an Application
Attach Method for an Application
CurrencyCode Method for an Application
Detach Method for an Application
EnableExceptions Method for an Application
FindApplet Method for an Application
GetBusObject Method for an Application
GetLastErrCode Method for an Application
GetLastErrText Method for an Application
GetService Method for an Application
GotoView Method for an Application
InvokeMethod Method for an Application
Language Method for an Application
Called only with InvokeMethod
LoadObjects Method for an Application
Login Method for an Application
LoginId Method for an Application
LoginName Method for an Application
Logoff Method for an Application
Name Method for an Application
NewPropertySet Method for an Application
PositionId Method for an Application
PositionName Method for an Application
ShowModalDialog Method for an Application
SWEAlert Method for an Application
For more information about each of these application methods, see Siebel Object Types Reference.
You can use the following technologies to access business component methods. You cannot use these methods with the Web Client Automation Server.
ActivateField Method for a Business Component
ActivateMultipleFields Method for a Business Component
Associate Method for a Business Component
BusObject Method for a Business Component
ClearLOVCache Method for a Business Component
Called only with InvokeMethod
ClearToQuery Method for a Business Component
CreateFile Method for a Business Component
Called only with InvokeMethod
DeactivateFields Method for a Business Component
DeleteRecord Method for a Business Component
ExecuteQuery Method for a Business Component
FirstRecord Method for a Business Component
GenerateProposal Method for a Business Component
Called only with InvokeMethod
GetAssocBusComp Method for a Business Component
GetFieldValue Method for a Business Component
GetFile Method for a Business Component
Called only with InvokeMethod
GetLastErrCode Method for a Business Component
GetLastErrText Method for a Business Component
GetMultipleFieldValues Method for a Business Component
GetPicklistBusComp Method for a Business Component
GetSearchExpr Method for a Business Component
GetSearchSpec Method for a Business Component
GetSortSpec Method for a Business Component
GetUserProperty Method for a Business Component
GetViewMode Method for a Business Component
InvokeMethod Method for a Business Component
Name Method for a Business Component
NewRecord Method for a Business Component
NextRecord Method for a Business Component
ParentBusComp Method for a Business Component
Pick Method for a Business Component
PutFile Method for a Business Component
Called only with InvokeMethod
RefreshBusComp Method for a Business Component
Called only with InvokeMethod
RefreshRecord Method for a Business Component
Called only with InvokeMethod
Release Method for a Business Component
SetAdminMode Method for a Business Component
Called only with InvokeMethod
SetFieldValue Method for a Business Component
SetMultipleFieldValues Method for a Business Component
SetSearchExpr Method for a Business Component
SetSearchSpec Method for a Business Component
SetSortSpec Method for a Business Component
SetViewMode Method for a Business Component
UndoRecord Method for a Business Component
WriteRecord Method for a Business Component
For more information about each of these business component methods, see Siebel Object Types Reference.
You can use the following technologies to access business object methods. You cannot use these methods with the Web Client Automation Server.
GetBusComp Method for a Business Object
GetLastErrCode Method for a Business Object
GetLastErrText Method for a Business Object
Name Method for a Business Object
Release Method for a Business Object
For more information about each of these business object methods, see Siebel Object Types Reference.
You can use the following technologies to access business service methods.
InvokeMethod Method for a Business Service
Name Method for a Business Service
Release Method for a Business Service
For more information about each of these business service methods, see Siebel Object Types Reference.
You can use the following control methods. You can use these methods only with Browser Script:
Applet Method for a Control
BusComp Method for a Control
GetProperty Method for a Control
GetValue Method for a Control
Name Method for a Control
SetLabelProperty Method for a Control
SetProperty Method for a Control
SetValue Method for a Control
For more information about each of these control methods, see Siebel Object Types Reference.
You can use the following technologies to access property set methods.
AddChild Method for a Property Set
Copy Method for a Property Set
GetByteValue Method for a Property Set
GetChild Method for a Property Set
GetChildCount Method for a Property Set
GetFirstProperty Method for a Property Set
GetLastErrCode Method for a Property Set
GetLastErrText Method for a Property Set
GetNextProperty Method for a Property Set
GetProperty Method for a Property Set
GetPropertyCount Method for a Property Set
GetType Method for a Property Set
GetValue Method for a Property Set
InsertChildAt Method for a Property Set
PropertyExists Method for a Property Set
RemoveChild Method for a Property Set
RemoveProperty Method for a Property Set
Reset Method for a Property Set
SetByteValue Method for a Property Set
SetProperty Method for a Property Set
SetType Method for a Property Set
SetValue Method for a Property Set
For more information about each of these property set methods, see Siebel Object Types Reference.
You can use the following technologies to access other methods that you can use.
GetErrorCode Method
GetErrorMessage Method
TheApplication Method
Note: You cannot use these methods with the following technologies: Web Client Automation Server, Mobile Web Client Automation Server, COM Data Control, and COM Data Server. |
For more information about each of these miscellaneous methods, see Siebel Object Types Reference.
This topic lists the offline APIs that are not supported by escriptporter.exe, the eScript Porting tool. Some objects and functions used in the Siebel Server-side script are not implemented in the Siebel Mobile disconnected framework. Any function invoked that is not supported shows a pop-up message saying This function is not supported.
For more information about the technologies you cannot use to access the object interface methods, see the following:
The following technologies are not supported to access application methods:
GetDataSource Method for an Application
GetProfileAttr Method for an Application
GetSharedGlobal Method for an Application
IsViewReadOnly Method for an Application
LoadUserAttributes Method for an Application
LookupMessage Method for an Application
LookupValue Method for an Application
RaiseError Method for an Application
RaiseErrorText Method for an Application
SetPositionId Method for an Application
SetPositionName Method for an Application
SetProfileAttr Method for an Application
SetSharedGlobal Method for an Application
Trace Method for an Application
TraceOff Method for an Application
TraceOn Method for an Application
The following technologies are not supported to access business component methods:
ExecuteQuery2 Method for a Business Component
FirstSelected Method for a Business Component
GetFormattedFieldValue Method for a Business Component
GetMVGBusComp Method for a Business Component
GetNamedSearch Method for a Business Component
LastRecord Method for a Business Component
NextSelected Method for a Business Component
PreviousRecord Method for a Business Component
RefineQuery Method for a Business Component
SetFormattedFieldValue Method for a Business Component
SetNamedSearch Method for a Business Component
SetUserProperty Method for a Business Component
The following technologies are not supported to access business service methods:
GetFirstProperty Method for a Business Service
GetNextProperty Method for a Business Service
GetProperty Method for a Business Service
PropertyExists Method for a Business Service
RemoveProperty Method for a Business Service
SetProperty Method for a Business Service
The following technologies are not supported to access buffer lib methods:
Buffer
getString
getValue
offset[]
putString
putValue
subBuffer
toString
The following technologies are not supported to access SELib methods:
dynamicLink
peek
pointer
poke
The following technologies are not supported to access CLib methods:
memchr
memcmp
memcpy
memmove
memset
isalnum
isalpha
isascii
iscntrl
isdigit
isgraph
islower
isprint
ispunct
isspace
isupper
isxdigit
toascii
clearerr
perror
strerror
chdir
getcwd
fclose
feof
fflush
fgetc
getc
fgetpos
fgets
fopen
fprintf
fputc
putc
fputs
fread
freopen
fscanf
fseek
fsetpos
ftell
fwrite
mkdir
remove
rename
rewind
rmdir
sscanf
mpfile
tmpnam
ngetc
cosh
div ldiv
frexp
ldexp
modf
rand
sinh
srand
tanh
rsprintf
sprintf
strchr
strcspn
stricmp
strcmpi
strlwr
strncat
strncmp
strncmpi
strnicmp
strncpy
strpbrk
strrchr
strspn
strstr
strstri
asctime
clock
difftime
gmtime
localtime
mktime
tmpnam
bsearch
getenv
putenv
qsort
system
atof
atoi
atol
fmod
strcat
strcmp
strcpy
strlen
strlwr
strtod
strtol
strupr
tolower
toupper
The following technologies are not supported to access global methods:
COMCreateObject
undefine