How to poll a flat file?

Hi All,

We all know to poll a database by using notification. Do anybody know how to poll a flat file in wM6? Is there any way to do this? Please reply if any of you encountered the same problem as well as the solution. Thanks in advance.

Regards,
Prasanna.

Hi Prasanna,

use the “Ports” menuitem in the IntegrationServer. There you can parametrize a file polling. Keep in mind, that your configuration will be saved in th package you select there. Yor services may be located in a different package.

regards
Robert

File Polling (see ISFlatFileSchemaGuide.pdf pp.80)

  1. Define a file polling port in the Security section of WmAdmin
    • Specify; Package Name
    • Run services as user Administrator
    • Monitoring Directory - the directory to be polled
    • Processing Service - the service to be called on finding a file
    • File Polling Interval - time between polls
    • Content Type - application/xwmflatfile
  2. Create a service (see Processing Service above)
    • define input object called ffdata
    • define Flow which invokes the following 3 services
pub.io:streamToBytes

I am getting the below error when running the services that you have outlined:

java.lang.ClassCastException: java.lang.String

do you have any idea as to why this exception is being thrown and how I can fix?

Thanks,

Brad

Hello,
Your error is due to a step that is trying to cast a string to another non-workable type. An example is if you have the string “1” and try to cast it to an Integer. Check all your services that are getting string but should be getting something like a stream, byte array, numeric. Good day.

Yemi Bedu