File polling problem

Hi

i have created a file polling port and it is successfuly polling this file after given interval. When it invokes the service, file directly gets moved to error directory, not able to find exact issue.

I have following steps in my service

->pub.flow.getTransportInfo
->pub.file.getFile
->pub.flatFile.convetToValues

In error log file i am getting following exception

2008-07-17 11:01:02 PDT FFSchema:getFlatFilecom.wm.app.b2b.server.ServiceException: [FFP.0018.0010] Cannot process ffData of type: com.wm.util.Values. Stack trace data …51413350542a11ddbb9cfdf1d48cbc49 NULL 51413350542a11ddbb9cfdf1d48cbc49 2008-07-17 11:01:02 PDT pub.flatFile:convertToValuescom.wm.app.b2b.server.ServiceException: [FFP.0018.0010] Cannot process ffData of type: com.wm.util.Values.

Thanks

Is your invoking service input is ffdata (object)?? and also set the content-type=application/x-wmflatfile in the filepolling port configuration.

And since you are using filepolling port invoking a service you dont need getFile etc.
just a step…

pub.flatFile.convertToValues(map ffdata to the ffData object-stream)
savePipeline(just for testing to check the ffValues)

Check the following thread:
[URL]wmusers.com

HTH,
RMG

Can you post your polling port config?

The invoked service doesn’t need to call getFile. The typical polling process will open the file for you and pass an open input stream named ffdata to the service, if you’ve configured the port with a content type of application/x-wmflatfile.

Hi,

I tried using just pub.flatFile.convertToValues in my service but now i am getting following exception

com.wm.app.b2b.server.ServiceException: [FFP.0018.0009] Input parameter ffData cannot be null.

I have mapped body to ffData.

My polling port configurations are as follows

Package NameWmFlatFile Polling InformationMonitoring DirectoryC:\B9\wsg\MonitoringDirectory Working Directory (optional)unspecified Completion Directory (optional)unspecified Error Directory (optional)unspecified File Name Filter (optional)unspecified File Age (optional) (seconds)unspecified Content Type (optional)application/x-wmflatfile Allow Recursive PollingNo

Run services as userDefault Message ProcessingProcessing ServiceFFSchema:getFlatFile Cleanup Service (optional)unspecified File Polling Interval (seconds)20 Cleanup File Age (optional) (days)7 Cleanup Interval (optional) (hours)24 Maximum Number of Invocation Threads1

Thanks

In your service (which is FFSchema:getFlatFile, correct?), declare an input named ffdata. It should be of type object. When calling convertToValues, map ffdata to ffData. There will not be any var named “body” involved (which is from pub.file:getFile, which you do not need to use).

You Invoking service (FFSchema:getFlatFile) input should be ffdata (object)…

In the step
pub.flatFile.convertToValues (map ffdata to the ffData object)

HTH,
RMG

Thanks everyone.

It’s seems to be working now.

Now i am in the process of doing some kind of proof of concept with this file polling application and i have few basic questions.

  1. Suppose my flat file contains 100 records and say there is some missing column on 50th record then will convertToValues service allows me to process remaining 99 record or it will send the whole flat file in error directory?

  2. If there is any exception in flat file then can i send an email from flow service with an exception details?

Thanks