Alpha Software Mobile Development Tools:   Alpha Anywhere    |   Alpha TransForm subscribe to our YouTube Channel  Follow Us on LinkedIn  Follow Us on Twitter  Follow Us on Facebook

Announcement

Collapse

The Alpha Software Forum Participation Guidelines

The Alpha Software Forum is a free forum created for Alpha Software Developer Community to ask for help, exchange ideas, and share solutions. Alpha Software strives to create an environment where all members of the community can feel safe to participate. In order to ensure the Alpha Software Forum is a place where all feel welcome, forum participants are expected to behave as follows:
  • Be professional in your conduct
  • Be kind to others
  • Be constructive when giving feedback
  • Be open to new ideas and suggestions
  • Stay on topic


Be sure all comments and threads you post are respectful. Posts that contain any of the following content will be considered a violation of your agreement as a member of the Alpha Software Forum Community and will be moderated:
  • Spam.
  • Vulgar language.
  • Quotes from private conversations without permission, including pricing and other sales related discussions.
  • Personal attacks, insults, or subtle put-downs.
  • Harassment, bullying, threatening, mocking, shaming, or deriding anyone.
  • Sexist, racist, homophobic, transphobic, ableist, or otherwise discriminatory jokes and language.
  • Sexually explicit or violent material, links, or language.
  • Pirated, hacked, or copyright-infringing material.
  • Encouraging of others to engage in the above behaviors.


If a thread or post is found to contain any of the content outlined above, a moderator may choose to take one of the following actions:
  • Remove the Post or Thread - the content is removed from the forum.
  • Place the User in Moderation - all posts and new threads must be approved by a moderator before they are posted.
  • Temporarily Ban the User - user is banned from forum for a period of time.
  • Permanently Ban the User - user is permanently banned from the forum.


Moderators may also rename posts and threads if they are too generic or do not property reflect the content.

Moderators may move threads if they have been posted in the incorrect forum.

Threads/Posts questioning specific moderator decisions or actions (such as "why was a user banned?") are not allowed and will be removed.

The owners of Alpha Software Corporation (Forum Owner) reserve the right to remove, edit, move, or close any thread for any reason; or ban any forum member without notice, reason, or explanation.

Community members are encouraged to click the "Report Post" icon in the lower left of a given post if they feel the post is in violation of the rules. This will alert the Moderators to take a look.

Alpha Software Corporation may amend the guidelines from time to time and may also vary the procedures it sets out where appropriate in a particular case. Your agreement to comply with the guidelines will be deemed agreement to any changes to it.



Bonus TIPS for Successful Posting

Try a Search First
It is highly recommended that a Search be done on your topic before posting, as many questions have been answered in prior posts. As with any search engine, the shorter the search term, the more "hits" will be returned, but the more specific the search term is, the greater the relevance of those "hits". Searching for "table" might well return every message on the board while "tablesum" would greatly restrict the number of messages returned.

When you do post
First, make sure you are posting your question in the correct forum. For example, if you post an issue regarding Desktop applications on the Mobile & Browser Applications board , not only will your question not be seen by the appropriate audience, it may also be removed or relocated.

The more detail you provide about your problem or question, the more likely someone is to understand your request and be able to help. A sample database with a minimum of records (and its support files, zipped together) will make it much easier to diagnose issues with your application. Screen shots of error messages are especially helpful.

When explaining how to reproduce your problem, please be as detailed as possible. Describe every step, click-by-click and keypress-by-keypress. Otherwise when others try to duplicate your problem, they may do something slightly different and end up with different results.

A note about attachments
You may only attach one file to each message. Attachment file size is limited to 2MB. If you need to include several files, you may do so by zipping them into a single archive.

If you forgot to attach your files to your post, please do NOT create a new thread. Instead, reply to your original message and attach the file there.

When attaching screen shots, it is best to attach an image file (.BMP, .JPG, .GIF, .PNG, etc.) or a zip file of several images, as opposed to a Word document containing the screen shots. Because Word documents are prone to viruses, many message board users will not open your Word file, therefore limiting their ability to help you.

Similarly, if you are uploading a zipped archive, you should simply create a .ZIP file and not a self-extracting .EXE as many users will not run your EXE file.
See more
See less

Login/Logout of Alpha technical question

Collapse
X
 
  • Filter
  • Time
  • Show
Clear All
new posts

    Login/Logout of Alpha technical question

    This is related to an earlier post about how to prevent more than one login to Alpha by a user (on different computers, for example).

    I already developed the technique to mark a user logged in when they open Alpha with their credentials (handled by the autoexec.scp) and mark a user logged out when they exit via the Main Menu using the Exit button.

    The question I have for anyone who has ever dealt with this capability: How do you let a user go back in to Alpha with their credentials after the computer shut down while in a session of Alpha? There is no mechanism I can think of that would mark the flag in the login file as logged out when there is a power failure, computer crash, or equivalent while the user is logged in to Alpha. I suspect it's impossible to control this. I provided an administrator with the ability to log out (i.e., update the flag) for all or selected users who experience a problem getting back in after a crash or unplanned shutdown.

    To take this even further, if you have any experience with Citrix, especially the shared desktop version, I was amazed to find out that after a timeout condition, meaning the Citrix user has been idle for, in this case, 20 minutes, when the user re-enters Citrix the Alpha session was ended -- there are no signs of an opened Alpha. Obviously, Citrix just shuts down applications when it times out. But in this case, where I depend on an orderly exit via the button on the Main Menu, the command to update the user's flag to logged out was not touched. Therefore, the user can't get back in to Alpha unless a separate mechanism is used to mark the user as logged out.

    Both of these are situations that make it impractical to use a login/logout approach. I bet this is not solvable, but if you have an answer, I would love to hear about it.

    Thank you.

    Jeff

    #2
    Re: Login/Logout of Alpha technical question

    where I depend on an orderly exit via the button on the Main Menu
    Possibly using code registered via CAN_DATABASE_EXIT() would be a more reliable way to log them out?
    There can be only one.

    Comment


      #3
      Re: Login/Logout of Alpha technical question

      Originally posted by Stan Mathews View Post
      Possibly using code registered via CAN_DATABASE_EXIT() would be a more reliable way to log them out?
      Regardless of the way it is set up to return the flag to logged out, this is not what I'm asking about. I'm saying that if a computer crashes while a user is in Alpha, is there a way to get the flag back to logged out. If the computer crashes, then CAN_DATABASE_EXIT() has no effect.

      Comment


        #4
        Re: Login/Logout of Alpha technical question

        I was amazed to find out that after a timeout condition, meaning the Citrix user has been idle for, in this case, 20 minutes, when the user re-enters Citrix the Alpha session was ended
        I took this to mean that Citrix closed all open applications much like windows does when wanting to reboot after an update. That shutdown should trigger the can_database_exit().
        There can be only one.

        Comment


          #5
          Re: Login/Logout of Alpha technical question

          Originally posted by Stan Mathews View Post
          I took this to mean that Citrix closed all open applications much like windows does when wanting to reboot after an update. That shutdown should trigger the can_database_exit().
          I'll test this assertion and, if true, you have solved part of the problem -- a significant part.

          The other part is when there is a crash, where the shutdown is not orderly. But I'm anxious to see about this can_database_exit approach for Citrix.

          Thanks. I'll let you know what I find.

          Jeff

          Comment


            #6
            Re: Login/Logout of Alpha technical question

            Jeff, if its worth the effort you can build your own times out routine for each form. Could be set to time out and close the app before Citrix shuts down. Stan's idea would be easier if it works.

            I think a crash is a crash. Don't know how to update persistent storage when someone yanks the plug out of the wall (so to speak).

            Comment


              #7
              Re: Login/Logout of Alpha technical question

              Originally posted by Tom Cone Jr View Post
              Jeff, if its worth the effort you can build your own times out routine for each form. Could be set to time out and close the app before Citrix shuts down. Stan's idea would be easier if it works.

              I think a crash is a crash. Don't know how to update persistent storage when someone yanks the plug out of the wall (so to speak).
              Tom, I know what you're saying about timing out a form, but the users all have their own way of working with the app and it would be impossible to know how to time a shutdown.

              Thanks.

              Jeff

              Comment


                #8
                Re: Login/Logout of Alpha technical question

                I wasn't thinking of timing out all the workstations at once, just those that have been idle, with Alpha running. Would your users object to having to reload Alpha if it were to be shut down on their workstation after 15 min of idleness? what if you didn't shut it down, but simply "logged them out", forcing them to log in again, but not having to reload Alpha itself?

                Comment


                  #9
                  Re: Login/Logout of Alpha technical question

                  Originally posted by Tom Cone Jr View Post
                  I wasn't thinking of timing out all the workstations at once, just those that have been idle, with Alpha running. Would your users object to having to reload Alpha if it were to be shut down on their workstation after 15 min of idleness? what if you didn't shut it down, but simply "logged them out", forcing them to log in again, but not having to reload Alpha itself?
                  Actually, I did some testing of Stan's idea to use the CanDatabaseClose instead of the way I had it set on the exit button. I tested whether Citrix session apps are closed in an orderly fashion after timing out. It turns out that Stan has it right, that Citrix shuts down the way Windows would shut down an application, and CanDatabaseClose does the trick. So this solves the problem for Citrix.

                  Thank you, Stan.

                  I don't think an unplanned crash or shutdown would allow CanDatabaseClose to work for restoring the flag to logged out, but I will at least test a ctrl-alt-delete to see what happens.

                  Thanks.

                  Jeff

                  Comment


                    #10
                    Re: Login/Logout of Alpha technical question

                    Hi Jeff,

                    If there is actually only one Alpha Five program window on a machine (which can be determined by XBasic), and a file created during login has an earlier create date than when that Alpha Five window was started (Can be a global time variable created in autoexec), then you know that it previously crashed. On a normal exit, delete the file.
                    Regards,

                    Ira J. Perlow
                    Computer Systems Design


                    CSDA A5 Products
                    New - Free CSDA DiagInfo - v1.39, 30 Apr 2013
                    CSDA Barcode Functions

                    CSDA Code Utility
                    CSDA Screen Capture


                    Comment


                      #11
                      Re: Login/Logout of Alpha technical question

                      Originally posted by csda1 View Post
                      Hi Jeff,

                      If there is actually only one Alpha Five program window on a machine (which can be determined by XBasic), and a file created during login has an earlier create date than when that Alpha Five window was started (Can be a global time variable created in autoexec), then you know that it previously crashed. On a normal exit, delete the file.
                      Ira, that's an interesting concept, where time comparisons can be used to sense crashes vs normal shutdowns. Thanks for that gem.

                      Jeff

                      Comment


                        #12
                        Re: Login/Logout of Alpha technical question

                        to expand on Ira's idea..

                        assign a guid to a global variable when Alpha starts, build the file named with the guid, record any info you want in the file.

                        Delete the file when Alpha shuts down normally.

                        If the file still exists after it shouldn't then you know you had a abend.

                        If you build an audit trail and include the 'session' quid you'll know what happened in that session..
                        Al Buchholz
                        Bookwood Systems, LTD
                        Weekly QReportBuilder Webinars Thursday 1 pm CST

                        Occam's Razor - KISS
                        Normalize till it hurts - De-normalize till it works.
                        Advice offered and questions asked in the spirit of learning how to fish is better than someone giving you a fish.
                        When we triage a problem it is much easier to read sample systems than to read a mind.
                        "Make it as simple as possible, but not simpler."
                        Albert Einstein

                        http://www.iadn.com/images/media/iadn_member.png

                        Comment


                          #13
                          Re: Login/Logout of Alpha technical question

                          Just a thought:
                          1. Add a javascript timer on the client side. The timer can be set to ping the user's field in a table with a timestamp.
                          2. On the server-side, every now and then (e.g. 5 minutes) you can check to see if the TABLE value has a recent TIMESTAMP and the SESSION exists (if you've stored session info in the table).
                          3. Bottom line: if the timestamp isn't recent (e.g. 15 minutes or your own timeout value) then you can consider the original session dead and reset it. Also... if the related session is gone then clearly the main Alpha timeout has occurred or the server was restarted. Either way... that's a reset.
                          4. Of course, you can also add a button that says "log me out" where it will kill other sessions.


                          I'm working on a "persistent 2-week login for UX components" and some other login variants for my own situation so I'm mucking around with logins myself.

                          Comment


                            #14
                            Re: Login/Logout of Alpha technical question

                            Originally posted by parkjammer View Post
                            Just a thought:
                            1. Add a javascript timer on the client side. The timer can be set to ping the user's field in a table with a timestamp.
                            2. On the server-side, every now and then (e.g. 5 minutes) you can check to see if the TABLE value has a recent TIMESTAMP and the SESSION exists (if you've stored session info in the table).
                            3. Bottom line: if the timestamp isn't recent (e.g. 15 minutes or your own timeout value) then you can consider the original session dead and reset it. Also... if the related session is gone then clearly the main Alpha timeout has occurred or the server was restarted. Either way... that's a reset.
                            4. Of course, you can also add a button that says "log me out" where it will kill other sessions.


                            I'm working on a "persistent 2-week login for UX components" and some other login variants for my own situation so I'm mucking around with logins myself.
                            Allan

                            Are you considering this a hybrid (desktop with web components) ?

                            I believe the original question is related to a desktop system.
                            Al Buchholz
                            Bookwood Systems, LTD
                            Weekly QReportBuilder Webinars Thursday 1 pm CST

                            Occam's Razor - KISS
                            Normalize till it hurts - De-normalize till it works.
                            Advice offered and questions asked in the spirit of learning how to fish is better than someone giving you a fish.
                            When we triage a problem it is much easier to read sample systems than to read a mind.
                            "Make it as simple as possible, but not simpler."
                            Albert Einstein

                            http://www.iadn.com/images/media/iadn_member.png

                            Comment


                              #15
                              Re: Login/Logout of Alpha technical question

                              I entered the thread via a search from the mobile section (v12). Didn't realize it was purely desktop-centric. However, my apps are cross platform (desktop, Android, iOS) so I use the UX components and javascript all the time even for pure browser apps.

                              Comment

                              Working...
                              X