Import gadget - Prerequisites

Use this option on a target Pega 7 Platform system, the destination system of a migration operation.

This option lets you import the contents of an archive ZIP file produced by the Export Rules/Data tool, the Purge/Archive wizard, the Product Package wizard, or the Product or Product Patch rule forms.

Basics

Rules, data, and other Pega 7 Platform instances contained in the ZIP file are added to the rules already present in this system, optionally overwriting some existing rules. Data instances (if any) in the Zip file are added to the data instances already present, optionally overwriting some existing ones.

To start the Import Archive tool, select Designer Studio> Application > Import & Export > Import.

You can also import Pegasystems engine changes contained in a JAR file, or third-party JAR files directly into the pr_engineclasses database table using this gadget. Upon restarting the server, code contained within the JAR file will be available and can be called from Java steps in activities. Using this approach, you do not need to undeploy and redeploy the prweb application, nor make any changes to the prconfig.xml file. (By default, the JAR file is loaded into the Customer CodeSet identified in the prbootstrap.properties file.)

1. Select an Import mode

Complete the Select Import Mode field. Select:

 2. Completing the Form — Local ZIP file

In the File Name field, type in the full path and name of the ZIP file to be uploaded, or click Browse.

Navigate to the local directory that contains the ZIP file, select it, and click Upload file.

If you attempt to upload a ZIP file when the ServiceExport directory already contains a file of that name, a prompt appears. Click to confirm that you want to overwrite the existing file.

Using this facility, by default, you can't upload a ZIP file using this facility that is larger than 1GB. This is an intentional design restriction on the HTTP file copy facility, not a limit on the rule import processing. For larger files, use File Transfer Protocol (FTP) or another means to place the file into the ServiceExport directory. Alternatively, you can set a higher (or lower) upload limit on your system by changing the value for the Initialization/MaximumFileUploadSizeMB parameter in the prconfig.xml file. See Limits and maximums.

 3. Completing the form — Zip File On Server

  1. Click to select one file in the boxed text area.
  2. Set options as desired:
Option Description
Compile Libraries

Select to force Java compilation of the libraries affected by the rules in the ZIP file following upload.

This option is meaningful when the ZIP archive contains a library rule (Rule-Utility-Library rule type) or function rule (Rule-Utility-Function rule type). You can also compile any library later from a button on the Library form.(This check box compiles the libraries on the current node during the import operation. On each other node of a multinode cluster, the Pega-RULES agent compiles these libraries later, ensuring consistency in compiled code across all nodes.)

Update Only If Newer

Select this option to only import instances of rules that have a more recent update time then the instances of those rules already present in the system. This is particularly valuable when importing hot fixes, because the user can import hot fixes in any order, without having to worry about whether the new import might conflict with or cancel out a previously-imported hot fix.

Overwrite Existing Rules

Select this option to overwrite any rule instances with the same RuleSet name, RuleSet version and visible keys that are already present in the destination PegaRULES database with the rule from the archive ZIP file.

If not selected, when you click Import, the tool scans the rules in the ZIP archive and compares them with existing rules in the system, noting any matches.

If matches are found, you cannot import the ZIP archive. You can:

  • Cancel the import operation
  • Restart the operation (return to the Tools menu) and check this box to force overwrites.
  • Update rules in the source system or destination system to eliminate the conflict and restart the operation.

Technically, a "match" means identical values for four properties:

  • pzInsKey — Internal key, includes creation date and time
  • pxUpdateDateTime — Date and time of last update
  • pyRuleSet — RuleSet
  • pyRuleSetVersion — Version

If this check box is selected, rules in the ZIP archive overwrite rules in the current system if they match on pzInsKey, pyRuleSet, and pyRuleSetVersion. (If the pxUpdateDateTime also matches, the rule is skipped; there is no need to overwrite, as the rule in the ZIP archive and the rule in the system are identical.)

This operation is not a merge; the rule from the ZIP archive overwrites the matching rule, regardless of which one was updated most recently.

If a RuleSet or RuleSet Version in the ZIP archive is not secured, but a matching RuleSet or RuleSet Version in the current system is marked as secure, overwriting the existing rule effectively removes the security check mark. If this is not intended, secure the RuleSet or RuleSet Version again.

Overwrite Existing Data

Select this option to overwrite any existing data instances with the same key that are already present in this destination PegaRULES database the database with the data instance in the archive ZIP file.

If matches are found, you cannot import the ZIP file. You can:

  • Cancel the import operation
  • Restart the operation (from the Tools menu) and check this box to force overwrites.
  • Alter data instances in the source or destination system to eliminate the conflict, and restart the operation.

Technically, a "match" means identical values for two properties:

  • pzInsKey — Internal key, includes creation date and time
  • pxUpdateDateTime — Date and time of last update

If the check box is selected, data instances in the ZIP archive overwrite data instances in the current system if they match on pzInsKey. (If the pxUpdateDateTime matches, there data instance is skipped; there is no need to overwrite, as the data instance in the ZIP archive and the one in the system are identical.)

4. Review File Data details

Review the File Data metadata details that appear, to confirm that this ZIP archive is the intended one and is appropriate for your system. The File Details area may contain the following metadata:

Label

Description

Type

Indicates whether the ZIP archive contains only RuleSets, is derived from a product rule, or contains Java classes.

Operator

Full name of the user who exporting this ZIP on the source system, from the General tab of the Operator ID data instance.

PRPC Engine

Version of the source system.

Pega-Build-Date

For an application bundle, the date the bundle was created.

Pega-CodeSet-Name

For an application bundle, the name of the CodeSet from which any Java JAR files were extracted.

Pega-CodeSet-Version

For an application bundle, the version number of the CodeSet from which any Java JAR files were extracted. >

Manifest-Version

If available, a version number extracted from the application bundle manifest file.

Pega-CodeSet-Patch

Not used.

Name

If the Type is Product, the Product Name key part of the product rule in the source system.

Version

If the Type is Product, the Product Version key part of the product rule in the source system.

Instance Count

Count of all records in the ZIP archive.

Label

If the Type is Product, the Short Description of the product rule in the source system.

Creation Date

Date and time the ZIP archive was exported from the source system.

Archive Type

One of: PegaArchive for a product rule or RuleSet export, JAR for a Java Archive, or Application Bundle, for a collection of multiple ZIP archives with a manifest.

Synchronizable

Not used.

RuleSet Name

If the archive contains only some or all versions of a single RuleSet, the name of the RuleSet.

5. Optional. Select Specified Instances For Load

To import specific rules or data from the ZIP archive, rather than the entire contents, select the check box Show Contents. The Import gadget display expands to list all the rules in the archive by Key name and RuleSet Version.

Select the check box next to each rule you want to import. The Import Options you have selected are applied to each rule individually as they would be for the entire archive.

When you have completed your selection, continue with the Import.

All components required by the rule must be present in the target system or imported along with it. See PDN article 24183 Troubleshooting: "Class...does not exist" error when importing a ZIP archive for more information on these types of errors.

 6. Begin Import

Click Import. The import operation starts. Importing may take several minutes or more.

The system attempts to upload the rules in an order that minimizes processing. After processing completes, adjust access groups or application rules to provide access to the new RuleSets, versions, and class groups as needed. Other users must log off and log in again to access the uploaded application RuleSets.

Click Close to close this form.

Notes

If you upload rules in a RuleSet version that users already can access, they may begin executing them immediately, possibly before other rules in the same ZIP archive are present. This may be desirable and intended, or not desirable. Similarly, declarative rules begin executing for such users immediately. Declarative rules may fail if not all the elements or properties they reference are uploaded yet.

In a multinode system, the lookup list cache on nodes other than the node on which you run the Import Archive tool may be stale temporarily. The Pega-RULES agent on each other node clears the lookup list cache during the next pulse.

If you import rules in a RuleSet version that some users already can access, they may begin executing them immediately, possibly before other rules in the same ZIP archive are present. This may be desirable and intended, or not intended. Similarly, declarative rules begin executing for such users immediately; declarative rules may fail if not all the elements or properties they reference are uploaded yet.

By default, you can't upload a ZIP file larger than 1GB to the server from your desktop with the Import Archive tool. This is a limitation on the upload operation, not on the import itself. Use FTP or another means to place the ZIP archive into the ServiceExport directory on the server, or change the limit through a prconfig.xml file setting. See Limits and maximums.

The property @baseclass.pxMoveImportDateTime records the date and time that a rule (or other instance) was imported from a ZIP archive. You can report on this property (for one rule type such as properties or flows) on when the rules moved into a system.

During the ZIP import operation, the system confirms, for each RuleSet version imported, that other RuleSet versions (or higher versions) identified as prerequisites are present. For example, you can't import a product ZIP archive exported from a Pega 7 Platform 05-03-01 system into a Pega 7 Platform 04-02-60 system. The converse — from 04-02-60 to 05-03-01 — is allowed, however. (This check is not performed for a ZIP archive that contains only RuleSets and was created directly in the Export Archive tool.)

Definitions application bundle, CodeSet, lookup list

About Archive tools