Back Forward Class form
Completing the General tab

About Activity rules

zzz Show all 

Use the General tab to define the class inheritance and database access.

CautionAfter you first save this form, your entries for many fields in this tab are permanently set and cannot be changed later. However, the Keys array is an exception. if you save the form with the Keys array blank, you can update the Class form later and complete Keys array to reference properties that are defined to apply to this class.

zzz How the system forms key values from the properties in the Keys array

Every object saved to the PegaRULES database — that is, every instance of a concrete class — must have a key formed from the value of properties that is unique within the class or class group.

For example, your system cannot contain two instances of the Data-Admin-Operator-ID class with an ID value of [email protected]. Similarly, your system cannot contain two HTML fragment rules named MyFragment in the same RuleSet and version.

The properties that form the key may apply to the concrete class itself or to a parent class. (For rule instances, the RuleSet and version are appended as part of the internal key.)

Process Commander looks in three places to learn which property values, in what order, to concatenate to form the unique key. The system assembles keys the first time it saves an instance:

zzz Completing the Settings fields

The appearance of the General tab changes depending on whether you enter a class group, keys, or neither. You cannot enter both a class group and keys. If you enter a class group, Process Commander uses keys defined in the class group.

CautionWhen you save the Class form, most of the choices you made become permanent. For example, you cannot later select or clear the Find by name first (Pattern)? box to use, and you cannot change properties entered in the Keys array.

Field

Description

Select

SmartPromptIndicate whether this class is to be abstract or concrete. Both abstract and concrete classes can have subclasses.

If this class is to have persistent instances, select Concrete. (You can't select Concrete if the class name ends in a dash.)

Otherwise select Abstract.

Settings  
Created in
Version

Identify the RuleSet version number that applies to this class. The Archive tools depend on the version you enter here. The Export Archive tool includes this class instance if you export this RuleSet version or a higher-numbered version.

However, version information in class rules is not used for rule resolution. You cannot define multiple class rules with the same class name but different versions.

CautionComplete this field when first creating a new class (with New or Save as). Alter this field later in rare circumstances only.

This Class

SmartPromptSelect one:

  • belongs to a class group to indicate that: (1) the key format of this class is identical to the key format of another class, (2) an existing class group named identically to the other class exists, and (3) you want to store instances of this class in the same table as instances of other member classes. Typically, choose this option for a concrete class derived from the Work- base class.
  • does not belong to a class group to indicate that database storage of this class is determined by the class inheritance and database table data instances.
  • is a class group to have Process Commander create a class group data instance with a name identical to the name of this class, This allows other classes to share a database table associated with instances of this class.

TipAs a best practice, choose belongs to a class group for any concrete class that is derived (according to pattern inheritance from a class that has This class set to is a class group. Otherwise, warning message may appear when you save the Class form. Although possible, avoid creating Database Table mappings for subclasses of a class group that differ from the Database Table for the entire class group.

NoteIf you create a class is derived from the Work- base class, and you selected is a class group, review the Short Description for this class carefully; the Short Description text is visible to application users. See More about Class rules.

NoteFor an external class created through the External Data Table wizard, the initial value is does not belong to a class group. Do not change this value.

Encrypt BLOB?

AdvancedSelect to cause Process Commander to encrypt the Storage Stream of each instance of this concrete class when saved to the PegaRULES database, and to decrypt the Storage Stream when an instance is retrieved from the database.

This check box appears only for concrete classes. It affects only instances of exactly this class, not instances of any subclasses of this class.

CautionDetermine whether you application is to use this feature early during the development project. You can't check, or clear, this box if the database already contains instances of the class.

Additional configuration is required to set up this capability. See Working with the PegaRULES database — How to enable encryption of the Storage Stream.

zzz About the Class Group field

This field appears only when is a class group or belongs to a class group is selected in the This class field. Confirm that the class group identified is the one expected.

Field

Description

Class Group

SmartPromptOptional. If you selected belongs to a class group, select a class group (an instance of the Data-Admin-DB-ClassGroup class) from the list. A class group — a data instance — has the same name as its first or defining container class.

The name of the class group you choose must match an initial portion of the class name.

Choose this option when defining one or several concrete classes that define types of work objects to be stored and processed as part of a single application.

If you enter a class group, leave the Keys array empty. In this case, the class group instance defines a common key structure used by all associated classes.

zzz Completing the Keys fields

The keys array appears only for concrete classes that either define a class group or that are do not belong to a class group.

If the Keys array appears, i9n many cases, you can leave it blank, at least when you first save the Class form:

Field

Description

Keys

zzzIf two or more properties are to form the key, the order of rows in this array is significant. Consider which order is likely to produce a natural or frequently presented sort order in reporting or searching.

For example, consider a class named Data-County, with a key formed from a county name (such as Suffolk, for Suffolk county) and state code (such as MA for Massachusetts). Assuming that reporting requirements present county information within state, a natural order for the two key parts is state followed by county.

Name

SmartPromptOptional. Leave blank if the concrete class is a subclass of a superclass that corresponds to a class group. Also, leave blank if a parent (or higher superclass) of this class is concrete and the key structure of this class is to be the same as the key structure of the parent.

Identify the property or properties that together define a unique key for objects of this class. If the property or properties that are to form the key are not yet defined, you can create them automatically the first time you save the Class form by entering a name here.

NoteIf the properties that are to make up the key are already defined (in a superclass), do not enter them initially. Save the Class form once, then use SmartPrompt to select them as rows in the Keys array, and then resave the Class form.

NoteTypically, the key of an object also determines how it is identified when locked. In the unusual case that a different key structure is needed, you can define a separate lock string on the Locking tab.

Caption

Optional. For concrete classes derived from Rule- or Data- for which a Form Builder form is present as a rule of type Rule-File-Form, this text appears as field labels in the New dialog box.

In other cases, you can enter text to document why you chose this property to be part of the key; the information you enter appears only in this field.

zzz Completing the Rule Instances of this class fields

AdvancedThese four check boxes appear only for concrete classes derived from the Rule- base class, with a few exceptions. They determine which parts of the full rule resolution algorithm the system uses to find rules of the new rule type. See How the system finds rules through rule resolution and How to create a custom rule type.

Field

Description

Rule Instances of This Class  
Allow multiple versions with the same key values? (rule resolution)

When selected causes the system to allow multiple rules of this rule type to have the same name, distinguished by RuleSet or RuleSet version. If this box is selected, at runtime Process Commander uses the RuleSet list part of the rule resolution algorithm for this class to select a rule at runtime.

Allow selection of rules based on property values? circumstance-qualified)

When selected, causes the system to allow rules of this rule type to have circumstance-based qualifications. If this box is selected, at runtime Process Commander uses circumstance-based processing at runtime to select a rule, and these fields appear on the Save As form. See circumstance.

This field appears only when the Allow multiple versions field is selected.

Allow rules that
are valid only for a certain period of time? (date range availability)

When selected, causes the system to allow rules of this rule type to have time-based qualifications. If this box is selected, Process Commander uses time-based processing at runtime to select a rule, and these fields appear on the Save As form. See time-based rules.

This field appears only when the Allow multiple versions field is selected.

Use class-based-inheritance toarrive at the
correct rule to execute?

When selected, causes the system to cause the system to search up the class inheritance structure (using both pattern and directed inheritance) to find rules of this rule type. If this box is not selected, at runtime Process Commander expects to find the rule in the current class only, not by searching through superclasses.

zzz Completing the Class Inheritance fields

Indicate how this class inherits rules from super classes.

Field

Description

Class Inheritance  
Find by name first (Pattern)?

Select to cause the system to use pattern inheritance before it uses directed inheritance when finding rules at runtime. Pattern inheritance searches superclasses based on prefixes of the class name that end in a dash character.

Clear this box to bypass pattern inheritance. Directed inheritance always occurs for all rule types with an Applies To key part.

If you selected belongs to a class group, this box is selected.

After you save a Class form, you cannot change this setting.

Parent class (Directed)

SmartPromptIdentify the class that is to be the immediate parent of this class:

  • If you don't check the Find by name first (Pattern)? box, then at runtime as part of rule resolution processing, the system searches the parent class and its parent and so on when it cannot find a rule in the current class.
  • If you check the Find by name first (Pattern)? box, the system during rule resolution searches classes with derived class names before it searches the parent class identified in this field.

NoteAfter you save the Class form, you can use the Class Inheritance display to review the ancestor classes of this class and the order they are searched.

NoteIf you selected is a class group in the This class field, enter Work- or a class that is derived from the Work- base class here.

NoteIf you enter in this field the longest possible prefix of this class ending in a dash character, you can select or clear the Find by name first (Pattern)? box, with no difference in rule resolution behavior or results. For example, if this class is named Work-Object-Mortgage and the parent class is to be Work-Object-, Process Commander performs the same search regardless of the check box setting.

Note Do not assume that the "inherits from" relationship is transitive. Because only one Parent class to inherit from (Directed) value is used by a rule resolution, it is possible that class C inherits from class B, and B inherits from A, but C does not inherit from A.

NoteYou cannot create a class derived from the Code- or System- base classes. These base classes are reserved.

zzz Testing the class-to-database table mapping

For a concrete class, you can test the database connection and learn the table structure.

Test Connection to Database Table  
 Test Connection  

After you save the Class form, click to confirm that the database instance (Data-Admin-DB-Name) and database table instance (Data-Admin-DB-Table) are working as intended. The test confirms that Process Commander can access the database and displays the database table that will contain instances of this class.

Results appear in a new window, identifying the database and database table that correspond to this concrete class, and whether the class is an internal or external class.

This button appears only for concrete classes.

zzz How to include properties in a class as key parts of that class

As you complete the Key Name fields while adding a class, you can only reference existing property rules. If a key part for your new class is a property that will apply to the new class, you cannot create the property until after you create and save the class rule.

Take these steps to work around this circular situation:

  1. Save the class rule with the Keys array empty; no keys defined.
  2. Define properties that are to form the keys in the class in the normal way.
  3. Open the class rule again, and enter the key properties into the Keys array of the General tab.
  4. Save the class rule again.

zzz About Class rules