Topic
9 replies Latest Post - ‏2014-10-29T17:29:57Z by JamesCole
JamesCole
JamesCole
10 Posts
ACCEPTED ANSWER

Pinned topic Display a running system message

‏2014-05-28T10:21:59Z |

Hi All,

Is there a way to display the messages when the system is running?

An example would be:

Display a screen and fill in the details, press a button/enter which then submits a report/job.

The system is now running showing system X, with a message (see attached screen shot). Therefore, as the system is running the mouse icon changes to a busy symbol, but a new screen is not recognised until the system has stopped the processing.

I have tried the AJAX option, but it did not appear the display the message.

 

Many Thanks in advance

James

  • JamesCole
    JamesCole
    10 Posts
    ACCEPTED ANSWER

    Re: Display a running system message

    ‏2014-06-02T15:37:34Z  in response to JamesCole

    Hi All, 

    Just to update this thread - I managed to get the message to display if I use the server update (deprecated). However, the HATS screen is not updated when the message disappears.

     

    Any suggestions? Also, it would be good if it worked using AJAX.

    Many Thanks

    James

    • tmparker
      tmparker
      516 Posts
      ACCEPTED ANSWER

      Re: Display a running system message

      ‏2014-06-02T22:16:11Z  in response to JamesCole

      Hi James,

      Normally in a HATS web project the browser should be in the waiting state when HATS is processing screens and there is an X-SYSTEM message.  It would be similar to any other webpage you use where you submit some data and it takes a few seconds for the web app to respond with the results, such as when you purchase something on a website and there is a few second delay before the credit card transaction is approved and the webpage updates.  I'm not sure why you want to show the X-SYSTEM to a user since they shouldn't really be aware of what is going on in the background from the host side of things.  As you can see, you get yourself into another problem since HATS will now be displaying a page to the user that was only temporary and not intended for them in the first place.  I guess I'm just not clear as to the purpose of doing this in the first place.  Can you explain this a little more?

      Thanks
      Tim

      • JamesCole
        JamesCole
        10 Posts
        ACCEPTED ANSWER

        Re: Display a running system message

        ‏2014-06-03T08:29:20Z  in response to tmparker

        Hi Tim, 

        Thanks for the response.

        So to clarify the screen shot was just one example, where it is used on a standard IBM Web Query screen. In this case, when the server is stopped a message is sent and that needs to be sent to the user otherwise, they might not be sure something is happening. If they were to click refresh on the browser, it would being up a HATS busy screen, which is worse.

        There are other examples where the user might enter some information and then a System X message says 'submitting report to batch'. Therefore, it is key to display this message and then refresh the screen automatically, which might now be on the same screen or a different one. In your shopping example, I would want to display a message that said 'processing transaction', which would then change to order processed. (so processing messages would be displayed)

         

        Hope this makes sense.

        Any suggestions?

         

        Many Thanks in advance

        James

        • tmparker
          tmparker
          516 Posts
          ACCEPTED ANSWER

          Re: Display a running system message

          ‏2014-06-03T18:50:34Z  in response to JamesCole

          The only way to have host changes reflected automatically is to use the Ajax auto-refresh feature.  If you want to handle a change not based on a host screen update you would need to add code to do that yourself.  This would still be some type of Ajax update mechanism.  That is how it works on pages such as the shopping example when an order is processed and updated without user interaction.  HATS has built in functionality that you can see in the JavaScript for handling these updates sent down from the server.  If you want to create custom updates for your own purposes you would need to implement something similar.

          Thanks
          Tim

          • JamesCole
            JamesCole
            10 Posts
            ACCEPTED ANSWER

            Re: Display a running system message

            ‏2014-08-20T13:37:21Z  in response to tmparker

            Hi Tim,

            Thanks for the update. Please could you point me to the JavaScript that is handling these updates?

             

            Is that any documentation on extending the HATS ajax functionality?

            The problem is that the ajax is not updating the screen when it is in system wait mode however, it will work from the server applet option. Is there any other settings that could be changed like OIA to pick up the message?

            Thanks

            James

             

            • tmparker
              tmparker
              516 Posts
              ACCEPTED ANSWER

              Re: Display a running system message

              ‏2014-08-21T15:57:47Z  in response to JamesCole

              Hi James,

              Are you talking about the host being in a system wait state, X-SYSTEM message, or a system locked state like when the user types incorrect data in a field and the keyboard becomes locked?  You really shouldn't ever see a system wait state because HATS should not be returning anything while we are waiting for the host to process.  I'm just a little confused what you are seeing and what you are trying to show.

              Thanks
              Tim

              • JamesCole
                JamesCole
                10 Posts
                ACCEPTED ANSWER

                Re: Display a running system message

                ‏2014-08-27T12:42:14Z  in response to tmparker

                Hi Tim, 

                Thanks for the reply. I will try to clarify, with one example.

                On an IBM Web Query AS/400 screen, I can take an option 1 on an input field. When I press enter the system goes in system wait (X-SYSTEM message) and displays a message that the HTTP Server is being shut down and tells me what is happening. When the system has finished processing the message is removed from the screen, but the screen has not changed.

                If I access the same page through a HATS web page, after pressing enter the message is not returned. The message can be displayed for a couple of minutes on the as/400, with the user not sure whether anything is happening from HATS. The underlying screen will be the same screen. Therefore how does the user know when he can carry on working with screen without the message?

                If I use the ajax option, the system message is not displayed at all. However, if I use the server option the system running message is returned, but never cleared. 

                Therefore, I appreciate that I might have to do some custom coding for the x-system message (not locked) but I would like to display the message in system wait and then have it removed once it has finished, system returned.

                Hope this makes sense.

                Thanks

                James

                 

                • tmparker
                  tmparker
                  516 Posts
                  ACCEPTED ANSWER

                  Re: Display a running system message

                  ‏2014-10-29T16:51:27Z  in response to JamesCole

                  Hi James,

                  Sorry for the long delay in figuring this out.  I know you have a PMR on this issue as well, and I have updated it with the answer, but I wanted to post it for the benefit of others should they have this same issue.

                  We know the OIA is locked initially after the screen changes and never updates with a new page on the client side so the heartbeat never starts to do the Ajax refresh.  The reason this happens is due to the oiaLockMaxWait value on the connection.  By default this value is set to 300 seconds, 5 minutes.  You can find the details in the InfoCenter here, http://pic.dhe.ibm.com/infocenter/hatshelp/v90/topic/com.ibm.hats.doc/doc/ugsettle.htm

                  As a result, the application is getting stuck in this wait period.  I added the parameter to my connection and set it to 2000ms to test and sure enough the page updated and showed the message you were looking for.

                  In the <class name="com.ibm.hats.common.NextScreenSettings"> section of the connection document I added this line <setting name="oiaLockMaxWait" value="2000"/>.  You can set this to whatever amount of time they want to meet your needs.

                  Thanks
                  Tim

                  • JamesCole
                    JamesCole
                    10 Posts
                    ACCEPTED ANSWER

                    Re: Display a running system message

                    ‏2014-10-29T17:29:57Z  in response to tmparker

                    Hi Tim, 

                    Thanks for taking to time to investigate and get back to me. I also appreciate the detailed answer and it works a treat :-)

                    Thanks again 

                    James