Skip to main content

Hi all,

I'm trying to set up a workspace that should fire every time a file is added to a folder. I came across the reader format "Directory Watch Reader", but so for I have been unable to find any documentation about how to use this reader type. If this is covered in the documentation anywhere, or in an article here at knowledge.safe.com, I'd be grateful for a link.

You don't really need the Directory Watcher Reader. See if you can follow this example for FME Server 2016.

https://s3.amazonaws.com/gitbook/Server-Authoring-2016/ServerAuthoring4RealTime/Exercise1.html

 

Its a great function once you understand how it works


I've never used the Directory Watch Reader (custom format), but you can see its description from the "Details" button in the Reader Gallery.

And if you click the "Edit" button, you can see the workflow of the reader on Workbench canvas.

You don't really need the Directory Watcher Reader. See if you can follow this example for FME Server 2016.

https://s3.amazonaws.com/gitbook/Server-Authoring-2016/ServerAuthoring4RealTime/Exercise1.html

 

Its a great function once you understand how it works

Thanks! That's very useful.

 

 

I had already managed to set up the serverside topic and directory watch, what I was really looking for was how to interact with the topic on the server using FME Workbench. I realise now that the notification doesn't give me the file name directly, but as json, so that I have to extract the info I need using a JSON flattener. I was also unsure of which reader type to use, but just found an example that uses the text_line reader type.

 


I've never used the Directory Watch Reader (custom format), but you can see its description from the "Details" button in the Reader Gallery.

And if you click the "Edit" button, you can see the workflow of the reader on Workbench canvas.
That's just what I was looking for, thanks! (And if I'm not the only one wondering where the Reader Gallery is: click Readers -> The dropdown button next to Format -> More Formats...)

 

 

For some reason I am unable to click Edit. (I'm using FME Workbench 2016.1.1, b 16609), and the Reader icon has a green arrow on it?

 

 

directorywatch.jpg

 

 

I haven't been able to add the reader to my workspace, that could be the reason. Can you help me to figure out what the input to "Dataset" should be? I've tried with the name of the topic on the server, as well as putting the name of the topic in the FME Server Parameter FME_TOPIC, and referencing the parameter with $(FME_TOPIC), but no luck. The details of the reader says "Set this as the notification reader in a workspace", but I'm not certain how to do that.

 

 

dataset.jpg

 

 


I've never used the Directory Watch Reader (custom format), but you can see its description from the "Details" button in the Reader Gallery.

And if you click the "Edit" button, you can see the workflow of the reader on Workbench canvas.
I realise now that "Set this as the notification reader" probably means to setting it when publishing the workspace to the server. On the "Register Services" pane, I click "Edit..." next to Notification Service, and then I'm able to select a "Send Notification Data to Reader". This is where I would select the Directory Watch Reader... if I were able to add the Directory Watch Reader to my workspace.

 

 


I realise now that "Set this as the notification reader" probably means to setting it when publishing the workspace to the server. On the "Register Services" pane, I click "Edit..." next to Notification Service, and then I'm able to select a "Send Notification Data to Reader". This is where I would select the Directory Watch Reader... if I were able to add the Directory Watch Reader to my workspace.

 

 

yeah, the Directory Watch Reader is a custom format published through the FME Hub, so it's necessary to select it as the Format in the Add Reader dialog box to download and install. Once you install that, then the Edit button is enabled.

 


yeah, the Directory Watch Reader is a custom format published through the FME Hub, so it's necessary to select it as the Format in the Add Reader dialog box to download and install. Once you install that, then the Edit button is enabled.

 

Thanks, that solved my problem! And I realised I can just add "*.txt" in the Dataset-field to be able to add the reader to my workspace.

 

 


Reply