Folder connectors
Folder connectors either process all input files dropped in the folder (watched folder), add additional information to an output folder, or copy the output files to the folder after processing (output folder).
Watched Folder
The Watched Folder connector converts all files that are placed into a configurable input directory. After the conversion is finished, the files are deleted. Additional configuration options are also available: files in subdirectories are also converted.
This connector does not work well with Windows NFS share. If the watched folder is shared to be accessible by other computers using the NFS protocol, the service starts to process files before they are copied completely. This is due to a limitation in the Windows Server NFS implementation.
Possible solutions:
- Use the SMB protocol instead of NFS
- Use a two-stage process to place the file in the watched folder:
- Copy the file to a temporary directory on the NFS share.
- From there, move the file to the watched folder.
Settings for adding a watched folder:
- Folder Path: The path of the input directory.
- Recursive: Convert files in all subdirectories. If this option is enabled, the connector recursively searches all subdirectories for input files. Subdirectories are not deleted after the conversion is finished.
- Companion file: Add metadata from a companion file. If this option is enabled, the connector expects a companion file.
Companion file
The service expects a companion file for each input file, which has the same file name with a different (configurable) extension.
The companion file must be XML, but can be structured arbitrarily. A list of variables can be defined with a corresponding XPath expression that is used to extract the value of the variable from the XML.
The XPath expressions always have to evaluate to a string.
Variables are used to pass through information to the output connector. They can be used in certain configuration values of some output connectors in the form of [input:‹variable name›]
. For example, as argument in the Execute Command connector or as placeholders in the URL setting of the REST Output connector.
Example: Companion file configuration
Key | Value |
---|---|
myfirstvariable | string(/root/myelement/@myattribute) |
mysecondvariable | string(/root/myotherelement[@name="interesting"]) |
Using the following companion file
<?xml version="1.0"?>
<myroot>
<myelement myattribute="my value"/>
<myotherelement name="not interesting">not interesting value</myotherelement>
<myotherelement name="interesting">my other value</myotherelement>
</myroot>
results in the following variable substitutions usable in the output connectors:
[input:myfirstvariable]
→ my value[input:mysecondvariable]
→ my other value
Create Text File
This connector creates a text file with additional information in a configurable output directory.
- Job Status: Each output connector can only be active for a subset of result statuses:
- Success: The connector is active for all jobs that completed successfully without warnings
- Warnings: The connector is active for all jobs that completed successfully with warnings
- Success or Warnings: The connector is active for all jobs that completed successfully with or without warnings
- Error: The connector is active for all jobs that failed
- Folder Path: The path of the output directory.
- Filename: The name of the text file. The filename may contain placeholder values such as:
[input:NAME]
: The name of the input job.[input:‹variable name›]
: A variable set by the input connector.
- Content: The content of the text file. The content of the file is customizable and may contain placeholders:
[output:ERROR]
: The error message. This placeholder is only available in case of an error.[output:WARNINGS]
: A list of warnings that happened during processing. One warning per line.[output:EVENTS]
: A list of everything that happened during processing. One event per line including the severity.[input:NAME]
: The name of the input job.[input:‹variable name›]
: If the configured input connector supports variables, those can also be used as placeholders.
- Recreate Structure: Recreate structure of the input folder. If the input connector is a watched folder, the output connector recreates the input folder structure in the output folder for each processed input file. The folder structure is merged with the pre-existing folder structure in the output folder.
- Overwrite: If an output file has the same name as a file that already exists in the output folder, the preexisting file is overwritten.
If this option is disabled, the new file is renamed using a suffix: " (1)", " (2)", and so on. There is no optional prefix added to the file results.
Output Folder
The Output Folder connector copies files into a configurable output directory. The connector can either store the unchanged input files (originals), or the converted result files (results).
- Job Status: Each output connector can only be active for a subset of result statuses:
- Success: The connector is active for all jobs that completed successfully without warnings
- Warnings: The connector is active for all jobs that completed successfully with warnings
- Success or Warnings: The connector is active for all jobs that completed successfully with or without warnings
- Error: The connector is active for all jobs that failed
- Folder Path: The path of the output directory.
- File Set: The files to be copied to the output folder. You can either copy the unprocessed input files (originals) or copy the resulting files from the workflow to the output folder.
- Recreate Structure: You can choose to recreate structure of the input folder. If the input connector is a watched folder, the output connector recreates the input folder structure in the output folder for each processed input file. The folder structure is merged with the pre-existing folder structure in the output folder.
- Overwrite: If an output file has the same name as a file that already exists in the output folder, the preexisting file is overwritten.
If this option is disabled, the new file is renamed using a suffix: " (1)", " (2)", and so on. There is no optional prefix added to the file results.