Configuring Siebel Open UI > Customizing Siebel Open UI > Doing General Customization Tasks >

Allowing Users to Interact with Clients During Business Service Calls


The user cannot interact with the client during a synchronous request to a business service until the client receives the reply for this request from the Siebel Server. However, the user can interact with the client while it is waiting for a reply during an asynchronous request. This topic describes how to write JavaScript code so that it sends an asynchronous request that allows the user to continue to use the client without interruption during the call. You use the following code to specify an asynchronous call:

async = true or false

For example, the following code makes an asynchronous request:

async = true

To view an example presentation model that includes more than one instance of enabling and disabling an asynchronous call, download the msgbrdcstpmsync.js file, and then search this file for the following string:

lpsca.async

To get a copy of this file, see Article ID 1494998.1 on My Oracle Support.

For more information, see About Synchronous and Asynchronous Requests.

To allow users to interact with clients during business service calls

  1. Use a JavaScript editor to open the presentation model that you must modify.
  2. Locate the ExecuteMethod that calls the business service that you must modify.

    Siebel Open UI uses the ExecuteMethod method to call a business service. For more information, see ExecuteMethod Method.

  3. Add the following code to the AddMethod call that you located in Step 2:

    var service = SiebelApp.S_App.GetService("service_name");
    var inPropSet = SiebelApp.S_App.NewPropertySet ();
    // set all the input arguments through inPropSet.SetProperty("property_name",
    "property_value")
    var outPropSet;
    if(service){
      var config = {};
      config.async = true;
      config.scope = this;
      config.cb = function(){
        outPropSet = arguments[2];
        if (outPropSet!== null){
          output_property_set
        }
      }
      service.InvokeMethod ("method_name", inPropSet, config);
    }

    where:

    • inPropSet.SetProperty allows you to add input arguments to the business service on the Siebel Server.
    • service_name is the name of a business service that Siebel Open UI must call.
    • config.async is set to true.
    • config.scope = this attaches a scope to the callback function so that you are not required to use var that=this to resolve the scope. For more information, see Coding Callback Methods.
    • method_name is the name of a business service method that resides in the business service that you specify in service_name.
    • output_property_set is the name of the property set that Siebel Open UI uses to store the output of this asynchronous call.

      For example, the following code creates an asynchronous call to create a list of quotes:

    var service = SiebelApp.S_App.GetService("Create Quote Service");
    var inPropSet = SiebelApp.S_App.NewPropertySet ();
    var outPropSet;
    if(service){
      var config = {};
      config.async = true;
      config.scope = this;
      config.cb = function(){
        outPropSet = arguments[2];
        if (outPropSet!== null){
          quoteList
        }
      
      service.InvokeMethod ("Create Quote", inPropSet, config);
    }

    where:

    • quoteList is an output property set that contains a list of quotes that Siebel Open UI gets from the Create Quote business service method.
Configuring Siebel Open UI Copyright © 2013, Oracle and/or its affiliates. All rights reserved. Legal Notices.