Page 1 of 1

keep-alive

Posted: Tue Oct 04, 2016 6:54 am
by JPG
Hi,
In our sessions we are using Keep-Alive and it works properly.

However, we have processes that can only be runned interactively and usually exceed the stablished time, so the Keep-Alive solution didn't work properly and it finish our session.

What kind of solutions can we find?

Tks

Re: keep-alive

Posted: Tue Oct 04, 2016 9:26 am
by emhill
Here is one solution we use. Create a hidden button on your screen called "btnRefresh" or whatever you like. Bind the button to a response indicator. We usually use the same name as the id so the response indicator would be "btnRefresh". Then we added a timeout script to the onload event. When the timeout is reached the system automatically clicks the "btnRefresh" button. In the RPG program when the btnRefresh indicator is on we just re-display the screen.

Add this script to the onload event of your screen:

=================================================
if (window.timeOutId === null||typeof(window.timeOutId)=="undefined") {
window.timeOutId = setTimeout(function() {
pui.click("btnRefresh");
}, 3000000);
}else {
clearTimeout(window.timeOutId);
window.timeOutId = setTimeout(function() {
pui.click("btnRefresh");
}, 3000000);
=================================================

The 3000000 is the number of milliseconds to delay until clicking the refresh button.

In addition to this you will need to add the following script to the onsubmit event:

=================================================
clearTimeout(window.timeOutId);
=================================================

This will "delete" the timeout running from the onload so it does not continue to run on other screens.

This may not be the best solution but it does work for us when we want a screen to stay active all the time.

Hope this helps a little.

Re: keep-alive

Posted: Wed Oct 05, 2016 5:13 am
by JPG
The solution is not good for our process.
In our screen we have a button that launches different interactive processes.
The script code seems to work when this screen is displayed but has not been done click the button. Once you click the button, they are running different programs and by exceeding the set time the session ends again.

Re: keep-alive

Posted: Mon Oct 10, 2016 2:57 pm
by Scott Klement
So the problem is occurring while the browser is waiting for the next screen to display?

That sounds like a bug in Profound UI. If you are not already on the current version (5.6.1) please update and see if that solves the problem, as we've fixed a number of things related to this already. If you are already on 5.6.1 and still experience this problem, then please open a support ticket.