How To get detailed Log for using Snipper Code for RSTT, Pricing, EAI


Copy Below code in below mentioned Business Service which you want to snip as per your requirement.
Compile it and perform your scenario.
Log will created in Logs folder

  • Row Set Transformation Toolkit
  • Remote Complex Object Instance Service
  • Pricing Manager
  • EAI Siebel Adapter

PreInvoke Method
function Service_PreInvokeMethod (MethodName, Inputs, Outputs)
{
PropertySetToFile(Inputs, “..\\LOG\\RowSetInputs.log”, (“Inputs to: ” + MethodName));
return (ContinueOperation);
}
function PropertySetToFile (PropSet, fileName, title)
{
var file = Clib.fopen(fileName, “at”);
LogData((“\n—————————————————“), file);
LogData((“Start Process  ” + Clib.asctime(Clib.gmtime(Clib.time()))), file);
LogData(title, file);
LogData(“PROVIDED PROPERTY SET”, file);
WritePropertySet(PropSet, file, 0);
Clib.fclose(file);
return (CancelOperation);
}
function WritePropertySet(PropSet, file, Level)
{
if ((Level == “”) || (typeof(Level) == “undefined”))
{
Level = 0;
}
var indent = “”;
for (var x = 0; x < Level; x++)
{
indent += “\t”;
}
var psType = PropSet.GetType();
var psValue = PropSet.GetValue();
LogData((indent + “Type: ” + psType + ” Value: ” + psValue), file);
var propName = PropSet.GetFirstProperty();
while (propName != “”)
{
var propValue = PropSet.GetProperty(propName);
LogData((indent + propName + ” = ” + propValue), file);
propName = PropSet.GetNextProperty();
}
var children = PropSet.GetChildCount();
for (var x = 0; x < children; x++)
{
LogData(( indent + “CHILD PROPERTY SET ” + x), file);
WritePropertySet(PropSet.GetChild(x), file, (Level + 1));
}
}
function LogData(DataString, file)
{
try
{
Clib.fputs((DataString + “\n”), file);
Clib.fflush(file);
}
catch (e)
{
// no action
}
}
Invoke Method
function Service_InvokeMethod (MethodName, Inputs, Outputs)
{
PropertySetToFile(Outputs, “..\\LOG\\RowSetOutputs.log”, (“Outputs from: ” + MethodName));
}

Advertisements


Categories: Siebel

Tags: , , , , , , , , , , , , , , , , , , , , , , , ,

Leave a Reply

Fill in your details below or click an icon to log in:

WordPress.com Logo

You are commenting using your WordPress.com account. Log Out / Change )

Twitter picture

You are commenting using your Twitter account. Log Out / Change )

Facebook photo

You are commenting using your Facebook account. Log Out / Change )

Google+ photo

You are commenting using your Google+ account. Log Out / Change )

Connecting to %s

%d bloggers like this: