Wednesday, April 18, 2012

View Layout Cache in Siebel Enterprise

This is reblogged from http://ondemand-education.com. Those guys have some cool articles :-)


View Layout Cache in Siebel Enterprise:
This is a subject that comes up often enough in the classroom or in the office, so I thought we would post a short article about it. Before we begin, we need to set the scene. You are navigating through Siebel Call Center or whatever application you use, and you click Help - About View with the Shift key held down. Siebel will kindly tell you how the View Layout you were looking at was brought to you :
Not Cached :
Siebel View Layout Not Cached
Well, bad news. You are on a dynamic layout view (amongst other things, applets such as Explorer, Hierarchical, Dynamic Drilldowns, Personalization rules can all make the View Layout so dynamic as to be  ”uncacheable”). So the View Layout is never cached.
Server :
Server Cache  View Layout
Well, so we are getting somewhere. The View Layout was retrieved from the Server and Web Server Cache.
Memory :
Memory Cached View Layout
Potentially even better. The View Layout came from your Browser Cache. In fact, maybe you just got “Server” as the response, then returned to the same View a few seconds later. The Layout was now in your Browser cache, so you got it from the Browser not your Server. Cool!
Disk :
Cached View Layout from Disk
Your Siebel Object Manager on your Siebel Server has the WebTemplateVersion parameter set and there was no updated View Layout available, so the Persistent Disk Cache version was used. The View Layout you requested was found in the Browser Persistent Disk Cache. This may even have happened between sessions in the Application. Cool!
Digging around in your Browser cache folder will bring all sorts of interesting surprises if this is set up. For example, here is a cached HTML file that was in my Browser just after the previous session :
Cache Content
I guess the point here is to think about the different situations where this may impact us.
  • Testing Average Load Times
  • Testing Usage Scenarios and making Assumptions
  • Choosing View Layout Templates carefully
  • Putting Explorer or other dynamic Applets in Views
  • Clearing your Browser Cache
There are a number of parameters  both in the CFG side of things and in the User Preferences that can affect the overall behavior, so watch out and take note of the Bookshelf on the subject of Improving Performance.

Sunday, March 11, 2012

Siebel 8 Script Libraries

 

Quick question; will the following code snippet work ?

Business Service : BS1, contains only this code

function function1 ()
{
TheApplication().RaiseErrorText("function1  triggered");
}

There is no code in any other event/function of this BS. And now, the attempt is to trigger this BS via the following code:

var bs = TheApplication().GetService("BS1");
bs.function1();

Now there is something wrong about the second code snippet, right ? This is not the usual way to invoke a Business Service Method.  The practise is to use the InvokeMethod command, passing property sets for input and output.  But here is the output of running these in Siebel 8

image

 

This is an example of Script Libraries feature from Siebel 8 onwards. Developers can write multiple functions in business services, and then these functions get exposed , and the functions can be invoked directly as you would do on C/C++/Java. There is no need of adding code in  Service_PreInvokeMethod  event to expose the functions.

There are limitations though, such a business service’s functions can be invoked only via scripting. They cannot be used in WFs or BRPs. But if your functionality calls for lots of scripting, this feature surely comes in handy.

 

The ever friendly Oli has been posting some really tricky pieces of code for his code challenges. Head over there to learn scripting mistakes that creep up in code.

Happy Scripting !