4D v16.3

WEB Get session process count

Home

 
4D v16.3
WEB Get session process count

WEB Get session process count 


 

WEB Get session process count ( sessionID ) -> Function result 
Parameter Type   Description
sessionID  Text in Session UUID
Function result  Longint in Number of processes attached to the session

The WEB Get session process count command returns the number of running processes attached to the session whose UUID you passed in sessionID.

This command is added in the context of the Handling of 4D Mobile sessions by programming feature introduced in 4D v15 R4. It is mainly designed to count the number of processes run by a 4D Mobile session.

  • For a 4D Mobile session, this command returns the actual number of processes. A 4D Mobile session can run several processes.
  • For a regular Web session, this command always return 1 (one Web session = one process).

Example  

You want to store information on the current 4D Mobile session in arrays:

 C_TEXT($sessionID)
 C_LONGINT($count)
 C_DATE($expDate)
 C_TIME($expTime)
 
 $sessionID:=WEB Get Current Session ID
 $count:=WEB Get session process count($sessionID)
 WEB GET SESSION EXPIRATION($sessionID;$expDate;$expTime)
 
 APPEND TO ARRAY($aTimestamp;String(Current date)+" "+String(Current time))
 APPEND TO ARRAY($aSessionUID;$sessionID)
 APPEND TO ARRAY($aNbProcesses;$count)
 APPEND TO ARRAY($aExpirationDate;$expDate)
 APPEND TO ARRAY($aExpirationTime;$expTime)



See also 

Web Sessions Management

 
PROPERTIES 

Product: 4D
Theme: Web Server
Number: 1350

This command can be run in preemptive processes

 
HISTORY 

Created: 4D v15 R4

 
ARTICLE USAGE

4D Language Reference ( 4D v16)
4D Language Reference ( 4D v16.1)
4D Language Reference ( 4D v16.2)
4D Language Reference ( 4D v16.3)