I have created a file poller in WM Admin page.It looks for *.txt files in the Monitoring folder and calls a processing service by putting the file in the working folder.
The processing service has inputs as "ffdata",“FileName”,“OriginalFileName” and “Content-type”.
For testing I am posting files in the Monitoring folder by a custom service which takes filename(i.e path + fileName) and fileContents.
Though my file is getting processed and moving in the done directory I donot find “ffdata” coming as input in the processing service.
I used savePipelineToFile and restorePipeLineFromFile to trace whether ffdata is coming or not.Though the FileName and Content-type are coming as input,but the ffdata is not coming as input to the processing service.
Can anyone please let me the cause and the solution .
I don’t think you can see the ffdata if you do savePipeline/ToFile and restorePipeLine/FromFile in the beginning of the service but if you do that after convertToValues service, you can surely see ffValues from ffData. That way you can step thru your service too.
If i’m not wrong, ffdata will not appear in both savePipelineToFile and restorePipelineFromFile.
you could try using savePipeline and restorePipeline, i think they will appear ffdata. But you need to make sure ffdata shown in the pipleline first and then use savePipline.
getFile service is not needed if you use file polling.
Even if you use savePipeline you wont be able to see ffdata because it is the stream object. You will have to convert the stream object into string before using savePipeline.
Define ffdata of Object type in the input of the file polling service. Use pub.io.streamToBytes service to convert stream into Bytes and then use pub.string.bytesToString to convert bytes to String(You can also directly convert stream to string). Now use savePipeline/File and restorePipeLine/File to converttoValues or watever u want to do.