ArchiveResponse

Group

Custom Classes Phase 6

Class Name

com.ebd.hub.datawizard.util.ArchiveResponse

Function

Provides input, output and log file of the profile and a metadata file for an archiving system in a directory.

Configuration File

archive_response.properties

Description

With this class, the input and output files of the profile can be made available to an archiving system in a directory. In addition, a log file and, necessary for some archiving systems, a metadata file can be stored.

Parameter Description

destination

The name under which the output file of the profile is stored in folder directory. The output file is the one set in Response Route field Content. The encoding of the file is 8859_1. See class ArchiveUtf8Response for a UTF8 encoding.

directory

The directory where all files are stored.

log

The job log file of the profile can also be stored in folder directory.

meta

The name of an additional metadata file that is needed for some archive systems. For details, please refer to the documentation of your archiving system. See example below.

meta-encoding

The encoding of the metadata file meta.

meta-template

The template on the basis of which the metadata file meta is generated. See example below.

source

The name under which the input file of the profile is stored in folder directory

zip

If a name is given here, all files in the folder directory are zipped into an archive file with this name.

Note: Generally, a file is not created if no name has been specified in the configuration file for it.

Note: Variables can be used in the configuration file and the metadata file. See example below. The placeholder @VAR_JOBNR@ would be replaced by the value of system variable VAR_JOBNR.

Example of a Configuration File

We use value ./conf/archive/archive_response.properties in the Response Route field Additional Parameter.

The following is the contents of the corresponding properties file. Note: See section Structure of a Properties File.

archive_response.properties
destination=target.csv
directory=./temp/archive/@VAR_JOBNR@
log=log.txt
meta=target.jpl
meta-encoding=8859_1
meta-template=./temp/archive/template.jpl
source=source.dat
zip=@VAR_JOBNR@.zip

Example of a MetadataTemplate

The following is the metadata template file template.jpl, from which the metadata file target.jpl is generated.

template.jpl
docu_type="DREC"
logi_directory="Share"
dok_dat_field[1]="@VAR_JOBNR@"
dok_dat_field[81]="0000285123"
dok_dat_field[3]="Example Ltd"
dok_dat_field[10]="4512345678"
dok_dat_field[4]="4545974"
dok_dat_field[50]="20160711"
dok_dat_field[70]="260.00"
dok_dat_field[15]="GBP"