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.
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.
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
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).
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.
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?
If there is any exception in flat file then can i send an email from flow service with an exception details?