June 03, 2016

How to force shutdown siebel server < 2ms

This is in continuation to my earlier post on How to shutdown Siebel server in less than 5 secs

And is suggested by a reader of this blog, who seems to be even more impatient than me(in a good way), and had automated the step to query Siebel server and step to use task kill command to bring down Siebel server as mentioned on my earlier post.

Final batch file looks something like : 

FOR /F "tokens=3" %%A IN ('sc queryex siebel_service_name  ^| findstr "PID"') DO (SET pid=%%A)
IF "!pid!" NEQ "0" (
taskkill /pid %pid% /f 
)


taskkill /im siebmtshmw.exe /f
taskkill /im siebmtsh.exe /f
taskkill /im siebsess.exe /f
taskkill /im siebprocmw.exe /f
taskkill /im siebproc.exe /f
Once executed with admin privileges, it brings down Siebel server at very instant. I have tested this, and it works beautifully.
Memory Release

Why this is faster than usual way? 
Usual way of bringing down service does memory cleanup and waits for long running processes to complete, gives some time to gracefully complete the tasks I think it copies the log files around as well.

However this batch file just pulls the trigger and knock down the server in one shot. There is a risk of data corruption, use it at your own risk!


If you have done something like this with Siebel which is not recommended but saves you time then please share it with us in comments section below.

June 01, 2016

Siebel EAI Interview questions - Web services

View latest 2020 Interview questions here:
Siebel REST API Interview Questions
Siebel EAI Interview Questions - JMS Transport

Question 1: What is the difference between outbound and inbound web services?

Answer: Inbound web services are hosted/served by Siebel and is invoked by external application to send data or to query data from Siebel.
Siebel Inbound Web Service

Outbound web services are web services which are hosted by external applications like SAP or Middle-ware and is invoked by Siebel workflows/business services to send or query data from external system.
Siebel Outbound Webservice


Question 2: What is WSDL?

Answer: WSDL stands for Web Service Definition Language. It's a standard for describing web service end point, it contains information about what all methods external system can call and what are input and output arguments for the service.
For Inbound web services Siebel dev team needs to provide WSDL, which is created from Adminstration Integration> Inbound Webservices view.
For outbound web-services external system like a billing system provides WSDL which is imported into Siebel.
Generate WSDL in Siebel

Question 3 : How WSDL is imported into Siebel?

Answer : Siebel inputs WSDL in two steps. Firstly WSDL is imported into Siebel tools which creates proxy business service and IOs for arguments.
WSDL Import in Siebel Tools

Second step involves creating web service end point in Administration integration> outbound web service which is done by imported by xml generated in first step.

Question 4 : What is filter business service in Siebel?

Answer: Filter business service is a custom business service which can be configured to be invoked at web service invocation just before or after actual workflow call. This service is used to handle custom soap headers of web service .

Question 5: What is SOAP Message? Which version of SOAP is supported by Siebel ?

Answer : SOAP Stands for Simple Object Access Protocol it is a XML format which exchanged by web services, SOAP 1.1 is supported by Siebel.

Question 6: When would you recommend using web services over queue based integration?

Answer: Web services should be used when business process can not wait for response from external system. For example : Order can not proceed without checking the inventory and user cannot wait before submitting order.

Question 7: What is the difference between EAI HTTP Transport and web services?

Answer : Web services is a HTTP based standard which uses WSDL to describe structure of input and output arguments and methods which can be invoked on server.
HTTP Transport can also be use to transfer data in and out if Siebel server however there is no description of input and output data structure and types.

Question 8: Can workflow be published as inbound web services?

Answer: Yes workflow and business service both can be published as web service in  Siebel.

Question 9: What is proxy business service in Siebel? and How does proxy BS works internally in Siebel?

Answer : Proxy business services are business services in Siebel which are created for each WSDL import in Siebel tools. Proxy business service converts in the input arguments into SOAP message and invokes HTTP transport to send data to external system.


EAI JSON Converter - v2 (No Java)

I published EAI JSON Converter business service based on Siebel Java business service back in 2013, and many people seemed to like it and implemented it. See the old post here. It was great to see that code getting implemented in production by many people. Surprisingly equal number of people faced difficulty in implementing the Java business service which is required to get EAI JSON Converter working.

Thus I started working towards removing dependency on JAVA business service and created complete eScript based solution as ver2 of EAI JSON Converter business service.
Generate JSON in Siebel without Java


This service will have the same methods and arguments, and will outputs similar JSON string and property set as previous version did but without the need of JDK. It is complete plug and play service, just copy paste the code and start using the service.

function CreateJSON(Inputs){
/*********
Created By: Jim
Support: http://howtosiebel.blogspot.com
*********/
    var str,j;
    var propName = "";
    var propVal = "";
   
    str = "{";
   
    propName = Inputs.GetFirstProperty();   
   
    //Type and value
    if(Inputs.GetValue() != null && Inputs.GetValue() != ""){
        str = str + '"' + Inputs.GetType()  + '"' + ":"  + '"' + Inputs.GetValue() + '"';   
        if(propName != "") str= str + ",";
    }
   
   
    //Properties
    while (propName != "") {
        propVal = Inputs.GetProperty(propName);
        str = str + '"' + propName +  '"' + ":" + '"' +propVal + '"';
        propName = Inputs.GetNextProperty();
        if(propName != "") str = str + ",";
       
    }
    propName = Inputs.GetFirstProperty();
    if(propName != "" && Inputs.GetChildCount()> 0)str = str + ",";
   
    //Loop for child
    if(Inputs.GetChildCount()> 0){
    if(Inputs.GetChildCount()> 1)str = str + '"Object"' + ":" + "{";
    for (var i = 0; i < Inputs.GetChildCount(); i++){
            j = Inputs.GetChild(i);
            str = str + '"' + j.GetType() + i + '"' + ":" + CreateJSON(j);// + ",";
            if(i+1<Inputs.GetChildCount()) str =str + ",";
    }
    if(Inputs.GetChildCount()> 1)str = str + "}";
    }
    str = str + "}";
    return str;   
}
Hope the code is self explanatory. Feel free to edit it for your implementation. I have tested the output and validated for RFC4627.

Creating JSON string from property set was easy I traversed through the property set using out of the box Siebel methods and created the string. Creating propset from JSON proved difficult, I am still working on solution for interpreting JSON and converting it into property set, I have made some progress will post it as soon as it is working satisfactorily.

If you want to contribute in nobel cause then contact me via comments below and don't forget to plus one this post on Google. All comments are welcome.

May 25, 2016

Guide to resolve Generic SSA NOTOK error message. SBL-DAT-00472

SBL-DAT-00472: Generic SSA NOTOK error message.

SSA NOTOK Error in Siebel

This error occurs in Siebel when there is some fundamental configuration mistake, like syntax errors or missing workflows or incorrect joins are configured. This error can be very difficult to fix, as it leaves very thin trace behind and there is no indication to start with. When I faced this error I narrowed it down by going through the most common reasons of this error and started to rule them out one by one.

Following is the list which I followed from various support web articles.


1. Deleted Workflows

Runtime events that are created automatically by workflow deployment have row id of workflow specified on them, and if that workflow does not exist in system then run time event can throw this error. To debug this turn on the personalisation logs and narrow down which runtime event is causing the trouble.

2. Explicit Joins on 1:1 tables

Someone has created explicit join based on 1:1 extention table and name of the join is same as the table name. For example table S_SRV_REQ1_FNX is extension table of S_SRV_REQ, so one should not create join in Service request BC with table S_SRV_REQ1_FNX to avoid getting this error.

3. Calculated Fields

This is the most common cause of this error. Any syntax mistake in calculation or calculation which compares a two different data types can result into SSA NOTOK Error.
For example following calculation will cause this error :
IIf ([Status] = 1, 10, 0)
This because the status field is DTYPE_TEXT and it is compared to integer value.

In my case I had a field in BC with syntactically incorrect calculation. Which was easy to find as it popped up as first thing in BC validation.


4. BC field Validations

This is another place where calculated fields can be referred and could cause this error. This might not error out every time as calculation might not be evaluated in all conditions. So do check field level validations as well when trying to fix this issue.

5. Run-time events or DVMs

Another place I would look for would be RTE and DVMs as they also use Siebel query language to identify records and validate things and any syntax goof up can cause this error to popup.

Another place you might get this error is while generating sample XML for BIP reports, this happens because application is not able to find the folder location specified in component parameter for XMLPReportDataDir .



Please feel free to share and discuss your experiences with this error in comments below.

April 29, 2016

7 Siebel Tools hacks every developer should know!

These are my favorite Siebel Tools tricks that I use day in day out. I thought of sharing this before good old Siebel tools is made completely obsolete by new "Siebel Composer". Would be good to compare this with composer features in future when it is fully developed and available.

Repository search

This is Siebel tools inbuilt search feature. It can be used to find all objects with specific keyword in entire repository. I use it to find the use of profile attributes in scripts or in calculated fields, search spec etc... Pretty neat.
To start search go to Tools> Search Repository
Enter keyword and click Search Now


It's not super fast but it's best way to be sure.

Alternative of genbscript.exe

I still meet few developers who run genbscript every time after compiling srf. There is much easier way to generate browser scripts available.

Scripting options

As shown above, one can configure tools to update browser scripts automatically after every compile.

Add multiple objects to one sif file. 

There is no need to create separate sif file for each object. After adding one object just leave the archive window aside and go to object explorer to pick another object and add to save archive.


Siebel sif files.

Create list of values from tools

Yes, One can create list of values from Siebel Tools. For this menu to appear your login needs to have Siebel administrator responsibility. I love this interface, it is so much better than Siebel client.


Compare objects 

Siebel Tools provide unique way of comparing objects, its not limited to comparing objects with a sif file. Once can compare two similar objects like two business components or applets in same repository or a different repository.

Compare objects in Siebel Tools

Copy items from one object to other

This is one of the neat hidden feature of Siebel tools. While comparing two objects one can use this feature to copy some objects from one object to other.

Button to copy items from one object to other
 As shown on press of button one can copy fields from one BC to other.

Bookmarks!

This is one of my favorite hack. I bookmark all the objects of projects that I am working on, it makes really easy to navigate back an forth without typing.

To bookmark any object list just open the bookmark pane and click the plus sign. And double click on the list to find the objects again, no typing required!

Siebel Tools Bookmark icons
Siebel Tools Bookmarks in Action
Shown above is my current bookmark list. I have bookmarked Order BCs(thin and thick :)), Quote BCs, and custom business services.

Some bonus keyboard shortcuts :


F7 to compile all objects
Cntrl + F7 compile single object
Alt + H + R about record
F5 starting Siebel dedicated client
Shift + F5 restarting Siebel dedicated client