Skip to main content

Dear community,

I have difficulties understanding the behavior of server handling (unc) paths. I'm quite new to server so this one might be simple but I don't get it.

What I want to do is use a Directory Watch publication on a upload folder. Then let a workbench subscription react to a new upload. This works. I need the workbench directory file and pathnames reader to scan the upload folder, add the new files to a list and move the files to a queue folder.

This is where the trouble comes in. The log tells me that the folder is not found. But the path is not the path I defined (\\\\fc01\\FMEdata\\KLIC\\upload) but local (D:\\Program Files\\FMEServer\\repositories\\KLIC\\01_scan\\upload).

When I create the path dynamic (datapath = \\\\fc01\\FMEdata\\KLIC, dataset = @Value(datapath)\\upload) things works fine. So I got it working but I do not understand why... Can anyone give me a hint in the right direction?

I know for sure server has read/write acces to this path as I have no problems writing gdb's to these locations. I create paths dynamically here as well because of a test-production thing I built in.

Thanks!

When your workspace is triggered by the notification, I believe the reader parameter is overridden with the json file that is generated by the directory watch publication.

This json file will give you the complete file and path name to the file that triggered the publication, so perhaps you won't even need the Directory and File Pathnames reader.

What I do, is that I use the topic monitoring in FME Server to display the small json block that is generated by the directory watch publication. Copy and save this block to a temp file, then create your json reader based on this temp file so that you get the correct attribute names.

Then publish this worskapace on FME Server and let the directory watch publication trigger it. Maybe send the output of the json reader to a Logger at first to understand how it works.


When your workspace is triggered by the notification, I believe the reader parameter is overridden with the json file that is generated by the directory watch publication.

This json file will give you the complete file and path name to the file that triggered the publication, so perhaps you won't even need the Directory and File Pathnames reader.

What I do, is that I use the topic monitoring in FME Server to display the small json block that is generated by the directory watch publication. Copy and save this block to a temp file, then create your json reader based on this temp file so that you get the correct attribute names.

Then publish this worskapace on FME Server and let the directory watch publication trigger it. Maybe send the output of the json reader to a Logger at first to understand how it works.

Thanks @david_r this makes sense. Important for me to understand what is happening under the hood.

 

While working on this I already thought using the json approach would be probably more easy but tried to keep things simple while learning. I like the way I can iterate / debug through the build process in Desktop and using the json block is a good idea to replicate the input.

 


Reply