• If this is your first visit, be sure to check out the FAQ by clicking the link above. You may have to register before you can post: click the register link above to proceed. To start viewing messages, select the forum that you want to visit from the selection below.

Announcement

Collapse
No announcement yet.

Push Message

Collapse
X
 
  • Filter
  • Time
  • Show
Clear All
new posts

  • Push Message

    Hi,
    I have a task to create an UI asking for some parameters via a few combo-boxes and a submit button. When an user selects valid values from the combo-boxes and pressed submit, the backend RPG will submit a job to produce data. The submitted job may run for a while, so I would like to provide a status update back to the browser. Because the processing job is a submit job, the ajax callback would not work. Is there a way for the backend program to PUSH message to an app?
    Thanks,

  • #2
    In order to push messages to the browser you would need to implement a "socket" connection. In your case though, you could implement a simpler solution. Allow your job to be submitted and immediately send back a success response. Upon your receiving your response, you can startup an Ext.TaskManager to make a backend call every XXX seconds. You would need to code a new backend procedure to send back the status of your job....maybe it just returns a true or false to indicate if the job is completed. Once completed (thus it returns back a success of true)....then you can stop the TaskManager from running.

    Comment


    • #3
      Thanks Sean for the idea.
      I think I would create a log file with session ID as key and then keep logging entries from the submitted job. The TaskManager would then be able to fetch the log entries from the log file during it's run time.

      Comment


      • #4
        Alternatively, if your submitted job knows the session ID then it could use vvUtility_saveSessVar() to update the status on the process (i.e., with a variable called BATCH_STATUS or something like that), then have your Valence program use vvUtility_getSessVar() to retrieve BATCH_STATUS to update the progress bar or status window. That way it's automatically cleaned up when the session ends.

        -Rob

        Comment


        • #5
          Thanks Robert for this idea.
          I think this may work better than the TaskManager with a log file in my case.
          Last edited by Dleong@celsinc.com; 03-22-2017, 02:06 PM.

          Comment

          Working...
          X