INVITE (single-device)

Category
Screen Building
Additional information
The INVITE operation is used to send a request for input to a display device and return to the program without waiting for input from the user. Before you run WebFacing applications that use the INVITE keyword, ensure that you have installed i5/OS® PTFs for WebFacing INVITE support. You may not need to use the INVITE keyword if your applications do not use asynchronous I/O. In this case, you can remove the INVITE keyword.

The WebFacing Tool supports the INVITE operation differently from 5250 devices. The main difference is that the READ operation timer is handled by the browser. This difference is due to the fact that an application can overwrite the screen records displayed on a 5250 display device, but cannot overwrite the page displayed in a browser without the browser giving control back to the application. Implementing the timer in the browser allows the browser to hand control back to the application when the timer expires.

The WebFacing Tool, by default, uses the value of the WAITRCD parameter for the browser-side timer. You can, however, override this value in the WebFacing project properties. The following describes the timer operation as implemented by the WebFacing Tool. Details of the behavior of INVITE are provided in the table below.

If the WAITRCD parameter is set to *IMMED, the browser will time out immediately. You can override the value for WAITRCD in the Run Time properties for your WebFacing project to change the time the browser waits for completion of a read-from-invited-devices operation. In the Run Time properties page for your WebFacing application, select Project and check the Override the maximum record wait time (WAITRCD) specified for DDS files check box and specify the number of seconds or *NOMAX for no time limit.

When the INVITE operation times out, an alert is issued in the browser if you have enabled the time-out dialog for INVITE. In the Run Time properties page for your WebFacing application, select Project and check the Show time-out dialog for INVITE check box. When the alert is issued in the browser, you can either reset the timer for that INVITE operation, or let the transaction time out. Note that when the transaction times out, any user input is lost. If you do not select the Show time-out dialog for INVITE check box on the Project properties page, no alert will appear when a timeout occurs.

Note: If you specify a value higher than the session time-out specified on the WAS server, the browser session will time out before the INVITE operation times out. You should specify a value lower than the session time-out setting on the WAS server.

You can change the content of the warning dialog by modifying the timeout.jsp file in \WebContent\webfacing\jsp\common\html for your WebFacing project. You can also modify the amount of time the warning is displayed. For example, if you want the warning to be dismissed immediately without user interaction, you can set the second parameter on the window.setTimeout method to 0.

You can modify the parameters for the warning dialog by updating the webface.js file for your release (for example, webfac512.js in version 5.1.2) in \WebContent\webfacing\ClientScript for your WebFacing project. In this file, you can modify attributes such as the warning dialog size and position. You can modify these attributes by updating the parameters for the window.showModalDialog method.

Note the following differences between INVITE processing for the 5250 and the WebFacing Tool:
  5250 WebFacing
WAITRCD time WAITRCD time begins to expire when the read-from-invited-devices operation is performed by the application. The WAITRCD time begins to expire when the write-with-invite operation is performed by the application.
WAITRCD set to *IMMED The user can key in data without interruption until pressing an AID key or the outstanding INVITE is cancelled. If an AID key is not pressed by the time the application performs a read-from-invited-devices operation, a time-out exception is returned to the application, although the device will still be input-capable. The browser will immediately time out and the user will be unable to key in any data.
WAITRCD set too low The user can key in data without interruption until pressing an AID key or the outstanding INVITE is cancelled. If an AID key is not pressed by the time the operation performs a read-from-invited-devices operation and the number of seconds specified for WAITRCD has passed, a time-out exception is returned to the application, although the device will still be input-capable. The browser will time out after the number of seconds specified for WAITRCD has passed, and the user will be unable to key in any data.
Application performs a read(wait) operation (wait for AID key to return control to the application) instead of a read-from-invited-devices operation after a write-with-invite operation The user can key in data without interruption until pressing an AID key or the outstanding INVITE is cancelled. The device will still be input-capable. If WAITRCD is not *NOMAX, the browser may time out and any data keyed in is lost. The read(wait) will cause the invited record format to be redisplayed and input-capable, without previously keyed-in data.
Application performs a read-from-invited-devices operation in response to an expired read-from-invited-devices operation The user can key in data without interruption until pressing an AID key or the outstanding INVITE is cancelled. The device will still be input-capable. The browser will time out and any data keyed in is lost. Each additional read-from-invited-devices operation will cause the invited record format to be redisplayed and input-capable, without previously keyed-in data.
Cancelling an INVITE operation when WAITRCD is set to *NOMAX or too high The outstanding INVITE request is cancelled almost immediately for an explicit request (such as ENDRCV) or implicit request (such as the write of another record format), as long as the request is processed before an AID key is pressed. The display will still be input-capable. The outstanding INVITE request is cancelled when the browser times out or the user presses an AID key. An implicit request is completed only upon browser time-out. If no AID key is pressed, a cancel request cannot complete until the number of seconds set for WAITRCD has passed. If WAITRCD is *NOMAX and no AID key is pressed, the request will never complete.
Suspending an INVITE operation when WAITRCD is set to *NOMAX or too high The outstanding INVITE request is almost immediately suspended. The suspend request cannot complete until the number of seconds set for WAITRCD has passed. If WAITRCD is *NOMAX and no AID key is pressed, the request will never complete.

Feedback