Use the Refactor on Import wizard to rename classes or rulesets in an archive as it is
imported. This allows you to integrate the imported structure into the existing hierarchy on
your system. The Refactor on Import wizard supports merging RuleSets developed by Pegasystems or
others into your PegaRULES database.
The Refactor on Import wizard displays a listing of the classes in the archive and allows you to
specify the names of classes to replace the top-level and Data- classes
for rules contained in the archive. On import, the rules contained in the *.jar or *.zip
file, are read into memory, renamed with your specified changes, and then copied to the
Pega Platform database. The import archive is not modified. Errors are
reported on rules that will not validate when saved, but all rules are saved to the
database.
-
In the header of Dev Studio, click .
-
Click Refactor on import.
-
Select a file to import:
- If the file already exists in the server
ServiceExport
directory,
click Next.
- To upload a new file, click Choose file and follow the
prompts.
-
Select the name of the file you want to import, and click
Next.
-
Specify new class names and optional new ruleset names to apply to each class or
ruleset as they are imported and then click Next.
Note: If the archive contains a product rule, the Refactor on Import wizard looks for a
previous import of the same Rule-Admin-Product name. If there is a
previous import with the same name, the wizard displays the refactor parameters used in
the previous import as the default values for the current import.
-
Verify that the changes are accurate and click Next.
Click ExportToExcel to create a detailed
list of the rules that will be changed. You can use the spreadsheet to evaluate the
effects of renaming the class before beginning the processing.
-
Click Next.
-
Select additional rules to be changed. If the archive includes rules that the system
cannot clearly identify as a class or ruleset name, you see a list of additional rules to
be changed. The check box at the top of the column only selects the instances on the
current page.
Note: For example, the name may be embedded in a Java class name, a URL string, or some
other property. These may be incidental occurrences of the class name that you do not
wish to change. For example, if you had used your organization name for the original
class name, you might want to keep the name where it appears in strings displayed in the
user interface.
- Optional:
To review the additional rules outside the wizard, click Export To
Excel to create a spreadsheet of the currently displayed page or
Export All To Excel to create a spreadsheet of the entire report.
-
Review the list of all rule instances that you selected to be refactored that could
not be changed successfully. Hover over the error message in the Status column for more
details on the error. To review the status for all rules outside the wizard, click
Export All To Excel.
-
Click Finish.
Result: Each use of this wizard is recorded in an instance of the
Log-Refactor class, with a key identifying the date and time of the use.