Skip to main content

File Listener (B2WS Server)

Overview​

The File Listener (B2WS Server) trigger watches a file path on the B2Win Suite server and starts a new iteration when the matching file changes.

Purpose​

Use this trigger when files are created or updated on the server and the workflow should process each changed file automatically.

Configuration​

FieldDescription
File PathServer-side file path to watch. The path can include workflow properties and wildcard patterns such as *.csv.
Read file content to propertyStores supported file content in SERVER_FILE_LISTENER_CONTENT.

Outputs​

OutputData TypeCollectionDescription
ChangedFileNodeFileFalseThe trigger outputs a NodeFile for the changed file.

Properties​

PropertyFlowDataTypeDescription
SERVER_FILE_LISTENER_FILEJsonNodeFile information that been listened for changed from the server
SERVER_FILE_LISTENER_CONTENTStringThe file content inside a property

Processing Logic​

The trigger evaluates the configured path, lists matching files when a wildcard is used, sorts changed files by modification time, loads each file into the workflow as a NodeFile, and emits them sequentially. The last processed modification timestamp is stored after a successful iteration.

Examples​

  • C:\example_folder\examplefile.csv watches one file.
  • C:\signatures\*.xlsx watches matching files in a folder.
  • C:\signatures${EXEC_BY_USERNAME}_scanned_signature.jpg uses a workflow property in the path.

Notes / Limitations​

  • File content is only stored as a property when the option is enabled and the file type can be read safely.
  • The watched path must be accessible from the B2Win Suite server process.