XML Match Connector [Deprecated]
XML Match Connector [Deprecated]
The XML Match Connector adds a decision shape to the flow, capable of sending an XML file to one of two defined connectors based on data that is dynamically parsed from the input XML.
An XML Match Connector functions as a fork in the flow. XML files are sent along different paths in the flow depending on whether the value at a specified XPath matches a defined Value. 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.
One common use case involves routing EDI files based on the EDI document type. After the EDI file is converted to XML via an X12 or EDIFACT connector, the XML Match Connector can check the XML structure for the document type and route the file to the connector configured to handle the appropriate type.
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.
- Type The data type of the element value that will be used to match files. Support data types are Strings, Numbers, and DateTime formats.
- XPath The path in the XML structure to the data that should be used to route files. The value at this path will be compared to the Value setting to determine if the input file is a match.
- Operator The logical operator that should be used to compare the element value in the input file and the Value setting.
- Value Element values parsed from input documents will be compared with this setting. The type of comparison depends on the Operator setting.
Settings not included in the previous categories.
- Log Subfolder Scheme Instructs the connector to group files in the Logs folder according to the selected interval. For example, the Weekly option instructs the connector to create a new subfolder each week and store all logs for the week in that folder. The blank setting tells the connector to save all logs directly in the Logs folder. For connectors that process many transactions, using subfolders can help keep logs organized and improve performance.
- 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 for specific use cases.
- Other Settings Allows configuration of hidden connector settings in a semicolon-separated list, like
setting1=value1;setting2=value2. Normal connector use cases and functionality should not require use of these settings.
Settings related to the automatic processing of files by the connector.
- Send Whether messages arriving at the connector will automatically be processed.
In many EDI setups, multiple types of EDI documents will be received over the same connection, and these documents need to be handled by different connectors depending on the EDI document type. The XML Match Connector easily provides the routing logic necessary to ensure documents are sent to the correct connector. For the purposes of this example, AS2 will be the EDI transport protocol, and X12 will be the EDI standard.
The flow to handle this case would look similar to this:
In the above flow, all incoming X12 documents are converted into XML by the X12_inbound connector; then the XMLMatch_doctype connector checks the document type and routes 850’s to XMLMap_850 and any other document type to XMLMap_214. This setup assumes that only 850’s and 214’s will be received from this partner.
The XMLMatch_doctype connector could have the following configuration:
- Type: ‘Number’
- XPath: ‘/Interchange/FunctionalGroup/TransactionSet//Meta/ST01’
- Operator: ‘Equals’
- Value: ‘850’
With the above configuration, files will only be considered a match if the value of the ST01 element is equal to 850.