Friday, January 6, 2012

Debugging Siebel Applications


It is essential that you understand how to debug Siebel applications. There are four basic techniques:
• Use alerts or RaiseErrorText methods to pop up message boxes
• Write to a file using Trace or custom methods
• Use the Siebel Debugger
• Use object manager level logging

Alert and RaiseError-Text
The alert method in browser script and the RaiseErrorText method in server
script enable you to display message boxes to the user.
The RaiseErrorText method stops the execution of a script; therefore, it is
only appropriate for a quick check of something and is not a good way to
debug scripts where the source of the error is hard to determine.
Alerts do not stop the execution of browser scripts and therefore are a quick
and easy way to debug browser scripts.

Writing to a Text File
The most common way to debug a script is to write information to a text file.
Accomplish this using the Trace function or an Siebel VB or eScript function.
Using Trace, you can write the actual SQL to a file.

Using the Debugger in Siebel Tools
This is a useful tool for visually stepping through the code and looking at the
values of variables real time. You can set break points anywhere until you
isolate a problem.

Using Object Manager Settings
When an application is in production, it is not always possible to add
debugging statements to script. In this situation, developers or systems
administrators can change settings in the object manager to trace events and
SQL.
Defined in the Component Parameters View:
• OM - EL Tracing User Name: a comma separated list of logins to trace (for
example, SADMIN)
• OM - Trace EL Allocation: traces object memory allocation (Set to 1)
• OM - Trace EL Events: traces which events are triggered (Set to 1)
• OM - Trace EL SQL: traces the SQL generated by script (Set to 1)

When to Use Browser versus Server Script


Browser script is recommended for:
• Communication with the user
• Interaction with desktop applications
• Data validation and manipulation limited to the current record

Server script is recommended for:
• Query, insert, update, and delete operations
• Access to data beyond the current record

Preferred alternatives to scripting include::


• Field validation
• User properties
• Workflow
• Personalization
• Run-time events
• State model

Followers

Search This Blog