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

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!