Problems with polling flatfiles


I have a scenerio where I was polling specifically for flatfiles in a shared folder. I have implemented the following sequence of services:


When I was executing the flow service, its working fine and was able to extract the required fields on xml document.

But when I was implementing the polling technique, the files were thrown into Error folder instead of Complete/Done folder.

(Actually, I was trying to poll for a couple of flat files (similar type) and the file that was specified in pub.file:getFile was thrown into Error folder and the other file which was not specified in the pub.file:getFile service was thrown into Complete/Done folder)

Could anyone guess where I was going wrong and suggest the successful polling implementation.

Appreciate ur suggestions.



Why dont configure IS6.x file polling technique in the ISAdminConsole and poll that shared directory with an interval and set the working directory and complete directory,Error directory.This makes easier and inbuilt process and also you can eliminte getFile service so the service input for flatfiles should be (ffdata) object(stream)and further down you can still use
pub.flatFile:convertToValues for parsing.

Try this too.



I have configured ISAdminConsole and was polling the shared directory. I did everything u mentioned but thought may be I need to include pub.file:getFile since I have to process those files.

I have a little confusion over here. I got to retrieve those files, process them and post somewhere else.

my question is: how could i view the result thats been processed (mean how can i know its done correctly). Becos when I look at the files in the Complete/Done folder, those files are nothing but the same flatfiles before processing.

Could u tell me how can i retrieve the processed files (i.e., converted xml documents) so that I can post/ do other stuff.



“Could u tell me how can i retrieve the processed files (i.e., converted xml documents) so that I can post/ do other stuff”

If you want to see the processed files then you have to build some mechanism ie once you parse the ff and converting them to xml document(ISdocumenttype)use the DocumentToXMLString gives out (xmldata)and write this xmldata string to a file and save it on the disk.give filename ending with some datetimestamp,so that it makes uniqueness of different files or else route the converted files to TN so that you can view it.


Another way might be to turn on service level auditing for your polling handler service and make sure it is set to save the output always… You do this by altering the properties of the service and setting up auditing to write to the database.

That way you’ll be able to use WmMonitor to see what was returned. But the bigger question is who/what is wanting to see the output? Usually you get the flat file, convert it and then put it into some back end system or send it off to a third party… A simple pub.flow:debugLog with a map from the output of documentToXMLString as RMG mentioned might give you some idea of what to do next…

Nathan Lee - WmUnit The webMethods testing framework