Unanticipated Get Calls

The vast majority of server requests are anticipated and accurately handled by recorded scripts. Occasionally during script replay a server spontaneously sends out additional Get calls that it did not send out during script recording. In such instances the client can only respond with default answers to the server. If the server accepts a default answer, replay continues without error. If the server finds the default answer to be unacceptable though, you must manually script an OraFormsSet and an OraFormsOnMessageGet function to prepare the correct response for the server’s Get call.

For example, the server spontaneously sends a Get request asking for the VALUE property of a certain UI control. Because there is no scripted function in the script to handle this Get request, the client responds with the default value of null for strings. The server does not accept this answer. Connection to the client is aborted and the replay script runs into errors.

To prepare for manual scripting of an additional Get function to manage this situation, it is necessary that you analyze the in-data and out-data that is exchanged between the client and server. This analysis can only be conducted if you have set the Silk Performer logging level to debug.

Note: If logging level was not set to debug before your test was run, after you change the setting you will need to rerun your test to generate the required debug data.
Note: Also, the record=names parameter on the Oracle Forms server must be enabled to allow accurate recording of scripts.

The OraFormsOnMessageGet function that you script must provide an answer that is different than the default answer for the subsequent Get call on the relevant UI element.

Note: It is actually an OraFormsSet function that provides the answer in the script (in the line preceding the OraFormsOnMessageGet function call).

As the following BDL script example illustrates, when a Get call is handled, you have to read the script from bottom to top:


OraFormsSetRectangle("VISIBLERECT", 0, 0, 119, 24, ORA_SET_TYPE_MESSAGEGET);
OraFormsOnMessageGet("LINE_CUSTOMER_ITEM_DSP_0"); // Requested Item
OraFormsMouseClick("LINE_CUSTOMER_ITEM_DSP_0", 70, 18, 0); //
Requested Item

This code sample can be read as: The client will perform a mouse click on the UI element LINE_CUSTOMER_ITEM_DSP_0. This is represented by the OraFormsMouseClick function. Upon the mouse click, you expect to receive a Get call from the server. To prepare for the Get call in advance of the mouse click, you insert the OraFormsOnMessageGet function. You then expect the server to ask for the property VISIBLERECT so you place the property value of type rectangle on the stack before the OraFormsOnMessageGet function using the OraFormsSetRectangle function.