Using EAI Siebel Adapter

EAI Siebel Adapter finds its usage in almost all integration scenarios and business process automation.

There is a bug which you must have encountered while using EAI Siebel Adapter BS.  I will explain the issue with an example and a solution to resolve the issue…

Let’s say you need to upsert an entity e.g., Assets in Siebel using EAI Siebel Adapter BS. The data structure is a parent -child hierarchy which consists of Assets (primary IC) and Account (child IC).

Let’s assume that Account is resolved by the Id field (Id field being part of the 1st user key and is available in the message). There is a possibility wherein a given account would be repeated in your message instance with different attributes. Consider the following structure:

<Account><Id>1-ABC</Id><Name>ABC Industries</Name></Account>
<Account><Id>1-XYZ</Id><Name>XYZ Industries</Name></Account>

In the above example, Account with Id “1-ABC” is repeated twice in the message. If the application tries to upsert this dataset using EAI Siebel Adapter, both the Accounts will be added as Child on Asset. However the data contained in the last instance of Account would be lost.  This information lost might be critical for business operations.


In this case, you would be required to consolidate all the similar Account records into a single component before running an Upsert. The resulting message after consolidation would look something similar below:

<Account><Id>1-ABC</Id><Name>ABC Industries</Name><BillTo>Y</BillTo></Account>
<Account><Id>1-XYZ</Id><Name>XYZ Industries</Name></Account>

I have built a generic BS which would consolidate the components. If anyone is interested please send me an email.


Correct JVM Settings for JAVA SubSystem

It is important from Siebel services perspective to instantiate the correct version of the JVM for tasks which involves JVM.
Please follow the following list to configure the correct JVM settings:

Windows: JRE_HOME/bin/client/jvm.dll
Solaris: JRE_HOME/lib/sparc/client/
AIX: JRE_HOME/bin/j9vm/ (IBM JRE)
Novell SUSE Linux: JRE_HOME/lib/i386/client/
Oracle Enterprise Linux: JRE_HOME/lib/i386/client/libjvm
HP-UX: JRE_HOME/lib/IA64N/server/

Array Object in eScript

An array is a special class of object that holds several values rather than one. The values could range from simple data structures to complex ones. The later is called vectors.

Values stored in an array are refernced by index numbers assigned to that value. Each value in an array is called an element. Array indices can be either numbers or strings. Arrays can be single dimensional or multi-dimensional in nature.

var arrMyArr = new Array(); // Defines an array object

arrMyArr[0] = “Single Dimensional first value”;

arrMyArr[1][2] = “2-Dimensional Array referencing 2nd row and 3rd column”

Operations supported on Array objects in eScript:

1. Array join() Method:
Syntax: arrMyArr.join([separatorString]):- A string of characters to be placed between consecutive elements of the array; if not specified, a comma is used.

2. Array length property:
Syntax: arrMyArr.length :- Returns an integer value which equals the largest index of array, +1.

3. Array pop() Method:
Syntax: arrMyArr.pop() :- Similar to the pop method we have for stacks. It removes the last element from the array and returns it. If the array has no elements left, it returns “undefined”.

4. Array push() Method:
Syntax: arrMyArr.push(“Element”) :- Appends the element(s) passed onto the end. Returns the updated index of the last element.

5. Array reverse() Method:
Syntax: arrMyArr.reverse() :- Reverses the elements in the array so that last element becomes the first element.

6. Array sort() Method:
Syntax: arrMyArr.sort(“Function to compare and decide sort mechanism”)

7. Array splice() Method:
Syntax: arrMyArr.splice(StartIndex, NoOfElements) :- Returns another array of the elements removed from the main array.

EAI Queue for Error Handling

The EAI Queue provides temporary storage for data in transit between Siebel Business applications and external applications and a means by which to monitor the data exchange. This temporary storage of data can facilitate error recovery in the event that the flow of data to or from Siebel is interrupted. Error Handling mechanism can be configured to push and pop messages from the EAI Queue based on an OOB Business Service “EAI XML Queuing Service”.Each entry in the EAI Queue may contain the following information:
■ XML file containing the data object in transit
■ Processing status of data object
■ Reference ID for data object in external application
■ Additional fields to be used for error information and other external application specific
A business service API is also provided to the EAI Queue. This business service contains methods to update information held in the queue and allows other components in the Siebel application, as well as customers, to develop software to use the queue. The business service contains the following methods:
■ AddMessage. Adds an XML data object to the queue.
■ GetMessage. Retrieves an XML data object from the queue.
■ GetStatus. Retrieves processing status of the data object.
■ UpdateStatus. Updates the processing status of the data object.
■ DeleteMessage. Removes an XML data object from the queue.

Steps to Configure an EAI Queue:
1. Navigate to Sitemap –> Integration Administration Screen –> EAI Queue
2. Create a New Record
3. Fill in the name of the EAI Queue e.g., “TEST EAI Retry Queue” without the quotes.

Steps to use / send Error Messages onto EAI Queue:
1. Call OOB “EAI XML Queueing Service” from the Error Handling workflow process to post the error message onto EAI Queue using “AddMessage” method.
2. Pass on the Error XML to the Error Handling workflow which in turn would post it onto the EAI Queue.
3. Error Message logged into the EAI Queue are listed as shown below:

Advantages of this Approach:
1. This uses OOB Siebel functionality without extra license to incorporate Error Handling.
2. Number of Custom Objects required to build for Error Handling decreases, thereby increasing performance, reducing development time, easier to debug.

Bundle Product Operations [Interface Perspective]

Product Model has become complex and updating Bundle Products requires it to be locked before updating and Release after upsert operation is complete.
The underlying BusComp Class on Bundle Products takes care of this requirement if updates are done via UI.

What would you do if you have a requirement to update Bundle Products coming from external sources in the background [Non UI Context Update].

Here is a simple solution which can be used:
For those of you who need background on the Data Model used for Product here is a snapshot….
Products are loaded into S_PROD_INT via “Internal Product – ISS Admin” BC. Once Products are released, they are available via “Internal Products” BC.
Bundle Product is a Hierarchical data having a Parent Product [referenced from Internal Product BC] and one or more Child Products [referenced from Internal Product BC but are loaded into “S_ISS_SUB_OBJ” table via “ISS Product Bundle Admin BusComp” BC].

Normally for 1:M relationships, the Parent’s ROW_ID is stored in the foreign key column of the Child Records.
For Products the case is a bit different. The Foreign key column “Object ID” doesn’t store the Parent Product’s ROW_ID. Instead it stores the “VOD Id” [VOD Id refers to the ROW_ID of the latest version record of a given product and is available in S_VOD table].

Having said that, lets get to the expectation of this post…

Locking a Bundle Product — This is a simple operation to achieve. There is a flag field on S_PROD_INT which serves as the Lock Flag. The field is “VOD Locked Flag”. This flag value has to be set on the Parent Product to Lock it. Before you Lock the Parent, you might check if its already locked. Here is a simple code that does that:

var boProdAdmin : BusObject = TheApplication().GetBusObject("Admin ISS Product Definition");
var bcProdAdmin : BusComp = boProdAdmin.GetBusComp("Internal Product - ISS Admin");
var bcProdBndl : BusComp = boProdAdmin.GetBusComp("ISS Product Bundle Admin BusComp");
var bcProdVer : BusComp = boProdAdmin.GetBusComp("ISS Product Versions BusComp");

//Lock the Product if not locked.
ActivateField("VOD Locked Flag");

if(GetFieldVlaue("VOD Locked Flag") == 'N' || GetFieldVlaue("VOD Locked Flag") == 0)
SetFieldValue("VOD Locked Flag", 1);
} //End of Lock Product

Note: You might add more fields onto the Query operation to uniquely identify the Parent Product.

Release a Bundle Product — Once the Bundle Product is updated with changes, you have to Release it. Without performing this operation the latest changes will not be reflected for end users to use to the latest Bundle Product.
There is a method called “Publish” on the “Internal Products – ISS Admin” BC which should be used to “Release” the Product.

There are various methodologies available to invoke the BC Method.

If you are trying to release the Bundle Product from a workflow or a Business Service, consider using the following BS and its methods:
Business Service                                               Method

SIA BC Utility Service                                            BCInvokeMethod
SIS OM PMT Service                                               Invoke BC Method

Strongly Typed Variable Declaration

Excerpt: Siebel 8.0 supports strongly typed variable declaration. This new feature is available in the new ST engine.

Advantages of this form of declaration are

  • Improved Performance (Effective utilization of memory)
  • Improved Scalability
  • Reduced Development time (The new ST engine is capable of pulling out data / object references from the metadata repository, thereby reducing the development time by reducing a developer’s time in lookup activities)

1. Example showing Strongly typed variable declaration:

 The following screenshot shows an example of strongly typed vs loosely typed variable declaration:


Other supported Object types in eScript are:


 2. Reduced Development Time:

The following screenshot(s) show the metadata shown to the user during eScript development:



Gets Metadata from repository

Gets Metadata from repository


3. Avoids Implicit Conversion:

The new script engine warns the user in the early part of development if there are implicit conversions defined. Please see the screenshot:

 Implicit Conversion Error

Implicit Conversion Error


 Issues if Strongly typed declaration methodology is not followed:

  • Late Binding: Variables are defined by the eScript Interpreter at run-time which implies errors would be caught at run-time only.
  • Implicit conversions might result in unwanted results.
  • Higher usage of memory by the Siebel script engine to process code.

Creating a Haley Knowledge Base Repository

Haley Authority is the new Rules engine introduced in Siebel v8.0. This tool allows administrators to create / administer rules at runtime. A developer can create rules in a local database (.akb file). However it is also important to create a Haley Knowledge base.“Steps to Create a Haley Knowledge base”

1. Create an OLTP database with default tablespace just like the way you create in SIEBEL. e.g., create a tablespace called HALEY which would use a dbf file to store the data in the OS filesystem.

2. This step is very important. I am assuming you have the DB in Oracle. You would be required to create a user which would have the role of “TABLEOWNER” in Haley knowledge Repository. Once your DB instance is ready, create an entry in NetManager or NetConfiguration Assistant. This would add an entry in the tnsnames.ora file for the DB Instance. Now its time to create an entry in the system ODBC. To do so, go to Start –> Run. Type odbcad32 and hit enter. Navigate to System DSN tab. Hit on Add button. Ensure you pick the Oracle provided driver for ODBC connection. Lets assume that you have created an ODBC source by the name HALEY_TEST. Now login to the DB instance you have created earlier using SQLPlus. Alternatively you can also use advanced utilities available thru a link in ORacle 10g. Create a user with the following name: “THE$AUTHORETE$HALEY_TEST”. Ensure the name is given in the format given. The user name consists of “THE$AUTHORETE$” and the “ODBC SOURCE NAME” created in system DSN. Add the following privileges to the above user:








You can also use inheritance property to add roles to the above user if roles have the above privileges.

3. Once the above 2 steps are complete, use your Haley Business Rules Engine to login to the Knowlege Repository created in the previous steps. You will see no activity on the Haley Engine for some time. Don’t worry. The application would be creating necessary tables in the knowledge repository. YOu can use PLSQL Developer or similar tool to check for tables in the Knowledge Repository database. The tables would start with the name THE$AUTHORETE$HALEY_TEST..

4. Once the process is complete, you then try to login to the application.

5. Then use the Import Siebel Definition functionality to import Siebel Object definitions from the Siebel DB.

Determine a Defined Holiday

To return an output indicating whether a day is a defined holiday.

1. Navigate to Administration Sevice->All Exceptions and create Exceptions. Here you can define holidays in exception hours.

2. Navigate to Administration-Service->Schedules and create Schedule and Note row-id for that schedule. Here you can define working hours.

3. Navigate to Administration Business Service->Simulator. Specify following inputs.

1) Name : FS Holiday API Service
2) MethodName : IsHoliday

4. Navigate to input arguments and Specify following input arguments.

1) Date Time any date and time, for which you want to check.
2) Calendar IdRow Id of that particular schedule that you had noted during creation of schedule.
3) Time Zone Time Zone of the Service Calendar.

Then Hit Run from the simulator applet.It will return the output argument Is Holiday as TRUE/FALSE depending on the Date Time.

Note : Always while giving the input arguments,please give the date as “MM/DD/YYYY” and time in 24 hr format.(e.g. 10/18/2008 18:01:00)



FS Holiday API Service : IsHoliday Method


This method returns an output indicating whether a day is a defined holiday.





This method is called from the FS Holiday API Service. It returns Yes if the Working field is unchecked for the holiday definition of that day, or No if the Working field is checked.


Note: This article is posted by Shweta Ameta


By nanpats Posted in Siebel

Invoke BC Method

Scenario: If you want to call a BusComp method in Workflow, Siebel provides a Business Service which can be leveraged to achieve this requirement.

Business Service: Product Manipulation Toolkit Business Service Methods

Method to be invoked: Invoke BC Method

This is a generic method that allows one to invoke a Business Component-based method from Workflow. A Business Service method is invoked from a workflow by default. This method acts as a bridge to allow one to pass in the Business Component name and the method name, along with the parameters and return value required from Workflow to the Business Component specified.


BC Name

[in] A string to specify the name of Business Component on which you want to invoke its method. (Required)

Method Name

[in] A string to specify the name of the method in the specified Business Component that you want to invoke. (Required)

Param 0

[in] A string to pass in the first argument to the method. (Optional)

Param 1

[in] A string to pass in the second argument to the method. (Optional)

Param 2

[in] A string to pass in the third argument to the method. (Optional)

Param 3

[in] A string to pass in the fourth argument to the method. (Optional)

Return Property Name

[out] A string to pass out the output of the method. (Optional)

By nanpats Posted in EAI