using aXes default screens in Longrange

Please do not use to report errors- use your regional help desk.
Please mark posts as being for RPG or RDMLX (LANSA) developer.
To subscribe by email, display this forum, scroll to the end and select ‘Subscribe Forum’.
Post Reply
dhnaigles
Posts: 28
Joined: Tue May 08, 2012 12:13 am

using aXes default screens in Longrange

Post by dhnaigles »

I know you can place "non-Longrange" aXes screens in a WebView in aXes, what happens when you leave that FormView containing the WebView? Is there a way to guarantee that you can "log off" the underlying aXes session? Otherwise, if the session remains active as an Interactive 5250 session, this may cause all sorts of locking issues for the system. Any way of forcing aXes to "destroy" the 5250 session when navigating to a different FormView?
Regards,

David
MarkDuignan
Posts: 346
Joined: Wed Apr 18, 2012 10:33 am

Re: using aXes default screens in Longrange

Post by MarkDuignan »

You can probably do this - but you may need to do some experimentation to get it to work.

First - a real and clean ‘logoff’ (ie: a proper managed 5250 sign off) is only possible if you are prepared to navigate the currently displayed 5250 screen programmatically or change the underlying 5250 application to support direct sign off operations (which people will rarely do IMO). eg: The user is logged on to a 5250 session on an BPCS Order Inquiry and is two levels down from the signoff menu item. So (for example) to cleanly logoff you may need to enter F12 twice and then enter menu option 90. Doing this is really overlapping into VLF-WEB-AXES-TS2-RAMP scripting territory. I don't think you are going to get that to work in a web page being exited because it is a series of asynchronous operations. RAMP has the same issues in VLF-WEB. That is why it has to disconnect the 5250 session - unlike VLF-WIN which can wait for the async operations to each complete or timeout.

So - assuming you are prepared to disconnect the 5250 session then axes has a disconnect operation. I would try out creating your own HTML container for the aXes 5250 session and embedd that in your web view - instead of embedding the aXes 5250 session directly into your web view. You may also just be able to use a web view directly from the LR menu (instead of a form view containing a web view).

The aXes advanced tutorial 1 (External Hosting) covers the types of techniques that you might use to open and close/kill the 5250 session. Here LongRange would be the outermost ‘external host’. I’m also assuming that some sort of HTML event allows you to trap the fact that you are moving away from your HTML page – it’s probably best to confirm that in a simple example before investing too much in anything else.

If you want to get into some RAMP like navigation of 5250 sessions then advanced tutorial 1 (External Hosting) and advanced tutorial 5 (Directing 5250 Screen Access) are probably worth reading.
MarkDuignan
Posts: 346
Joined: Wed Apr 18, 2012 10:33 am

Re: using aXes default screens in Longrange

Post by MarkDuignan »

Another advantage of using your own HTML container is that you can largely develop and test it on your PC using the Safari or Chrome web browsers. Generally it is a lot easier to debug HTML and JavaScript on a PC browser than in an iPad or iPhone browser.
dhnaigles
Posts: 28
Joined: Tue May 08, 2012 12:13 am

Re: using aXes default screens in Longrange

Post by dhnaigles »

I am using an external host with the webview embedded in the formview and having the axes session as a frame in the html page for this functionality. My question is how do I know in my embedded webview that I have switched to a different formview and need to "back out" of my axes session? I already have the external hosting JavaScript to handle the log off and destroy. I just need to know how to signal for it to begin.
Regards,

David
dhnaigles
Posts: 28
Joined: Tue May 08, 2012 12:13 am

Re: using aXes default screens in Longrange

Post by dhnaigles »

Would the onunload event be fired in the HTML when I navigate to a different formview?
Regards,

David
MarkDuignan
Posts: 346
Joined: Wed Apr 18, 2012 10:33 am

Re: using aXes default screens in Longrange

Post by MarkDuignan »

What HTML form/document level events did you try to handle to tell you you are leaving you page?

I'm not saying you can do this - I am just saying that you should experiment with the various HTML form/document ending events to see what (if any) fires.

Once you have one of those that works you can just possibly disconnect the session?
MarkDuignan
Posts: 346
Joined: Wed Apr 18, 2012 10:33 am

Re: using aXes default screens in Longrange

Post by MarkDuignan »

I don't know which one (if any) - I guess you should try them all in a little test page?
Post Reply