Subscribe

RSS Feed (xml)

Powered By

Skin Design:
Free Blogger Skins

Powered by Blogger

Monday, May 19, 2008

Siebel CRM How To – Restrict a Field to only Accept Certain Characters?

Requirement:

  • We have a multilingual application and we have Unicode enabled database but still we would like to restrict user from entering certain characters.

  • We want to prevent user from entering numbers in alpha-numeric fields.
Solution:

Use charCodeAt function given by Siebel but not documented properly by Siebel. Here I am giving a Pseudo code to explain how it can be used.

if (FieldName == "First Name") {
for (var i=0;i less than field length ;i++) {
var ASCII_code = fieldvalue.charCodeAt(i)
if(ASCII_code is not valid code)
Error("Not Valid Code");
}}


charCodeAt() returns the ASCII code of the character that is supplied to it. ASCII code comparison is way faster than the number function that are used to compare strings so we can also use this function where we want to compare two strings by just modifying the above given Pseudo code.

Hope this helps! If yes, Please put your comments below.

Siebel CRM How To - Automate login into Siebel Dedicated Client

The trick I am going to tell you in this article might seem to you very simple and basic if you have been working on siebel for a long time but for a newbie it can be small time saving trick during his early days of dabbling with Siebel Development. I have come to know in last few days while talking to a friend, assuming that a simple thing is known to everybody is a mistake and there is nothing such as useless simple thing.

My experience has taught me that it is pretty common to ignore simple things but they usually are the one's that can save you a lot of hassel if used in a proper way. During our intital time of Siebel development there is atleast 50 time we open Siebel Dedicated Client and Siebel tools while we are trying to explore Siebel to the best of our ablity. This simple trick can automate your login to the client and tools and save some time of entering username or password.


  • Right Click the shortcut through which you acess the Siebel Client or Siebel Tools and choose Properties from the context menu.
  • Scroll right to the end of Target Text Field Value enter the following text in the end.

/u sadmin /p sadmin /d sample

These text will automate your login to sample database. If you want to automate your login to Local Database enter the following code.

/u username /p pwd /d Local

replace username with your local username and pwd with your local database password

You can create copies of the shortcut that you use and can configure different shortcuts to login to different databases. Detail about switches being used in the above article and other switches that can be used is a subject of another post.

Hope this post helps you. If yes, Then please post your comments or suggestion to improve this blog.

Navigating Siebel - Via Keyboard!

We generally navigate siebel with the help of mouse. Suppose, one fine day your mouse stops working would that mean that you are stuck and will not be able to work on siebel? I don't think so, to overcome that situation Siebel has provided keyboard shortcuts or acclerators to navigate and perform important functions in siebel so that you are dependent on Mouse to do all your work in siebel.

And I have always been a fan of keyboard as it saves you lot of time while working on system. So, here I am presenting list of keyboard shortcuts provided by siebel to perform various functions.


Record Management

New Record : CTRL + N
Copy Record : CTRL + B
Delete Record : CTRL + D
Save Record : CTRL + S
Undo Record : CTRL + U OR ESC
Select All Records in List : CTRL + A

Record Navigation

Next Record : CTRL + Down Arrow Key
Next Page of Records : CTRL + ALT + . (In List Applets)
Last Page of Records : CTRL + ALT + L (In List Applets)
Previous Record : CTRL + Up Arrow Key
Previous Page of Records : CTRL + ALT + , (In List Applets)
First Page of Records : CTRL + ALT + F (In List Applets)


Query Management

New Query : CTRL + Q
Execute Query : ENTER in a Field OR CTRL + ENTER in a Text Area
Refine Query : CTRL +R

General Navigation

Go to Site Map : CTRL + SHIFT + A
Open Search Center : CTRL + F OR CTRL + SHIFT + F
Run Report : CTRL + SHIFT + R

Layout Management

Define Columns Displayed : CTRL + SHIFT + K
Define Sort Order : CTRL + SHIFT + O

Online Help Shortcut


Open Online Help : CTRL + ALT + H
Help with Record : CTRL + ALT + K
Technical Support : CTRL + ALT + J

Application Management Shortcut

Connect as New User : CTRL + SHIFT + W (Works in Dedicated Client)
Log Out : CTRL + SHIFT + X (Works in Dedicated Client)


Field Navigation

Next Field : Tab
Previous Field : SHIFT + TAB

If you think I have missed something or you know something that others don't feel free to share it here. I will be more than happy to include it with your reference.

Siebel How To - Create Inbound and Outbound Webservice?

I was fortunate enough early in my carrer to get a chance to work on Siebel EAI. It was the first implementation of Web Services in our project. So, had to struggle a lot to understand basics of web service. But I always from my school time had intrest in XML and Web so understanding that part was not that difficult but I really had to work hard to understand web services from Siebel Prespective. I am thankful to God now that there was nobody to guide me at that time which resulted in terrific learning and understanding of a fact

'Siebel is Huge' like a sea and what I have explored till now is not even 10% of whole Siebel.

During my days working on Siebel Web Services I created a Powerpoint Presentation (PPT) which had minimum steps that you need to perform to create Inbound and Outbound Service with Screen Shots. Which I would like to share with you all. It can act as a your guide to check If you are missing any steps in creating Web Service. It is not a comprehensive guide but just a tutorial to give you insight and to point you to the right direction if you are involved in EAI.

Click on the Link Below to download the PPT.

Download Now!!!!

Siebel Tools How To - Have Mutiple Local database Instances?

This article is a step by step guide to have mutiple local database instances on the same system.
Below mentioned points might be the reason why you would want to do that

  • You are working on mutilple projects and they all have repository named 'Siebel Repository'. You want to work on both repositories simultaneously.
  • You share your system and you want the changes made by other developer to be on a different instance rather than yours.
  • You have a server that can be accessed by mutiple people who work on it simultaneously

So, How do you do that? Here is the answer

  • Make a copy of your siebel local database (that is file named sse_data.dbf) rename it to be anything such as sse_data_copy.dbf
  • Make a copy your tools.cfg file (which should be residing in siebel install dir\tools\bin\enu\) and rename it to such as tool_copy.cfg
  • Open the tools_copy.cfg file scroll down to section [Local]
  • Find parameter named Connect String and change the value to reflect the name and path of you newly created copy of your dbf file.

for example

Previous Value : C:\PROGRA~1\Siebel\7.8\Tools\local\sse_data.dbf -q -m -x NONE -gp 4096 -c256m -ch256m -ch256m

New Value : C:\PROGRA~1\Siebel\7.8\Tools\local\sse_data_copy.dbf -q -m -x NONE -gp 4096 -c256m -ch256m -ch256m

you can change the other parameters also. To learn more about other parameters please read my post Siebel CRM - Configuration File (cfg) Disected and Explained.

  • Change the parameter named DockRepositoryName to different name if you don't want to have repository of your newly created instance to be Siebel Repository.
  • Create a copy of your shortcut which you use to access your siebel tools instance.
  • Right Click on the newly created instance and choose properties from the context menu
  • In the Target field of the newly opened window scroll to the point where it mentions the name of the cfg file which should be tools.cfg
  • Rename just the name of the file to tools_copy.cfg (the name of the copy of the cfg file you made)

for example

Orignal Value : "C:\Program Files\Siebel\7.8\Tools\BIN\siebdev.exe" /c "C:\PROGRA~1\Siebel\7.8\Tools\bin\enu\tools.cfg"

New Value : "C:\Program Files\Siebel\7.8\Tools\BIN\siebdev.exe" /c "C:\PROGRA~1\Siebel\7.8\Tools\bin\enu\tools_copy.cfg"

And you are done. Now you have two Siebel tools instances on the same system.

This solution will not work if :

  1. If you mutiple users work on the system at same time. (For example a terminal server where multiple users can login and work simultenously)
  2. If you want to Check in your changes to a different server

In next article we will discuss about additional changes that can be done to overcome this problem.

I Hope this post was helpful to you. If yes, Please post your comments or suggestion to make this site better.

Siebel CRM How To - Invoke Workflow through BC User Property

Till siebel 7.5 the only method know to invoke workflows were

  • Runtime Events in start step of workflow
  • Business Service
  • Business Component Script
  • Workflow Policies
But from Siebel 7.7 ownwards there is one more method by which we can invoke a workflow. That way is Siebel business Component user property. You can 'Named Methodn' user property in a BC which can invoke a workflow where n is increment to the last named method user property defined on that BC.

Name: Named Method

Value:[Event Name] , "INVOKESVC", , "Workflow Process Manager", "RunProcess", 'ProcessName',[Name of the Workflows] , 'RowId', [Row Id Value]

Example

The below mentioned will invoke a workflow named 'Example Workflow' when a new record is created in Example BC.

Name: Named Method 1

Value: "New Record", "INVOKESVC", "Example", "Workflow Process Manager", "RunProcess", "'ProcessName'", "Example Wrokflow", "'RowId'", "[Id]"

Hope this post helps you. If yes, Please post your comments.

Siebel CRM How To - Create a new LOV?

Whatever I have posted in this blog assumes that you have fair bit of idea working on Siebel CRM. I noticed there is hardly anything in this blog that can help a newbie. So thought of starting a new Category that is 'Siebel CRM How To'. This Category will include step by step How To's to various things in Siebel CRM. Starting this series is a simple 'How To' of creating a new List of Value and adding to the existing List of Value (LOV).

Information about LOV and explaination about the various terms is subject of another post. In this post I am just going to have step by step tutorial of creating a new LOV and adding new values to existing LOV's

Creating a new LOV

You can create an LOV from two places both have a different way of creating LOV in Siebel CRM.

Administration ==> Data ==> List of Values
Administration ==> Data ==> LOV Explorer


Through List of Values to add a new LOV following steps have to be followed. As an Example we will add a new LOV for Martial Status of a person.


  1. Click New and Choose LOV_TYPE in Type Field
  2. Enter MARITAL_LOV in 'Display Value'.
  3. Enter 'Marital Status' in Language-Independent Code Field
  4. Enter 'English-American' if you implementation language is English otherwise it will be according to the language of your implementation. Save the record
  5. Click New again and choose 'MARITAL_LOV' in Type Field
  6. Enter 'Married' in Display Value and Language-Independent Code Field
  7. Enter 'English-American' if you implementation language is English otherwise it will be according to the language of your implementation. Save the record.
  8. Follow steps 5 -7 for all values that you want to associate with this LOV

For example we will follow steps 5 - 7 and just change the value Married to Single so that It can have two values 'Married' and 'Single'

Through LOV Explorer you have to perform the following steps.

  1. Click New and enter 'MARITAL_LOV' in the Type field
  2. Click on the + sign in the left hand side of the LOV Explorer window for the type that you created
  3. Click on the Values folder.
  4. In the Right hand side Applet click on New
  5. Enter 'Married' in the 'Code' and 'Display Value' Field
  6. Enter 'English-American' if you implementation language is English otherwise it will be according to the language of your implementation. Save the record.
  7. Repeat steps 4-6 for the all the values that you want to enter.


That's it. You are done with creating the New LOV with new Values

To enter New Values in the existing Siebel LOV just perform the following steps.

  1. Query for the LOV Type that you want to add New Values.
  2. Copy the record Enter the Display Value and Language Independent Code Field
  3. Change the value in the Order Field to be the unique number and save the record.
Related Posts that you might like to Read:

Siebel CRM - List of Values a Strategic Move!
Siebel CRM - List of Values a Strategic Move- Continued!

Siebel List of Values - A Strategic Move - Continued.

Last time I said that I will be presenting a Solution to make Required Fields dynamic and SRF independent. So I am back with What I promised.

Requirement:

Siebel Service Request module was to be implemented because of a new implementation the business requirements were being changed all the time. One Strange requirement was to make the Required Fields of a business component dynamic. So that they can be changed without a release. Now, we all know one way to make a field required is to set the Required Property of the field to true. But that would mean that if I were to change that a new SRF deployment will be required.


Solution:
LOV's again were the life saver for us. We created an LOV called SRV_REQ_FIELD and in the Display value we provided the names of the fields that we wanted as Required Fields. In the Business Component PreWrite Record we queried for that particular LOV and traversed through the records that were active. If the Field provided in the LOV did not contained a value then an error was raise stating that the value for that particular required field was not supplied. I am giving the Pseudo Code below to what that script might look like


BOLOV = TheApplication().GetBusObject("List Of Values");
BCLOV = BOLOV.GetBusComp("List Of Values");
with (BCLOV)
{
Query for LOV Type as 'SR_REQ_FIELD' and Active Flag = 'Y'
}

IsRecord = BCLOV.FirstRecord();
while( Last record is not reached)
{
this.ActivateField(BCLOV.GetFieldValue("Name"));
if ( this.GetFieldValue(BCLOV.GetFieldValue("Name")) == "" )
Raise Errro Text ("Value not given")
BCLOV.NextRecord();
}


This solution is not recommended if the number of fields that are required is fairly large. But still can be really handy in many situations.

Hope you liked this post! If yes, Do post your comments.

For other posts Related to LOV please go through the category of List of Values

Siebel List of Values - A Strategic Move!

List of Values (LOV) is assumed to pretty simple entity in siebel and having very limited use, of showing values in dropdown picklist. But lately I found they can be used in more than one ways. They can be a real life saver. One use I have found of them is to avoid hard coding. Yes, you can avoid hard coding of values and use LOV instead which you can then change without SRF Release.

I will list below some real scenarios which I have come across and used List of Values to accomplish task which otherwise would have a real pain while moving stuff different environments.

Workflows - Requirement :
We were creating workflows that were going to integrate Siebel with some other application with the help of MQ Series. Now, to accomplish that we had to enter two paramerters related to MQ Series in the first step of workflows, Queue Manager and Physical Queue Name.

If, we were to hardcode then it would be difficult to move workflow between different envoirnments such as QA and production because they had different Physical Queue Name . There LOV's came to our Rescue. We created two LOV's with the values of the Queue Manager and Queue Name and used LookupValue() method in workflows to acomplish that.

LookupValue method accepts two arguments 'LOV Type' and Language Independent Code ('LIC') and returns the display value of that LOV Type. The syntax is as following



LookupValue("LOV Type","LIC")

Example :
  • Create an new LOV Type (in this case we are created MQ_PHY_QUEUE_NAME. It should be same in all the environments where you want to deploy the workflow)
  • Enter the Display Value (actual value that you want to speficy like in this case we specify ESBLDAS for dev env and ESBLQAS for QA Env)
  • Enter the LIC (can be anything descriptive like in this case we had given 'Physical Queue Name')
  • In the Input Arguments of workflow choose input argument type as Expression and specify the value as LookupValue("MQ_PHY_QUEUE_NAME","Physical Queue Name")

Now, it is going to pick the value as 'Display Value' of the LOV that you have specified.

In next post I will describe how can we use LOV to dynamically specify Required Fields for a Business Component.

For other posts Related to LOV please go through the category of List of Values

Siebel eScript – An Overview

Scripting is one of the most important areas in Siebel Development but irony is that it is never recommended to write script in Siebel. Siebel scripting is done in a language known as eScript. eScript shares it’s syntax with JavaScript. If you have worked in JavaScript then you would find it pretty easy to adapt to eScript.

eScript can be broadly classified into two categories

  • Server Scripts
  • Browser Scripts
Server Scripts: as its name suggests is executed on server side. Which means that the user request is sent to server where the scripts is then executed

Browser Script: is actually converted into JavaScript and is executed on client side.

Usually scripting is written on objects in Siebel such as Applets, Business Components etc. But the main use of eScript is done to write Business Services. There are lots of things that you achieve through a business service. Detail discussion on business service is subject to different post but it is similar to somewhat workflows implementing complete business processes with the help of script.

Scripting should be used as a last resort. Everything can be done through script of course but it makes the manageability and up gradation of Application difficult.

But as I said in my earlier post to be a successful Siebel developer Scripting and Configuration should be your strong points. Scripting can be fun but should be avoided as long as possible

Siebel eScript – How to track performance with Timing Scripts

Timing scripts can come in handy to know exactly how much our code is taking to execute. There can be several reasons for doing this.

  • We are calling several business services in code and we need to know performance of each one.
  • We need to know time our script on business component, Applet is taking
  • We have several approaches to solve the problem and need to know the exact time taken by each.
The code to achieve that is:

var fileVar = Clib.fopen("c:\\Timing.txt", "at");
var timeVar = Clib.ctime(Clib.time());
Clib.fputs(timeVar + ": Starting trace in of code", fileVar);

//code which you want to track time
…………………………………….
…………………………………….

timeVar = Clib.ctime(Clib.time());
Clib.fputs("Ending trace of code: " + timeVar, fileVar);
Clib.fclose(fileVar);

PS: This code will work only if you are trying to run it in dedicated client or your Siebel server is windows server. This code will fail if you are trying to run it from thin client and your Siebel Server is a unix server as it will not able to find the path. You will have to change the path to unix path e.g. /apps/srvr/bin if your server is unix.

Hope this helps!!!!

NextRecord DeleteRecord - Use with caution!!

Number of times we have written code in which we have to traverse number of records in a loop and n number of times we have missed one important statement that results in our code to stuck in infinite loop. Yes, I am talking about the statement Object.NextRecord()

This statment is generally used at the end of the loop so that after all the processing is complete we move on to the next record in the record set and perform processing on the next record. I am giving a Psuedo code to explain that.

while(not end of recordset)

{

perform operation

recordset.NextRecord()

}


But here I am going to to tell you about a situation where doing a NextRecord(). will result in problems. Yes, I we are deleting the records in the loop then we don't need to use the NextRecord() function.


Reason for that is using DeleteRecord() results in pointer to moved to next record automatically and if we use NextRecord then it will result in skipping of the last record we are trying to delete. Pseudo to explain this

while(not end of RecordSet)

{

do processing

recordset.DeleteRecord();

// recordset.NextRecord(); // no need to use next record as delete will automatically move the pointer to next line

}

Hope this tip is helpful. Happy Scripting :)

Siebel How To - enable or disable a button conditionally?

I was working on my desk one day and newbie to siebel approached me to ask a question(also a avid reader on asked me the same question on mail). He asked me about a simple requirement or rather I should say the requirement that appeared simple to me.

The requirement was :

A button on an Applet should be enabled if a particular user logs into the application otherwise it should remain disabled.The Solution is a simple script that we can write on Applet_PreCanInvoke event to enable or disable a button conditionally.

I am providing the pseudo code for that script below

function WebApplet_PreCanInvokeMethod (MethodName, &CanInvoke)
{
if (MethodName == "UrButtonMethod")
{
if(UserLogin == "AuthorisedUser")
{
CanInvoke="TRUE";
return (CancelOperation);
}
else
{
CanInvoke="FALSE";
return (CancelOperation);
}
}
}

There is just one catch in the above mentioned code. How will you find that user is the authorised user or not. There are several ways of doing it some are easy and some are difficult.

I will tell you the easiest way to do that. You just need to write one line of code to accomplish that which is as following.

if(TheApplication().GetProfileAttr("Me.Login") == "AuthorisedUserLogin")

There is a whole bunch of such kind of profile attributes that are available to us all the time in the whole application, we can use them anywhere we want. But discussion on Profile Attributes is subject of another post. So, come back for more.

If this post was helpful to you, Please post your comments or suggestions to make this site better.

Siebel Search Specification (Search Spec) – What about it?

This article has been submitted by Nidhi Puri having Siebel experience of 2+ years and right now working as Project Lead.

A Search Spec is nothing but a filter on the returned set of records and if we we look atc it from database point it acts as where clause in the SQL that is formed which restricts the number of records that will be retruned from database.

In Siebel we can apply search spec to

  • Applet
  • Business Component
  • Link
  • Picklist

1. For an Applet, a search spec filters the records that are displayed on UI. The underlying BC brings back a set of records and before they can be displayed, the applet search spec applies the filter on them and displays only a subset of records.

2. For a Business Component, a search spec filters all records that would be returned from the underlying base table. This would also result in the filtering of records on the applet tied to this BC. However, the search spec in 1 above works only for that particular applet while on a BC, the search spec is inherently applied to all applets that are based on this BC.

3. A search spec on a Link will filter all child records from the destination BC.

For Example
Account/Address link. Search spec looks something like this: [City] = ‘London’, this will bring back all address records for the account where the City = London.

4. A search spec on a Picklist will filter the data that the picklist points to. For static picklist, the data exists on the List of values, so the search spec for a static picklist would look something like this:

[Value] <> 'Corporate'. This would show all values other than "Corporate" when you click on the dropdown. For dynamic picklists, the search spec would something look like this: [Active Flag] = ‘Y’, this would bring back all records from the destination BC (on which the picklist is based on) where the Active Flag = Y

Siebel Profile Attributes - an Overview.

Profile Attributes I stumbled upon them in siebel when I was working on my first assignment involving Siebel EAI. Till that time I had only used and heard of Global Variables which you could use throught out your script.

But as the requirement said only if user clicked a button in View A and then performed some particular action in View B trigger a workflow.

As views involved had different BC's it was not possible to have done through global variables. Then my senior colluege introduced me to a new entity in siebel called 'Profile Attributes'. They are important because they have a unique property. They are available throughout the application. The best term that comes to my mind to describe them is 'Session Variables'. Those who have worked a little bit on development of Web Application will understand exactly what I am saying and for those who hasn't worked on them I will explain.

As you know from siebel 7 onwards it has Web Architecture. So, as soon as you login into siebel through your browser a session is started which last till time you log out or you close your browser window or according to the length set through session parameter at server level.

Now discussing in details that how server maintains this session and what goes on behind the scene is out of scope of this article
but what you need to know is that Siebel server recognises every unique user through session id that is given to you when you login to siebel and it remains valid until you session closes due to above mentioned reasons. So, Profile Attributes are variables that can hold any value during the session of the user. There are two methods available to in siebel escript that help you to work with Profile Attributes.

  • GetProfileAttr
  • SetProfileAttr

GetProfileAttr method is used to retrieve the value of a particular profile attribute. The syntax is

TheApplication().GetProfileAttr("ProfileAttrName")

SetProfileAttr method is used to set the value of Profile Attribute. If the Profile Attribute that you mention is not already existing it creates a new Profile Attribute. The syntax is

TheApplication().SetProfileAttr("ProfileAttrName",Value)

So, to accomplish the our requirement we Set a profile attribute when clicked the button on view A and then when he went to View B and did the particular action we wanted we retrieved the value of the profile attribute and if all the conditions were met we executed the workflow and everybody developed happily ever after :)

But, there is a twist in the story and it was not a happy ending after all which highlights the fragile nature of Profile Attributes. Now, in a particular situation this solution won't work. If user clicked button on View A and then logged off which meant profile attribute is destroyed hence the functionality failed. So, as you all must have guessed this solution was scrapped :(

So, the moral of the story is use Profile Attributes with caution and only if you are sure that if the session is destroyed you functionality wouldn't fail.

Siebel Business Component Outer Join - How Important?

During my past two years of working on Siebel I have come across lot of situations where just one little miss can wreck havoc with the application. It can result in performance issues and Data issues. I think some of you might have guessed by know what miss I am talking about.

I am talking about Outer Join Flag on Join Section of the Business Component. Joins are the integral part of Siebel configuration. They are indispensable, joins are required because we know the database (it can be oracle, DB2 or Microsoft SQL Server) is a relational database known as RDBMS in short form. Which means the information that resides in it is in the form of related tables and we always need information of one table in another. These tables are related with the help of Foreign Keys (FK). So, when we want to show information of one table in another we use Joins and we use them all the times.


When we are creating Joins in Siebel you can see a field called Outer Join Flag. Please see the screenshot below.



and every time we don't check that flag we are heading for trouble.
Now, what exactly does that flag represent? Before I explain it I assume that you have basic understanding of SQL and simple joins. As I have mentioned earlier that everything that configure or do on UI is converted into SQL and that is where this flag comes into picture.

For example see the simple sql pulling data from another table with the help of simple join

select name b
from siebel.s_opty a, siebel.s_doc_quote b
where b.par_row_id = a.row_id
and a.somefield = b.somefield
and a.row_id = 'Some Id'

Now this SQL is suppose to select name of the quote where the par_row_id column (which store row id of its parent) is equal to the row if of opportunity and in addition to that somefield of opportunity is equal to some field of quote. Now we assume that you had created a join between Opportunity-Quote and forgot to check the outer join flag.You will be amazed to see that there are No Records on UI. The reason being it will try to match the exact values in the field and any record that is a not a match will be discarded. Which means if there are some records that have no value in 'somefield' either in Opportunity or on Quote will be discarded. What if we want those records to shown? We have to check the Outer join flag which will result in a query as given below

select name b
from siebel.s_opty a, siebel.s_doc_quote b
where b.par_row_id = a.row_id
and a.somefield = b.somefield(+)
and a.row_id = 'Some Id'

Which will result in all the Quotes that have 'Some Id' in par_row_id or in simple terms that have Opportunity Id with 'Some Id' as their parent.

My experience has taught me to ask this as the first question whenever I face problem mentioned above and I have seen developers sweat over this kind of problem for hours before they spot it. I will mention some real life situations I have faced which were due this little (or rather huge) miss while doing configuration.

Examples - Real Life Situations:
We have developed a web service that resulted in the insertion of quotes from a Java Application. When we inserted a quote it got inserted successfully and when we tried to update it, it Failed. It took us almost a day to find out that a developer had created a new join in business component and forgot to check that Outer Join flag which resulted in update to failed as it was not able to fetch that record.

I had created a new View in Assets Screen. When user was in My Assets view then he was able to see the records but as soon as he choose All view the records disappeared. The reason same a new join and forgot to check Outer join flag.

Whenever you face this kind of problem go through logs and more often than not you will find this as your root cause. To know more about logs read my Post Siebel - Logs How useful are they?

If this Post was helpful to you please post some comments and come back for more.

Siebel Logs - How Useful are they ?

If you have worked on Siebel CRM I am sure that you have heard the term LOGS lot of times. They are one of the most important and useful things if you are a Siebel Developer. But still most of us actually know how to use them to our advantage or to reduce our development time. Here in this Article I will try to explain some tips and tricks to get the logs and debug our code. Now we all know that we have two types of Siebel Application Clients.


  • Dedicated Client
  • Web Client
Siebel Web Client : We will talk first about the Siebel Web Client. Now to get logs from Siebel Web Client there is no easy way and the only way to get logs is to increase the log level at server for "Object Manager" or particular component that you want to get logs of for example Workflow Process Manager. I will talk detail about the Web Client Logging techniques in my next few posts.

In this article I am going to discuss ways which can help us get logs from dedicated clients and speed up our debugging and development time.


Dedicated Client : There are essentialy two ways to get logs from dedicated client

  • Spool
  • Environmental Variable

Spool : it is a very basic and known technique to get the spool of all the SQL Queries that are fired in the database level and we all come across it during our initial Siebel development days. We can enable the spool for Siebel Client as well as Siebel Tools. The steps to enable spool for both the Siebl tools and client there is common process which is as following

  1. Right click the siebel tools or Siebel Client Shortcut
  2. Go to end of String which is in Target Text Field
  3. Enter the Following string at the end: /s "c:\spool.txt"

/s switch here stands for Spool. Various other switches that can be used are as following

  • /u : username
  • /p : password
  • /d : database

With the following string you can automate login to your local or sample database depeding on the value you give in the switch. I am providing you examples of both

/u sadmin /p sadmin /d sample : String to login to Sample database with Sadmin user id
/u user /p pwd /d local : String to login to Local database with "user" user id.

Environmental Variable : This is more powerful and less know method of generating logs for dedicated client. Siebel has provided couple of Environmental Variables which are as following :

  • SIEBEL_LOG_EVENTS
  • SIEBEL_LOG_DIR

SIEBEL_LOG_EVENTS : This environmental variable can have two types of values.
Numeric or text.
The numeric value is the log level which can be between 1-4. 1 being the lowest and 4 being the highest. The Text value can be ALL which means Log Level of 4.

SIEBEL_LOG_DIR : This value of this variable is path where you want to create the logs. Makes sure that the path you mention is valid otherwise the logs will be created in the temp directory.

Examples of both the environmental variables are as following

SIEBEL_LOG_EVENTS : ALL
SIEBEL_LOG_DIR : C:\siebel_logs

The process to create these enviornmental variables is as following

  1. Right click on the My Computer Icon
  2. Select Properties from context menu
  3. Go to ==> Advanced Tab
  4. Click ==> Environmental Variables
  5. In User Environmental Variables Tab click New
  6. Enter SIEBEL_LOG_EVENTS in Variable Name field
  7. Enter ALL in Variable Value Field
  8. Click New again and Enter the following details
  9. Variable Name : SIEBEL_LOG_DIR ; Variable Value : "your siebel log path"

Remember that Variable Names are case Sensitive. After you have created the variables when you start you dedicated client you will notice that in the path that you have given a file named siebel.log is created for Dedicated Client and file named siebel_dev is created for Siebel Tools.

If you don't provide the SIEBEL_LOG_DIR environmental variable the logs are created by default in Temp Directory.

Hope this posts helps you.
If the answer
is yes. Please post your comments and visit again.

Siebel Tools - Check In - Check Out an Introduction.

Check In - Check Out are the very common terms that Siebel Developers hear. A rather simple but a very important feature for development. Without this feature their would be an absolute chaos during development. I will try to explain Check In - Check Out (CICO) with the help of simple Analaogy:

Imagine a room full of documents. You are allowed to make a copy of document take it home and work on it. What If everybody was allowed to go in at any time into the room and modify any document they want? The answer is again Absolute Chaos. Imagine working really hard on the document and to see next day that what you have taken home is invalid because somebody took a copy and made some changes to and you have to do the rework.

Based on above analogy we can map 'Room' as 'Siebel Server Repository', Documents as 'Siebel Objects', Home as 'Local Environment'

So, the only way to control this is to have a some sort of mechanism to prevent you from taking that document while somebody else is working on it. Siebel Check In - Check Out process is precisely that chaos saving mechanism.

We all know that siebel is based on Client - Server Architecture and the same architechture is followed in case of siebel tools. You have siebel server repository and you siebel client dbf or local database where you perform you development.

Check In - Check Out in siebel refers to the process of getting a copy of siebel objects in the your local environment, work on it and then update it back to the server after you are done.

There are various terms in siebel that you need to understand the check in - check out process

Check Out : Process of getting a copy from Server Repository to your local database and also locking he object on server so that nobody else can modify it.
Check In : Process of putting the object from local environment back to server and also release the lock so that others can work on it
Get : Process of getting copy from Server Repository to your local database without locking the object.
Full Get : Process to update you local tools repository will the latest objects from Siebel Server Repository. Unlike Get you don't select a particular object to update but all the projects

You can check out a single object or a whole project. If you check out a whole project then all the objects that are part of that project will be locked with your Id and nobody else will be able to work on them. So, It is not a good idea. General practice is just to check out a single object.

Now, I will explain the steps to perform each operation mentioned above

Check - Out :

1. Query for the object that you want to check out.
2. Right Click and Choose Check Out. (You can also press F10 or choose Tools Menu ==> Check Out)
Tip:The option of check out single object will only be available if your tools.cfg as parameter EnableObjectCOCI set to true.
3. Again Click on Check Out in the new window that appears.

Check In :

1. Click Tools (Menu) ==> Check In (You can also press CTRL + F10)
A new window will appear. It will show the objects that have check out by your id
2. Select the Object that you want to check in and click Check In

Get :

1. Query for the object that you want to Get.
2. Right Click and Choose Check Out. (You can also press F10 or choose Tools Menu ==> Check Out)
Tip:The option of check out single object will only be available if your tools.cfg as parameter EnableObjectCOCI set to true.
3. Again Click on Get in the new window that appears.

Full Get :

1. Click Tools (Menu) ==> Check Out
2. Select 'All Projects' Radio button in the new window that appears
3. Click Get.


Hope this post was helpful. If Yes, Please post your comments.

Siebel CRM - Configuration File (cfg) Disected and Explained.

Today we are going to discuss about one of the most important files for Siebel CRM. Yes, those who have worked on Siebel will know what I am talking about.
Yes, we are going to discuss ".cfg" file which stands for configuration file which largley controls siebel bhavieor. There are basically 3 important cfg files.

1. eapps.cfg
2. tools.cfg
3. cfg file for Siebel Client(Name can depend on the kind of siebel application you are using)
so for this article we will assume uagent.cfg which is used if you are using call center.

To discuss eapps.cfg is out of scope for this article so in this article we will be discussing tools.cfg and uagent.cfg file.

Tools.cfg is used for Siebel Tools and uagent exsits for Siebel Client both dedicated and thin. First of all the location of the file.

Tools.cfg exsits in :siebel installation directory\tools\bin\enu
Here enu means the language that you have choosen. It can be different if you have installed siebel tools in langauage other than english.

uagent.cfg exsits in : siebel installation directory\web client\bin\enu.
For thin client the cfg file exsits on server and the path is
/siebel install dir/siebsrvr/bin/enu if the server is Unix
siebel install dir\siebsrvr/bin/enu if the server is Windows
Now I will describe various sections of CFG file.

In CFG file anything that starts from [] is a section that contains certain Parameters to control siebel. I will list important sections that are important and we need modify them often

1. [Siebel]
2. [DataSources]
3. [Local]
4. [Sample] Only used if you have installed sample database
5. [ServerDataSrc] Very important and modified often.
6. [SWE]

Tip: If you want to comment anything in cfg file use ; a semicolon in front of any line would mean that siebel is going to ignore that line treating it as comment.
I am goint to list only the important parameters in the sections.

1. [Siebel] : This section contains important parameters related to siebel. Which are as following

RepositoryFile :Name of the SRF file to be used
ApplicationName :Name of the Application to be used
ApplicationTitle :Name that is going to appear in Title of your browser window and can be anything
ApplicationSplashText :Name that is going to appear when you start you dedicated client and can be anything
EnableScripting :Often used for debugging purposes. If set to false no script is going to execute when you start you client
LocalDbODBCDataSource :Name of the ODBC data source that is going to be used when you start dedicated client with local database (SSD Local Db default instance by default)
ServerDbODBCDataSource :Name of the ODBC data source that is going to be used when you start dedicated client with server database (SSD default instance by default)
DockRepositoryName
:Name of the repository that is going to be used.
WebClientSiteDir : Path to the directory from where the browser scripts and images are going to be picked up
EnablePersonalization : To Enable or Disable personlaization for Siebel Users
EnableRuntimeEvents : To Enable or disable Runtime Events
EnableObjectCOCI : To Enable object check in check out when set to false you are not allowed to check out a single object. Remember Object checkout has to be enabled from tools also before you can do that

2. [DataSources] : This section contians the what you can see from the dropdown of you dedicated client. Default values are
Local = Local
Sample = Sample
ServerDataSrc = Server

You can specify more datasources under this section to specify more section you have to define it in the following way.

MyNewDataSource = NewDataSource
MyNewDataSource is the name of the Section that should be present in the cfg file that is going to contain parameters to be used for this datasource
'NewDataSource' is the value that is going to appear in the dropdown of dedicated siebel tools or client.
3. [Local] : In this section only one parameter is important and that we can change to our advantage
ConnectString = C:\PROGRA~1\Siebel\7.8\Tools\local\sse_data.dbf -q -m -x NONE -gp 4096 -c256m -ch256m

As you can see the value of the connection string is in the form of Path and then switches.

The path is the path to your dbf file and the switches that you can give are as following
-q : means start local database in quite mode.This prevents a SQL Anywhere window from showing up.
-m : truncate transaction log after checkpoint.
-x NONE : Do not load any network drivers.
-gp 4096 : Tells the engine that the database page size is 4,096 bytes.
-c256m : Initial cache size is 256 MB
-ch256m : Maximum cache size can be mb256.

4. [Sample] : This section is pretty similar to Local Section with exception of one parameter

FileSystem : It contains path to you file system where you attachments are stored

5. [ServerDataSrc] : This is one of the most important section and you have to change few parameter before you can actually login to server through Dedicated Client.

ConnectString : Here just like local section indicates the connection string to be used to connect to server
FileSystem : Path to you file system. Similar to local section
GatewayAddress : This will contain the name of your Siebel Gateway Server. This section has to be changed to a valid value
EnterpriseServer : This will contain the name of your Siebel Enterprise Server.This section has to be changed to a valid value

6. [SWE] : This section contains parameters related to the bitmaps and appearance of Siebel Client. But It contains an important parameter which is as following.

ClientBusinessService : This parameter is used if you want a business service to be called from browser scripts. The Business service has to be mentioned here in this section.
The format to mention the business service is

ClientBusinessServicen = "Business Service Name" where n is a incremental number one more than the number mentioned in last ClientBusinessService entry. For example
ClientBusinessService0 = "Message Bar"
ClientBusinessService1 = "Communications Client"

If I want to have one more entry in the file then I will enter
ClientBusinessService2 = "Business Service Name"

This completes the listing and explaination of important parameters of the cfg file used by siebel tools and siebel client.

Hope this post was helpful to you. If yes please post your comments and visit again for more.

Siebel 7.8 Signals - A Case Study!

I am back with what I promised.
A case study how we used signals to improve the perfomance by 83%. I will try to tell you facts that I found while working on them and not available in bookshelf and supportweb. If you want to know about singals please read my post Siebel CRM 7.8 - Signals Demysitified

We are working on Siebel 7.8.2.3. It is a Call Center module but major and complex functionality is weaved around Quote Module which includes customizable products. Now these coustmizable products can have upto 10 products and 300 attributes in one Quote Item record. In addition to Quote and Quote Item various custom entities are also copied as Quote Item Child. So, In total there are 11 entites are copied over when you 'Copy' or 'Revise' Quote.

Now it is not possible to copy all these through configuration as by configuration only 'Root Quote Item' or just the First record of Quote Item is copied over, not all the records that are created as a result of customization of product. So, The intial solution was to copy or revise quote through scripting copying the Quote Item and all of its child. But the result was that it took upto 3 minutes to copy or revise the quote which was unacceptable and due to accessive scripting the process was not stable and often broke giving one or the other scripting error.

So, we started exploring the Solution through vaniall singals i.e 'CopyQuote' to copy quote and 'ReviseCopyQuote' to revise quote. When these signals were enabled they resulted in copy and revision of just 'Quote' and 'Quote Item'. After further exploring we found that these signal use a 'Data Map' which can be modified through Application

Data Maps are available
Adminstration ==> Application ==> Data Map Administration.
This view is not available by default especially if you have upgraded your application to Siebel 7.8. You might have to enter a different license key for this view. Data Maps are nothing but declarative mapping of BO, BC and Fields. You specify the Source BC, Fields and Destination BC, Fields. Just creating the mapping is not enough you have to have supporting configuration of the BC's to make it work.

Every BC that you enter should be added to the BO. It should have a Link to it's parent (if any) and that links should be added in the Business Component Section of BO.
Add the custom fields to the datamap.

Now comes the tricky part. Even if you do all this you will not see any improvement in performance and you might face some errors. This is what you have to do in addition to what you have already done.

1. Create 'MapId' Advanced Property for Child Business Component Fields.
2. Create Light version of Child Business Components.

Now, I will explain all the three steps in detail.

MapId : Data Maps support an advanced property called 'MapId' which is really important if you want this to work. 'MapId' is not properly defined in Bookshelf. I will try to explain this property with help of an example.

We assume that Quote Item has a child called Delivery Schedule and we want it to be copied over when we copy quote. A field called 'Quote Item Id' is present in delivery schedule which stores the row id of Quote Item and is used by Link hence establishing the Parent-Child relationship.

When we specify a source field in data map the value of that field is copied to the field specified in the destination field section. Which means when we specify 'Quote Item Id' Field value from source 'Quote Item Id' is copied to the destination field. To simply this further suppose the source 'Quote Item Id' had a value '1-6666' which means destination 'Quote Item Id' would have value '1-6666'. But this is wrong. This behaviour would mean that new delivery schedule record is now child of old 'Quote Item' not new.

Here is where 'MapId' property comes into picture. You have to specify 'MapId' property for all the fields which are suppose to store the row id of parent business component. You have to enter the following information in the MVG that opens when you click on Advanced property field


Property Name :MapId (remember it is case sensitive)
Property Value : Name of parent business component


According to above example the Advanced property would be something like this

Property Name : MapId
Property Value : Quote Item

This should solve one of your problems.

Light Version BC: When we are copying we don't need the validations or stuff like precision or Currency code property.
Making the BC Light mean that create a copy of the original BC and perform the following steps

1. Change the Class of the Bus Comp CSSBCBase.
2. Disable all the user properties of the buscomp.
3. Remove all the Post Defaults and Pre Defaults (Until and unless really required)
4. Remove all the picklists
5. All the values from the validations
6. All the values from the precision fields

I think you Get the idea now So, remove all that you think can be unnecessary. But there are something that are required so you have to use a little common sense before removing all these things.

And you are done!!!!!!!

Using these signals we were able to reduce the copy/revise time to under 10 seconds when it had records in all the 11 custom entities.

Siebel CRM 7.8 - Signals Demystified.

Anybody who has worked on Siebel 7.8 must have come accross the term 'Signal'. I came across this term just a few months ago. When were wroking for some Performance issues in our Project. It is one of the most useful thing that I have come across in Siebel in past 2 years of experience. It has the ability to change the way we do lot of things.

What I found out during my Reaserch to find out more on singals is the fact that it is absolutely not a new thing in siebel. It has been part of siebel from very start which is way back in Siebel 6. I know you might be confused a little bit. Let me explain.

we all know that siebel is a Event Driven language. We can choose to handle those events or let siebel handle those events.In events we do some coding for the custom methods that we have defined. And we all know that in the end we have to write a statement 'return(CancleOperation)'. Of Late what I knew was that we just have to write this statement otherwise we get and error message 'MethodName is not Supported'.

The reason for this kind of behaviour is 'Signals' that's right!!! Signals are responsible for it. Now I will explain how.

Everything Method Invoked in Siebel is a 'Signal' which is passed on to the C++ code that makes the core siebel. When a vanilla method is invoked such as 'SetFieldValue' , 'GetFieldValue', 'InvokeMethod' Siebel has the code in it is C++ Classes to handle it. But when we invoke the custom method Siebel has absolutely no idea how to handle that code. So, we write the statement 'return(CancleOperation)' so that the custom method never reaches Siebel C++ code.

Now the question is what has changed in Signals in version 7.8? Well, the answer is Prior this version of siebel we coudn't create custom signals and we couldn't modify the existing signals. But now in Siebel 7.8 we can change vanilla singals and also create new signals.

The view that let's us do that is Adminstration ==> Order Management ==> Signals.

You can see in this view a lot of signals related to pricing as they are used extensively for Pricing in siebel. But you can also see signals like 'SetFieldvalue'.

In my next post I will be explaining in detail how we used Copy and Revise Vanilla Signals to rectify the performance issues related to Copy and Revision of Quote.

If this post has been helpful. Please post your comments and visit again for more.

Best Practices For Siebel

Through my experience I have learnt that there are always several ways to accomplish everything. Some of them are the right way to do things and some of them are wrong way. It might take a little more effort to do things in right way but it always pay in the long run. Wrong way might save you some time and effort but price you have and consequences you have to suffer are far greater. This post here would provide you some insight on doing thing right way in siebel.

  • Whenever there is a requirement to extend a column in a table it is suggested that instead of extending the Base Table we should extend the Extension table corresponding to it.
    Whenever you extend the column in a table make sure you also extend the EIM table corresponding to it and also make a record in the Attribute Mapping.
    Steps for it:

    a) Go to the EIM Interface table object and identify the correct EIM table.

    b) Extend the EIM Table.

    c) In EIM Table Mapping object > Attribute Mapping Object > create a record for newly added column.
  • The customized buttons who have the Method Invoked Property as"EventMethod%" ie. prefixed with 'EventMethod' need not to be forcibly enable
    by using 'PreCanInvoke" event scripting.
    They are always enabled.

Hope this helps. Keep Coming for more

Siebel CRM How To - Automate login into Siebel Dedicated Client

The trick I am going to tell you in this article might seem to you very simple and basic if you have been working on siebel for a long time but for a newbie it can be small time saving trick during his early days of dabbling with Siebel Development. I have come to know in last few days while talking to a friend, assuming that a simple thing is known to everybody is a mistake and there is nothing such as useless simple thing.

My experience has taught me that it is pretty common to ignore simple things but they usually are the one's that can save you a lot of hassel if used in a proper way. During our intital time of Siebel development there is atleast 50 time we open Siebel Dedicated Client and Siebel tools while we are trying to explore Siebel to the best of our ablity. This simple trick can automate your login to the client and tools and save some time of entering username or password.


  • Right Click the shortcut through which you acess the Siebel Client or Siebel Tools and choose Properties from the context menu.
  • Scroll right to the end of Target Text Field Value enter the following text in the end.

/u sadmin /p sadmin /d sample

These text will automate your login to sample database. If you want to automate your login to Local Database enter the following code.

/u username /p pwd /d Local

replace username with your local username and pwd with your local database password

You can create copies of the shortcut that you use and can configure different shortcuts to login to different databases. Detail about switches being used in the above article and other switches that can be used is a subject of another post.

Hope this post helps you. If yes, Then please post your comments or suggestion to improve this blog.

Siebel CRM - Back to Basics (Siebel Architechture).

In a perfect world this would have been my first article. But this world is not perfect and as the saying goes 'Better late than never' here it is.


I will approach Siebel Architecture in a different way. Then I will take each technical term used in this article that is important and requires further exploration and explain it further in next articles of Back to Basics series.

Ever wondered what happens once you have put the URL of your siebel Application in the browser and hit enter?

This is different approach to Siebel Architecture. The answer to this question will be an explaination of Siebel Architechture. So, Let's start.

==> You have opened your browser window and have enterned the URL and Clicked Go button of your browser window
http://yourseiebelapp/apptype_lang/start.swe
Before going into background I would like to explain or dissect the above given URL.

http : Is the protocol that is being used to transfer the data over web from one computer to another.
yoursiebelapp : is the host name of the Web Server on which your Siebel Component resides. We will go into details of these components later
apptype_lang can be divided into two parts
apptype : Represents the module you are using can be sales, callcenter, mkt etc.
lang : Represents the language of your implementation can be enu, fin etc.
start.swe : It might be used or might not be used but represents a command recoganized by siebel component called 'SWSE' which stands for Siebel WebServer Extensions.

Now we know the meaning of the URL we have just entered we will move behind the scenes.

==> The Request goes to the Webserver (Discussing Webserver is out of scope for this post) where an important component resides called Siebel Webserver Extensions (SWSE).
SWSE :
The responsibility of this component is to identify if the request that has arrived on webserver is a Siebel request or not and also it helps to format the html pages that are server to the Web Clients of siebel. It also supports Load balancing if you have more than one siebel server which generally is the case.
==> If the request received is a siebel request then SWSE contacts Siebel Gateway Name Server to obtain information about Siebel Servers and Siebel Enterprise Server.
Siebel Gateway Name Server (SGNS):
SGNS can be considered as Sieber Server contact information storehouse for all the siebel servers. It serves as the dynamic address registry for Siebel Servers and components. At start up, a Siebel Server within the Siebel Enterprise Server stores its network address in the Gateway Name Servers nonpersistent address registry.
It also has a important file called siebns.dat containg information of Siebel Servers such as
1. Operational parameters
2. Connectivity information
3. Definitions and assignments of component groups and components

Siebel Enterprise Server (SES) :
SES is not a physical server it is just a logical entity in simple terms SES is a logical grouping on serveral siebel servers such as Siebel Server shaing one database can part of SES.

The Siebel Servers in a Siebel Enterprise Server are configured, managed, and monitored as a single logical group which helps the Siebel Administrator to start, stop, monitor, or set server parameters for all Siebel Servers within the Siebel Enterprise Server.

==> Once the SWSE gets information about Siebel Server it forwards the request to the Siebel Server on Round Robin basis due its load balancing feature.

Siebel Server (SS) :
Siebel Server is the system on which Siebel Server Components are installed and it functions as Application server. Each server component performs a defined function.Server components or groups of components determine what applications and services a Siebel Server supports. The Siebel Server runs as a system service under Windows and a process under UNIX. This system service or process monitors and controls the state of all server components on that Siebel Server. Each Siebel Server is one instantiation of the Siebel Server system service or process within the current Siebel Enterprise Server.

==> Once the request is received by siebel server it is passed to a component called Application Object Manager (AOM)

Application Object Manager (AOM) :
One of the most important types of server components is the Application Object Manager (AOM).They process user requests and are application or service-specific. For example A Sales Application will have Sales AOM and Call center application will have a Call Center AOM.This Application Object Manager provides the session environment in which this application runs. When an AOM receives a user request to start an application, it does the following:

==> The business object layer starts an application user session, processes any required business logic, and sends a data request to the data manager.

Data Manager (DM) :
Data Manager is that another component that is a part of AOM. Its primary function is to receive user request create corresponding SQL and Forward it to database Server. It also receives results from Database server and forwards it to Siebel Business Object Layer for additional processing.

==> Siebel Business Object Layer forwards the results to Siebel Web Engine (SWE) another component residing in AOM.

==> SWE helps create UI for the data and forwards the web pages to the SWSE Component which resides on Web Server.

==> Webserver then sends back the results to the users who had intially requested it.

Expiration of scheduled workbooks

Here is a short example of how scheduled workbooks in Discoverer expire. Consider the example below where I have scheduled a workbook to run every 1 minute. Also, I have specified that the results should be deleted after 1 day.
In theory, I should have at most 24 x 60 = 1440 results for this given workbook available. Well, I was not about to wait one whole day, so I did the next best thing. I simply reset my machine's clock forward by one day, restarted my middle-tier services (actually only the process manager: OracleasProcessManager in my case), reconnected to Plus, and launched the Discoverer Scheduling Manager. Now, my system clock said something like Nov 30, 2005, 4:15pm. Therefore, all results from Nov 29 that had run before 4:15pm should have expired. If you take a look at the screenshot below, it will confirm the same: four results have expired and will be deleted.

Results of scheduled workbooks are stored in tables in the EUL. This means that for every run of a scheduled workbook, one table is created in the EUL. If you were to list all the tables in the EUL, prior to deleting the expired results, you get 62 results.
Exit Discoverer Plus, and you are prompted with a dialog asking you to confirm the deletion.
Click 'OK' and the results are deleted. Which means that four tables sould have been deleted from the EUL. To confrm that, rerun the SQL command to list all the tables in the EUL (select tname from tab;). As expected, the EUL now has four tables less than before.
You could try different options, but the bottom line is that the results become due for expiration and thus deletion when they are more than 24 hours old in this case.

Beyond the BI Graph Wizard

This post is aimed at BI Beans developers wanting to fully exploit all the features of the BI Beans Graph. Within JDeveloper the easiest way to create a new graph is to use the Graph Wizard. This will allow you to create a new query to populate the graph and also define the layout. The end result is an XML file within the BIDesigner. This XML file is stored on the local file system. Before deploying your application this XML file has to be copied to the remote catalog so your application can correctly locate and open it.

Once the graph has been created most of the properties relating to a graph are exposed using the customizer wizards that are part of the graph toolbar in JDeveloper. Using the GUI tools you can easily create a graph something like the one shown below, where the width of the lines has been increased and the colors for each line set to match a specific theme:


These are very basic customizations. However, the BI Beans graph does contain a lot of properties that are not covered by either the graph wizard or the customizers. There are three basic ways to access these additional properties:

1) Use the Structure and Properties panels in JDeveloper
2) Directly editing the graph XML file
3) Use the graph Java API


Method 1 : Using the Structure and Properties panels in JDeveloper

In JDeveloper the Structure and Properties panels can be used to view all the available graph properties. Once a graph is open in the JDeveloper graph editor, opening the Structure panel (Ctrl+Shift+S) will expose the all the structure of the graph bean:


Some sections contain more detailed sections and are shown as drillable in the tree. For example the plotArea has an SFX section. This controls the Special Effects features. This is not exposed in the graph Wizard or the customizers, so the Properties panel has to be invoked to both view and modify these properties. To open the Properties panel use the (Ctrl+Shift+P) keystroke. The plotArea SFX has the following properties:

Using the SFX properties graph developers can add features such as background images to a graph. By setting the fillType, textureDisplay and textureURL properties it is easy to update the graph shown above by adding a background image as shown below:


In the actual graph XML file the following additional tags are added to control the SFX features:


Another feature that is only exposed via the Properties panel is the ability to wrap the text for the various title areas. In order to word-wrap long titles you simply select the required title in the structure panel, for example the Y1 Title:


The Property panel then exposes the options such as word wrap, text rotation, alignment etc. In the graph XML file the following entry would be added:




Method 2 : Directly editing the graph XML file

If you really want to push the boundaries the next step for customizing graphs is to directly edit the graph XML. As stated above, the graph definition is saved to an XML file within the BIDesigner directory on the local file store. Developers can use any text editor to open the file and add new XML tags or edit existing tags to customize the appearance of the graph. After saving the file, in JDeveloper you only need to reload the graph to view the results of the changes to the file.

The BI Beans graph is shipped with a DTD document that lists all the available XML tags. You can see the complete list of graph attributes inside the file 'graph.dtd'. This DTD file is located in your JDEVELOPER_HOME\bibeans\lib\bipres.jar. The WinZip utility can be used to unzip the contents of this JAR file and view the dtd document. For detailed information on these attributes, refer to the technical note available on OTN from the Reports Product Management Team:

http://www.oracle.com/technology/products/reports/htdocs/getstart/
whitepapers/graphdtd/graph_dtd_technote_2.html

This Technical Note explains all these attributes using comments within the graph.dtd. This document will help to explain the usage of these various attributes that provide more fine-grained customization of graphs.

Directly editing the XML provides more opportunities to customize the visual representations of a graph. For example, BI Beans Graph does not provide a graph type that just plots the trend as a series of floating bars. However, by directly editing the XML it is possible to generate a graph that does have floating bars as shown below:



To do this is a two stage process. Assuming you have the following graph:






The first step is to add another series that clearly identifies the increase in sales for the years 2000-2002. Choose a stacked bar graph to show the two series. Your graph will now look like this:





Once this has been done, the next step is to add the following to the graph xml document:




The O1 axis tick mark style is defined so that the floating bars can be identified easily with their respective labels on the X-axis. The above XML entry will make one of the series transparent, and you will get a floating effect as shown below:




In order to show the total sales and increase in different colors, you will need to define exceptional risers. Exceptional risers are data markers that do not share series attributes, e.g., series color. Add the following to the Graph xml document to define exceptional risers:




This will change the color of the total sales bars as shown below:




To make the above graph look exactly like first graph with the nice red and silver bars some additional XML statements are required to modify the color codes used as part of the series definition and apply some special effects properties as well.



Method 3 : Using the graph Java API


The last method for interacting with the Graph bean is to use the Java API. This provides access to some interesting features such as the ability to set the bars or pie slices transparent. Currently the only way to set this property is to call the graph bean API using java code as follows:


DataAccess da = graph.getModel().getDataAccess();

int seriesCount = da.getEdgeExtent(DataDirector.ROW_EDGE);

for (int i=0; i

try{

graph.getSeries().setColor(new Color(red,green,blue,alpha), i);

}

catch (SeriesOutOfRangeException se){

System.out.println(" Series out of Bound Exception ");

}

}

This method uses the constructor for Color: Color(int r, int g, int b, int a) and creates an sRGB color with the specified red, green, blue, and alpha values in the range (0 - 255). The result is as follows:


Using BI Beans with non-OLAP data source

One of the largest threads currently running on the BI Beans forum relates to using BI Beans with non-OLAP data sources. Out of the box most of the BI presentation beans are wired to work with an OLAP data source. That OLAP data source can be derived from either a relational star/snowflake schema or an analytic workspace. The use of an OLAP data source against a relational schema requires additional metadata to be added in the form of registration of dimensions and cubes within the CWM repository.

In many cases the creation of this additional metadata may not be possible, so people have asked if it is possible to connect BI Beans to a non-OLAP data source. The answer is yes. The easiest way to do this is to use the BI Graph bean and connect this to an XML data source. This is relatively easy to do and as part of the BI Beans 10g samples we already provide a UIX example that shows how to connect a BI Graph bean to an XML data source. Now we have added a JSP example.

Using a very simple JSP page we can add a new BI Graph bean and render this with data from an XML data source. The code below shows the completed JSP page with all the require libraries and tags:






In this example the JSP page includes two key lines of code:

Line 1: helper.setGraphProperties(graph, "graph1.xml");
Line 2: helper.loadData(graph, false);

The first line sets the style properties for the graph. Below is the code used to load the style information and apply it to the graph:



For more information on setting the various graph properties and styles using the XML tags please refer to my previous posting “Beyond the BI Graph”. This can be found at the following URL:

http://all-siebel-info.blogspot.com/2008/05/beyond-bi-graph-wizard.html

The second line of code creates a connection to a non-OLAP data source for the graph and is contained within the same code library as the previous, code extract, GraphUIXSample.java. The loadData() method allows for two different types of connections. By passing the value of “false” as the last parameter the graph will be generated using data from an XML file, "helper.loadData(graph, false); ". This will call the following code:



This code loads an XML file that contains the following tags and data points:


which results in the following graph being displayed when the JSP is run:


By passing the value of “true” as the last parameter ( helper.loadData(graph, true) )the graph will be generated using data from a SQL statement. This will call the following code:




For this example we connect to the Scott schema and select data from the EMP table. The connection details to the instance are coded into this example; however, these could be stored and loaded from another file if required. Note here the lack of a BIDesigner connection, this is an area that also generates a lot of questions on the forum. There is no need to define a BIDesigner to make a non-OLAP connection. The connection is defined as per a normal ODBC connection.

The SQL statement is contained within a String object and is defined as follows:

String sqlQuery = "select DEPTNO, JOB, avg(SAL)from EMP group by DEPTNO, JOB";

Executing the query in a SQLPlus session will generate the following result:


The query results are assigned to an array called “data” using a “while” loop to walk-through the result set. To assign the data to the graph the setTabularData() method is called:

graph.setTabularData(data);

Running the JSP page now will generate the same style of graph as before, however, the data will now be sourced from the EMP table and will appear as follows:


Featured Video