Skip to main content
Question

Scan folder before starting workbench traitment

  • July 10, 2013
  • 6 replies
  • 25 views

farfar
Contributor
Forum|alt.badge.img+12
Hi,

 

I use schedules to launch my workbench every x minute. my workbench starts by reading shp files into my folder. I have a problem if there are no file in folder, the job starts and i get errors with no files. I look for a solution to test if my folder contains files and continuous traitment of workbench. 

 

I try with python script but i can't.

 

Any help?

 

Thanks
This post is closed to further activity.
It may be an old question, an answered question, an implemented idea, or a notification-only post.
Please check post dates before relying on any information in a question or answer.
For follow-up or related questions, please post a new question or idea.
If there is a genuine update to be made, please contact us and request that the post is reopened.

6 replies

david_r
Celebrity
  • July 10, 2013
Hi,

 

 

have you tried setting "Ignore failred readers: yes" under the Workspace parameters / Advanced?

 

 

David

farfar
Contributor
Forum|alt.badge.img+12
  • Author
  • Contributor
  • July 10, 2013
Hi,

 

i try it but no change. i get each x minutes the FME_FAILURE in FME SERVER_jobs.

 

Other ideas? 

 

Thanks,

 

 

 

 


david_r
Celebrity
  • July 10, 2013
Hi,

 

 

another option could be to use the "Directory and File Pathnames" reader to count the files in the directory.

 

 

If count > 0, then pass it on to either a FeatureReader or a second workspace (WorkspaceRunner / FMEServerJobSubmitter). If count = 0, terminate.

 

 

David

farfar
Contributor
Forum|alt.badge.img+12
  • Author
  • Contributor
  • July 10, 2013
Hi,

 

its a good idea, but how could i retrieve count files? 

 

Thanks an advance.

 

 

 


fmelizard
Safer
Forum|alt.badge.img+21
  • Safer
  • July 10, 2013
Hi,

 

 

Each file or directory (according to how you set the reader) is a feature, so you can count the features, or use one of the features attributes.

farfar
Contributor
Forum|alt.badge.img+12
  • Author
  • Contributor
  • July 11, 2013
Hi,

 

David, Itay, thank you for your help.

 

I use Directory and File Pathnames readers and FeatureTypeFilter to retrieve path of files is are exist into the directory.

 

 

Farfar