Siebel – Automatic User Logout
by Nitin JainLogging out a user automatically, when the user does not explicitly logoff.
This one came up as a request from NP on GeeksBlogging@dotCOM. I believe this would possibly be a very frequent issue and a common problem in almost all the Siebel Installations. The users generally come from a Sales background. They hardly care how they actually close the Siebel Application. In most cases, they just press the (X) button on top of the Browser window, rather than explicitly selecting File -> Logout.
In this case, though the Browser is closed, the session parameters in the server, and the Database Connection remains open. This is a major issue in many of Siebel Development Environments.
Here we explain how to get around it. I have been working on multiple solutions regarding this. But, following is the most elegant one I found. In Siebel Communications, if you look at the Server Architecture carefully, you would notice that there is a Business Service in Siebel Tools, “Communications Client” which does all the magic. You can add the following Server Script to the Service_PreInvokeMethod this Business Service.
I have tried adding some comments at appropriate places in the code. Let me know how it works.
function Service_PreInvokeMethod (MethodName, Inputs, Outputs)
{
/* “ShellUIExit” is the method that is called at the time of exit from the Siebel UI */
if (MethodName == “ShellUIExit”)
{
var bs_CommSvr = TheApplication().GetService(“Communications Client”);
var ps_inp = TheApplication().NewPropertySet();
var ps_out = TheApplication().NewPropertySet();
var m_pValue;
m_pValue = Inputs.GetProperty(“m_pMediaStatusMgr”);
if (m_pValue !=”")
{
/* A user could potentially have multiple sessions open from the same machine. This is an added check for security purposes. */
bs_CommSvr.InvokeMethod(“IsTheLastSession”, ps_inp, ps_out);
var Is_Last = ps_out.GetProperty(“LastSession”);
if (Is_Last == “1″)
bs_CommSvr.InvokeMethod(“LogOutCommandName”, ps_inp, ps_out);
}
}
return (ContinueOperation);
}
In case this is not working, I would like to know your views on the topic.
Further research underway, I will keep updating this post.
Related posts:
- Siebel – Forcing User Logoff Hi all, Somebody recently asked me if there is a...
- Siebel – DefaultFocus – User Property In Siebel Application, whenever you navigate to a screen, the...
- Siebel – Fetch Active view properties – III I will discuss a practical example, and the corresponding Inputs...
- Siebel – getMilliseconds() usage Siebel by default displays all dates in the system accurate...
- Siebel – InvokeServiceMethod() on Calculated Fields InvokeServiceMethod() is used to invoke Business Services and take values...
- Siebel – millisecond dates on Applet I had discussed in my previous posts about invoking a...
- Siebel – Fetch Active view properties Hi, Working on a typical requirement recently, I came across...
hey great..
We were having this problem since a very long time in our system. We will definitely try this.
thanks mate!
You are welcome, David! Glad it helped. Cheers..
Nitin,
Even i am facing the same problem.
i wil try it .
thnx for the post
regards
Naren
Nitin,
Can you pls explian more about Inpurt parameter “m_pMediaStatusMgr”. From where will system get this parameter value?
Thanks,
NP
To be honest, not very sure, NP.
Just pulled this out from somewhere. But, I guess you are right. Let’s do some more research around this. I will let you know if I find something more.
A very simple workaround is published on support web for this
check this out:
https://support.oracle.com/CSP/main/article?cmd=show&type=NOT&id=757036.1
you do the hard work when you don’t know the easier way to do it … isn’t
Great solution, Tejeshwer!
For those still in doldrums, the “My Oracle Support” Link posted by TJ above points to an article which supports Browser scripting the Application Level object, to detect the pressing of (X) and calling the appropriate Application Level method.
Definitely makes things simpler since we most of us would know about the Application Object, rather than the Communications Client Service as in the post above!
Thanks, TJ.
The solution discussed in the blog works for all scenarios (e.g., user logs out from the app using File Logout or closing the browser).
Ensure the following line calls the command “LogOut” for the communications client to work.
bs_CommSvr.InvokeMethod(”LogOut”, ps_inp, ps_out);
hi, i’m narendra,
i’m new to siebel…
will u people please tell me some important concepts , so that it can help me in learning quickly
Hi,
Will this work for Siebel Call center and Version 7.8.2?
Thanks in advance
Bhavana
Hi Bhavana,
Actually this was developed for v7.8 itself. So, it should work fine, I assume.
Do give it a shot and let us know !
Cheers ..
Hi,
Any idea how to ristrict multiple user session in Siebel. I want one user should open 2 sessions only. if he opens more than 2 session, message should pop up ‘mexmium session limit reached’.
Thanks!