You can store information in the storage of various session types, such as Client/Server, Web, or Mobile, allowing for easy reuse across different processes.
Now, in 4D 20 R6, you can access the storage of a specific session. This enhancement enables users to easily maintain the continuity and consistency of information across multiple sessions of the same user. Imagine being able to pull up the same customer record across different applications such as Client/Server or Web.
New command
The new command “Session storage by id” returns the storage object of the session ID given.
$storage:=Session storage by id($id)
For example, from another session, to modify a text in the storage of the session defined by the ID:
#DECLARE($id : Text; $text : Text)
var $obj : Object
$obj:=Session storage by ID($id)
If($obj.settings=Null)
Use($obj)
$obj.settings:=New shared object("text"; $text)
End use
Else
Use($obj.settings)
$obj.settings.text:=$text
End use
End if
To see the HDI Get Session Storage in action, you can watch the accompanying video and download it yourself to explore its capabilities.
Real-life case
You have a Client/Server application and have extended certain functionalities with Qodly. The exchange of information between these different sessions is essential to enabling users to move easily from one platform to the other.
- To ensure a secure sharing of data, it is crucial to have robust authentication measures in place to confirm the identity of the connected user.
- In addition, the “Get process activity” command provides a list of users and their corresponding session IDs, enabling efficient tracking and management of user sessions.
- Then, use shared objects and the “Sesssion storage by ID” command to reflect changes in session storage across other sessions of the same user. So, a cohesive and synchronized user experience can be achieved.
Next
For more insights on user session management, please refer to the documentation.
You can participate in the conversation on our forum if you have any queries or feedback.