The
obvious way would be opening that session by id and setting EndSession=1, however it might not work every time since the session object is locked by its owner process.
1.
There is is query
SessionInfo in class %CSP.Session, which returns some AllowEndSession flag, however, I don't know if it's of any use
Set rs = ##class(%ResultSet).%New("%CSP.Session:SessionInfo")
w rs.Execute()
w rs.Next()
w rs.Get("ID")
DLnrk47Qyg
w rs.Get("AllowEndSession")
0
2. If you could find the ID of the process which the session belongs to, you could end the process by
$System.Process.Terminate(Process ID)
However, I could not find a clear way to connect the session with process, maybe because one session could be used by different processes sequentualy
Maybe the
%CSP.Session:SessionInfo
%SYS.LockQuery
%SYS.ProcessQuery
could be of help to you, but for some reason, doing
Set rs = ##class(%ResultSet).%New("%SYS.LockQuery:List")
Do rs.Execute()
While rs.Next() { Write rs.Get("LockString"),! }
does not return the session lock reference, while it's cleary there in Portal Page, which is strange
I'm pretty sure that a dive into actual globals containing session info could solve this
3. You might want to ask this question at
community.intersystems.com, since these mail lists are not very active
среда, 31 марта 2021 г. в 22:22:23 UTC+7, Michoel Reach: