> Le 30 juin 2017 à 23:58, Kirk Brooks via 4D_Tech <4d_tech@lists.4d.com> a 
> écrit :
> 
> Hi folks,
> 
> I'm working on an old db. Like begun in v3/pre 4D server old. It has its
> own user scheme built in, no 4D users at all (or that matter here).
> 
> The issue is recognizing and tracking modified by/when data. [...]


Each time a process begins, I use an EoS (execute on server) method to write a 
process variable (an objet) in the twin. As the twin is also the process that 
executes the trigger, it will read user from that variable. 

3 methods:

a) on startup call User_infosSet
set some properties in c_object <>userInfo_o on client side (user PK, name, 
login, machine, ip address, etc.)

b) when a client process begins, always call User_infosSet_srv
this is the EoS method, it receives <>userInfo_o as $1 and makes a copy of it 
in a c_object userInfo_o on server side

c) when needed (client side, trigger…) call User_infosGet (property)
get some property in the object, 
 case of
   : client side
     read property in <>userInfo_o
   : server side (twin)
     read property in userInfo_o

Know issue:
- one more process variable on server
- never forget b) (as I sometimes do)

Besides that, the trigger knows the user. 

I can send the code if needed. 

-- 
Arnaud 



**********************************************************************
4D Internet Users Group (4D iNUG)
FAQ:  http://lists.4d.com/faqnug.html
Archive:  http://lists.4d.com/archives.html
Options: http://lists.4d.com/mailman/options/4d_tech
Unsub:  mailto:4d_tech-unsubscr...@lists.4d.com
**********************************************************************

Reply via email to