In my project there is a servlet call from the JSP page to the WF server. The report gets stored on a specified path using ON SAVE or ON HOLD. My question is how will the front end know when the execution is done. If WF takes a long time to execute the report, the front end can't check for existence of the file since it will already be created and only the byte size will increase. Anyway this can be done?
February 14, 2006, 04:24 AM
<JG>
The easiest way is to write a check file after the report is complete and look for that and not at the report itself.
-* check for the existence of the check file and delete it if it exists !if exist c:\temp\checkfile.txt (del c:\temp\checkfile.txt) -RUN -* run the report FILEDEF CHECKFILE DISK c:\temp\checkfile.txt -RUN TABLE FILE CAR PRINT MODEL END -RUN -* write the check file -WRITE CHECKFILE report complete
February 14, 2006, 06:07 AM
Mika Keranen
Hi,
You could also show the user a messagebox after the report is run? Please insert < at the beginning of the lines that require it, sorry for posting the code like this...
Btw, can you post html-code to this forum? If, how? Thanks for the info.
Regards, Mika
TABLE FILE CAR SUM SALES BY COUNTRY ON TABLE HOLD END -RUN -HTMLFORM BEGIN html> head> <script language="JavaScript"> function msg_box() { alert("Report output &LINES lines."); }
/head> body onLoad="msg_box();"> /body> /html> -HTMLFORM END
WebFOCUS 7.6.x PMF 5.2.x
February 14, 2006, 10:00 AM
Kerry
Hi Mika,
To post HTML code that has the < character, please wrap the code with UBB tags "code" and "/code" at the beginning and at the end of the code [ replace the " " with [], please ).
Here is an example of how it will look like:
...
<html>
my code goes here ...
</html>
...
Hope it helps.
Cheers,
KerryThis message has been edited. Last edited by: Kerry,
Kerry Zhan Focal Point Moderator Information Builders, Inc.
February 15, 2006, 10:11 AM
dhagen
Typically, when you call a servlet, your calling action would wait for a response, thus confirming a complete execution (sort of). If you are using JSP, then maybe use the WF API to initiate the call, then your application server will wait for a response from the API call before rendering the JSP response. Therefore, the JSP will only complete it's response to the client when the execution is done.
"There is no limit to what you can achieve ... if you don’t care who gets the credit." Roger Abbott