Configuring a product rule
Configuring a product rule
You define the application components you want to package in a product rule. Put the product rule in the same ruleset as the work class for the application.
Identify the components
You specify the components you want to export on the Contents tab of a product rule. The tab includes the following sections:
- Applications to include
- Rulesets to include
- Class instances to include
- Individual instances to include
- JAR files to include
- File details
For more information about the settings on the product rule Contents tab, see the help topic Specifying the content of a product rule.
Applications to include
Specify the application rules that identify the rulesets and versions to include in the archive file. Using this option eliminates the need to specify the individual rulesets and versions in the RuleSets to include section. Select the application in the Name and Version fields. The order of applications in the array is unimportant.
Rulesets included in the archive must have all the prerequisite rulesets included either in the product rule or on the destination system. When the product rule is exported to an archive file, the archive contains information about all the rulesets associated with the application. This information is used by the Import wizard to warn you about missing rulesets on the destination system.
A ruleset using Application Validation (AV) mode has no prerequisites. Rules within a ruleset using AV mode can refer to rules in any rulesets in the application and its built-on application. An AV ruleset, therefore, should be exported within the context of an application.
Use the following settings to automatically include specific components or patch ruleset versions in the archive.
- Select Include associated data to export any data instances associated with the application ruleset automatically. Instances selected in the Individual instances to include section are not used. Typically, these data instances are derived from the Data- class and include operator ID, access group, database table, and database records.
- Select Custom/Production rulesets to include the production rulesets listed on the application rule automatically. Select this check box if you are using delegated or localization rulesets (these are production rulesets).
- Select Include rule history to include the instances of History-Rule class. The instances are rows in the standard history rule table. These instances in the History tab of a rule include the date, time, operator, and comments that are added when a developer checks in a rule. This information can be useful for auditing purposes when migrating applications to another development or testing environment.
- Select Include data types to include the instances of the custom data types (classes) that you have created for your application. For example, you may have created a Customer data type to manage customer contact information. This data type might include information such as the customer name, email, or phone number. The data types are exported even if they are not associated with a ruleset.
- Select Delta mode to include only the current version of the application's rulesets in the archive file. For example, if your application references OrderEntry:02-03-05, the archive file produced from the product rule includes only rules in OrderEntry:02-03-05. This feature is useful when you are migrating a patch update.
Rulesets to include
Specify rulesets that are not part of an application. The rulesets can be entered in any order. During import, the system determines a valid order to load the rules. Make sure that the prerequisites are included in the list or already exist on the target system. For example, when you include rulesets from other applications, you must verify that all the prerequisites are listed in the product rule or are already present on the target system. If the prerequisites are not present on the target system, some rules may be unavailable.
- Use the Minimum version and Maximum version fields to define a range within a major version that you want to include in the product. Leave both fields blank to include all versions.
- Select Exclude non-versioned rules to exclude rule types that are associated with a ruleset but not with a version, such as class and application rules.
- Select the Include associated data check box to include data instances associated with the selected rulesets.
Class instances to include
You can include all instances from any class by entering a class name. In addition to concrete classes, you can enter an abstract class that has concrete subclasses. This section is useful for specifying data classes (derived from the Data- base class) that are required for an application to run correctly on the destination system. Remember that if you have selected the Include associated data check box in the Applications to include section or RuleSets to include section, all data instances associated with the rulesets are exported by default.
Be careful to note any dependencies among data instances or between data instances and your rules. During import to the destination system, data instances already present are by default not overwritten. These data instances may require adjustment after import.
You can use a when rule in the When filter field to filter the class instances that you want to include in the ZIP file. The ListView filter column is included for backward compatibility.
If you select Include descendants?, all the subclass instances are included and the ListView filter and When filter values are ignored.
Use the Exclude classes field to enter the names of descendant classes you do not want to include. You can enter more than one class using a comma (,) to delimit the names.
Individual instances to include
Complete this optional array by listing the specific class instances that you want to include in the archive file. For example, you may want to include only specific operators or access groups in the product rule, rather than all instances.
Instances are processed in the order listed on the product rule. This is important if your application includes views that reference each other. Listing the instances in the wrong order can create dependency tree errors. Drag the instances onto a different row on the list to change the order.
As a best practice, when selecting large numbers of instances, use a filter in the Class instance to include section.
JAR files to include
Pega Platform™ allows you to extend the Java code built into the Pega Platform with your own code. The code can be used with activities (Rule-Obj-Activity rule type), user interfaces, or system interfaces. If your application uses JAR files, complete the array in the Jar files to include section to include JAR files in the product archive.
To locate available JAR files, enter a class name in the Search jar files field and click Query jars.
Use this section to prepare the product rule for packaging in a ZIP archive file.
The date in the Creation Date field is displayed in the destination system before the archive file is imported. The date value entered persists even when the file is copied or renamed. Enter a text description of the contents of this file in the Short Description field. This value appears on the destination system before the archive file is imported.
As a best practice, lock the ruleset versions you want to include in the archive file. Doing so helps prevent updates to the rulesets after they have been packaged in the archive file. Select Allow unlocked ruleset versions? if you want to include unlocked ruleset versions. For example, select the check box if you include a delegated ruleset.
If you want to include post-import instructions such as a Read-Me text, identify an HTML rule on the Installation tab. The file is displayed at the end of the import operation for this product rule.
The Preview Product File button lets you review the items that will be included in the archive file. It is a best practice to review contents before you create the archive file to ensure that the contents are correct.
The Create Product File button creates an archive file on your local computer.