You are here: Reference > Rule types > Classes > More about Class rules

More about Class rules

  1. About
  2. New
  3. General
  4. Locking
  5. External Mapping
  6. Advanced
  7. History
  1. More...

Plan well before creating class rules, keeping in mind the following features and limitations.

Terminology

The term class refers to a Rule-Obj-Class instance. The terms Java class, Java method, and Java object refer to the Java program files and objects.

A concrete class derived from the Rule- base class is sometimes called a rule type. A concrete class derived from the Work- base class is sometimes called a work type.

Version locking

Although class rules are associated with a RuleSet and a version, they do not belong to any specific version of that RuleSet.

Locking a RuleSet version (by checking the Lock this Version box) does not prevent later changes to class rules associated with the RuleSet, if any version of that RuleSet is not locked.

When all versions of a RuleSet are locked, you cannot update or delete classes associated with that RuleSet.

Class group short descriptions

If you define a class derived from the Work- base class that is also the name of a class group, complete the Short Description carefully. Choose a description that is meaningful to application users.

Often, all the work types in an application belong to one class group; it is known as a work pool. If you selected is a class group on the General tab, the Short Description on the Class form appears in the Switch Work Pool selection on the Designer Studio Application menu and on the Work Pool Selector in the Case Manager portal.

For example, for the standard class named PegaSample-, the Short Description is Sample Work.

Container class for a Class group

Special planning and care is required to create the classes that together are to become a class group:

  1. Create one class first (known informally as the container class). Identify or define the properties that form its key, and record these properties in the Key area of the Class form. All classes derived from that class group (based on pattern inheritance) will share this key structure.
  2. Create the class group instance, with the container class name as the class group name. (This occurs automatically in many cases.)
  3. Update the container class rule to reflect that it now is within the newly created class group.
  4. Create other classes that are to be in the class group, and associate them with the class group (no explicit key fields).

History classes

When you create certain classes, the system automatically creates a related history class with a similar name, but derived from the History- base class. For example, if you create a class named MyCo-LoanApplications, the system also creates the class History-MyCo-LoanApplications.

External classes

An external class is a concrete class that corresponds to a table in an external database rather than a table in the PegaRULES database. Use the Connector and Metadata wizard to create an external class, associated properties, and the database table instance. See About the Connector and Metadata wizard.

Deleting classes

You cannot delete a class rule that contains subclasses or that contains instances.

To delete a class rule, use the Delete a Class tool. Select Designer Studio > System > Refactor> Rules > Delete a Class to start the tool. See About the Delete a Class tool.

If the associated History- class contains no instances, deleting a class that has an associated History- class deletes the History- class too (if it has no instances), and all rules that apply to that class.

Renaming a class

You can rename a class, updating all the rules that reference it. Select Designer Studio > System > Refactor> Rules > Rename a Class. See About the Rename a Class wizard.

No check-out; always available

Use caution when changing class rules, noting the following conditions:

About Class rules