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
| Field | Description |
|---|---|
| File Path | Server-side file path to watch. The path can include workflow properties and wildcard patterns such as *.csv. |
| Read file content to property | Stores supported file content in SERVER_FILE_LISTENER_CONTENT. |
Outputs
| Output | Data Type | Collection | Description |
|---|---|---|---|
| ChangedFile | NodeFile | False | The trigger outputs a NodeFile for the changed file. |
Properties
| Property | FlowDataType | Description |
|---|---|---|
| SERVER_FILE_LISTENER_FILE | JsonNode | File information that been listened for changed from the server |
| SERVER_FILE_LISTENER_CONTENT | String | The 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.csvwatches one file.C:\signatures\*.xlsxwatches matching files in a folder.C:\signatures${EXEC_BY_USERNAME}_scanned_signature.jpguses 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.