Purpose
It’s a common practice for an Integration engine to save a copy of the data that is received from an external source, also a copy of the data that have been produced and sent out. This is for record-keeping, auditing, and have the option to “re-play” records if it’s ever required.
The Catcher handler is designed for this purpose – it simply “catches” the records from its upstream node (the “parent node”) and saves the data to files in the node’s home folder.
Cather handler does not do any data processing, rather than providing itself as a record-catching “storage”. Thus by design, minimal configuration options are available. The output file name is created dynamically based on the “original source of data” (that is, if the source is a file, it will be the file name; if it’s from a network input, it’s the receiver node’s hostname and port.) suffixed by a date stamp.
If YES, catcher appends new records to the existing file if the targeted file already exists. Otherwise, if will create a different file with a different name to avoid name clash. This will happen if the same file is processed multiple times by a Foldda solution.
Unlike the other handlers, Catcher handler produces no output data to be passed down-stream nodes, thus Catcher node cannot have children node – Foldda Integrator will ignore any nodes after a Catcher.
Parameters
The following three parameters can be configured through the handler’s config file.
Name | Values | Remark |
append-if-exists | YES or NO (default) |
Config Example
In the Catcher handler’s config in this example, it appends all records to a daily file if the source is the same.
<Handler>Catcher</Handler>
<Parameters>
<Parameter>
<Name>append-if-exists</Name>
<Value>YES</Value>
</Parameter>
</Parameters>
See Also
The HL7 File Writer handler.