Accessing another process's object variables properties like %session and %request.
Hi Community,
I am trying to access another process's content of objects like %request and %session. I am using the class/method "%SYS.ProcessQuery:VariableByPid". Does anyone knows how to get the value of the properties like %request.Data("ID",1) from one process that is running on the DB server?
Example of what I am trying to do:
set rs=##class(%ResultSet).%New("%SYS.ProcessQuery:VariableByPid")
set tsc=rs.Execute(ProcessID,"%request")
while rs.%Next() {
w "Name:"_$g(rs.Data("Name")),!
w "Value:"_$g(rs.Data("Value")),!
}
do rs.Close()
Output:
Name:%request
Value:1@%CSP.Request
I just can see the object reference 1@%CSP.Request, I am not sure if we have a way to check the object properties.
Kind Regards,
Daniel
What do you want to achieve?
Hi Eduard,
I need to investigate system performance issues and I am planning to log useful information about the process that are inside the array Data of %request and %session objects. Things like user name, Id's and etc.
I hope it makes sense.
Kind Regards,
Daniel
You can use %CSP.SessionEvents for that.