Was this helpful?
Zip Invoker
This component is used to compress a file or a folder and its contents. The input for this component is either a SourceMessage or the value stored in the Source File or Directory property.
Zip Invoker is different from Zip Aggregator. Zip Invoker can compress one or multiple files within a single execution of the step whereas Zip Aggregator will process one file per execution of the step. For Zip Invoker input is a file or folder and output is a zip file. For Zip Aggregator, input are multiple files. It reads these files one at a time, allows you to processes them one at a time, in a loop, until no input is received, and then generates a zip file.
Zip Invoker Properties
There are no Zip Invoker properties.
Supported Actions
Action
Description
Execute
You can either specify input files using the Source File or Directory property, or pass the files to the component through a DJMessage using the SourceMessage parameter. The output result is zipped to the target DJMessage object.
Supported Action Parameters
When the Execute option is used, the following properties must be set:
Action
Parameter
Description
Execute
SourceMessage
Set this property to use DJMessage as a source. If a DJMessage is used as a source, then load the body of the DJMessage with the input files prior to the zip step.
Note:  Either the SourceMessage parameter or the Source File or Directory property must be defined, otherwise no source error occurs. If both are defined, the Source File or Directory property takes precedence over the SourceMessage parameter.
Execute
TargetMessage
Set this property to write the zip file to a target DJMessage. If the Output Zip File property is used, the zip file will be written to the path/zip file name that is specified. If it is not used, then the zip file will be written to the body of the TargetMessage.
Note:  To create a valid Zip file (body of the TargetMessage), you must set the DJMessage Encoding property:
trg.Encoding = ENC_BINARY
Note:  The maximum size limit for DJMessage is 2 GB.
IMPORTANT!  You can use DJMessage properties in a preceding step (script, start step, decision) to set the value for the Source File or Directory property. If this is the case, it will take precedence or override the Source File or Directory property in the component. Order of precedence will be:
a) DJMessage property defined before the Zip Invoker step
b) Source File or Directory property
c) SourceMessage parameter
Supported Action Properties
Property Name
Description
Source File or Directory
The path and name of the file or directory that must be compressed. You can use a Macro to ensure the portability of the process.
Include Source Directories and Sub-Directories
Select TRUE if you wish to include sub-directories, which may exist within the source directory, inside the zip file created by this component. Select FALSE if you do not wish to include sub-directories from the Source Directory in the resulting zip file.
The default value is TRUE.
Source File Matching Pattern
Allows you to specify a Java regular expressions or matching pattern using wildcards and literal characters to include only those files that match the specified pattern. Thus limiting or filtering the files that are compressed. This is case-insensitive.
For example, a directory may consist of 100 files of different formats and extensions, but you may want to compress only files with “.csv” extension. In this case you can specify “.csv” in the Source File Matching Pattern text box.
Target Zip File
(Optional) The path and name of the output zip file. You can use a Macro to ensure the portability of the process.
Zip Password
For better security, a password can be set to open a zip file. This property allows you to specify a password that will be required to open the zip file.
Zip Compression Method
The compression method:
DEFLATE (default) - The Deflate compression.
STORE - No compression.
Zip Compression Level
The level of compression for the DEFLATE compression method:
FASTEST - Level 1 Deflate compression.
FAST - Level 3 Deflate compression.
NORMAL (default) - Level 5 Deflate compression.
MAXIMUM - Level 7 Deflate compression.
ULTRA - Level 9 Deflate compression.
Zip Encryption Method
The encryption method used in the zip file:
NONE - No encryption is performed.
ZIP_STANDARD (default) - Encrypted with the weak zip standard algorithm.
AES - Encrypted with AES, the strongest choice.
Note:  When creating a zip file that uses the "AES" encryption method, make sure that your zip utility supports it.
Zip Aes Key Strength
AES Key Strength is only applied to the AES Encryption Method with the following options:
KEY_STRENGTH_128 - 128-bit AES key length
KEY_STRENGTH_256 (default) - 256-bit AES key length
Note:  This property is only displayed for AES Encryption Method.
Flatten Target
The flatten target property enables you to either maintain the original directory structure when compressing the files to a zip file, or discard that structure and compress all files to a single folder (the current directory).
Valid values:
TRUE - Do not retain the directory structure when compressing files and flatten everything out.
FALSE (default) - Retain the directory structure when compressing files.
Target Duplicates
The following options are available for duplicate zip entries (the same file name and target folder name):
Error (default) - Throw exception
Ignore - Keep first zip entry
Replace - Keep last zip entry
Rename - Keep all files by adding a number before the file extension.
Note:  This property is only applied when Flatten Target property is set to TRUE.
Error Codes
Code
Description
Reason
6
Write error
Error occurred while writing ZipEntry to zip file.
6
Write error
Error occurs when writing message to zip file.
12
No source error
No message file input to zip. Set the Source File Or Directory property for creating the zip file.
46
License error
The Zip Iterator is not licensed or has an expired license.
Last modified date: 10/22/2024