Enhancement of Get process activity command

Automatically translated from English

The Get process activity command, added with 4D v16 R4, makes it possible to retrieve a list of running processes and connected users. With 4D v16 R5 we’ve further enhanced the command to make parsing the results easier. In addition to that, a new systemID attribute has been added to uniquely identify any process, whatever its type: user, 4D or spare.

Database example

Easy parsing

To provide even more flexibility when calling Get process activity, a new session object is now included as part of the processes collection. This lets you easily retrieve session information, like the user name for example, from a given process using object notation.

C_OBJECT($o)
C_LONGINT($i)
 
$o:=Get process activity   // Get process & session info
 
For ($i;0;($o.processes.length)-1)   // Iterate over the "processes" collection 
  $processName:=$o.processes[$i].name
 
$userName:=String($o.processes[$i].session.userName)  // Easy access to userName, use String() because session object might be undefined
End for

Process System ID

The Get process activity command now returns a new systemID attribute for the objects of the processes collection. Allowing you to uniquely identify any process: user process, 4D process or spare process.

Please note that the same systemID is also used in the “4DRequestsLog.txt” and “4DRequestsLog_ProcessInfo.txt” log files. See the documentation about logs for more details.

Caroline Briaud

• 4D Product Team Leader •

Caroline joined 4D SAS in July, 2013 as an Engineering Manager responsible for new features definition. Caroline helped the Engineering team to put in place the R-release concept, with the new development process definition and its application within 4D’s engineering teams.Caroline is now leading the 4D Product team, mainly made up of Product Owners which are representing the customers within Engineering.

Caroline started her career as a software developer in the mobile phone industry. She specialized in program management with an American company in an international context spread across US, India and China.