July 03, 2016

WebServices Performance Tuning



Recently I have been working on high traffic and highly available web service which is hosted by Siebel. I was asked to improve performance of it. I checked all the places for any performance degradation clues, there was hardly any, all queries were on indexed columns and thin BC's were used, there was no fat whatsoever.

With all the logs and spool generation my focus went to these two problems. 

1. Before every web service call Siebel was requesting file system to write read user preference file which was taking fair bit of time due to contention at file system. You might see following in logs, if user preference file is corrupted.



ObjMgrLog Debug 5 0 2016-06-29 06:50:56 SharedFileReader: \SiebelFS\userpref\EAIUSER&Siebel Sales Enterprise.spf: Open iteration 0 failed. errcode = 2.


This file read was absolutely unnecessary, luckily there was a way to turn off by setting "OM - Save Preferences" to FALSE for EAI object manager. This will make all logins to avoid looking up for user preference file.

2. Another useless transaction I noticed was with database. It was when Siebel tries to update the last login date on S_USER record. 
In logs you can see queries like these:

UPDATE SIEBEL.S_USER SET
LAST_LOGIN_TS = :7,
MODIFICATION_NUM = :8,
LAST_UPD_BY = :9,
LAST_UPD = :10,
DB_LAST_UPD = current_date,
DB_LAST_UPD_SRC = :11
WHERE
ROW_ID = :12 AND MODIFICATION_NUM = :14;
This can also be turned off in recent Siebel versions by setting DisableLastLoginTS = TRUE 

Its a new parameter introduced by Oracle, you can read more about this parameter on oracle support 1665762.1

Hope it helps. If you have come across any such parameter which can improve performance then please share it in comments below.

June 23, 2016

Just one Elastic applet?

Oracle introduced wonderful elastic list applets with IP16,  this feature shrinks list applet size if there are no or less records needs to be displayed. However this doesn't always looks nice, specially in MVG applets and pick applets.
Default Elastic Applets in IP16
 
This feature can be turned off by setting "Enable Elastic Grid" system preference, but it is turned off for entire application. That makes me think is there any way we can make only one applet as elastic applet?  Answer is yes :)

Neel on Siebel Unleashed published beautiful trick to back port elastic applets into IP15. Absolutely splendid! This trick can be extended to make only few applets Elastic. 

To make all list applets Elastic add following in custom CSS file:
.ui-jqgrid-bdiv{max-height:340px !important; height:auto !important;}
To make only one applet Elastic (After turning of the system preference) add following CSS :
div[title="Line Items List Applet"] div.ui-jqgrid-bdiv { height: auto !important}

By preceding another div selector to the CSS rule we can instruct browser to apply CSS style only if applet name is : "Line Items List Applet". One can use this trick to change other UI attributes for specific applets and apply different styling.


Happy Styling :)

June 21, 2016

Siebel Tools and Windows 10

Those who have been following blog closely would know from my latest demo video that I have been using windows 10 and Siebel IP16 for experimentation.

One can easily install Siebel Tools and client on windows 10 and run it on Oracle XE with Sample database, however Siebel IP16 being a new release it has some quirks which are not very developer friendly.

Here are some problems that I get everytime:

1. All workflows by default are not valid :(
Workflow simulator will error out straight away even if there is nothing wrong with workflow. Validator might say workflow is not fully connected.
Workflow simulation on Windows 10

What's the fix? Just edit the workflow once and move around workflow steps. And then simulate again, this time it will work just fine.

2. Tools wont boot and authentication subsystem will reject your login.
An internal error has occurred within the authentication subsystem for the Siebel application. Please contact your system administrator for assistance.(SBL-DAT-00565)
SBL-DAT-00565

Oracle XE is either crashed or booting up just give it few minutes have a coffee or something.


3. Dedicated client wont start
A system error occurred trying to start the command 'siebel.exe /c "C:\Siebel\16.0.0.0.0\Client\BIN\enu\scomm.cfg" /b "C:\Program Files (x86)\Mozilla Firefox\firefox.exe" /u SADMIN /p SADMIN /d SAMPLE_XE /h'.(SBL-DEV-00127)
Cant start dedicated client.

Just run tools as administrator and you will be fine.

Hope it helps.

My current setup includes: Windows 10, Siebel IP16, Oracle XE, Oracle Virtual Box containing : Windows 2008 Server which is hosting  > MSSQL Server + IIS + Siebel Server IP16.

June 17, 2016

Scriptless Challenge : How to constrain association list applet dynamically?

Association applet let's you associate records from an existing list of records. Unlike pick applets these association list applets doesn't have any out of the box way of constraining records.

Consider scenario: When opportunity type is internal, system should only show internal marketed products for opportunity in product association list applet and for opportunity type external system should show only external marketed products. Products are marked as internal and external by product type field.

Challenge: According to oracle there is no other way then scripting on web load of association applet to filter the records. Script can look something like following. And it works flawlessly.

Can you suggest any script less alternative?

function WebApplet_Load ()
{
var BO;
var ParentBC;
var BC;
var AccountId;
BO = TheApplication().ActiveBusObject();
ParentBC = BO.GetBusComp("Opportunity");
if(ParentBC.Name = "Opportunity")
{
    AccountId = ParentBC.GetFieldValue ("Account Id");
    BC = this.BusComp();
    with (BC)
    {
        ClearToQuery();
        ActivateField("Account Id");
        SetSearchSpec ("Account Id", AccountId);
        ExecuteQuery();
    }
}
ParentBC = null;
BC = null;
BO = null;
}


June 16, 2016

How to hide disabled buttons in Siebel Open UI?

With IP 15 and 16 Open UI themes have inclined towards bigger controls and more blank space on page, which is not bad thing but too much of it is making UI cluttered specially on small screens.

To fix this issue one can hide all disabled controls and all the white space around it. this can be done by simply adding following CSS and Open UI framework takes care of the rest.

button.appletButtonDis {
    display: none;
}

Further on to hide disabled menu items add :

li[aria-disabled=true]{
    display: none;
}

Siebel adds these classes and attributes to all the buttons on all applets and menus including new/query/delete icons to show them as disabled. Thus this change effects the entire application.

This post is contributed by esteem reader from down under via siebel-developers slack community. Register today to read more discussion like this.

June 06, 2016

Siebel Admin [Cheat Sheet]

I see many Siebel consultants(including me) searching web everytime to get correct syntax for Siebel server manager commands.

Although the syntax is so simple we still somehow manage to forget it :) I have created this cheat sheet from list of commands which I use day in day out. List contains command to increase log levels, shutdown startup components, creating components, starting server manager.

Feel free to download and print one for your desk.Download Here

Hopefully no more searching for commands to increase log level of siebel components :) cheers!

June 03, 2016

Siebel Integration Interview Questions - JMS Transport

This article only covers Siebel integration interview questions related to EAI JMS Transport , see Siebel EAI Interview Questions for other Integration interview questions.

Question 1: When should JMS be used over web services in Siebel integration requirement?

Answer: JMS queues are based on store and forward guaranteed delivery mechanism. That means source system sends the message to middleware which holds the message in queue until Siebel server reads it thus message is never lost.

However on other side web services doesn't have retry mechanism in architecture. In case of heavy load or server unavailability message can be lost if source system can't resend it. Benefit of using web services is that they are faster to develop, setup and maintain.

Question 2: How does JMS integration works in Siebel?

Answer : Siebel has JMS receiver server component which can pull XML messages from JMS queue for data transfer. For JMS components to get messages from JMS server Siebel needs to have JAVA installed on Siebel server.

Question 3 : What is the difference between queue and a topic of JMS?

Answer: Queue is is implementation of first in first out data structure, and can be used only between one source and one consumer. Once XML message is consumed by consumer it is deleted from the queue.


Topics also have queue like store and forward mechanism but with the difference that they do not delete XML messages immediately after it has been read, the same message can be read by another consumer (application). Thus well suited for 1 to many integration scenario.

Questions 4 : What steps are involved in JMS component setup in Siebel?

Answer:  Siebel JMS setup involves minimum three items :
- Setup of JVM (Java) subsystem
This tells where is Java files and server details of JMS server.
- Setup of JMS subsystem
This contains queue or topic information
- Setup of receiver component
This component pulls XML messages from JMS server mentioned in JVM sub system from queue mentioned in JMS subsystem.

Question 5: What is jndi.properties file? What it is necessary?

Answer: Java subsystem required for JMS integration required JMS server location information such IP address and port. This information is kept in jndi.properties file in Siebel filesystem.
It looks something like this: https://docs.oracle.com/javase/jndi/tutorial/beyond/env/src/jndi.properties

Questions 6: what kind of logging is available for JMS transport?

Answer:  EAI JMS Transport  provides two logging methods, first one is the traditional Siebel logs which can be turned on by increasing log level of receiver component.

Second type of logs are Java logs which generated by Java virtual machine installed on Siebel server , they can get turned on by setting VMOptions in Java subsystem.

See more Siebel EAI Interview Question

[Download] EAI JSON Converter v2

Pleased to bring you the complete EAI JSON Converter v2. It happened a lot sooner than I expected.
Siebel EAI JSON Converter

Below is the code which converts JSON string to property set. The heart of the code is eval statement, which converts the JSON string into eScript Object. 
Siebel eval statement

Remaining code is just the recursive traversing to convert object into property set. I have tested the code for couple JSON strings, it passed everytime with flying colours every time. Feel free to change the code as required. 

You can download the complete sif from git hub. https://github.com/Jimjson/eScript-based-EAI-JSON-Converter-


EAI JSON Converter Demo: 

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.