|
From: Dejan K. <dej...@nb...> - 2003-08-13 12:37:36
|
As I could see the only problem happens when sutting down scanner tool (Control-C). This was a bug and I have fixed few minutes ago. I am not sure what demo scanner should do, but as I could see from this output all should be OK. Regarding to questions Qin has asked: > > 1. Extend the scanner class and overwrite its bahavior to always copy it to > > 'done' folder; I don't see why you should change scanner behaviour in this case. done folder can contain all received documents no matter if they are valid or not. > > 2. Modify the scanner configuration properties file by changing the test > > pipeline to my validation; Yes, you should write new scanner configuration or change some existing config file. > > 3. Write my validation pipeline to (a) validate; (b) report; and (3) copy > > files to either 'ok' or 'done' folder. for (a) you would probably need to write some new pipeline stage. You could probably use ScriptingPipeline stage, too. I am not sure what type of validation you need to perform... (b) What type of report it should be? Some kind of log file, report file for each document or e-mail... (c) I wouldn't use done folder here since it is used by scanner. I like to have copy of all received documents in some folder and done folder is just about that. I would introduce two new folders here: ok and error (or some other names). You can use FileWritter for this purpose. Dejan ----- Original Message ----- From: "Bruce McDonald" <br...@mc...> To: "Qin Ding" <qd...@cs...> Cc: <bab...@li...> Sent: Wednesday, August 13, 2003 12:42 AM Subject: [Babeldoc-devel] Re: Have you downloaded 1.1.7? > Dejan, > > Is there a way to get the demo scanner working? > > regards, > Bruce. > > On Tuesday 12 August 2003 10:23 am, Qin Ding wrote: > > Bruce: Thank you. It built well now. I ran the example scanner: > > D:\babeldoc-src-1.1.7-dev\build\examples>babeldoc scanner > > <2003-08-12 09:03:02,806> INFO [main] : Starting feeder... > > <2003-08-12 09:03:02,876> INFO [main] : Initializing workers: > > <2003-08-12 09:03:02,916> INFO [main] : directory (directory) > > configured... > > <2003-08-12 09:03:02,926> INFO [main] : Starting workers... > > <2003-08-12 09:03:02,926> INFO [main] : directory started... > > <2003-08-12 09:04:33,136> INFO [Thread-1] : Processing document... > > <2003-08-12 09:04:33,286> INFO [Thread-1] : PipelineStage name: entry > > <2003-08-12 09:04:33,336> INFO [Thread-1] : PipelineStage name: transform > > <2003-08-12 09:04:34,218> INFO [Thread-1] : PipelineStage name: choose > > <2003-08-12 09:04:34,248> INFO [Thread-1] : PipelineStage name: writer > > > > What's expected here? Does it mean it works for this example? When I stop > > the scanner by control_c, I got this: > > <2003-08-12 09:05:54,904> INFO [shutdown] : Shutting down... > > <2003-08-12 09:05:54,904> INFO [shutdown] : Stopping workers... > > java.lang.NullPointerException > > at com.babeldoc.scanner.ScannerWorkerScheduler.stopAll(Unknown > > Source) > > at com.babeldoc.scanner.Scanner.stop(Unknown Source) > > at com.babeldoc.scanner.Scanner.finishUp(Unknown Source) > > at com.babeldoc.core.BabeldocCommand$1$ShutMeDownNicely.run(Unknown > > Sour > > ce) > > > > Bruce: this is what I try to achieve: > > 1. Start the scanner and make it ready for the files to come at any time; > > 2. When a flat file arrives (ftped here), I want scanner to hand it over to > > my validation pipeline. Here I will use apache common.validator package to > > validate the entire file based on business rules and generate a validation > > report using apache's velocity > > 3. The validation pipeline decides where to copy the original file to. If > > validation is ok, the file goes to the fold 'ok', otherwise, it goes to > > your 'done' folder. > > > > I can see this is what I should do: > > 1. Extend the scanner class and overwrite its bahavior to always copy it to > > 'done' folder; > > 2. Modify the scanner configuration properties file by changing the test > > pipeline to my validation; > > 3. Write my validation pipeline to (a) validate; (b) report; and (3) copy > > files to either 'ok' or 'done' folder. > > > > Bruce: am I on the right track? Can you help me with this by directing me > > to the right class to extend for both scanner and pipeline? I really > > appreciate it very much. Thank you. > > > > Qin > > > > > > > > > > -------------------------------------------------------------------------- - > >------------- > > > > This is a PRIVATE message. If you are not the intended recipient, please > > delete without copying and kindly advise us by e-mail of the mistake in > > delivery. NOTE: Regardless of content, this e-mail shall not operate to > > bind CSC to any order or other contract unless pursuant to explicit written > > agreement or government initiative expressly permitting the use of e-mail > > for such purpose. > > -------------------------------------------------------------------------- - > >------------- > > > > > > > > > > > > Bruce McDonald > > <bruce To: Qin > > Ding/ASD/CSC@CSC, bruce mcdonald @mcdonald-family > > <tr...@us...> .com> cc: > > Subject: Re: Have you > > downloaded 1.1.7? 08/11/03 06:19 > > PM > > > > > > > > > > > > > > Your problem is that your are using ANT directlly. Babeldoc requires that > > you > > build using the build.bat script on windows. > > > > so to build babeldoc: d:\babeldoc-src-1.1.7-dev>build setup build > > > > regards, > > Bruce. > > > > On Monday 11 August 2003 05:55 pm, Qin Ding wrote: > > > Bruce: > > > > > > I just downloaded the 1.1.7-dev. When I tried to build > > > > > > D:\babeldoc-src-1.1.7-dev>ant > > > Buildfile: build.xml > > > > > > declare: > > > > > > BUILD FAILED > > > file:D:/babeldoc-src-1.1.7-dev/build.xml:87: taskdef class > > > com.babeldoc.bootstra > > > p.ant.ModuleFinder cannot be found > > > > > > Total time: 1 second > > > > > > > > > D:\babeldoc-src-1.1.7-dev>ant setup > > > Buildfile: build.xml > > > > > > declare: > > > > > > BUILD FAILED > > > file:D:/babeldoc-src-1.1.7-dev/build.xml:87: taskdef class > > > com.babeldoc.bootstra > > > p.ant.ModuleFinder cannot be found > > > > > > Total time: 1 second > > > > > > What went wrong? > > > > > > Qin > > > > -------------------------------------------------------------------------- - > > > > >------------- > > > > > > This is a PRIVATE message. If you are not the intended recipient, please > > > delete without copying and kindly advise us by e-mail of the mistake in > > > delivery. NOTE: Regardless of content, this e-mail shall not operate to > > > bind CSC to any order or other contract unless pursuant to explicit > > > > written > > > > > agreement or government initiative expressly permitting the use of e-mail > > > for such purpose. > > > > -------------------------------------------------------------------------- - > > > > >------------- > > > > > > > > > > > > > > > > > > bruce mcdonald > > > <triphop To: > > > qi...@us... @users.sourcefor cc: > > > ge.net> Subject: Have you > > > > downloaded > > > > > 1.1.7? > > > > > > 08/11/03 04:16 > > > PM > > > > > > > > > > > > > > > > > > > > > Your problem should be fixed. > > > ------------------------------------------------------- > This SF.Net email sponsored by: Free pre-built ASP.NET sites including > Data Reports, E-commerce, Portals, and Forums are available now. > Download today and enter to win an XBOX or Visual Studio .NET. > http://aspnet.click-url.com/go/psa00100003ave/direct;at.aspnet_072303_01/01 > _______________________________________________ > Babeldoc-devel mailing list > Bab...@li... > https://lists.sourceforge.net/lists/listinfo/babeldoc-devel |