Contents

The Compression component is used to compress the incoming data and send it forward. This component can compress file or directory and store it to target directory. It makes use of the APIs available in the java.util.zip package. The component compresses the text and attachment contained in the incoming document.

Configuration and Testing

Interaction Configurations


Figure 1: Interaction Configurations

Attributes

Compress File?

Enable this property to compress the input file or directory.

After this property is enabled, below attributes (which appear when Compress File attribute is selected) need to be specified.


Figure 2: Attributes supporting Compress file property

Source File Directory

The directory from where the component picks the files to be compressed. Provide absolute path here.

Source File Name

The name of file which need to be compressed. Provide the full file name with extension .zip, for example, inputfile.zip

Icon

This field should be left empty if Source Directory has to be compressed..

Target File Directory

The directory to where the component sends the compressed file/s, that is, where the files get stored. Provide absolute path here.

Action if same file exist

If the file with same name exists in the target folder, choose the action to be taken from the below options:

  • Overwrite: Overwrites the existing file and hence the old file gets replaced with the new one.
  • Rename: Renames the file with "filename + MMddyyHHmmss + counter(optional)".


Figure 3: Options of Actions in case file name matches

Icon
  • For the Expert Properties Cleanup resources (excluding connection) after each document and Target Namespace, please refer the respective sections in Common Configurations page.
  • For Monitoring configuration property too, refer the respective section in the above-mentioned page.

Scheduler Configurations

Please refer the respective section in Common Configurations page.

Transport Configurations

Please refer the respective section in Common Configurations page.

Icon

Transport Configurations panel will be available only if scheduling is enabled in Scheduler Configurations panel.

Error Handling

Please refer the sections Request Processing Error and Invalid Request Error in the Error Handling section of Common Configurations page for details.

Testing

Sample Input and Output

The configuration can be tested by clicking the Test button in the Interaction Configuration panel.

Type "Hello World!" in the Input Message editor and click Execute.


Figure 4: Sample Input Message

Response generated appears in the Output Message tab.


Figure 5: Response Generated

Functional Demonstration

Scenario

Compress the incoming data.

Configure the Compression adapter and use Feeder and Display component to send sample input and to check the response respectively. Bytes data is displayed in the Display component.


Figure 6: Sample Event Process

Sample Input

Run the Event Process and click Send in the Feeder window.


Figure 7: Sample Input

Output

"Input Text" in the feeder is the default message present in the Feeder window.


Figure 8: Output in the Display window

Useful Tips

Currently the component’s compression algorithm is not configurable.

Adaptavist ThemeBuilder EngineAtlassian Confluence