Bookshelf Home | Contents | Index | PDF |
Siebel Object Interfaces Reference > Interfaces Reference > Business Service Events > Service_PreInvokeMethod EventThe PreInvokeMethod event is called before a specialized method on the business service is invoked. Server Script SyntaxService_PreInvokeMethod(MethodName, InputArguments, OutputArguments)
Browser Script SyntaxService_PreInvokeMethod(name, inputPropSet) NOTE: In Browser Script, output property sets are not supported for this event. Returns"ContinueOperation" or "CancelOperation" UsageThe Server Script version of this event is used for the following:
The Browser Script version is used for the following:
NOTE: The Browser Script version is not intended to perform business logic, and does not return an output property set. Figure 7 illustrates the differences in how standard and custom business service methods are handled. With a standard method, the script can intercept Method in the Service_PreInvokeMethod event and take any necessary custom actions before the C++ code is executed. The C++ code then executes, setting values in the outputs as defined by the service code. If the C++ code executes successfully, the Service_InvokeMethod event can be used to inspect the outputs, modify them if necessary, or perform other tasks dependent on the successful completion of the C++ code. At that point, the calling function regains control of the script execution. With a custom method, the script can intercept Method in the Service_PreInvokeMethod event and take any necessary custom actions. The script must return CancelOperation. CancelOperation tells the Siebel application to cancel the remaining operations associated with the event. If not canceled, the code flow would continue to the C++ code, which does not have the ability to handle the custom method, and would therefore throw an "Unknown method name" error (indicated by X in Figure 7). Because the method invocation is canceled, the Service_InvokeMethod event is not executed (indicated by X in Figure 7). Used WithExampleThis Siebel VB example sets properties in a new Shipping Engine business service: Function Service_PreInvokeMethod (MethodName As String, Inputs As PropertySet, Outputs As PropertySet) As Integer If MethodName = "CalculateShipping" Then Dim sShipper As String, sShipMethod As String iReturn = ContinueOperation Select Case sShipper Case "Airline" Case "Ground" sCost = Format(dCost, "Currency") Service_PreInvokeMethod = iReturn Related Topic |
Siebel Object Interfaces Reference | Copyright © 2008, Oracle. All rights reserved. | |