Focal Point Banner
Community Center Education Summit Technical Support User Groups
Let's Get Social!

Facebook Twitter LinkedIn YouTube
Focal Point    Focal Point Forums  Hop To Forum Categories  WebFOCUS/FOCUS Forum on Focal Point     [CLOSED] Is there something that prohibits creating 2 WF files on the same HTML Page
Go
New
Search
Notify
Tools
Reply
  
[CLOSED] Is there something that prohibits creating 2 WF files on the same HTML Page
 Login/Join
 
Master
posted
I am trying to bring two process together. The run button should be generating two FOCUS files but for some reason the first one disappears when the second is created...both are called via a single run button on an html file.

This message has been edited. Last edited by: FP Mod Chuck,


WebFOCUS 8.
Windows, All Outputs
 
Posts: 537 | Registered: June 28, 2013Reply With QuoteReport This Post
Master
posted Hide Post
to elaborate a bit...I added a fex to an html page. The two parameter fields required were created.

I added a second fex that uses the same two parameters.

I click the run button which executes each fex. The first fex is far simpler and runs almost immediately. If I jump into WF, as if to create a new report, I can see the FOCUS file it created.

However, as soon as the second file completes a minute or so later, it's focus file is present but the original has disappeared.


If I execute each of these on their own html page, each gets created and stays created...


WebFOCUS 8.
Windows, All Outputs
 
Posts: 537 | Registered: June 28, 2013Reply With QuoteReport This Post
Virtuoso
posted Hide Post
Where and how to you "save" the files ?

Sample of your code may help


WF versions : Prod 8.2.0.1M gen 240, Dev 8.2.04 gen 48, OS : Windows, DB : MSSQL, Outputs : HTML, Excel, PDF
In Focus since 2007
 
Posts: 2163 | Location: Montreal Area, Qc, CA | Registered: September 25, 2013Reply With QuoteReport This Post
Expert
posted Hide Post
The single HTML page in which the two fexes run need to have two iFrames, one for the display of the results for each fex. The run button would execute each of the two fexes separately (Tasks and Annimations), one in each of the two iFrames.
 
Posts: 2976 | Location: Middle Tennessee [8204M Gen48 in Test&Prod] | Registered: February 23, 2005Reply With QuoteReport This Post
Master
posted Hide Post
I can be more specific:

1) Create an HTML page that prompts user for Fiscal Year and as of Period. User hits blue arrow, 2 FOCUS tables should be built for later use. The user then presses a second button that jumps to a new HTML page for further processing/options/reporting.

Most of our reporting works this way. This is however the first time 2 FOCUS files are created..at once ...usually it is just 1.

1) Started with a Blank HTML page..no template used.

2) Clicked: Insert then New Report then drew a box that should eventually show the outcome of the fex - likely ending with the number of lines written to FOCUS file. I referenced my fex. Upon doing this it auto creates parameters fro FY and Period as well as creating the blue arrow run button.

3) Repeated step 2 for my second fex. Since the parameter names are the same (FY and Period) it uses the parameters already created.

4) I checked the little blue arrow propeties- both fexes are now listed.

5) I run the HTTML page. Fex 2 takes about 15 seconds to run. While it is running I am able to verify it was created since I can add a procedure to reference it and report the contents before fex 1 finishes.

Eventually (2 minutes) fex1 comlpetes. At this point I see the fex 1 FOCUS file but the fex 2 focus file is gone.

Here are the lines of code in each fex:

APP HOLD foccache
ON TABLE HOLD AS HOLDDTLS FORMAT FOCUS

and

APP HOLD foccache
ON TABLE HOLD AS HOLDFINDB_ALLDATASETS_FINAL2 FORMAT FOCUS


If I run these fexes independently (double click fex name) they each create their respective hold files without issue.


I am not sure what you mean by iframes...is this the box I drew that houses the outcome of each fex.


WebFOCUS 8.
Windows, All Outputs
 
Posts: 537 | Registered: June 28, 2013Reply With QuoteReport This Post
Gold member
posted Hide Post
For another option, see my post regarding the Table of Contents option at the end of the following thread: http://forums.informationbuild...467087316#5467087316


WebFocus 8201m on Windows; App Studio 8201; Procedures: WebFocus with SQL; HTML Parameter Pages & Dashboard; Output: Excel, HTML, & PDF.
 
Posts: 86 | Location: MI | Registered: July 23, 2009Reply With QuoteReport This Post
Virtuoso
posted Hide Post
quote:
I am not sure what you mean by iframes...is this the box I drew that houses the outcome of each fex

Yes

quote:

APP HOLD foccache


Storing data in that "folder" is not permanent, after a few minutes (according to your server setup) the files are removed.


WF versions : Prod 8.2.0.1M gen 240, Dev 8.2.04 gen 48, OS : Windows, DB : MSSQL, Outputs : HTML, Excel, PDF
In Focus since 2007
 
Posts: 2163 | Location: Montreal Area, Qc, CA | Registered: September 25, 2013Reply With QuoteReport This Post
Master
posted Hide Post
Here is the thing....We have dashboards that populate reports/graphs etc in this manner. They each have exactly the same prompts. The user hits ONE button...everything runs at once and populates. The difference seem to be, in those cases, traditional HOLD files are used..not FOCUS files.


I just did a test. Same HTML set up but I made 2 little blue arrow run buttons. The first runs fex 1. The second runs fex 2. I press button one, wait 2 minutes till it finishes then press button 2 wait for fex 2 to finish a few seconds later...I have my two FOCUS files.

I exit 100% out of WF and go back in...
If I run button two first then wait and run button 1..it still works.

When I press both buttons at the same time..each runs but I do not get the HOLD file that should have finished first....when I look in Foccache its there but as soon as the other FOCUS file is written it disappears.


Any ideas?

I tried writing the second file to foc_meta..so now I have one going to foccache and one to foc-meata and it seems to work...still testing...however I have no idea the implications of writing to foc-meta..never did that before.


WebFOCUS 8.
Windows, All Outputs
 
Posts: 537 | Registered: June 28, 2013Reply With QuoteReport This Post
Virtuoso
posted Hide Post
I look for me that we're missing information

Why is that so important that the HOLD file exist in the folder ?
Are they not just needed to produce the output result and been discard after ?

Holding the files in a path other than foccache may create trouble since every concurrent execution will try to save the same file at the same place.

Can you share both fex code ?


WF versions : Prod 8.2.0.1M gen 240, Dev 8.2.04 gen 48, OS : Windows, DB : MSSQL, Outputs : HTML, Excel, PDF
In Focus since 2007
 
Posts: 2163 | Location: Montreal Area, Qc, CA | Registered: September 25, 2013Reply With QuoteReport This Post
Master
posted Hide Post
well, I tried to create a foccache2 folder. However I have had mixed results. The file does not seem to go away once I log off like regular foccache. Further is does not refresh.


Foc-meta still works. I am just not sure the ***ramifications*** of using it.


I need to make this a FOCUS file so it does not disappear as the user pops from screen to screen, form to form, running different reports and fexes. This is how we were taught. If everything is self contained in one html page, one report etc..regular hold files work well.

The real question is, why, when you try to build 2 differently named focus files CONCURRENLT does the first one written disappear as the subsequent one is created. Sound like another WF8008 bug...

Again, if there are no run concurrently, there is no issue.


WebFOCUS 8.
Windows, All Outputs
 
Posts: 537 | Registered: June 28, 2013Reply With QuoteReport This Post
Master
posted Hide Post
Ha! foc-meta is based n whomever runs the file last...that wont work...needs to be in foccache...I will add two buttons for now to run each separately. Perhaps call in a ticket.


WebFOCUS 8.
Windows, All Outputs
 
Posts: 537 | Registered: June 28, 2013Reply With QuoteReport This Post
Virtuoso
posted Hide Post
Your problem sounds familiar.

Let's start with a question: Can you find the missing HOLD file in another foccache directory perhaps?

If the answer is yes, then you are dealing with 2 separate sessions. That probably means that at the start of either of your two fexes, no session had been started yet. As a consequence, each fex starts a new session separately.

You may be able to start a session before that by explicitly starting a fex, for example to display your form, so that everything is part of the same session.

I've never received a good answer from IBI about when a session starts. That is relevant for cases like these.

This message has been edited. Last edited by: Wep5622,


WebFOCUS 8.1.03, Windows 7-64/2008-64, IBM DB2/400, Oracle 11g & RDB, MS SQL-Server 2005, SAP, PostgreSQL 11, Output: HTML, PDF, Excel 2010
: Member of User Group Benelux :
 
Posts: 1643 | Location: Enschede, Netherlands | Registered: August 12, 2010Reply With QuoteReport This Post
Master
posted Hide Post
no, when both fexes fire off simultaneously, I immediately see the first one and if I am fast enough can even do a quick report off it and it indeed has data in it. IT IS THERE IN FOCCACHE.

As the second one completes, the first disappears.

Now if I create TWO run buttons, press either one first, *wait* for it to finish and press the second run button...then BOTH files are there...


WebFOCUS 8.
Windows, All Outputs
 
Posts: 537 | Registered: June 28, 2013Reply With QuoteReport This Post
Virtuoso
posted Hide Post
Robert

This does sound like a bug, 8.0.08 is a very old release now. Any plans on upgrading?


Thank you for using Focal Point!

Chuck Wolff - Focal Point Moderator
WebFOCUS 7x and 8x, Windows, Linux All output Formats
 
Posts: 1566 | Location: Customer Support | Registered: April 12, 2005Reply With QuoteReport This Post
Master
posted Hide Post
I WISH!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!

Interesting today, two us started looking at this again. Suddenly it works. 4 times in a row!..then the one file did no seem to get replaced, it remained and older vintage..like it did not refresh.... Then at one point it behaved like yesterday, ie the file was created but deleted just as the second completed.

WTH?


WebFOCUS 8.
Windows, All Outputs
 
Posts: 537 | Registered: June 28, 2013Reply With QuoteReport This Post
Virtuoso
posted Hide Post
Sounds like the second report's session (sometimes) clears FOCCACHE before getting down to work.

If, as you indicate, the first report completes almost instantaneously, I suggest running them in series, rather than attempting to run them in parallel.

But, bottom line, FOCCACHE is transient in nature, designed to support a single thread of Focus code. Any attempt to asynchronously access the product of this process is on shaky legs.


- Jack Gross
WF through 8.1.05
 
Posts: 1925 | Location: NYC | In FOCUS since 1983 | Registered: January 11, 2005Reply With QuoteReport This Post
  Powered by Social Strata  
 

Focal Point    Focal Point Forums  Hop To Forum Categories  WebFOCUS/FOCUS Forum on Focal Point     [CLOSED] Is there something that prohibits creating 2 WF files on the same HTML Page

Copyright © 1996-2018 Information Builders, leaders in enterprise business intelligence.