What each request is doing is defined by the ?Action= part. The number of GETCONSOLSTATUS requests recorded depends on the processing time. In the example above it was recorded three times, meaning that the consolidation was done by the moment the third GETCONSOLSTATUS request was sent to the server. If you playback this script, it will work in the following way: The script submits the consolidation in the EXECUTE request and then calls GETCONSOLSTATUS three times. If we have a timer around these requests, the response time will be almost instantaneous. While in reality, the consolidation may take many minutes or even an hour (yes, this is a good example of when people may be happy with a one-hour response time in a web application). If we have several iterations in the script, we will submit several consolidations, which continue to work in the background, competing for the same data, while we report sub-second response times.
Consolidation scripts require creating an explicit loop around GETCONSOLSTATUS to catch the end of consolidation:
web_custom_request("XMLDataGrid.asp_7",
"URL={URL}/Data/XMLDataGrid.asp?Action=EXECUTEamp;TaskID=1024amp;RowStart=1amp;ColStart=2amp;RowEnd=1amp;ColEnd=2amp;SelType=0amp;Format=JavaScript",
LAST);
do {
sleep(3000);
web_reg_find("Text=1","SaveCount=abc_count",LAST);
web_custom_request("XMLDataGrid.asp_8",
"URL={URL}/Data/XMLDataGrid.asp?Action=GETCONSOLSTATUS",
LAST);
} while (strcmp(lr_eval_string("{abc_count}"),"1")==0);
Here the loop simulates the internal logic of the system sending GETCONSOLSTATUS requests every three seconds until the consolidation is done. Without such loop, the script just checks the status and finishes the iteration while the consolidation continues for a long time after that.





