Sharing Session variable through espace

My objective is very simple; I would like to be able to share "Session Variable" through espaces.

Some discussions exist on the subject and basically, I understood the "best" would be to save all that information in an Entity having Attributes for all the information I need to share.  

In order to go that way, I would need to identify each instance in the Entity with enough information enabling every module to find the information it is looking for.  

To do so, the information needed to look into the Entity needs to be available from each espace.  The first one we may think of, is the UserName which I assume is the same one from an espace to another.  

However, in order to be safer, I am looking to find another Information such as Logging Time or any specific ID that is available from any modules that is called after. 

Such a safer approach is to avoid the possibility of having a situation of for instance, two sessions opened simultaneously.   

By the way, any approach not requiring the use of an Entity is welcomed.  





.

 

Hi Pierre,

You can create an action that outputs the value of the session variable. You can call that action on other modules.

Regards,

Marcelo

Create Get methods which are public on each espace that needs to share the Session variables.