Another Progress programming tidbit - how to write a Vantage Ti

Lonnie,

QUOTE: "using PSTimer to perform a timed shutdown of Vantage with the
Progress "Quit" statement... the Progress "Quit" statement may reduce the
chance of database corruption when terminating Vantage."

This is the method my original ClientTimeOut used to function. Yes this
works, the problem with this is that it performs a hard close (terminating a
program window with the possiblity of a dialog window open, I think this is
what results the error message) partial transactions are not completed or
handled correctly, resulting in possible incomplete open records in the
database. This is why when a dialog window is up on the screen you can not
access other vantage windows because of the way Progress handles them. So
be very careful with it.

The last mouse move or keyboard entry is a tricky thing. If you minimize
Vantage, then go work in excel or something else, Vantage would not be
considered idle because the mouse and keyboard are still in use. Using
keyboard traps within Progress to capture this information resulted in the
system getting hung up on the WAIT commands. I'm still trying to find
something in this manner that will work as I can still get false readings on
the timeout if a user sits in a text editor field typing away for a long
period of time (past the timeout setting).

I came up with another method that works better than applying the QUIT
command. The idea was to use a macro of mouse clicks like AutoIT and
GroundControl do, have it go through the Vantage windows on a users desktop
and click on the close/cancel button or file-exit menu of each of the
windows. This would act like a user doing this themselves and then follow
along Vantage's natural track of programming procedures of backing out of
transactions. The hard part was reading each users desktop for all
Progress/Vantage windows, obtaining their location (since a user could move
a window or even minimize it), dynamically creating the macro of mouse
clicks which to apply to those windows in order. Then it was just a matter
of executing it and presto, a complete client side version of ClientTimeOut
that results without any error messages to the user screen and without any
possible incomplete records to the database (unless there is a bug in
Epicor's code). It also assures that the Vantage license is freed up
correctly because Vantage was closed from its own menu option. Now add the
timeout setting to be defined by the Vantage user ID and you can have a
dynamic timeout setting that changes per user logged in. Now add an IP chat
program to it and run a manager program from you desk that can poll/chat
with any client (without requiring a vantage license), check what idle time
is reported at that session, and trigger my timeout from the manager
program. Applying this same chat method back to the server allows you to
communicate with Promon from a workstation and use the Progress Proshut
function from your desk to kill a vantage session that way. (Down side with
this is that you get the error messages that the Progress Client Time Out
function to appear on the workstation. I hate error messages. You could
run an application in the background of the client workstation that monitors
for these error message and process a macro of mouse clicks to them and the
user only sees a quick flash of the message on the screen as the macro
clicks through them.)

Some ideas I'm still playing around with are the idea of adding/using the
Progress Proshut chat from the Client timeout app and have the clients kill
themselves at the server. An auto bump, where you can set a percentage like
75% and if a user tries to login and all licenses are in use, have the
program chat out to all other workstations and if a workstation has a
vantage session that is idle for more that the percentage of the bump
setting, fire the timeout early closing that session and allowing the other
user to login.



-----Original Message-----
From: Lonnie Drew [mailto:lonniedrew@...]
Sent: Friday, May 14, 2004 3:20 PM
To: vantage@yahoogroups.com
Subject: [Vantage] Another Progress programming tidbit - how to write a
Vantage Timeout Routine...


The other day while testing the Progress PSTimer OCX, I launched a
hidden Progress program from a VTG/MFG file, which then launched
Vantage.

The calling program continued in the background, using PSTimer to
perform a timed shutdown of Vantage with the Progress "Quit"
statement.

The importance of this....only 1 message resulted, as opposed to
other methods .... the Progress "Quit" statement may reduce the
chance of database corruption when terminating Vantage.

I thought it was interesting and deserves a close look.

All you would need is a function to return time of last mouse
movement or keyboard input, and you could easily design a control
program in Progress and assign variable times to each workstation.

If I decide to write and test, I'll upload it to files section.

Have a good weekend!




Useful links for the Yahoo!Groups Vantage Board are: ( Note: You must have
already linked your email address to a yahoo id to enable access. )
(1) To access the Files Section of our Yahoo!Group for Report Builder and
Crystal Reports and other 'goodies', please goto:
http://groups.yahoo.com/group/vantage/files/.
(2) To search through old msg's goto:
http://groups.yahoo.com/group/vantage/messages
(3) To view links to Vendors that provide Vantage services goto:
http://groups.yahoo.com/group/vantage/links
Yahoo! Groups Links
The other day while testing the Progress PSTimer OCX, I launched a
hidden Progress program from a VTG/MFG file, which then launched
Vantage.

The calling program continued in the background, using PSTimer to
perform a timed shutdown of Vantage with the Progress "Quit"
statement.

The importance of this....only 1 message resulted, as opposed to
other methods .... the Progress "Quit" statement may reduce the
chance of database corruption when terminating Vantage.

I thought it was interesting and deserves a close look.

All you would need is a function to return time of last mouse
movement or keyboard input, and you could easily design a control
program in Progress and assign variable times to each workstation.

If I decide to write and test, I'll upload it to files section.

Have a good weekend!