Enter your keyword

post

How to create ZIP file in Oracle Integration Cloud

Are you keen to know how to create Zip file in Oracle Integration Cloud (OIC)? Zip file creation is one of the key aspect of ERP based related integration.
 
This is the article, which will let you know how to create zip file in OIC with the help of  FTP adapter.
 
After this article, you will be able to create a zip file containing multiple types of files.

See the article to see how to read zip file.

Let’s go into depth and see how to go step by step to achieve this.

  • Create a scheduled process with name ZipFiles_Int
  • Drop an FTP connection on Integration canvas
  • Enter the endpoint name as “ListFiles
  • Enter the following information and click the Next button
    • Select Operation: List File
    • Input Directory: Enter the directory (/home/opc/source) from which files to be listed
    • File Name Pattern: *
  • Finish the FTP wizard
  • Drop the For-Each acidity just below the FTP adapter and populate below information
    • Name: LoopOverTheFiles
    • Repeating Element: Drop the repeated element of ListFile Response
    • Current Element Name: CurrentFile
  • Drop the FTP adapter under the For-Each loop
  • Enter the endpoint name as “DownloadFileToStage
  • Enter the following information and click the Next button
    • Select Operation: Download File
    • Select a Transfer Mode: ASCII
    • Input Directory: Enter the directory (/) from where the files will be picked up
    • File Name: *
    • Download Directory: Enter the directory(/filestozip) on which the files will be downloaded on Integration Staging area
  • Edit the DownloadFileToStage mapper and do the following mapping:
    • $CurrentFile-> File->directory    —-à   DownloadRequest->directory
    • $CurrentFile-> File->filename    —-à   DownloadRequest->filename
  • Drop the Stage activity outside the loop and enter “ZipTheFiles” as an endpoint name
  • Configure below option and click the Next button
    • Choose Stage File Operation: Zip Files
    • Specify the File Name: Enter the zip file name (test.zip)
    • Specify the Directory to zip: Enter the directory which you want to zip(/filestozip). This should be the same as we mentioned during Download File operation in the previous step
    • Specify the Output Directory: Enter the directory(/zipdir) in which you want to create zip file
  • Drop the FTP adapter just below the Stage activity and enter the endpoint name as “WriteZipFileOnFTP
  • Configure options as below and click the Next button
    • Select Operation: Write File
    • Select a Transfer Mode: ASCII
    • Input Directory: Enter the directory (/home/opc/target) where you want to push the zip file from the staging area
    • File Name Pattern: test.zip
  • Select “No” from Do you want to specify the structure for the contents of the file and finish the  Wizard
  • Edit the WriteZipFileOnFTP mapper and do the following mapping:
    • $ZipTheFiles -> FileReference    —-à   WriteFile->ICSFile->FileReference
    • $ZipTheFiles -> filename             —-à   WriteFile->filename
 
 
All the configuration is completed, save and close the integration. Keep some files on the FTP source location and Submit the integration

 

 

Open the target location and see the zip file should be created

 

 

Leave a Reply

Your email address will not be published.