top of page

How to decrypt/unzip a password protected zip file in Boomi

Writer: Alex JamesAlex James

Updated: Mar 1, 2024

Boomi OOTB currently doesn't support unzipping a password protected zip file. However, this can be accomplished using a third party library Zip4j which has comprehensive features for Zip encryption/decryption.


We will go through the steps to understand how a Boomi Process can extract files from a password protected zip file.


There are two ways how the ZipFile document can be passed as input to the Zip4j custom script. a) ZipFile present in a local disk location and the script can directly access the file from the source directory.

b) ZipFile document is passed as InputStream to the Zip4j script. Usually documents flow as streams of data from one shape to another in the process. If the ZipFile is retrieved from source application say SFTP folder or email attachment, then the document will be as a data stream and can be passed directly as InputStream to the Zip4j script.

However in both the approaches, the extracted files will be written to a local destination directory.


Download the Java library and add it to account libraries

  1. Download the JAR from https://mvnrepository.com/artifact/net.lingala.zip4j/zip4j/2.9.1. You can also download from here


2. In the AtomSphere platform, Go to Settings --> Account Information and Set up --> Account Libraries. Upload the downloaded JAR file from your local folder to the platform.



Create a custom library component and deploy it to your environment

Approach 1: ZipFile present in a local directory and extracted files written to a local destination directory

Approach 2: ZipFile document is passed as InputStream to the Zip4j script.

Final Output


 
 
 

2 Comments


Pratham Sharma
Pratham Sharma
Oct 27, 2022

Have you tested Your Scipt??

it is throwing :-- unable to resolve class net.lingala.zip4j.ZipFile @ line 3, column 1. Error


Like
Alex James
Alex James
Oct 28, 2022
Replying to

Hi Pratham, this is a tested code. Did you create a custom library component and deploy it to your environment? I observe from the exception thath the Boomi runtime could not recognize the class.

Like
bottom of page