Access session variable from other module

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?

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.