Back Forward More about Class rules
 

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

  Show all 

 

TipUse planning and care in creating class rules. Note these features and limitations.

 Terminology

Within this help system, 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

CautionAlthough 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. SR-3270 B-19797

 Application names

If you define a class derived from the Work- base class that is also the name of a class group, complete the 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 Description on the Class form appears as an application name on the portal. For users linked to that work pool through their access group, the Description text appears below the logo on the portal navigation panel. The application name determines the work types available when users enter new work objects.

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

 Final hyphen character in class names

By convention, a class name ending in a dash or hyphen (-) is an abstract class, with properties and attributes that are inherited by other abstract or concrete classes derived from it. As a best practice, follow this convention in the classes your development team creates.

 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)

 Reviewing class inheritance

TipUse the Class Inheritance diagram to confirm which classes are ancestor classes to a specific class, and the order in which Process Commander searches these classes during rule resolution using both pattern inheritance and directed inheritance. Select the Inheritance item from the Related Rules menu (Related Rules) to view the diagram. See About the Class Inheritance diagram.

 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 accelerator to create an external class, associated properties, and the database table instance. See About the Connector and Metadata accelerator.

 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> System > Tools > Refactor Rules > Delete a Class BYRNB 2/25/10 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. R-11901 BUG-2766

 Renaming a class

You can rename a class, updating all the rules that reference it. Select > System > Tools > Refactor Rules> Rename a Class. BYRNB 2/25/10 See About the Rename a Class wizard.

 No check-out; always available

No check out, always available

CautionChange class rules with care, noting these special conditions:

Definitions abstract class, base class, class, class group, concrete class, directed inheritance, external class, inheritance, internal class, pattern inheritance, rule resolution, work pool
Standard rules Atlas — Standard classes

UpAbout Class rules