raiseAdminAlert Method
Use the raiseAdminAlert method in your exception handling code during testing and field trials.
void raiseAdminAlert(String adminMessageText); |
Arguments
HostScreen
Required. HostScreen object.
adminMessageText
Required. Text string that will be displayed as an alert at the first Administrator's Console that refreshes following the execution of this method.
Remarks
Use this method to in your application to handle unknown screen transitions and other errors that can benefit from a "little assistance" at the Administrator's Console.
The most common use would be in a standard screen transition method that "ends-up" on the wrong screen or unknown screen. A message can be sent to the admin for the active session, such as "Please navigate to screen OrderReady".
When this method is executed, on the Admin Console the session the HostScreen object is connected to will flash red, and an Alert will appear with the adminMessageText in it. Presumably, the developer or another tester can then access the Admin Terminal Emulator for the session and "fix" the error (if possible).
Each time a raiseAdminAlert is called for a session, a special recording of the Administrator's Actions will be appended to a special "Alert_xxx" file in the active recordings folder. These alert files can then be reviewed by the developer to determine which navigation sequences were missing from the code.
For example:
if (oScreen.getScreenName() != "OrderReady")
{
oScreen.raiseAdminAlert("Please navigate the screen to OrderReady");
oScreen.waitForScreen("AdminReady",30000); // wait 30 seconds
oScreen.adminAlertHandled();
}
Presumably, the above sample would be included in a generic method for moving to the next screen using a screen name or list of screen names variable in the place of "OrderReady".
Requirements
Flynet Viewer
See Also
waitForScreen | adminAlertHandled
Applies To: HostScreen object
© 2016 Inventu Corporation, Flynet LTD