Bookshelf Home | Contents | Index | Search | PDF | ![]() ![]() ![]() ![]() |
Siebel Interactive Designer API Reference > Siebel-Specific Functions > SendSelectionInformationToServer >
Using the CDA Service Broker in the ISSCDA RT UI Service
You 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:
- Call another business service
- Accept information from that business service
- Return a confirmation response back to the client
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"
Method="CDAServiceBroker"
Example 1
CDANoReturn
Use this parameter when no confirmation is needed from the server business component.
argObj["CDAExternalServiceName"] = "My Business Service";
argObj["CDAExternalMethodName"] = "My Business Service Method";
argObj["CDANoReturn"]= "";
OL.SendSelectionInformationToServer("ISSCDA RT UI Service", "CDAServiceBroker", "auto", true, argObj);
Example 2
CDAReturnValue
This 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 3
CDAReturnHandler
If 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);
function alertEvent(ps)
{
if (ps != null)
{
for (bFirst = true; (arg = ps.EnumProperties (bFirst)) != null; bFirst = false)
{
value = ps.GetProperty (arg);
alert(arg + "=" + value);
}
}
else
{
alert("Empty PropertySet in function alertEvent");
}
} </script>
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 4
Null value
If 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);
Bookshelf Home | Contents | Index | Search | PDF | ![]() ![]() ![]() ![]() |
Siebel Interactive Designer API Reference Published: 18 April 2003 |