Bookshelf Home | Contents | Index | Search | PDF |
Siebel Object Interfaces Reference > Interfaces Reference > Business Service Events >
Service_InvokeMethod
The InvokeMethod event is called after the InvokeMethod method is called on a business service.
Server Script Syntax
Service_InvokeMethod(methodName, InputArguments, OutputArguments)
Browser Script Syntax
OutputArguments=oService.InvokeMethod(methodName, InputArguments)
Returns
Not applicable
Usage
Although this event does not return a value, it may add properties to, or alter the values of the properties in, the property set OutputArguments.
When you invoke business service methods through Browser Script, the business service may be implemented as a browser-based business service (written in JavaScript) or a server-based business service. Initially, the High Interactivity mode framework checks if the business service resides in the browser, and if it does not find it, it sends the request to the server for execution.
NOTE: Browser Script may invoke a browser-based or server-based business service, but Server Script can only invoke a server-based business service.
NOTE: Although the InvokeMethod function does not return a value in Server Script, it may modify the properties in the OutputArguments property set.
Used With
Browser Script, Server Script
Example
This Browser Script example invokes the Shipping Engine business service created in Service_PreInvokeMethod in response to a button click. The InvokeMethod property on the Button is set to "CalcShipping". It gets values from the keyboard through prompts (JavaScript method), passes a property set to the service, and gets return values by means of another property set.
function Applet_PreInvokeMethod (name, inputPropSet)
{
if (name == "CalcShipping") {
var svc = theApplication().GetService("Shipping Engine");
var inputs = theApplication().NewPropertySet();
var outputs = theApplication().NewPropertySet();var size = prompt("Enter the sum of H+W+D in inches");
var shipper = prompt("Enter the shipping company");
var weight = prompt("Enter the shipping weight in pounds");with (inputs) {
SetProperty ("Size", size);
SetProperty ("Shipping Company", shipper);
SetProperty ("Ship Method", shipMethod);
SetProperty ("Weight", weight);
}outputs = svc.InvokeMethod("CalculateShipping", inputs);
var cost = outputs.GetProperty("Cost");
var delDate = outputs.GetProperty("Delivery Date");TheApplication().SWEAlert ("Shipping by " + shipper + ":\n Shipping Cost is " +
cost + ",\n Estimated delivery date is " +
delDate);return (CancelOperation);
}
else
return (ContinueOperation);
}
See Also
Bookshelf Home | Contents | Index | Search | PDF |
Siebel Object Interfaces Reference Published: 18 June 2003 |