I did find the java class which probably get's called by the javascript wrapper...
src\java\org\apache\cocoon\components\flow\javascript\fom\FOM_Cocoon.java public void jsFunction_processPipelineTo(String uri, Object map, Object outputStream) throws Exception So my best tip is to attach the sources and put a breakpoint in that method... Hope you find a solution and if you do ... please post back the solution. Cheers, Robby -----Original Message----- From: Robby Pelssers [mailto:[email protected]] Sent: Friday, March 19, 2010 8:11 PM To: [email protected] Subject: RE: Runnable in flowscript? mm.... I actually was searching for the flowscript shipped with cocoon which is being called... But I can't seem to find it in the cocoon sources... Which version of cocoon are you using by the way? I'm trying to understand what the flowscript function does ...since apparently it should set some Avalon context. You don't happen to have that script at hand? Robby -----Original Message----- From: Fawzib Rojas [mailto:[email protected]] Sent: Friday, March 19, 2010 8:03 PM To: [email protected] Subject: Re: Runnable in flowscript? Output: fmt= pdf2 output_stream = com.spectron.io.fileprogressoutputstr...@fc8361 I know that part works (i can access objects variables in thread) because I tested it with something like this: var length=0; var r = new java.lang.Runnable() { run: function() { while(true) length++; } }; new java.lang.Thread(r).start(); // Display the waiting page until complete: while(!output_stream.isClosed()) { cocoon.sendPageAndWait("progress.jx",{ "length" : length }); } And the progress page displayed the length variable, and it was increasing (the thread was working). The problem seems to be that inside the thread none of the cocoon-related objects can be used. On 3/19/2010 2:53 PM, Robby Pelssers wrote: > You're in fact using a closure here so I'm not sure if that's causing issues. > Can you add following debug statements? > > var r = new java.lang.Runnable() { > run: function() { > //add following print statements > print("fmt= " + fmt); > print("output_stream = " + ouput_stream); > // gives an exception here on the console > cocoon.processPipelineTo(fmt+"_pipe/"+url,{}, output_stream); > output_stream.close(); > } > }; > > --------------------------------------------------------------------- To unsubscribe, e-mail: [email protected] For additional commands, e-mail: [email protected] --------------------------------------------------------------------- To unsubscribe, e-mail: [email protected] For additional commands, e-mail: [email protected] --------------------------------------------------------------------- To unsubscribe, e-mail: [email protected] For additional commands, e-mail: [email protected]
