Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

[FEAT] Add WatchFileSystem Activity #6304

Open
adamfisher opened this issue Jan 16, 2025 · 1 comment
Open

[FEAT] Add WatchFileSystem Activity #6304

adamfisher opened this issue Jan 16, 2025 · 1 comment
Labels
enhancement New feature or request
Milestone

Comments

@adamfisher
Copy link

Feature Request

Problem Overview

A common scenario workflow users come across is waiting for a file or folder in a directory to be created or changed before taking action.

Proposed Solution

The solution would be to add a new activity that integrates the .NET FileSystemWatcher into a new WatchFileSystem activity that allows a workflow user to specify a path segment to watch which suspends the workflow until the watch conditions are satisfied, at which point the workflow is resumed.

Activity Inputs:

  • Path: The path to the directory to watch for changes.
  • File Filter: The filter string, used to determine what files are monitored in a directory. Supports a simplified set of regular expressions.
  • Event Type: Dropdown selection of Changed, Created, Deleted, Renamed
  • Notification Types: A dropdown selection of the type of changes to watch for. These values will come from the NotifyFilters enum. (Can this be a multi-select? Would it make sense?)
  • IncludeSubdirectories: Checkbox indicating whether subdirectories within the specified path should be monitored.
  • Ignore Hidden Files: Checkbox indicating whether hidden files within the specified path should be monitored.
  • Ignore Hidden Folders: Checkbox indicating whether hidden folders within the specified path should be monitored.

Activity Outputs:

  • Directory: The Directory reference of the Path being watched.
  • File: The File reference matching the watch conditions.

Use Cases

  • Daily xml/json/csv/data files get dumped into a directory and I want to process them with Elsa when they become available.
  • I need to wait for a file exist before a downstream activity or workflow can begin execution and this WatchFileSystem activity would provide suspension capability until the file exists.
@adamfisher adamfisher added the enhancement New feature or request label Jan 16, 2025
@sfmskywalker sfmskywalker added this to the Elsa 3.4 milestone Jan 22, 2025
@sfmskywalker
Copy link
Member

Makes sense. We have this in Elsa 2, might be portable to Elsa 3 or at least serve as an inspiration.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
enhancement New feature or request
Projects
Status: No status
Development

No branches or pull requests

2 participants