Siebel Communications Server Administration Guide > Configuring Advanced Communications Features > Configuring Communications Log In and Log Out >

Configuring Automatic Log Out Using Server Script


This section describes an example server script that will provide automatic log out for communications-enabled Siebel applications. This script will be invoked under certain circumstances to automatically log a user out of an ACD queue.

To configure this functionality, create a server script that overwrites the Service_PreInvokeMethod event for the ShellUIExit method of the Communications Client business service. The script uses the runtime events ApplicationUnload, WebLogout, and WebTimeout.

The ShellUIExit method may be triggered in any of the following cases:

  • The user logs out of the Siebel application by choosing File > Log Out from the application-level menu.
  • The user exits the browser.
  • The browser fails and the application timeout is reached.

Define the following server script to include this functionality:

function Service_PreInvokeMethod (MethodName, Inputs, Outputs)

{

if (MethodName == "ShellUIExit")

{

var CommSrvr_BS = TheApplication().GetService("Communications Client");

var ip = TheApplication().NewPropertySet();

var op = TheApplication().NewPropertySet();

var m_pValue;

m_pValue = Inputs.GetProperty("m_pMediaStatusMgr");

if (m_pValue !="")

{

CommSrvr_BS.InvokeMethod("IsTheLastSession", ip, op);

var bLast = op.GetProperty("LastSession");

if (bLast == "1")

{

CommSrvr_BS.InvokeMethod("LogOutCommandName", ip, op);

}

}

}

return (ContinueOperation);

}

For more information about Service_PreInvokeMethod, see Siebel Object Interfaces Reference. For more information about runtime events, see Siebel Personalization Administration Guide.

For more information about methods of the Communications Client business service, see Communications Client Methods.

Siebel Communications Server Administration Guide Copyright © 2006, Oracle. All rights reserved.