cancel
Showing results for 
Search instead for 
Did you mean: 

How to query session variables from the BP database

IvanLaureys
Level 2

Hi all,

Would any of you know how we can query the dynamic session variables (and value of course) from the BP tables ?  I would expect some table linked with table BPASession, but can't find it.

In the BPASessionLog_... table, we can trace when a session variable value is changed, but that's not enough to get its initial value, and is also not very efficient...  I guess there must be another place where BP handles those values.  Thanks for your help !

3 REPLIES 3

John__Carter
Staff
Staff

I don't think session variables have their own table or field in the database; the initial value will be part of the process XML, like a standard data item. What's your use case, what are you trying to do?

IvanLaureys
Level 2

Thank you John for your answer.

We have built long time ago an activity dashboard with resources, running scripts, pending cases, high rate exceptions and some alerts, all based on DB queries, it runs fine for years. 
Querying on a specific session variable value would help to raise an extra alert on some processes with specific behavior.
I would have thought that the current value of a session variable is saved when changed, but possibly it is only kept in memory along the session indeed... Then I guess I can forget about getting this value anyhow I am afraid... Thanks again for your help !

John__Carter
Staff
Staff

Yeah I'm pretty sure they are in memory.

One way to do what you want would be to adapt your automation to recognise a change in SV value and push out a signal, but this is probably far too much effort. 

Another option would be to use the HTTP vars command to get session variables for a session ID. But again, probably too much work for the small benefit it would bring.