File Polling issue

Hi,

I have created a file Polling service which polls for an EDI file. The content type is specified as application/EDIstream and the variable in the input/output tab of the processing service is called edidata. This is similar to the way file polling for Flat file is specified the difference being content-type application/wmflatfile and variable name being ffdata. I have specified the package name as the package containing the processing service. When i put the file in the monitoring directory the tracePipeline in the processing service does not show the edidata variable in the pipeline populated. After reading through the previous threads for this topic, i changed the package name to WmEDI but i am still getting the same result. Please let me know if anybody experienced the same problem and whether u could find any resolution for the same.

Thanks
Gaurav

Hi,

These are the steps in the service I invoke:
pub.file:getFile
pub.flatfile:converToValues
body–>ffData–>ffValues—>My Refrence Document
Then Map to one my Adapter services.

When I run this service Manually from Developer, everything works fine. But I want to do through File Polling.

To do this I have setup the File Polling:

Monitoring Directory /home/stretch/webmeth/brsisis
Working Directory (optional) /home/stretch/webmeth/brsisis/Work
Completion Directory (optional) /home/stretch/webmeth/brsisis/Done
Error Directory (optional) /home/stretch/webmeth/brsisis/Error
File Name Filter (optional) LoadFiles1.txt
File Age (optional) (seconds) unspecified
Content Type (optional) application/x-wmflatfile
Allow Recursive Polling No
Run services as user porika

Message Processing
Processing Service PorikaPractice.MultipleFiles.Work:ProcessMultipleFiles
File Polling Interval (seconds) 60
Cleanup Service (optional) unspecified
Cleanup At Startup Yes
Cleanup File Age (optional) (days) 7
Cleanup Interval (optional) (hours) 24
Maximum Number of Invocation Threads 10

How do I get the file name? What do I need to provide the filename as? to pub.file:getFile?
Since I am using pub.file:getFile.

I get the following error whan I post a file on the monitoring directory:

2006-01-25 14:55:50 CST [FPL.0001.0011V2] Monitoring files at /home/stretch/webmeth/brsisis
2006-01-25 14:55:50 CST [FPL.0001.0036V2] File polling processing file: FilePolling.25956.LoadFiles1.txt
2006-01-25 14:55:50 CST [FPL.0001.0033C] Error processing service: [FPL.0002.0004] Server Error: [ISS.0086.9019] No filename supplied
2006-01-25 14:56:50 CST [FPL.0001.0011V2] Monitoring files at /home/stretch/webmeth/brsisis
2006-01-25 14:57:50 CST [FPL.0001.0011V2] Monitoring files at /home/stretch/webmeth/brsisis

Can anybody help me please!!!
Thank you very much in advance,
Priyatham Porika

Hi Daniel,
To answer your questions:

  1. Use the service oub.flow:getTransportInfo in the service callied by the file polling port. This will give you the complete name fo the file
    2)It’s the default behaviour of filepolling to put the file into work after the service is invoked and either move it to complete or error after that. You can avoid this by not givin the work directory in filepolling configuration.

Regards,
Pappu

Daniel,
It was a typo the service to be used is pub.flow:getTransportInfo

All the Best,
Pappu

Pradeep,

In the input of the service, specify an Object variable named ffdata.The first step in the service should invoke streamToString service and map ffdata to the stream variable of the service.Then use bytesToString to get the content.Even if you put a saveToPiepline, you wont be able to see the ffdata in the pipeline because it is a stream object.

HTH
ramesh.

Sorry the above post was addressed to Priyatham

Thanks Ramesh! This was driving me crazy trying to figure out why nothing was showing on the pipeline when I saved it to a file and then restored to debug.

For anyone else looking for exactly what to do…

Add a variable, ‘ffdata’, to the Input of the service.
Step 1:
pub.io.streamToBytes, Pipeline In:ffdata->Service In:stream
Step 2:
pub.string.bytesToString, Pipeline In:bytes->Service In:bytes
Step 3:
pub.flow.savePipelineToFile

That will save the contents of the file into ‘string’ variable and you can then disable the first 3 steps and use a pub.flow.restorePipelineFromFile to see the file contents.

Once I had it into bytes, it was an easy matter to use convertToValues and such.

hELLO

I am using file polling and i have set the settingin the admin page.

So i havethe abc.txt document picked up and is delivered to the done directory.

But iam not sure why i geta name like
“FilePolling.30068.abc.TXT”

what doe sthe FilePolling.30068 specify.