File Match Connector
File Match Connector
The File Match Connector adds a decision shape to the flow, capable of sending a message to one of two defined connectors based on the filename.
A File Match Connector functions as a fork in the flow. Files are sent along different paths in the flow depending on whether the filename matches a defined Filter. Files that match are sent along the solid blue flow path, and files that do not match are sent along the dotted gray flow path.
For example, when receiving X12 documents from a partner, it may be necessary to route the document to a specific flow depending on the document type. Promoting the document type to the filename and implementing a FileMatch Connector can ensure that X12 documents are routed and processed in the appropriate way.
FileMatch Connectors can be chained together in a ‘cascade.’ This allows for a multi-step conditional to sort files into the appropriate flows based on the filename.
This section contains all of the configurable connector properties.
Settings related to the core operation of the connector.
- Filter The glob pattern filemask used to determine whether files ‘match.’ Files that match this pattern are sent along the ‘Match’ path, indicated by a solid blue line. Files that do not match this pattern are sent along the ‘Else’ path, indicated by a dotted gray line. This pattern supports wildcards (e.g. *.txt).
Settings that determine the folder on disk that files will be processed from, and where they will be placed after processing.
- Input Folder (Send) The connector can process files placed in this folder. If Send Automation is enabled, the connector will automatically poll this location for files to process.
- Output Folder (Receive) After the connector finishes processing a file, the result will be placed in this folder. If the connector is connected to another connector in the flow, files will not remain here and will instead be passed along to the Input/Send folder for the connected connector.
- Processed Folder (Sent) After processing a file, the connector will place a copy of the processed file in this folder if Save to Sent Folder is enabled. This copy of the file will not be passed along to the next connector in the flow.
Settings not included in the previous categories.
- Log Messages Whether the log entry for a processed file will include a copy of the file itself.
- Save to Sent Folder Whether files processed by the connector should be copied to the Sent folder for the connector.
Settings related to the automatic processing of files by the connector.
- Send Whether messages arriving at the connector will automatically be processed.
The following sections detail how to use negative filters and multiple filters at a time.
The Filter setting can be set to a negative filter, which operates as the inverse of a regular filter. Only files that do not match the ‘negative’ filter will be considered matches. Negative filters can be set by including a minus sign before the pattern:
In this example, all files without a ‘.tmp’ file extension will be passed along the solid blue path, and all ‘.tmp’ files will be sent along the dotted gray path.
Multiple filters can be specified in a comma-delimited list. Later filters will take priority, except for when a filter exactly matches a filename (no wildcards or other character replacements). Positive and negative filters can be combined, for example:
In this example, all text files will be considered matches except those that begin with ‘processed_’. A file called ‘processed_file.txt’ would not be considered a match and would be sent along the dotted gray path.