top of page
  • Writer's pictureAlex James

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

Updated: Mar 1

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


zip4j-2.9.1
.jar
Download JAR • 209KB

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


226 views2 comments

2 commenti


Pratham Sharma
Pratham Sharma
27 ott 2022

Have you tested Your Scipt??

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


Mi piace
Alex James
Alex James
28 ott 2022
Risposta a

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.

Mi piace
bottom of page