Access session variable from other module

Access session variable from other module

  
Hi all,

I have a session variable in Module A,
And I need to access this variable in Module B.
I read about the consumers and producers.
So I set Module A Is User Provider to be yes, and Module B User Provider eSpace to be Module A.
My question is: How can I access the session variable that exist in Module A, in an action that exist in Module B?

Thanks,
Shirly

Hi Shirly,

Create a public action in Module A which will read the session value and return , now consume this action in Module B to get the session value.

Module A- Public Action GetSessionValue() (inside this action read the session value and assign it in outparameter)

ModuleB- take reference of Module A public action GetSession() and get the return value.


Regards
-PJ-



hi 
 
1) create a Aplication with name PublicActions
2) Create a module with name Actions
3) Create the "variables global session" in Session
4) Create a SetSessionVariabel()
5) Create an input variable in this function VarSessionVariabel call that will receive the name of the session variable and one with ValSessionVariable that will receive the value of the session variable
6) create a public action function with name GetSessionVariabel ()
7) create a VarSessionVariabel input variable that will receive the session variablename and an output variable with the name of ValSessionVariabel that will get the session value and return to the caller.

thats'it

View Example https://gyndaniel.outsystemscloud.com/Actions/HomePage.aspx