EAI Siebel Adapter Business Service – Case study

EAI Siebel Adapter Business Service – Overview

The EAI Siebel Adapter business service is one of the important and widely used EAI business services. In this article we consolidated some useful posts/information related to EAI Siebel Adapter business service. Thanks to Siebel Unleashed for sharing this wonderful example.

EAI Siebel Adapter – A case study

Below example will explain the usage of EAI Siebel Adapter business service.

Requirement

For Document Generation over 190 fields fetched from over 10 different BC’s were to be set on the Service Agreement BC.
This was being done through business services, which used to query all the BC’s and store the values in global variables.These global variables were used in a function to set the field values of the Service Agreement BC.

Problem

Because of large number of SetFieldValue statements (over 190) this business service used to take 15-20 seconds to complete.

Solution

Instead of using SetFieldValue we created a Siebel Message in the form of Property Set and used the EAI Siebel Adapters Update method to do the bulk update and improve on performance.
Example code to that is given below:


// The property set that we created
<SiebelMessage IntObjectName = “ServiceAgreementIO” IntObjectFormat =”Hierarchical” MessageType = “Integration Object”>
<ListOfServiceAgreementIO>
<ServiceAgreement Field1=”Value1” Field2=”Value2”>
</ServiceAgreement>
</ListOfServiceAgreementIO>
</SiebelMessage>


The Code to create the above the Property Set is as follows:


//Create 3 Property Sets
var AgreePS = TheApplication().NewPropertySet();
var ListAgreePS = TheApplication().NewPropertySet();
var AgreeDataPS = TheApplication().NewPropertySet();

//Make this of Type Siebel Message
AgreePS.SetType(“SiebelMessage”);

//Set Necessary Properties
AgreePS.SetProperty(“MessageType”,”Integration Object”);
AgreePS.SetProperty(“IntObjectName”,”AutoAgreementIO”);
AgreePS.SetProperty(“IntObjectFormat”,”Siebel Hierarchical”);
ListAgreePS.SetType(“ListOfServiceAgreementIO”);
AgreePS.SetProperty(“IntegrationObject”,”ServiceAgreementIO”);

//Add List as Child of Siebel Message
AgreePS.AddChild(ListAgreePS);

//Add data to property set
AgreeDataPS.SetType(“ServiceAgreement”);
AgreeDataPS.SetProperty(“Field1”, golbalvariable1);
AgreeDataPS.SetProperty(“Field1”,golbalvariable2);

//Finally Add Data to List
ListAgreePS.AddChild(AgreeDataPS);

After we have created our complete property set with all the values then we use EAI Siebel Adapter business service to update our BC in one shot, here is the code to do it.

var inpSet = TheApplication().NewPropertySet();
var outSet = TheApplication().NewPropertySet();
var svc = TheApplication().GetService(“EAI Siebel Adapter”);
inpSet.AddChild(AgreePS);
inpSet.SetProperty(“PrimaryRowId”,RowId);
svc.InvokeMethod(“Update”,inpSet,outset);