SiebelGuide.com/siebelblogs

Siebel Blogs, News, Events, Tips and Tricks
Filed under Tips&Tricks, eScript, All

There are several other ways to optimize Siebel scripting but it is also very important to write the code in a way as to reduce the maintenance efforts, help future reference and for best understanding. So in this blog post about Siebel eScripting best practices I will mention tips to address these essential skills needed.

Tip 8: Consolidate Scripts to BC level script or Business Service level script.
There are cases where in a same set block of script is being used at multiple places. A simple example would be a script used in toggle applets where there are multiple applets involved and each applet could be having the same block of script addressing the same functionality. For a developer, a small change in functionality would require him to change multiple objects. This overhead can be reduced if possible, by moving the functionality to either at the Business Component level or at the Business Service level. Then the developer would have to make changes to only one object which effectively saves a lot of overhead and time.


Also keep in mind that lesser the code in your repository better the maintenance efforts and would also help the upgrade process.

Tip 9: Self-Document the scripts with Comments
I can’t stress enough on this trip. There are always times when we look at the other person’s code and we would always wonder why this was done. Also even there are times when a year later or so, our own code would look alien to us. So always use comments sparingly. Commenting is a wonderful way of conveying the meaning of the code.

Each code should start with a commented header explaining the purpose of the code. Then comment the code appropriately at every sections of the code to make the whole script self explanatory. Below is the sample function header.

function Service_PreInvokeMethod (MethodName, Inputs, Outputs)
{
/**********************************************************
* Name: AAG Service PreInvokeMethod
* Author: SiebelGuide.com
* Date Created: 01/25/2008
*
* Purpose/Description: Illustration of how comment header is used
*
* Inputs: Id, SR_ID
* Outputs: Returns status of BS
*
* Revision History:
* 3/1/08 — SiebelGuide.com — Added to update status of SR
* 3/9/08 — Sridhar — Added Email functionality, Enhancement SBL-320
************************************************************/

The header shown above is the most common header used by many developers. Feel free to use the above header in your code.

In my next post I will mention tips to enhance readability and error handling. Till then let me know what you guys think about these tips. Until my next post Adiós..!

Related posts(Auto Generated):

  1. PropertyExists Method in Siebel eScript
  2. eScript Best Practices - Part6
  3. PropertySets in Siebel - Made Easy
  4. eScript Best Practices - Part7
  5. eScripting Best Practices - Part3

Posted by Sridhar on Monday, March 31st, 2008


Page copy protected against web site content infringement by Copyscape
You can follow any responses to this entry through the magic of "RSS 2.0" and leave a trackback from your own site.

2 Responses to “eScripting Best Practices - Part5”

Post A Comment

Recent Posts 

Recent Comments:

  • Gloria: Thank you for sharing your knowledge!
  • Sridhar: Hi Satya, Please share your documents using “Participate” link on the right hand side. Many thanks...
  • satya vardhan: hi ramya this is vardhan i am in obiee developer i am not undrstanding ur query can u repeat once again...
  • satya vardhan: hi sri obiee this is reporting tool if u want more details send me ur mailid. i can forword some documents...
  • Ramya: Hi, Can u pls tell me how to get the difference between two date fields by ignoring weekends (i.e satday, sunday if...