Google
 
We have moved to a http://siebelunleased.com Please visit there for updated posts

Sunday, September 30, 2007

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.

If you face any problems while implementing solutions then mail me at neelmani.gautam@gmail.com

Hope this post helps you! If yes then please do write you comments and come back for more.
Read more!

Saturday, September 29, 2007

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.
Read more!

Friday, September 28, 2007

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.


Read more!

Thursday, September 27, 2007

Siebel CRM - Workflow Debugging through Logs.

When we talk about Siebel, I think Workflows are the most common term that we come across after Object Manager. We can achive really complex functionality through worklfows but what it means is that debugging them is equally complex. We generally test workflows through Simulation but if we were debug workflows in real time it can be quite painful and time consuming.

A simple method to debug workflow is to increase the log level for Workflow Process Manager (WPM) component. But if somebody has ever tried that he can vouch that it can be quite a headache to go through that log (believe me it is a lot and it can go up in MB's even if the workflow is of moderate complexity). And what's more is that most of the information that is contained in that log is useless and not realted to workflow functionality.
So here in this article I am going to present a pretty simple technique which can help you to get just the right amount of information that you need to debug a workflow.
Instead of increasing the log level of complete WPM component if you just increase the log level of just selective sub-components that should do the trick. I will list down the Sub-Components that you need to increase the log level to get just the appropirate information that you need.

  • Workflow Definition Loading
  • Workflow Engine Invoked
  • Workflow Process Execution
  • Workflow Step Execution
  • SQL Tracing
Just increase the log level of the above said components from 1 to 4 and you are done !!!!!
To get logs from dedicated client you need set the Environmental Variable on your system. To understand the process of doing that Please go through my Old Post where I have explained about siebel logs.

Hope this post has helped you.
If the answer is "YES"!! Please leave your comments and visit again.
Read more!

Wednesday, September 26, 2007

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.

Read more!

Tuesday, September 25, 2007

Runtime Events Workflows - Part 2

This Article is about Siebel CRM 7.X Workflows and Runtime Events. It tells you how can we use them to our advantange.

In this article I will tell you about the actual process of Setting up Runtime Event and Business Service assuming you have working knowledge of both. If you want to know the basics of these please see other posts of my blog.

Just one important thing that you should know about runtime evetns is that they are executed even before the Business Component Events.

To explain it better I am taking an example where our requirement is to execute a workflow when you click Submit Oppty button on Opportunity Form Applet.


  1. Goto Administration ==>Runtime Events Screen
  2. Goto Action Sets View
  3. Create a New Record in the Action Set View of Runtime Events Administration Screen
  4. Enter Any Name in the Name Field of the Action Set List Applet
  5. Create New Record List Applet Below it
  6. Enter

Name = "TestRuntimeEvent" ;
Action Type = "Business Service" ;
Sequence = "1"

  1. In the Form Applet Below Enter the Following Details Business Service = "TestBS" ; Business Service Method = "TestMethod"8. Click Menu ==> Reload Runtime Events Make Sure that you have Active Flag checked in both List Applets.

You are done in Action Set View.

Now Goto Events view and Follow the steps given below

  1. Click New and Enter the Following Information

Sequence = 1 ;
Object Type = "Applet" ;
Object Name = "Opportnity Form Applet" ;
Event = "InvokeMethod" ;
Sub Event = "Submit Oppty" ;
Action Set = "TestRunTimeEvent"


Conditional Expression should be given if you want the restrict the execution of this Runtime Event to certain conditions and Action Set Name is always the name of the action set that we created.

2. Click Menu ==> Reload Runtime Events.


* Everytime you make a change to runtime events you have to Reload them to activate the changes that you have made.

Now we are through the Runtime Event parts.

What we have done so far is that When user clicks Submit Oppty button it is going to call BS named TestBS with method as "TestMethod".

Now we are going to write the code in the busines service which will actually result in the execution of Workflow Process Asynchronously.

  1. Go To Administration ==> Business Service
  2. Create a Business Record with name "TestBS"
  3. Create a Record in List Applet for Service_PreInvokeMethod and choose Programming Langauge as "eScript"


Write the Following code in Code Window inside the function Service_PreInvokeMethod


if(MethodName == "TestMethod")
{
var svc;
var child;
var input;
var output;
var rowid;
var bo = TheApplication().ActiveBusObject();
var bc = bo.GetBusComp("Opportunity"); // Change the BusComp name with the name of the BusComp you want to execute the workflow with
svc = TheApplication().GetService("Asynchronous Server Requests"); // Don't change this - Actual BS that is responsible for submitting a job to WPM
input = TheApplication().NewPropertySet();
child = TheApplication().NewPropertySet();
output = TheApplication().NewPropertySet();
input.SetProperty("Component", "WfProcMgr");
rowid = bc.GetFieldValue("Id");
// We would like to pass the row id of the Current record on which the user is working - You can pass more than one arguments
child.SetProperty("ProcessName", "Service Agreement - Agreement Status"); // Workflow process you want to execute
child.SetProperty("RowId", rowid); // passing the values
input.AddChild(child);
svc.InvokeMethod("SubmitRequest", input, output); /// invoking the business service method
svc = null; // nullfiying the objects
child = null;
output = null;
input = null;
return(CancelOperation);
}


And you are done!!!!!!!!!
Please post your comments if this post helps you in anyway.

Click Here to Goto Part 1 of this Article


Read more!

Siebel CRM - How To Call a Workflow Asynchronously?

This Article is about Siebel CRM 7.X Workflows and Runtime Events. It tells you how can we use them to our advantange.
We all want the response time of our Application to be as fast as it can and we do everything that we can to achieve that. I am going to tell you about a way which can help you to reduce the response time without actually reducing any functionality. Siebel can execute workflows in two ways.

  • Synchronous
  • Asynchronous


Synchronous Execution : When workflows are executed Synchronously then user gets the control back only when the workflow has finished it execution.

Asynchronous Execution: When workflows are executed Asynchronously then user gets back the control immediately and the workflow is submitted to workflow process manager (WPM) as a job to be executed. WPM then executes the job later.

Often we have a functionality where large amount of processing needs to be done on an object which user is not going to use access right now. I can explain it with an example.

When user clicks copy button on a opportunity or quote we want certain custom entities to be copied over but which user will not access at that time but later.

So, we can reduce our response time by just copying the quote or opportunity synchronously and placing the code of copying of custom entities in workflow and executing that workflow asynchronously.

There are two way to execute a workflow asynchronously

  • Workflow Policy
  • Runtime Event and Business Service (BS) Combination

Workflow Policy is pretty traditional method of executing a workflow process.
You create a policy. Enter the conditions Specify the workflow to be executed Generate Triggers
I wouldn't go into details of creating a policy but I will tell you some disadvantages of using Workflow Policy

  1. Slow Execution
  2. Difficult to setup
  3. Not Reliable and Error Prone

But from siebel 7.7 onwards we have another more robust, efficient and quicker way to do that which is Runtime Events and Business Service.

Continue to Part 2


Read more!

Saturday, September 22, 2007

Web Services - Part 1 Introduction

This is an age of Digitization and Communication. We want to make every aspect our life as easy as we can.We are trying to digitize every business process that we know such as marketing, sales. Internet is playing a pivotal role in making world a global village. We can reach anyone, anytime, anywhere. It is blurring the physical boundaries and eliminating the time differences.

Now we are ready to embrace the next generation Internet. Which is not only going to connect
computer but anything that can handle digital data. Already in Phase 1 was have mobile phones, pda, black berry's considerable changing our business models and the way we conduct our business. Now our office is a room with desk in it, it has expanded and can be a city, state or a country. And as we progress in this directions it will not be just mobile phones and computers we will have every equipment that will be able to connect and operated through Internet.

But how are we making this happen? How is that possible that such distinct equipments are able to connect and communicate? As we know that for anything to communicate there has to be something common between them. Now that common thing between all these things is a Web Service. Which is nothing but a language based on XML and SOAP which provides basis for these equipments to communication with each other. Future applications are going to be web enabled and based on
Service Oriented Architecture (SOA). To explain it in layman terms we can say that anybody who would want to use these application will have some services on his disposal, which he can use to get his work done. Before we can understand what a web service is we have to understand three things.

  • XML : Xtensible Markup Language
  • SOAP : Service Object Access Protocol
  • WSDL : Web Service Description Language

XML : In simple language Extensible Markup Language (XML) is a simple, very flexible text
format derived from SGML (ISO 8879). Originally designed to meet the challenges of large-scale electronic publishing, XML is also playing an increasingly important role in the exchange of a wide variety of data on the Web and elsewhere.
(To explain XML in detail is out of scope for this article but you can visit below links to get more details on XML)
W3 SchoolWikipediaXML communities, ResourcesXML Information, News

SOAP :SOAP originally stood for Simple Object Access Protocol, and lately also Service Oriented Architecture Protocol, but is now simply SOAP. SOAP makes use of an Internet application layer protocol as a transport protocol. SOAP is nothing but a wrapper around XML data. It describes the data it is carrying. That is how diverse application can understand the what is being sent to them without knowing who sent them. Of course there are other methods also to connect to diverse applications such as CORBA, GIOP, ICE, and DCOM

WSDL: It is again nothing but XML structure defining or rather describing the service the application is providing. It describes what kind of data it can accept. What kind of function it can perform and what kind of output it is going to return. In more technical terms it can be described as an XML format that allows service interfaces to be described along with the details of their bindings
to specific protocols. Typically used to generate server and client code, and for configuration.Which any application that has capability of understanding XML can use.

A Web Service is nothing but usage of above said technologies in combination to exchange data
between heterogeneous application.


As next part of this article I will define Web Services in Context of Siebel. Answers to questions like how are they helpful and a turtorial to create a web services in Siebel and a real case study.

To Download a step by step tutorial on creating Inbound and Outbound Web Services Click Here.
Read more!

Saturday, September 15, 2007

Siebel... First look

Siebel, I heard this world when I entered the world of IT. I said to myself what the hell is that, out of university having mind full of the magic words like C++, Java, .Net. The word siebel didn't ring any bell. Then someone from the crowd of the newly joinees blurted out I think it is a CRM and I (well, most of us) had no idea what was he talking about. Then he started telling us some definitions which he must have learnt while completing his course and it was going all over our head we couldn't understand a word.Then as time passed we learnt what actually a CRM is and what exactly is Siebel. I would say I was rather lucky to come or rather stumble across Siebel (Which I realised later.. of course).

Enough of background now something for which you are here.

CRM stands for Customer Relationship Management. We come across CRM everyday in our life but we seldom notice it. It is a very basic concept of any business even a street peddler selling trivial stuff uses CRM in on form or the other (I know it sounds absurd right now, but just wait a little more) and still we never notice it.

An example would explain what exactly I mean

When we go to a our shop across the street and we buy say a toothpaste or a tea bag the shop owner knows that we prefer a specific brand and without our asking he presents us with a brand that we want. This in layman terms can defined as a CRM. He is able to provide you the personalized experience based on the perfrences he has come to know about you over a period of time and memorizing them to make you to come back to him. Now when we talk about MNC's and other really big companies they want to provide their customers with similar personalised experiences but it is not possible to remember all the details of muti millon dollar deals so they depend on CRM for these needs and that is where Siebel comes into picture.

We all know that in today's cut throat competition where World is a global village the most difficult thing to do for a business is to retain customers. Dynamics of today's business change very quickly we need to be flexible to accommodate changes may be on daily basis if required. This is where Siebel comes into the picture. It helps us manage every transaction that we have with our customer using technologies like Siebel Analytics forecast what the demand will be in few years to come.It helps in managing business transaction of mammoth level with ease. siebel can be used by wide variety of business including sales, marketing, callcenter etc.


In next few posts I will discuss more about siebel and it various applications.


Read 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


Read more!