November 14, 2013

Siebel EAI Interview Questions - EAI Siebel Adapter

Question: Explain the methods of EAI Siebel Adapter


Answer: EAI Siebel Adapter is pre-build business service which interacts with Siebel Object manager to perform CRUD operations on Siebel Database. Following methods are available on the service:

Query

  1. Query method is used to query data from Siebel, output of this method is Integration Object instance.
  2. Query can be executed using :
    1. Row id of the primary BusComp
    2. Search spec consisting of parent and child buscomp fields.
    3. Integration object instance - which is also known as Query By Example
  3. Only required input argument of this method is Output Integration Object Name which is the name of integration object which is queried by the service.

November 07, 2013

Whats wrong with EAI Java Business Service?

What is wrong with EAI Java Business Service?? This was my reaction after struggling with EAI Java Business Service and trying to execute small Java code from Siebel. Actually there is nothing wrong with the service, it is our lack of knowledge and less experience with Java development which makes it difficult to configure.

I am going to list down steps required to get the Sample bookshelf code working with Siebel web client.



1. Siebel is not compatible with Java 1.7.
If you compile from Java 1.7 or above you will get the following error while calling service from Siebel

Class name incorrect or does not extend SiebelBusinessService : AddBusinessService -- JVM Exception:java.lang.UnsupportedClassVersionError: AddBusinessService : Unsupported major.minor version 51.0(SBL-EAI-05010)
For workaround Siebel Tools comes with a older version of jdk which can help you to compile and get rid of the above error.

November 01, 2013

JSON and Siebel


JSON(JavaScript Object Notation) is a new lightweight integration message format which is replacing XML in thin client integrations. There are no meta tags and data description in JSON as in XML, it is just a string representation of JavaScript Object, it is designed to help javascript code to convert data to string and string to data without considerable overhead.


JSON vs XML


Many companies have started replacing XML with JSON in APIs. All the APIs of Google (Maps,Mail,Calendar, plus etc are now serving JSON), Twitter API,  Facebook apps and interfaces are built using JSON.
Read more on JSON on : http://www.json.org/

Siebel lacks in support of JSON on server side. Oracle support recommends use of workarounds such as using custom scripting to parse JSON response received by Siebel.

So how to interpret json in Siebel? Answer lies in the escript engine of Siebel. Siebel eScript as we know is actually ECMA script which was basis of Javascript. That is why the syntax of Javascript and eScript closely matches each other.
ECMA adopted JSON before it became standard in javascript. Thus our well known Siebel eScript also have some support.

October 19, 2013

How to Pre-populate CC or BCC in Siebel F9 Functionality?

Siebel F9 Email Client no doubt is one of best out of the box functionality of Siebel. It has lot of its logic built into the classes thus presents some limitations. In our previous post we saw how we can bring data from child business component data into email body.

In this posts lets see how we can pre-default CC or BCC recipients using some scripting. Out of the box
when ever Send Email method is invoked from on any Siebel Applet, Send Communication Applet is opened, and "To" email field is populated with the value of the field specified in Recipient Email Address Field  user property on the BC.

However there is no way we can pre-default CC and BCC fields out of the box. With the help of small script on  Send Communication Applet can set the value of To Email, CC, BCC and Email Body as well. This can be useful little customization that can help to pre-populate data which can not be achieved using email templates and recipient groups.

function WebApplet_Load ()
{
    var oBC = this.BusComp();
    oBC.SetFieldValue("Email BCC Line","a@a.com");
    oBC.WriteRecord();
}

Siebel Email Client - Siebel 7.8
Hope it helps

-Jim

October 18, 2013

Property Set Value is marked as binary data - SBL-EXL-00109

Error: PropertySet GetValue call failed. PropertySet Value is marked as binary data, starting with: 'PropertySet GetValue call failed. PropertySet Value is marked as binary data, starting with: '(SBL-EXL-00109)

This error occurs when Siebel script tries to manipulate the data from external interface which is not UTF-16, as GetValue or GetProperty Methods are build to return on UTF-16 data. I was getting this error when I was trying to GET some data using EAI HTTP Transport Service.

There are two solutions which can be used to resolve this issue.
First: Use Transcode Service, Convert Method, and using EncodingToString and SourceEncoding as CP1252. Read more on: http://learnfrommike.blogspot.com.au/2012/08/read-response-from-invoking-siebel-crm.html

Second: EAI HTTP Service provides conversion directly from the service. We can provide
CharSetConversion input property to convert the output to required encoding. I was successful using following code:

function Service_PreInvokeMethod (MethodName, Inputs, Outputs)
{
var bs = TheApplication().GetService("EAI HTTP Transport");
var inp = TheApplication().NewPropertySet();
var op = TheApplication().NewPropertySet();
inp.SetProperty("HTTPRequestMethod","GET");
inp.SetProperty("CharSetConversion","UTF-8");inp.SetProperty("HTTPRequestURLTemplate","");
bs.InvokeMethod("SendReceive",inp,Outputs);
return (CancelOperation);
}

Hope it helps.