Bookshelf Home | Contents | Index | PDF |
Siebel Advisor API Reference > Siebel-Specific Functions for Siebel Advisor > SendSelectionInformationToServerUsageUse the SendSelectionInformationToServer function to post specified data to a business service and method. NOTE: To use this function, you need to write a business service and a method on that service. You can use this function to create a variety of integration points with other applications as follows:
SyntaxSendSelectionInformationToServer(service, method, prodStr, enableLinkback, optArgs) ExampleTo send the model and year of your car along with product and state information, call the function as follows: var optArgs = new Object(); This call will automatically extract product information from the data model since auto is true. It will also create a linkback string for the current state of the pageset. The linkback string can then be used to open the pageset in this state. Using the CDA Service Broker in the ISSCDA RT UI ServiceYou can call the CDAServiceBroker method in the ISSCDA RT UI Service to have the client receive a confirmation response after it posts a request to a business service using SendSelectionInformationToServer(). The CDA Service Broker in the ISSCDA RT UI business service acts as a broker to:
The following examples illustrate how to accomplish these tasks using the CDA Service Broker. To invoke the CDA Service Broker, you must set the following parameters in the SendSelectionInformationToServer function: Service="ISSCDA RT UI Service" Example 1CDANoReturnUse this parameter when no confirmation is needed from the server business component. argObj["CDAExternalServiceName"] = "My Business Service"; argObj["CDAExternalMethodName"] = "My Business Service Method"; OL.SendSelectionInformationToServer("ISSCDA RT UI Service", "CDAServiceBroker", "auto", true, argObj); Example 2CDAReturnValueThis parameter requests the business service to select a value from the output property set and return it to the client. argObj["CDAExternalServiceName"] = "My Business Service"; argObj["CDAExternalMethodName"] = "My Business Service Method"; argObj["CDAReturnValue"]= "ReturnName"; OL.SendSelectionInformationToServer("ISSCDA RT UI Service", "CDAServiceBroker", "auto", true, argObj); In this example, the client specifies CDAReturnValue=ReturnName. After successful execution of the method, the client can retrieve the returned property value from ReturnName. Example 3CDAReturnHandlerIf you need to retrieve the entire output property set from the server, you can build a property set handler for the client side. The name of the property set handler is passed to the server side to process the property set object. The ISSCDA RT UI Service reconstructs the property set into JavaScript objects and sends it back to the client. argObj["CDAExternalServiceName"] = "My Business Service"; argObj["CDAExternalMethodName"] = "My Business Service Method"; argObj["CDAReturnHandler"]= OL.FrameToString(window)+'.alertEvent'); OL.SendSelectionInformationToServer("ISSCDA RT UI Service", "CDAServiceBroker", "auto", true, argObj); for (bFirst = true; (arg = ps.EnumProperties (bFirst)) != null; bFirst = false) alert("Empty PropertySet in function alertEvent"); NOTE: The JavaScript object constructed from the server side code uses the constructor (which resides in the propset.js) in the SWE script. Be sure to include this script in the file where the property set handler is in your JavaScript. Example 4Null valueIf you use a null value for optArgs, the CDA Service Broker retrieves the default property set name from the repository. The default name is defined in the Siebel repository under the ReturnPropertyName in the user property of the business service CDA RT UI Service. The CDA Service Broker calls the specified business service using the default property set name. If the default property set name in the specified business service exists in the return output property set, it will be returned to the client. argObj["CDAExternalServiceName"] = "My Business Service"; argObj["CDAExternalMethodName"] = "My Business Service Method"; OL.SendSelectionInformationToServer("ISSCDA RT UI Service", "CDAServiceBroker", "auto", true); |
Siebel Advisor API Reference | Copyright © 2013, Oracle and/or its affiliates. All rights reserved. Legal Notices. | |