How to debug Siebel Script faster?

Siebel scripting is powerful.

But, frustratingly slow to create – thanks to the slow debugging process in Siebel. When you are writing scripts, you follow a simple process –

  1. Select a specific event in the Applet, BC or Application
  2. Create the script (hopefully review it)
  3. Compile script
  4. Test, and find something that is not working
  5. Rinse, and repeat

In the age of dynamic languages, this introduces a slow process for script development. There are two ways to work-around how Siebel works by default.

 

Enable Fix and Go for faster development of Siebel scripts

Fix and Go is a feature introduced in Siebel 8, but finds less takers.

You enable “Fix and Go” in Siebel Tools. Go to View menu > Options > navigate to Scripting tab. You see something called “Engine Settings” and have a few options in the section. Just enable all of them (they are enabled by default).

If you remember history, these were introduced with the Siebel ST Engine that processes eScript (in version 8). Earlier we had something called T engine, which was slower.

T engine was so slow in fact that any eScript development meant at least 10 coffee breaks in a span of 1 hour.

Siebel Tools Script Fix and Go

Now, create scripts in the normal way.

After you are done compile SRF as always. Then, start Siebel client using the Siebel debug option in Tools.

If you see any issues, you can set/check options for Siebel debug mode in View menu > Options > Debug tab. You should now be able to start Siebel client in the “debug mode”. Use the Debug toolbar for this purpose.

Siebel Tools Script Debug Toolbar

Siebel in debug mode enables you to check on the scripts that are getting executed. You can also get Siebel to enter “debug mode” and see script in Tools when an error occurs. Fix and Go adds more capability here – it enables you to change script on the fly and see that in action without any further compilation.

This makes it incredibly easy to change, test and repeat the whole process until development is complete.

 

Use Client Business Service to debug Siebel Scripts

Somehow I do not really like debug mode all that much. Siebel Tools throws me out of context whenever Siebel client is running. Sometimes I don’t even need Siebel telling me all the scripts that are running in the background. I just require to focus on one simple script.

Next, I have seen Fix and Go sometimes not considering latest changes. I had outgrown (or devalued myself enough) beyond an active coder and could not just get myself to drive it to completion.

For whatever the lazy reasons – I like debugging through the client better.

You do remember, Client Business Services – don’t you? Just navigate to Administration – Business Service > Details to see all services.

You can also export Tools business services using an Export button to an XML. This XML can be used to import the same service in the Client.

Siebel Client Business Service

Client Business Services support change-on-the-go all the time. You can change the scripts at any time, and check whether the changes have the desired impact through the Business Service simulator (Administration – Business Service > Simulator).

Siebel Script Client Business Service Simulator Debug

Although Simulator enables you to debug Business Services in Tools also, the fast changing ways of Client Business Service better utilise the capability of Simulator.

You will know that Siebel Property Sets provide the most optimal ways of passing across structured/unstructured, complex data patterns amongst various Siebel service. You can easily create Siebel property set structure within the client simulator. Once created you can reuse the same property set while you continue making changes to the script. This makes the whole process amazingly fast to execute and complete.

You can export the settings of Client business service simulator and the input arguments. Future usage will simple require you to import back the client service (Service Name, Method, Iterations), and the Input Arguments.

Of course, you cannot use this Client Business Service + Simulator method of debugging when you use a lot of user events (e.g. on dependency on ActiveView, use of specific scripts in current context in Applets, etc.).

 

Use crmcog template for Client Business Service

For quicker debugging of scripts you should create a blank template that can call a given function. You can then simply copy code from Tools (or your favourite editor), and paste it in the code window for the specific function.

To create the template:

  1. Create a new Service in Client. I typically name it 1test so that I can find it easily in the simulator window. Ensure that the Cache flag is set to N. We don’t want to mess with caching when the business service is all set to undergo changes at least a 1000 times
  2. Create a simple Service_PreInvokeMethod. You just have to call the function, nothing fancy
  3. Create a test function – I call it “1” because it is easy to type in Simulator. It can just have one statement to demonstrate that it works indeed

Test whether this works in the Simulator.

Siebel Client Business Service Debug Template

The next time you have any business service to debug, you can simply type it in Tools as always. Copy/paste from Tools to the test function, and let it rip.

You can use this method to create a number of predefined test cases for the function within the simulator. Compare results quickly after each big change to verify that the service still works along the expected lines in entirety.

You can download the script here.

Import the XML in Administration – Business Service > Details tab > Import Service option from Menu.

crmcog Siebel Client Business Service Template For Faster Debugging
crmcog Siebel Client Business Service Template For Faster Debugging
crmcog Client Business Service Template for faster debugging.zip
Version: 0.1
843.0 B
71 Downloads
Details

Leave a Reply

Be the First to Comment!

Notify of
avatar
wpDiscuz