Skip to main content

Product Rule

Application components

Applications consist of Rules, Rulesets, application data, system data, and other objects such as database schemas. As an application moves toward production, the application and its components must migrate among Pega systems. For example, you migrate the application from a development environment to a testing environment, and then finally to a production system. In some cases, you may want to migrate only specific application components such as updated Rulesets or data types included in a patch release.

Consider the following scenario: If you move from one house to another house, you might create a manifest of household items that you want to move. You do not include things like cabinets, plumbing, or wiring, as these items are already in the house to which you are moving. You then load the items on the manifest list into a moving van. When the van reaches its destination, you take the items out of the van and unpack each item.

Like the manifest described in the previous example, you create a product Rule that identifies the application components you want to move to a destination Pega Platform system. A product Rule lists the Rulesets, data, and other objects that make up an application. The product Rule usually does not include standard Rulesets and data because those components are built into all Pega Platform systems. A product Rule is an instance of the Rule-Admin-Product class, also referred to as a RAP.

Note: You can find product Rules in the Records Explorer > SysAdmin category.

You can access the Product Preview dialog from the Product Rule to view a summary of application contents.

In the following image, click the icons to learn about the Product Preview dialog:

Application Packaging wizard

Pega Platform uses the product Rule to create an archive file that is used to export and import the selected contents. Like loading the moving van, you put the contents of the product Rule into an archive file, also called a RAP file, that is compressed using either ZIP or JAR compression. You copy the archive file to the destination system and import the contents of the file into the system.

The following video highlights the basics of application migration:

Video transcript

Over the course of application development, an application usually moves across multiple environments. Generally, an application is developed in one environment, QAed in a different one, User Acceptance tested in another, and finally moved into a production environment when it is ready for release.

Transitioning back and forth between environments happens constantly in any development cycle. This fast pace, usually driven by a need for time-sensitive hotfixes and updates, can lead to issues during application migration. If not done correctly, applications could be migrated without certain features, user groups, external system data, etc. Planning a successful migration is easy with an integrated migration wizard that produces a consolidated package of all the essential components in your application.

Application packaging wizard

To avoid introducing errors when creating a product Rule and generating a RAP file, Pega Platform provides a tool called the Application Packaging wizard that guides you through the creation of a product Rule in a series of steps. The wizard identifies the items included at each step, which gives a developer the opportunity to identify missing components. For example, customized data instances that are associated with standard Rulesets, like the Google API key, can be added manually. You can also modify the product Rule from the Rule form itself.

Associating data instances with Rulesets

Associating data instances to a Ruleset simplifies application migration and maintenance. When you package an application for migration, you include an application's Rulesets. However, a Ruleset corresponds to a collection of Rules and does not include data instances such as operator IDs, Access Groups, database tables, and databases.

To help make packaging and migration of data instances easier, you associate data instances with Rulesets. By doing this, you do not need to specify each data instance in the product Rule. When you create the product Rule, the system automatically adds the data instances to the archive file automatically.

As a best practice, associate data instances with Rulesets. As you create data instances of certain classes, either manually or with a wizard, the system automatically associates the instance with one of the application's Rulesets.

The associated Ruleset appears in the Rule header. The following example provides an Access Group that is associated with the Purchasing Ruleset. You can change the associated Ruleset by clicking Edit. Update the Ruleset in the Associated Ruleset pop-up dialog.

associated ruleset 0

You can remove the Ruleset so that the data instance is not associated with any Ruleset. For example, you may have created operators for development or testing only. You can remove the Ruleset association from these operator IDs so that they are not automatically exported. Removing the associated Ruleset results in a guardrail warning.

associated ruleset warning 1394462938057 0

Associating a data instance with a Ruleset does not affect or restrict any run-time behavior. The data instance remains available to all applications regardless of the associated Ruleset.

Availability of imported Rules

If you import Rules in a Ruleset that users can already access, the Rules may begin executing immediately. These Rules may run before all the Rules in the same archive have been imported. Similarly, declarative Rules begin executing immediately. This means that the declarative processes might fail if the elements or properties they reference have not yet been uploaded. This needs to be planned for when an archive is imported on a system with active users.

Note: To learn more about importing Rules, see Using the Data Import Wizard.

Check your knowledge with the following interaction:


This Topic is available in the following Module:

If you are having problems with your training, please review the Pega Academy Support FAQs.

Did you find this content helpful?

Want to help us improve this content?

We'd prefer it if you saw us at our best.

Pega Academy has detected you are using a browser which may prevent you from experiencing the site as intended. To improve your experience, please update your browser.

Close Deprecation Notice