From: David G. <dg...@co...> - 2003-09-23 19:26:48
|
Hi Qin, 1) You should set the environment variable BABELDOC_USER to point at your project directory. 2) While you can certainly subclass the PipelineStage to perform your validation, an easier approach may be to use the Scripting stage and just call your validation routines inline. Creating a new stage type requires a bit more familiarity with the Babeldoc environment. 3) Regarding e-mailing your report, you might do something like the following: a) Call your validation routines via a Scripting stage. b) Place the original document into an attribute c) Replace the current document with the report to be e-mailed. d) Use the SmtpWriter stage to e-mail your report e) Move the original document from the attribute in which it is stored back into the current document f) Continue processing It sounds like you've got a pretty good handle on everything else. Hope this helps, David On Tuesday 23 September 2003 11:57 am, Qin Ding wrote: > I am trying to use this tool. From what I read, this is an excellent tool > for me. I read the user guide and white paper and usage documents and > developer guide twice and I am still not sure of how to put this project > together. > > My babeldoc home (BABELDOC_HOME env variable) > c:\babeldoc > It has lib and bin directory which has all the scripts and jar files from > your build/lib and build/bin. In c:\babeldoc\lib, it also has my own jar > (longlegs-validation.jar) and apache common-validator.jar > > My project home > c:\myproject\longlegs\ > In your documents, at one place, it states that I need to set up USER_DIR > env variable pointing to this project directory; and at another place in > the document, it asks to include this directory in the classpath. Which way > should I go? > > Under the longlegs folder, I have > config folder > config/scanner sub-folder. In here, I have config.properties for the > scanner like this: > > daddy-longlegs.type=directory > daddy-longlegs.period=10000 > daddy-longlegs.inDirectory=/daddy/longlegs/in > daddy-longlegs.doneDirectory=/daddy/longlegs/done > daddy-longlegs.pipeline=longlegs > > pipeline folder. In here, I have config.properties like this: > > longlegs.type=simple > longlegs.configFile=pipeline/simple/longlegs > > pipeline/simple folder. In here, I have longlegs.properties, and > flat2xml-convert.xml like this: > > entryStage=validate > validate.stageType=DataValidation > validate.nextStage=convert > > convert.stageType=FlatToXml > convert.nextStage=transform > convert.flatToXmlFile=/longlegs/pipeline/simple/flat2xml-convert.xml > > transform.stageType=XslTransform > transform.nextStage=null > > flat2xml-convert.xml is omitted here. It is the copy of yours. > > journal > journal/simple > > Also > I have created two directories > C:\daddy\longlegs\in > C:\daddy\longlegs\done > > I want to drop a flat file (delimited by comma, or tab, or vertical bar) in > c:\daddy\longlegs\in folder. The scanner should pass the file to my > pipeline stage "DataValidation". I need to write this pipeline stage. As > I understand, all I need to do is to subclass the PipelineStage. In that > class, I should implement process method to call my validation logics, > which I have jar-ed and deployed in c:\babeldoc\lib directory along with > apache common-validator. > > Now, where should I deploy my pipelineStage DataValidation class? In my > longlegs/pipeline directory or some new directory I should add to the > longlegs/pipeline directory? > > A validation report (html) is dynamically generated during the validation > stage. This report, Not original flat file, needs to be mailed out. How do > I add the report from my DataValidate stage to the mail pipelineStage? > Also, I believe I can use the FileWriter pipelineStage to write the html > report out. So, the key is to introduce the report to the mail and > filewriter stage, not the original flat file. How do I do that? > > If I can successfully put all these together quickly, I'd like to present > this tool to my manager for considering to use in our next project. Your > help is greatly appreciated. Thanks. > > 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. > --------------------------------------------------------------------------- >------------- > > > > > > > ------------------------------------------------------- > This sf.net email is sponsored by:ThinkGeek > Welcome to geek heaven. > http://thinkgeek.com/sf > _______________________________________________ > Babeldoc-user mailing list > Bab...@li... > https://lists.sourceforge.net/lists/listinfo/babeldoc-user -- David Glick Transmit Consulting, Inc 619-475-4052 dg...@tr... |