NetTalk Central

Author Topic: NotifyDeleteSession and file names  (Read 3233 times)

Keith

  • Sr. Member
  • ****
  • Posts: 306
    • View Profile
    • Email
NotifyDeleteSession and file names
« on: July 20, 2014, 05:36:20 PM »
I have declared a file name as !GLO:ScenariosFileName in the dictionary because the file will be in a different folder based on User.  The variable GLO:ScenariosFileName is 'Threaded' and I set it up in the WebHandler ProcessLink embed point - I'm pretty sure that this is the correct practice and it seems to work ok when I log on as different users the files in the various User folders are correctly accessed and updated.

However, in the WebHandler NotifyDeleteSession I noticed that the Scenarios file could not be opened because of an 'Invalid File Name' (this is where I have coded the deletion of the temporary session records).  The code then worked fine after I had explicitly set the value of GLO:ScenariosFileName to what it should have been.

It looks as if GLO:ScenariosFileName  retains its value while the session has not timed out  - could some one tell me what may be going on here?

Thanks

Keith
Clarion 10.0.0 build 12799
NetTalk 9.31
StringTheory 2.65
InsightGraphing 2.27

Bruce

  • Global Moderator
  • Hero Member
  • *****
  • Posts: 11250
    • View Profile
Re: NotifyDeleteSession and file names
« Reply #1 on: July 21, 2014, 06:31:48 AM »
>> I have declared a file name as !GLO:ScenariosFileName in the dictionary because the file will be in a different folder based on User.  The variable GLO:ScenariosFileName is 'Threaded' and I set it up in the WebHandler ProcessLink embed point - I'm pretty sure that this is the correct practice and it seems to work ok when I log on as different users the files in the various User folders are correctly accessed and updated.

All sounds correct.

>> However, in the WebHandler NotifyDeleteSession I noticed that the Scenarios file could not be opened because of an 'Invalid File Name' (this is where I have coded the deletion of the temporary session records).  The code then worked fine after I had explicitly set the value of GLO:ScenariosFileName to what it should have been.

Correct, NotifyDeleteSession is not an incoming URL request, and hence it does not take a route through ProcessLink to get here. Indeed at this point _nothing_ session related, apart from the actual session ID, is available at this point.

>> It looks as if GLO:ScenariosFileName retains its value while the session has not timed out

no, this is an incorrect conclusion. GLO:ScenariosFileName is threaded (which is correct) and hence does not retain it's value at all.

cheers
Bruce

Keith

  • Sr. Member
  • ****
  • Posts: 306
    • View Profile
    • Email
Re: NotifyDeleteSession and file names
« Reply #2 on: July 21, 2014, 05:09:53 PM »
Bruce

Thanks, that's clearer now.  I didn't realise how the requests continued to rout thru ProcessLink.

One last question on this related to you comment:

>>GLO:ScenariosFileName is threaded (which is correct) and hence does not retain it's value at all.

 - what if the variable wasn't threaded what difference would that make?

Thanks

Keith
Clarion 10.0.0 build 12799
NetTalk 9.31
StringTheory 2.65
InsightGraphing 2.27

Bruce

  • Global Moderator
  • Hero Member
  • *****
  • Posts: 11250
    • View Profile
Re: NotifyDeleteSession and file names
« Reply #3 on: July 21, 2014, 10:08:19 PM »
>>  - what if the variable wasn't threaded what difference would that make?

Then every user would be using the same variable - and it would be overwritten with each incoming request. ie all the users would be sharing "all the files" and you'd have, what we in the trade call, a boo-boo. At this point you wouldn't need to worry about NotifyDeleteSession because absolutely everything would be completely broken.

cheers
Bruce