More about Class Group data instances |
Creating appropriate class groups and the corresponding classes are important early steps in building an application.
All instances of classes that are associated with a class group share a common key definition and common lock definition. This allows the database software (such as, Oracle or Microsoft SQL Server) to save the instances as rows in one table in the PegaRULES database.
The common key format also ensures that the same database table is accessed when an instance is converted from one class (within a class group) to another class (in that same class group). For example, a work object may initially be entered incorrectly as a merchandise order, but later be reclassified as a merchandise return request. Both work types have the same key structure and belong to a common work pool (class group).
Class groups can help with database table management, backup, space, and reporting.
You can automatically create a class group while creating a Class rule (Rule-Obj-Class rule type). The new class (a rule) and the new class group (a data instance) have identical names.
To do this, select is a class group
for the This
class field on the Settings tab of
the Class form.
The names of all classes belonging to a common class group start with the class group name, followed by a dash character. For example, if you define a class group named Work-Object-Thorr-Task, the classes in the class group can be named Work-Object-Thorr-Task-Ordering, Work-Object-Thorr-Task-Shipping, and Work-Object-Thorr-Task-Billing.
For rule resolution purposes (not database storage purposes) classes in the class group can derive from (inherit rules from) the class with the same names as the class group, but this is not required. Because of directed inheritance, classes in the class group can inherit rules from elsewhere in the hierarchy.
For instance, in the above example, Work-Object-Thorr-Task-Ordering can be configured to inherit rules from Work-Object-, while the other two classes inherit from Work-Cover-Thorr-. All the classes in one class group, however, are associated with one common database table, regardless of their parent class for rule resolution purposes.
When one Process Commander system hosts two or more organizations using a common application, it is important that each organization have its own dedicated work pools. Work object numbering is per work pool; each organization can then have a work object numbered W-1234. B-6962 See How to replicate a class group and class structure.
If you use the Application Accelerator to create an initial application, the Accelerator creates a class group for the work pool automatically, incorporating good design practice.
If you do not use the Application Accelerator, designing a class group for a work pool and for the corresponding Work- classes involves several steps. Plan your work and follow the sequence listed here. These steps create one class group and one work pool.
Is
a class group
in the This class field. On the
Keys tab of the form, enter the property
pyID as the only key part. When you save the class form,
the system creates both the class you define, a history class, and a
Class Group data instance. Choose the Short
Description text carefully, it defines the application
name.is a member of a class
group
for these classes. Do not complete the
Keys array for these classes.The database key for instances in most cases consists of the class name concatenated with the instance name. However, the internal key for instances of a class in a class group consists of the name of the class group (which is the same as the name of the container class) concatenated with the instance name. (The instance name or internal key is formed from the values of the key part or parts.)
External classes cannot be part of a class group. Each external class has an associated Database Table instance (Data-Admin-DB-Table class).
class, container class, external class, internal key, Work- base class, work pool | |
Working with the PegaRULES database | |
Atlas — Initial Class Groups |