The WEB Session commands have been adapted to 4D Mobile session. Now, you can save the results of a query or an inter-process variable related to a given 4D Mobile session. For example, with new handling of 4D Mobile sessions, you can manage the cart of your users.
For information, 4D Mobile sessions and Web sessions are two different kinds of sessions. A Web session can run only one Web process (both are merged). A 4D Mobile session can run several Web processes; each Web process can have its own context (selections, variables, etc.).
- The WEB Get Current Session ID command now returns the UUID associated with the current 4D Mobile session.
- The WEB GET SESSION EXPIRATION command returns expiration information related to the cookie of a 4D Mobile session. The same cookie is used for all processes attached to a 4D Mobile session.
- The WEB CLOSE SESSION command closes the 4D Mobile session whose ID is passed in sessionID. Since a 4D Mobile session can handle several processes, this command actually requests all related Web processes to terminate their execution.
We have also added a new command:
- The new WEB Get session process count command allows you to find out the number of existing processes related to a given session.
An example database is available to demonstrate the new functionality.
For more details, please take a look at the 4D v15 R4 upgrade manual.