Monday, April 25, 2011

Deploy Integration Object to runtime DB

This Functionality has been introduced in Siebel 8.1

Pre Siebel 8.1 the only way to solve this problem was to have SRF Change. In Siebel 8.1 world here is what we can do to avoid SRF change
  1. Opened Siebel Tools by connecting to Production Repository.
  2. Made the change to the Integration Object
  3. Right Click and Deploy to runtime
If you are still getting the same error as that of before i.e prior modification of IO then issue could be of clear the cache and the only way to do it is have a server restart.

Follow these steps after deploying the IO:
  1. Go To Administration – Web Service (either Inbound or Outbound)
  2. Click on Clear Cache button
  3. You are done
Yes, it is as simple as that. I did notice one thing that if you EAI Object manager is not used heavily than you might not require this.

Thursday, April 14, 2011

How to Read SOAP Response In siebel

function ReadResponse(psInput,psOutput)


{

//******************************************************

// Description: The purpose of this function is to read the



incoming response XML from middleware and check for success/error.



//**********************************************************

var psParent;

var psChild;

//var psInCopy = TheApplication().NewPropertySet();





try {

var isSuccess =

true;

psParent = TheApplication ().NewPropertySet ();

psParent = psInput;

var iChildCount = psParent.GetChildCount();



psChild =

TheApplication ().NewPropertySet ();

//var strLevelType = psParent.GetType();

//var strLevel ="";

var isTraversing = true;

var iChild = 0

var

strResponseType;

var strErrorCode = "";

var strErrorMessage = "";

var strErrorSeverity = "";

var blnIsErrorDetail = false;

while ((isTraversing)

&& (iChildCount > 0) && (iChild < iChildCount)) {

psChild = psParent.GetChild(iChild);

iChild++;

//strLevelType

= psChild.GetType();

// *** UNCOMMENT TO TRACE *********

// TheApplication().Trace("(" + iChild + "/" + + iChildCount + ") " + strLevelType);

//*******************************************************



// check for parent tags to force drill down to specific child tags

// if

(psChild.GetType() == "CustomerInfoAccessResponse") {

if ((psChild.GetType() == "CustomerInfoAccessResponse")

(psChild.GetType() == "PayLoad")



(psChild.GetType() == "Operation")

(psChild.GetType() == "Output")

((psChild.GetType() == "ErrorMessage") && (blnIsErrorDetail))) {

if

(psChild.GetType() == "Output") {

blnIsErrorDetail = true;

}

psParent = psChild;



iChildCount = psParent.GetChildCount();

iChild = 0;

// check for tags to get values

} else if

(psChild.GetType() == "ResponseType") {

strResponseType = psChild.GetValue();

if (strResponseType != "ACK") {



isSuccess = false;

}

} else if (psChild.GetType() == "ErrorMessage") {

// this tag is used 2

ways - as parent and child-value - ignore error

try {

strErrorMessage = strErrorMessage + psChild.GetValue();



} catch(e) {}

} else if (psChild.GetType() == "ErrorCode") {

strErrorCode = psChild.GetValue();

} else

if (psChild.GetType() == "ErrorDetailMessage") {

strErrorMessage = strErrorMessage + "; Detail: " + psChild.GetValue();

} else

if (psChild.GetType() == "ErrorSeverity") {

strErrorSeverity = psChild.GetValue();

}

}





psOutput.SetProperty("WMService","getOpportunityByReservation");

if (isSuccess) {

psOutput.SetProperty("Error Message",strErrorMessage);



psOutput.SetProperty("Response","Success");

psOutput.SetProperty("ErrorCode","None");

psOutput.SetProperty("ErrorApp","None");



psOutput.SetProperty("DisplayMsgCode","ACK");



// KCS -08/28/06-added code here to parse inputs and update the outputs

//

either removing the Status property or changing the value of the

// status property.

} else {

psOutput.SetProperty("Error

Message",strErrorMessage);

psOutput.SetProperty("Response","Error");

psOutput.SetProperty("ErrorCode",strErrorCode);



psOutput.SetProperty("ErrorApp",strErrorSeverity);

//psOutput.SetProperty("DisplayMsgCode",strResponseType);



psOutput.SetProperty("DisplayMsgCode","Dta01");

}



} catch(e) {

throw(e);

} finally {

psParent = null;

psChild = null;

}

}



How to create a VBC without Script - XML Gateway

Key Points:


• Using XML Gateway Business Service to serve the VBC

• Using Business Integration Manager (Server Request) as Transport Protocol

• Create your own workflow to deal with the logic


Architecture:


• VBC trigger XML Gateway: Init(), Query(), etc

XML Gateway generates xml files corresponding to the command. Eg. It generates xml file







Contact







Matching Init() command

• XML Gateway triggers Business Integration Manager to invoke SendReceive() method



• Business Integration Manager sends the xml files generated by XML Gateway to Workflow



• Workflow gets the xml file and passes it to external application like MQ Series, MSMQ, HTTP Web Application or processes it inside the Siebel



• Workflow gets the result xml file from external application or Siebel Application and passes it back to Business Integration Manager (BIM)



• BIM receives the result xml file and passes back to XML Gateway to populate the VBC







Points of configuration:



• Create a BC of Class CSSBCVExtern



• Configure the above BC with following user properties

Service Name: XML Gateway

Service Parameters: Transport=EAI Business Integration Manager (Server

Request);ProcessName=;



• Create a process property as type of binary/string. Set the default to . It will hold the xml file generated by XML Gateway



• Create a process property as type of binary and named . It will pass back to BIM and XML Gateway to populate the VBC



• Analyse the xml file generated by XML Gateway to determine what action to be taken. (Query, Insert…)



• Use XSLT to transform the result xml file to the format XML Gateway needs to populate the VBC




Sample Workflow Design





Workflow Process Properties





Step Type Method Business Service

SaveIncomingXML Business Service Send EAI File Transport

Input Argument Type Value Property name

Process Property IncomingXML

FileName Literal C:\XMLGateway.txt

AppendToFile Literal True











Step Type Method Business Service

Analyse Incoming XML Business Service Echo Workflow Utilities

Output Argument Type Value Property name

CheckPoint Expression InStr([&IncomingXML],"fields-req")













Step Type Method Business Service

Is Init Request? Decision Point

Branch Condition Expression

Is Init Condition (CheckPoint Greater Than('0'))

Not Init Default







Step Type Method Business Service

Get Init XML Response Business Service Receive EAI File Transport

Input Argument Type Value Property name

FileName Literal C:\TEMP\TestVBCInit.xml

Output Argument Type Value Argument name

Output Argument











Step Type Method Business Service

Analyse Incoming Query XML Business Service Echo Workflow Utilities

Output Argument Type Value Property name

CheckPoint Expression InStr([&IncomingXML], "query-req")













Step Type Method Business Service

Is Query Request? Decision Point

Branch Condition Expression

Is Query Condition (CheckPoint Greater Than('0'))

Not Query Default







Step Type Method Business Service

Get Query XML Response Business Service Receive EAI File Transport

Input Argument Type Value Property name

FileName Literal C:\TEMP\TestVBCQuery.xml

Output Argument Type Value Argument name

Output Argument





TestVBCQuery.xml











Mr.

Sara

Chan







TestVBCInit.xml