Terminate the application (develop using PB 12.5) after certain time of user inactivity.
We want to terminate our PowerBuilder 12.5 (PB12) application in the following scenario.
- If there is no user activity or no process (front-end / back-end) is getting executed for certain period of time then the system will terminate itself.
- While terminating the application, the system will close database connection(s) and opened screen(s).
- After termination, the system will display the login screen through which on successful login, the user will able to open the application once again.
To achieve the above goal we have write the following script
Script written in the application idle event
Following code in application login screen OK button
//Call idle event after 2 minutes of user inactivity
We have checked the above logic in PowerBuilder 5.0, and found ok.
But when we are testing it in PB 12 environment, we found that it is improperly terminating the application. Following are the scenario
- A report require 4 minutes to generate (require 4 minutes to display the data on the screen after click the retrieve button).
- Using the above report we have check the application termination logic.
- After click on the retrieve button for the above report we have not done any user activity (e.g. mouse movement, mouse click & keyboard activity etc) in the application.
- But we found that after 4 minutes system display the report data on the screen & immediately (within a fraction of second) terminate the application.
Our Perception of Idle process in PB 12.5
- It will behave like PowerBuilder 5.0 application.
- For the above scenario (report generation) system will start count the user inactivity time after display the report data on screen. Means system will terminate the application after 2 minutes of display the report data on screen
Request you to help me to resolve this issue.
Thanks & e-Regards