Error in simple file polling

Hi,

I am running a simple file polling flow service downloaded from SAG.

I have created a file polling port and able to see the file disappearing from the folder.
But in the flow service, i am not able to see the content of the file using debugLog.
The error encountered is:

can someone suggest a solution for this pls…?

–Regards,
–Sagar

Can you share the steps of your FLOW service?

pub.flow:tracePipeline is your friend to try and work out what’s in the pipeline. It might be that you’re trying to do a String operator on something that is a Stream or it might be a node if it’s xml for instance…

The steps are:
pub.io:streamToBytes
pub.string:bytesToString
pub.flow:debugLog

Today the service is running fine, i dont know how…:confused: i haven’t made any changes to the service or IS !!!

Thanks a lot for your replies, will definitely share if i am able to find out the reason behind the error.

Regards,
Sagar

base on the error dump, the input pipeline for pub.io:streamToString is string instead of stream.

later that may be you have changed something on your input service which you are not aware of.

the flow service can be simplify as below instead.
pub.io:streamToString
pub.flow:debugLog

Hi,

There is no such service which you have mentioned. Even i implemented the same flow steps which Ssagar had flowed but i am getting error like;“error processing service” for file polling.Please help me.

i have checked from the documentation, pub.io:streamToString service only available in webMethods 8.x and above.

hi guys,

i have tried to create a file polling service (txt file), below is my finding.
for performance and i/o overhead consideration, option 1 is preferable.

option 1:

  1. create a service input named “ffdata” (without quote) as object.
  2. write the flow service as below.
    pub.io:streamToBytes
    pub.string:bytesToString
    pub.flow:debugLog

or

option 2:

  1. write the flow service as below.
    pub.flow:getTransportInfo
    pub.file:getFile (base on filepolling->filename)
    pub.io:streamToBytes
    pub.string:bytesToString
    pub.flow:debugLog

ssagar, check the input type you have defined for “ffdata”, it must be defined as object.
if you are receiving xml file, then you will need to define a “node” object for your input instead.
you can always use pub.flow:tracePipeline at the begining of the flow service to know what kind of input pipeline you will received.

tanveer, your error description is too brief, for development, it’s advisable to turn your debug log level to more details

okay, thats all right. i was seeing in 7.1. Thanks