Siebel Business Service Part-4
In this post I will discuss on how to create a business service.
How to create a BS in Siebel Tools
How to create a BS in Siebel Tools
•Lock
the project on which BS should be based on
•Select
the
Business Services object in the Tools Object Explorer.
•Right-click, and
then choose New Record.(Ctrl+N)
•Type a
name of
the BS in the
Name field of the new business service and Select the Project.
•Choose
the appropriate class
Data transformation – CSSEAIDTEScriptService class.
Other business services - CSSService class.
Data transformation – CSSEAIDTEScriptService class.
Other business services - CSSService class.
Defining
a Method for BS
•With
the business
service selected in Siebel Tools, expand the Business Service tree in the
Object Explorer,
and then select Business Service Method.
•Right-click, and
then choose New Record.
•Type
the
name of the method in the Name field of the new method.
Defining
Method Arguments…
•With
your business service method selected in Siebel Tools, expand the Business
Service Method
tree in
the Object Explorer, and then select Business Service Method Args.
•Right-click, and
then choose New Record.
•Type the
name of the argument in the Name field of the new method argument record.
•Enter
the
data type in the Data Type field.
•Check
the
Optional check box if you do not want the argument to be required for the method.
Business
Service Script
•select
the
business service for which script is to be written.
•Right-click, and
then choose Edit Server Scripts.
•The
Siebel Script Editor appears.
Select either
Siebel eScript or
Visual Basic for your scripting language. Select Service_PreInvokedMethod as
the event handler.
Type
in the script
into the Script Editor
function Service_PreInvokeMethod (MethodName, Inputs, Outputs)
{
try{
if(MethodName
== "Resubmit SR")
{//Start
of "MethodName" if block
var
SRBusObj = TheApplication().GetBusObject("Service Request");
var SRBusCom =
SRBusObj.GetBusComp("Service Request");
var
sSrNum = Inputs.GetProperty("SR Number");
with(SRBusCom)
{//Strat of
With Block
InvokeMethod("SetAdminMode","TRUE");
SetViewMode(AllView);
ActivateField("Status");
ClearToQuery();
SetSearchSpec("SR Number", sSrNum);
ExecuteQuery(ForwardOnly);
var isRec=FirstRecord();
while(isRec)
{//Start of While block
SetFieldValue("Status",
"Created");
WriteRecord();
SetFieldValue("Status","Submitted");
WriteRecord();
isRec=NextRecord();
}//End of While block
}//End of With Block
return (CancelOperation);
}//End of
"MethodName" if block
return (ContinueOperation);
}//End of try Block
catch(e)
{
TheApplication().RaiseErrorText(e.toString());
}
finally
{
isRec = null;
SRBusObj = null;
SRBusCom = null;
}
}
You
have successfully created a BS in Siebel Tools... Next post I will show
how to create a BS in Siebel Application (Client Side)... Stay Tunned
Comments
Post a Comment