With EAI first word that comes to mind is integration. But domain of EAI is not limited to just integration with external application. It can help us in configuration also when used properly. The most common used EAI business Service is EAI Siebel Adapter which is used at lot of places. Recently it helped me to improve performance of code by 50%. Here is how?
For Document Generation over 190 fields fetched from over 10 different BC’s were to be set on Service Agreement BC.
This was being done through business service which used to query all the BC’s and store values in global variable and then in the end these global variables were used in function to set the field values of Service Agreement BC.
Because of large number of SetFieldValue statements (over 190 🙁 ) this business service used to take 15-20 seconds to complete.
Instead of using SetFieldValue we created a Siebel Message in the form of Property Set and used 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”>
<ServiceAgreement Field1=”Value1” Field2=”Value2”>
The Code to create the above the Property Set is as following
//Create 3 Property Sets
var AgreePS = TheApplication().NewPropertySet();
var ListAgreePS = TheApplication().NewPropertySet();
var AgreeDataPS = TheApplication().NewPropertySet();
//Make this of Type Siebel Message
//Set Necessary Properties
//Add List as Child of Siebel Message
//Add data to property set
//Finally Add Data to List
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”);
And we are done Instead of taking 20 seconds to complete this code now takes just 10 seconds to complete. EAI Siebel Adapter has come again to our saviour 🙂