Branch Connectors add a decision shape to the flow, capable of sending a message to one of two defined connectors based on the filename, a header in the message, or a specific value in the file (if it is an XML file).
A Branch Connector functions as a fork in the flow. Files are sent along different paths in the flow depending on whether the condition specified in the connector is true. Branch conditions can check for three different types of values:
- The filename
- A header in the file/message
- A value at a specified xpath in the file (must be an XML file)
The Branch Connector configuration determines which of these values to look for, and the “target” value that it should be compared against. If the actual value matches the target value, then the message will be passed along the solid blue flow path, and if the values do not match, then the message will be passed along the dotted gray path.
Branch Connectors can be chained together in a ‘cascade’ for multi-step conditional processing, similar to a ‘select-case’ statement. More details can be found in the Cascading section.
This section contains all of the configurable connector properties.
Settings related to the core operation of the connector.
- Connector Id The static name of the connector. All connector-specific files are held in a folder by the same name within the Data Directory.
- Connector Description An optional field to provide free-form description of the connector and its role in the flow.
- Match Type Whether the branch condition will look at the filename, a header in the file, or the value at an xpath in the file.
- Data Type Whether the target value is a string, number, or DateTime.
- Operator How the actual value should be compared to the target value (e.g. equal-to, starts-with, regex-match).
- Match Value The value to compare against the actual value found in the file.
- Match Case Whether the string comparison should be case-sensitive.
- Trim String Whether the string comparison should ignore whitespace.
- DateTime Format How DateTime values will be structured to enable comparison.
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.
- Ignore Missing Values Whether to treat missing headers or xpaths as the empty string. This avoids errors being thrown when an expected header or xpath is missing, and instead passes the message along the ‘does not match’ Flow path.
Log Subfolder Scheme By default, logs for transactions processed by the connector will be stored in the Logs subfolder for the connector. For connectors that process many transactions, it may be desirable to further divide the logs based on the datetime they were generated. When this setting is set to Daily, logs generated on the same day will be grouped in a subfolder;; when this setting is set to Weekly, logs generated in the same week will be grouped in a subfolder; and so on.
- 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.
A single Branch Connector determines whether a message will be passed along one of two paths. To create a multi-step conditional, like checking for several different possible header values, Branch Connectors should be chained together in a cascade. The dotted gray path for each Branch Connector should be connected to the next Branch Connector in the Flow.
For example, imagine that an incoming file has a header value indicating how the file should be processed. This header will have one of three different values, and depending on this value, the file needs to be dropped off at a different host/directory on the network.
For this case, the Branch Connector could be used in a cascade like the following:
In this example, each Branch Connector is checking for one of the three possible header values. If the header matches, the file is passed along to a File Connector to be dropped off in the appropriate directory. If it does not match, the file moves along to the next Branch Connector (i.e. moves to the next ‘case’).