How to import large archive .zip files using the Import Rules/Data tool
Summary
To migrate rules or data from one Process Commander system to anothyer, you can create and export archive. zip files. To import the .zip file (extract and save the contents to the database) use the Import Archive tool.
To access the tool, select File > Import Archive (zip) in the Developer portal.
Before you can import the .zip file, it must be in the Service Export directory on your Process Commander server. In most cases, you upload the .zip file from your local area network to your server using the Import Rules/Data tool.
However, if you attempt to upload a file larger than 25 MB (which is defined by the Initialization/MaximumFileUploadSizeMB
setting in the prconfig.xml
file) the following error appears:
HTTP Status 413 – User attempted to upload a file larger than 25 MB. Please contact the System Administrator.
You can use either of two methods to place an archive .zip file larger than 25 MB onto your server.
Suggested Approach
Method A: Copy the .zip file directly to the server
This method is preferable as it is easier to execute and less error prone than changing the prconfig.xml
setting (Method B).
- Use a File Transfer Protocol utility to copy the .zip file to your system’s
ServiceExport
directory on the server. The exact location of this directory varies depending upon your application server. For example, the Apache Tomcat path is /contextRoot/work/Catalina/localhost/prweb/StaticContent/global/ServiceExport where contextRoot is the path defined for this application. For more information about server directory configurations see Deployment Step 3: Installation. - Open the Import Rules/Data tool and select Zip File On Server mode.
- Select the .zip file you want to import and select all three import options (for more information about these options, see Application Developer Help).
- Click Import.
The system extracts the file and imports its contents intoto the PegaRULES database.
Method B: Modify the prconfig.xml file and upload the .zip file
Important: Modify theprconfig.xml
file only when needed. Reset the value to 25 MB when you have finished importing the file. Uploading files larger than 25MB is processing intensive and can use excessive server time during the transfer (which may be mistaken for a denial-of-service attack on the system).
- Locate and extract the prconfig.xml file using the procedures described in How to change prconfig.xml file settings.
- Open
prconfig.xml
in a text editor and add the following entry (in this example, 30 MB):<envname="Initialization/MaximumFileUploadSizeMB" value="30" />
- Save the modified
prconfig.xml
file, repackage it, and redeploy. - Open the Import Rules/Data tool and select Local Zip File mode.
- Use the browser to locate the .zip file and click Upload file.
The system uploads the .zip file to the server.
- Select all three import options and click Import
The system extracts the file and saves its contents to the PegaRULES database.
- When you have finished importing the file, optionally reset the
MaximumFileUploadSizeMB
value to 25 by repeating steps 1 through 3.
Related Information
- Administration and Security Guide V5.2 , Chapter 4