NetTalk Central

Author Topic: NotifyDeleteSession - what's available  (Read 3092 times)

Keith

  • Sr. Member
  • ****
  • Posts: 306
    • View Profile
    • Email
NotifyDeleteSession - what's available
« on: August 27, 2014, 03:07:23 PM »
Hi

I am using the !glo:FileName construct for file names in my dictionary to be able to separate user files based on login and populate the file name from a Control file in the ProcessLink procedure.  This all works fine.

I added a file which required 'cleaning up' at session end and wrote the code in NotifyDeleteSession but the glo:FileName variable and the session variable 'username' were null at this point.

The documentation says "The Session Id is available at this point in the self.SessionID property.  No other session values are available at this point in the code."

If this really is the case then it's not straightforward to delete the session data.  The standard 'file name' is constructed using, say, the 'username' session variable viz:

    GLO:ScenariosFileName = clip(Con:filePath) & p_web.GSV('username') & '\Scenarios.tps'

if CON:FilePath is 'D:\GreatApplication\' and the users are Fred, Mary and Jane then the data stores are:


D:\GreatApplication\Fred\Scenarios.tps
D:\GreatApplication\Mary\Scenarios.tps
D:\GreatApplication\Jane\Scenarios.tps

If the session variable 'username' is not available at the 'clean up' point then I would probably need to store the session id and 'username' in another file in order to be able to retrieve it so that I could delete data from the correct file.

Is my analysis correct and is this what has to be done if you are implementing multiple file stores (one per user)?

Thanks

Keith
Clarion 10.0.0 build 12799
NetTalk 9.31
StringTheory 2.65
InsightGraphing 2.27

kevin plummer

  • Hero Member
  • *****
  • Posts: 1195
    • View Profile
    • Production Accounting and Software Payroll
Re: NotifyDeleteSession - what's available
« Reply #1 on: August 27, 2014, 05:14:00 PM »
correct - you would need to keep your own table or just use the sessionID as the file name not the username.

Keith

  • Sr. Member
  • ****
  • Posts: 306
    • View Profile
    • Email
Re: NotifyDeleteSession - what's available
« Reply #2 on: August 27, 2014, 05:35:14 PM »
Thanks Kevin for the clarification.

Keith
Clarion 10.0.0 build 12799
NetTalk 9.31
StringTheory 2.65
InsightGraphing 2.27