How to generate random number in Siebel eScript?

Recently I had a requirement to generate non-repetitive random numbers in siebel escript. I searched the siebel tools help and found Clib.rand() function to the rescue. And using it was also very simple.

Accessing Field in Siebel Browser Script

Accessing a field in browser script can a bit pain, for someone who is new to the browser scripting. There is no direct way to access the field in browser scripts that are not shown on the applet at run time.

This is because the browser script works on the DOM elements not the Siebel Objects. Siebel to support its syntax, publishes some of the objects and methods in the browser script.

There is a workaround to access field in the browser script:
1. Add a control in the applet with the required field.
2. Set the HTML Type of control to Hidden.
3. Add this control on the list applet as column or on the header (where buttons are placed) of the form applet.
4. Create usual script to GetFieldValue. Now you will be able to get the value inside the script.



There are also lots of restriction in the browser script as compared to Server Script, some of them being:
  • TheApplication() in eScript is converted to theApplication() in JavaScript.
  • We can not use theApplication().GetBusObject(), can only use theApplication().ActiveBusObject();
  • Cannot Get and Set Field values that are not shown on the UI.
  • Cannot use InvokeMethod("LookupValue") (this creates lots of troubles in developing multilingual prompts.)

Siebel Message Property Set

The Next buzz word that we hear in Siebel EAI is Siebel Message or IO Hierarchy. It appears to be very similar to XML hierarchy, but it is not!


Siebel Message or IO Hierarchy is an instance of an Integration Object in form of property set. It is mostly used in EAI workflows, but it can also be very useful in scripting and business processes.


What is Integration Object? : It is an structure that defines the Siebel Data that is needed to be integrated with Other applications.

An IO defines Business Object whose data will be integrated, BC whose fields will be updated, and the fields that will be used.


What is Integration Object Instance? :
When an Integration Object is used to query siebel database it results in an property set that contains the data in the structure represented in the Integration Object.
This output property set is called Siebel Message.

How Siebel Message is different from a Property Set?
Siebel Message is actually a property set whose type is set to "SiebelMessage".Most common method to create a Siebel Message is by calling Query Method of EAI Siebel Adapter Service.
This service creates the properties with Name specified in the Integration Components Fields.

On the other hand XML Hierarchy contains property name from the Integration Component XML Tag.

Mapping between Siebel Property Set and XML

I think first problem that we face in EAI is understanding the mapping between the Siebel Property Set and the XML. But once this mapping is clear Siebel EAI becomes lot more easier module to work on.



XML as we all know is the structured data trasfer language, and property set is set of variables contain values in form of string name value pairs. There are lots of vanilla services available in siebel tools that converts the property set in to an XML or write the property set to a file.


Let see how the property set is converted into an XML.
A Property set contains four parts which we can get and set by eScript methods.

Note : A property set can contain child elements , which can themselves be a Property Set, and can have Type , Property and a Value.

Similarly an XML contains:



Siebel converts
Type of property set to XML Element ,
Properties are added as Attrbutes,
Value is kept as Value of the Element
and child properties are added as child elements in XML.


This can be demonstrated by following code:


It will produce an XML output like this:





Workflow Revision Failed : SBL-DAT-00393: An end of file error has occurred.

Recently I faced a strange bug in my Siebel Tools. Whenever i tried to revise an workflow, i was getting this error :


An end of file error has occurred. Please continue or ask your system administrator to check your application configuration if the problem persists. (SBL-DAT-00393).

And after i press Ok button, tools hangs and every time i have to restart the tools.

Even when i tried to connect directly to the database server the error was re-occurring. And this was happening with a specific workflow only. I was very much bugged up at that time.

I searched support web but still couldn't find any reason behind this in Siebel Tools.

Then one of colleague suggested me to delete excess versions of workflows in tools to get it done.
At first i thought it wouldn't help, but yes it worked!!



I must say, Siebel has got mind of his own! Thanks to Manuj, who helped me to get this thing done.

Extending Column in Siebel : Video Tutorial

I haven't came across any siebel implementation till yet, that doesn't requires extension of siebel base tables. 

This usually required when siebel table doesn't have any column that can support the required data type or when there is additional data required at the business layer.

Although it can be achieved by using the extension table, but it is recommended that fields that are shown on UI or used frequently in the script should exists in the base column. 

This is because that extension column requires an additional join in the sql query. And every time BC based on the base table will be queried, extension table will also be called into the memory. 



Here is one video from you tube that explain the whole process of extending column as a screen cast.







Tom Siebel at Stanford University: Glory Days Long Gone for I.T.?

Here are some videos of Entrepreneurial Thought Leader Lecture at Standford University by Tom Siebel who started siebel systems and sold it to oracle.

Have a look what he has to say to new entrepreneurs @ stanford. 



Description
Tom Siebel, Chairman of First Virtual Group, paints a picture of the dramatic explosion of the dot-com boom; an era, he recalls, where "risk was a business problem, and not an anathema." With a 17 percent growth rate - an increase unprecedented before or since, says Siebel - the business opportunities of the 1980's era appeared to be unlimited. Changes in technology were total replacements, rather than incremental, meaning that every client had to buy and keep buying or find themselves lagging into obsolescence. He credits this free market flow with conjuring a revolution in computing and communications.


Description
Most of the promise of post-industrial society has been realized, says Tom Siebel, Chairman of First Virtual Group, and all of the great technological advances and development of great companies are behind us. The tech sector is hovering around a mere three percent annual growth rate, says Siebel; keeping it just on par with the rate of current economic growth.



Description
The globe's human population is currently around six-and-a-half billion, and it is slated to reach nine billion people in the next twenty years. Tom Siebel, Chairman of First Virtual Group, points out that this sharp increase will propel a worldwide demand for food, water, energy, and healthcare. And, he adds, the business opportunities in providing these essentials are unparalleled.



Description
Facing the likelihood of carbon reporting and carbon tracking that will be necessary with upcoming cap and trade legislation, Tom Siebel, First Virtual Group Chairman, announces a new initiative to help reduce the cost of reporting on an enterprise's carbon footprint - a tool that he foresees will serve a $3 trillion market in 2020.



Description
Forward-thinking entrepreneurs should consider government restrictions in their long-term business planning, says First Virtual Group's Chairman Tom Siebel. They should also be aware of the opportunities that exist through population growth and a growing demographic of the aged. And they should be thinking about solving the energy problem, and the provision of clean food and water for the planet.

Other Siebel Blogs

siebel-admin-l @ IT - toolbox

siebel-dev-l @ IT - toolbox