Use Detector To Queue Items


I’d like to push items into a queue when they are added into a folder. I see that the file watcher detector will let me react on a new item being created, but you need to create a do...while(true) in order for that to continually monitor. Is there a better way to handle this through either Openflow/NodeRED or OpenRPA?


Certain activities written for Microsoft Workflow Foundation will allow the workflow to go idle ( setting an bookmark )
Detector is such an activity

If you use a state machine, you can make a clear workflow that shows this is a never ending workflow, and use it from a pick branch for instance.
But you do not NEED to, as you already have seen, you can simply create a while true, loop with the detector inside. There is no right or wrong here, both are fine.

The file watcher detector will raise an event every time Microsoft File system sends an event, but if noone is listening, the event is lost. The event will only be picked up if an workflow is idle waiting on “detector” activity ( or you can subscribe to it from nodered ) so it’s always a good idea to check for “more files” after processing to see if more files was added/changed . Some times Microsoft fails to notify on changes, so i always like to have a pack branch with both an delay and Detector pick, so i once in a while check for updates either way

This makes sense and will work for my use case. Thank you so much, Allan!

1 Like

This topic was automatically closed 3 days after the last reply. New replies are no longer allowed.